@zeniai/web-cockpit-ui 2.0.62-dev → 2.0.62-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/CreditAgentRoutes-CHOmROOx.js +4 -0
- package/dist/assets/Preview-Ciq7dXYi-BIomkdVS.js +1 -0
- package/dist/assets/ScreenRoutes-B7wjlCly.js +185 -0
- package/dist/assets/SignInScreen-o-4PPERX.js +1 -0
- package/dist/assets/__vite-browser-external-FmFgRqLi-Bre4IUow.js +1 -0
- package/dist/assets/{analytics-D2hq1pB4.js → analytics-BPGO8b57.js} +1 -1
- package/dist/assets/{analyticsHelper-Duy8p9G0.js → analyticsHelper-DKbII6U3.js} +1 -1
- package/dist/assets/core-CAP-FD3g.js +12 -0
- package/dist/assets/dash.all.min-D0CkNF8g-D9_yOFId.js +21 -0
- package/dist/assets/epic-CzgzIV8O.js +2 -0
- package/dist/assets/hls-fD7GzkMr-CIetwlf6.js +40 -0
- package/dist/assets/index-CUe3JVOn.js +80686 -0
- package/dist/assets/index-C_rFPbpi-BmvLnHwU.js +3299 -0
- package/dist/assets/index-CsCrKvDl-c6qvDLig.js +2 -0
- package/dist/assets/index-DVThwdcI.css +1 -0
- package/dist/assets/lexical-CJELSiUm.js +1 -0
- package/dist/assets/{liveblocks-DtPrLDJS.js → liveblocks-gBcidJDD.js} +15 -15
- package/dist/assets/lottie-DBV1jHLR.js +1 -0
- package/dist/assets/mixin-XJuHfVsL-BC7tPWd5.js +43 -0
- package/dist/assets/mui-DXk9y9I2.js +9 -0
- package/dist/assets/react-3LeYKPCr-DQYxrxzx.js +6 -0
- package/dist/assets/react-6Tvfe2S2-C3HExdIT.js +19 -0
- package/dist/assets/react-B2-P-PS--jKLPCF39.js +19 -0
- package/dist/assets/react-CWXWcDMY-jdgkuHu3.js +17 -0
- package/dist/assets/react-CWt3gw2R-D9htCvfo.js +21 -0
- package/dist/assets/react-CytUn6Kg-3TKlgJbg.js +22 -0
- package/dist/assets/react-G6j-OGKl-GY4UOU2R.js +34 -0
- package/dist/assets/react-kuaGVSkA-CwkG8qcH.js +7 -0
- package/dist/assets/recharts-CJELSiUm.js +1 -0
- package/dist/assets/{sentry-DGdrGMts.js → sentry-BwzxWoLh.js} +2 -2
- package/dist/assets/utils-7tk2ftkc.js +36 -0
- package/dist/assets/{zeni-epic-state-BrXQ4qCB.js → zeni-epic-state-DAp72fC9.js} +6 -6
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/CreditAgentRoutes-Dfd0Kd6I.js +0 -4
- package/dist/assets/Preview-IR8wZl18.js +0 -1
- package/dist/assets/ScreenRoutes-CWwjG5zs.js +0 -180
- package/dist/assets/SignInScreen-D3CJKpcD.js +0 -1
- package/dist/assets/core-Bd7Ijkb8.js +0 -12
- package/dist/assets/dash.all.min-DEn1t6rn.js +0 -21
- package/dist/assets/empty-BWs4yw6m.js +0 -1
- package/dist/assets/empty-Cuv-JavI.js +0 -1
- package/dist/assets/epic-BEruqsXy.js +0 -2
- package/dist/assets/hls-DifHSkbp.js +0 -40
- package/dist/assets/index-B4tJfZBM.js +0 -1
- package/dist/assets/index-BHnFF6Mj.js +0 -3304
- package/dist/assets/index-Ddpazk8i.js +0 -1
- package/dist/assets/index-ICxwMH4m.js +0 -1
- package/dist/assets/index-IYkmdsJO.js +0 -80176
- package/dist/assets/index-aPW1WLF7.js +0 -2
- package/dist/assets/index-aa1-CqLI.js +0 -1
- package/dist/assets/index-y98xvd7i.css +0 -1
- package/dist/assets/lexical-DUprPrXL.js +0 -21
- package/dist/assets/lottie-CxiyciuX.js +0 -2
- package/dist/assets/mixin-BPAPQfSE.js +0 -43
- package/dist/assets/mui-7i_-G9Wo.js +0 -9
- package/dist/assets/react-BP_tYIvG.js +0 -17
- package/dist/assets/react-BUCt2wJF.js +0 -21
- package/dist/assets/react-BmixicuU.js +0 -34
- package/dist/assets/react-D0Ona832.js +0 -19
- package/dist/assets/react-D1eycK3j.js +0 -7
- package/dist/assets/react-DZOlfJ3z.js +0 -6
- package/dist/assets/react-Da7CbJkT.js +0 -19
- package/dist/assets/react-Dy5N-1E1.js +0 -22
- package/dist/assets/recharts-ukUg8EgD.js +0 -65
- package/dist/assets/url-B6X-Y6dN.js +0 -6
- package/dist/assets/url-BHD2x5lb.js +0 -1
- package/dist/assets/utils-DOKAIlnQ.js +0 -36
|
@@ -0,0 +1,3299 @@
|
|
|
1
|
+
import{e as Er,a as yr,b as la}from"./sentry-BwzxWoLh.js";import{u as Lb}from"./hls-fD7GzkMr-CIetwlf6.js";import{M as Mb,s as xr}from"./mixin-XJuHfVsL-BC7tPWd5.js";(function(){try{var t=typeof window<"u"?window:typeof la<"u"?la:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="df5ca703-2834-40b4-b784-c54d1c7b1a30",t._sentryDebugIdIdentifier="sentry-dbid-df5ca703-2834-40b4-b784-c54d1c7b1a30")}catch{}})();var xb=Object.create,Lc=Object.defineProperty,Nb=Object.getOwnPropertyDescriptor,Ob=Object.getOwnPropertyNames,Pb=Object.getPrototypeOf,Ub=Object.prototype.hasOwnProperty,Zm=function(t,e){return function(){return t&&(e=t(t=0)),e}},$e=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},rt=function(t,e,n){return n=t!=null?xb(Pb(t)):{},function(i,a,r,s){if(a&&typeof a=="object"||typeof a=="function")for(var o,l=Ob(a),d=0,u=l.length;d<u;d++)o=l[d],!Ub.call(i,o)&&o!==r&&Lc(i,o,{get:(function(c){return a[c]}).bind(null,o),enumerable:!(s=Nb(a,o))||s.enumerable});return i}(t&&t.__esModule?n:Lc(n,"default",{value:t,enumerable:!0}),t)},Kt=$e(function(t,e){var n;n=typeof window<"u"?window:typeof la<"u"?la:typeof self<"u"?self:{},e.exports=n});function ri(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):ri(t,e)}var si=Zm(function(){si()});function zm(t){return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var Xm=Zm(function(){}),Jm=$e(function(t,e){var n=Array.prototype.slice;e.exports=function(i,a){for(("length"in i)||(i=[i]),i=n.call(i);i.length;){var r=i.shift(),s=a(r);if(s)return s;r.childNodes&&r.childNodes.length&&(i=n.call(r.childNodes).concat(i))}}}),Hb=$e(function(t,e){function n(i,a){if(!ri(this,n))return new n(i,a);this.data=i,this.nodeValue=i,this.length=i.length,this.ownerDocument=a||null}si(),e.exports=n,n.prototype.nodeType=8,n.prototype.nodeName="#comment",n.prototype.toString=function(){return"[object Comment]"}}),Wb=$e(function(t,e){function n(i,a){if(!ri(this,n))return new n(i);this.data=i||"",this.length=this.data.length,this.ownerDocument=a||null}si(),e.exports=n,n.prototype.type="DOMTextNode",n.prototype.nodeType=3,n.prototype.nodeName="#text",n.prototype.toString=function(){return this.data},n.prototype.replaceData=function(i,a,r){var s=this.data,o=s.substring(0,i),l=s.substring(i+a,s.length);this.data=o+r+l,this.length=this.data.length}}),ep=$e(function(t,e){e.exports=function(n){var i=this,a=n.type;n.target||(n.target=i),i.listeners||(i.listeners={});var r=i.listeners[a];if(r)return r.forEach(function(s){n.currentTarget=i,typeof s=="function"?s(n):s.handleEvent(n)});i.parentNode&&i.parentNode.dispatchEvent(n)}}),tp=$e(function(t,e){e.exports=function(n,i){var a=this;a.listeners||(a.listeners={}),a.listeners[n]||(a.listeners[n]=[]),a.listeners[n].indexOf(i)===-1&&a.listeners[n].push(i)}}),np=$e(function(t,e){e.exports=function(n,i){var a=this;if(a.listeners&&a.listeners[n]){var r=a.listeners[n],s=r.indexOf(i);s!==-1&&r.splice(s,1)}}}),Bb=$e(function(t,e){Xm(),e.exports=i;var n=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function i(o){switch(o.nodeType){case 3:return s(o.data);case 8:return"<!--"+o.data+"-->";default:return function(l){var d=[],u=l.tagName;return l.namespaceURI==="http://www.w3.org/1999/xhtml"&&(u=u.toLowerCase()),d.push("<"+u+function(c){var m=[];for(var p in c)a(c,p)&&m.push({name:p,value:c[p]});for(var v in c._attributes)for(var b in c._attributes[v]){var f=c._attributes[v][b],T=(f.prefix?f.prefix+":":"")+b;m.push({name:T,value:f.value})}return c.className&&m.push({name:"class",value:c.className}),m.length?r(m):""}(l)+function(c){var m=c.dataset,p=[];for(var v in m)p.push({name:"data-"+v,value:m[v]});return p.length?r(p):""}(l)),n.indexOf(u)>-1?d.push(" />"):(d.push(">"),l.childNodes.length?d.push.apply(d,l.childNodes.map(i)):l.textContent||l.innerText?d.push(s(l.textContent||l.innerText)):l.innerHTML&&d.push(l.innerHTML),d.push("</"+u+">")),d.join("")}(o)}}function a(o,l){var d=zm(o[l]);return l==="style"&&Object.keys(o.style).length>0||o.hasOwnProperty(l)&&(d==="string"||d==="boolean"||d==="number")&&l!=="nodeName"&&l!=="className"&&l!=="tagName"&&l!=="textContent"&&l!=="innerText"&&l!=="namespaceURI"&&l!=="innerHTML"}function r(o){var l=[];return o.forEach(function(d){var u=d.name,c=d.value;u==="style"&&(c=function(m){if(typeof m=="string")return m;var p="";return Object.keys(m).forEach(function(v){var b=m[v];v=v.replace(/[A-Z]/g,function(f){return"-"+f.toLowerCase()}),p+=v+":"+b+";"}),p}(c)),l.push(u+'="'+function(m){return s(m).replace(/"/g,""")}(c)+'"')}),l.length?" "+l.join(" "):""}function s(o){var l="";return typeof o=="string"?l=o:o&&(l=o.toString()),l.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}),ip=$e(function(t,e){si();var n=Jm(),i=ep(),a=tp(),r=np(),s=Bb(),o="http://www.w3.org/1999/xhtml";function l(d,u,c){if(!ri(this,l))return new l(d);var m=c===void 0?o:c||null;this.tagName=m===o?String(d).toUpperCase():d,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=u||null,this.namespaceURI=m,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}e.exports=l,l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(d){return d.parentNode&&d.parentNode.removeChild(d),this.childNodes.push(d),d.parentNode=this,d},l.prototype.replaceChild=function(d,u){d.parentNode&&d.parentNode.removeChild(d);var c=this.childNodes.indexOf(u);return u.parentNode=null,this.childNodes[c]=d,d.parentNode=this,u},l.prototype.removeChild=function(d){var u=this.childNodes.indexOf(d);return this.childNodes.splice(u,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,u){d.parentNode&&d.parentNode.removeChild(d);var c=u==null?-1:this.childNodes.indexOf(u);return c>-1?this.childNodes.splice(c,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,u,c){var m=null,p=u,v=u.indexOf(":");v>-1&&(m=u.substr(0,v),p=u.substr(v+1)),this.tagName==="INPUT"&&u==="type"?this.type=c:(this._attributes[d]||(this._attributes[d]={}))[p]={value:c,prefix:m}},l.prototype.getAttributeNS=function(d,u){var c=this._attributes[d],m=c&&c[u]&&c[u].value;return this.tagName==="INPUT"&&u==="type"?this.type:typeof m!="string"?null:m},l.prototype.removeAttributeNS=function(d,u){var c=this._attributes[d];c&&delete c[u]},l.prototype.hasAttributeNS=function(d,u){var c=this._attributes[d];return!!c&&u in c},l.prototype.setAttribute=function(d,u){return this.setAttributeNS(null,d,u)},l.prototype.getAttribute=function(d){return this.getAttributeNS(null,d)},l.prototype.removeAttribute=function(d){return this.removeAttributeNS(null,d)},l.prototype.hasAttribute=function(d){return this.hasAttributeNS(null,d)},l.prototype.removeEventListener=r,l.prototype.addEventListener=a,l.prototype.dispatchEvent=i,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(d){var u=d.split(" "),c=[];return n(this,function(m){if(m.nodeType===1){var p=(m.className||"").split(" ");u.every(function(v){return p.indexOf(v)!==-1})&&c.push(m)}}),c},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var u=[];return n(this.childNodes,function(c){c.nodeType===1&&(d==="*"||c.tagName.toLowerCase()===d)&&u.push(c)}),u},l.prototype.contains=function(d){return n(this,function(u){return d===u})||!1}}),Vb=$e(function(t,e){si();var n=ip();function i(a){if(!ri(this,i))return new i;this.childNodes=[],this.parentNode=null,this.ownerDocument=a||null}e.exports=i,i.prototype.type="DocumentFragment",i.prototype.nodeType=11,i.prototype.nodeName="#document-fragment",i.prototype.appendChild=n.prototype.appendChild,i.prototype.replaceChild=n.prototype.replaceChild,i.prototype.removeChild=n.prototype.removeChild,i.prototype.toString=function(){return this.childNodes.map(function(a){return String(a)}).join("")}}),$b=$e(function(t,e){function n(i){}e.exports=n,n.prototype.initEvent=function(i,a,r){this.type=i,this.bubbles=a,this.cancelable=r},n.prototype.preventDefault=function(){}}),qb=$e(function(t,e){si();var n=Jm(),i=Hb(),a=Wb(),r=ip(),s=Vb(),o=$b(),l=ep(),d=tp(),u=np();function c(){if(!ri(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}e.exports=c;var m=c.prototype;m.createTextNode=function(p){return new a(p,this)},m.createElementNS=function(p,v){var b=p===null?null:String(p);return new r(v,this,b)},m.createElement=function(p){return new r(p,this)},m.createDocumentFragment=function(){return new s(this)},m.createEvent=function(p){return new o(p)},m.createComment=function(p){return new i(p,this)},m.getElementById=function(p){return p=String(p),n(this.childNodes,function(v){if(String(v.id)===p)return v})||null},m.getElementsByClassName=r.prototype.getElementsByClassName,m.getElementsByTagName=r.prototype.getElementsByTagName,m.contains=r.prototype.contains,m.removeEventListener=u,m.addEventListener=d,m.dispatchEvent=l}),Kb=$e(function(t,e){var n=qb();e.exports=new n}),ap=$e(function(t,e){var n,i=typeof la<"u"?la:typeof window<"u"?window:{},a=Kb();typeof document<"u"?n=document:(n=i["__GLOBAL_DOCUMENT_CACHE@4"])||(n=i["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=n});function td(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function rp(t,e){if(t){if(typeof t=="string")return td(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return td(t,e)}}function an(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,i){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var r,s,o=[],l=!0,d=!1;try{for(a=a.call(n);!(l=(r=a.next()).done)&&(o.push(r.value),!i||o.length!==i);l=!0);}catch(u){d=!0,s=u}finally{try{!l&&a.return!=null&&a.return()}finally{if(d)throw s}}return o}}(t,e)||rp(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var tr=rt(Kt()),Mc=rt(Kt()),Fb=rt(Kt()),xe={now:function(){var t=Fb.default.performance,e=t&&t.timing,n=e&&e.navigationStart,i=typeof n=="number"&&typeof t.now=="function"?n+t.now():Date.now();return Math.round(i)}},_r=function(){var t,e,n;if(typeof((t=Mc.default.crypto)===null||t===void 0?void 0:t.getRandomValues)=="function"){n=new Uint8Array(32),Mc.default.crypto.getRandomValues(n);for(var i=0;i<32;i++)n[i]=n[i]%16}else{n=[];for(var a=0;a<32;a++)n[a]=16*Math.random()|0}var r=0;e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(l){var d=l==="x"?n[r]:3&n[r]|8;return r++,d.toString(16)});var s=xe.now(),o=s?.toString(16).substring(3);return o?e.substring(0,28)+o:e},sp=function(){return("000000"+(Math.random()*Math.pow(36,6)|0).toString(36)).slice(-6)},ct=function(t){if(t&&t.nodeName!==void 0)return t.muxId||(t.muxId=sp()),t.muxId;var e;try{e=document.querySelector(t)}catch{}return e&&!e.muxId&&(e.muxId=t),e?.muxId||t},is=function(t){var e;t&&t.nodeName!==void 0?t=ct(e=t):e=document.querySelector(t);var n=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,t,n]};function ht(t){return function(e){if(Array.isArray(e))return td(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||rp(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var Yb=0,op=1,Gb=2,lp=3,jb=4,X=function(t){var e,n,i,a,r,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,o=[console,t],l=(e=console.trace).bind.apply(e,ht(o)),d=(n=console.info).bind.apply(n,ht(o)),u=(i=console.debug).bind.apply(i,ht(o)),c=(a=console.warn).bind.apply(a,ht(o)),m=(r=console.error).bind.apply(r,ht(o)),p=s;return{trace:function(){for(var v=arguments.length,b=new Array(v),f=0;f<v;f++)b[f]=arguments[f];if(!(p>Yb))return l.apply(void 0,ht(b))},debug:function(){for(var v=arguments.length,b=new Array(v),f=0;f<v;f++)b[f]=arguments[f];if(!(p>op))return u.apply(void 0,ht(b))},info:function(){for(var v=arguments.length,b=new Array(v),f=0;f<v;f++)b[f]=arguments[f];if(!(p>Gb))return d.apply(void 0,ht(b))},warn:function(){for(var v=arguments.length,b=new Array(v),f=0;f<v;f++)b[f]=arguments[f];if(!(p>lp))return c.apply(void 0,ht(b))},error:function(){for(var v=arguments.length,b=new Array(v),f=0;f<v;f++)b[f]=arguments[f];if(!(p>jb))return m.apply(void 0,ht(b))},get level(){return p},set level(v){v!==this.level&&(p=v??s)}}}("[mux]"),al=rt(Kt());function nd(){return(al.default.doNotTrack||al.default.navigator&&al.default.navigator.doNotTrack)==="1"}function O(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function we(t,e){if(!ri(t,e))throw new TypeError("Cannot call a class as a function")}function Ft(t,e,n){return e&&function(i,a){for(var r=0;r<a.length;r++){var s=a[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(i,s.key,s)}}(t.prototype,e),t}function S(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tr(t){return(Tr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function id(t,e,n){return id=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,a,r){var s=function(l,d){for(;!Object.prototype.hasOwnProperty.call(l,d)&&(l=Tr(l))!==null;);return l}(i,a);if(s){var o=Object.getOwnPropertyDescriptor(s,a);return o.get?o.get.call(r||i):o.value}},id(t,e,n||t)}function dp(t,e){return(dp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n})(t,e)}function Qb(t,e){if(t==null)return{};var n,i,a=function(s,o){if(s==null)return{};var l,d,u={},c=Object.keys(s);for(d=0;d<c.length;d++)l=c[d],!(o.indexOf(l)>=0)&&(u[l]=s[l]);return u}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function Zb(t){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,i=Tr(t);if(e){var a=Tr(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(r,s){return!s||zm(s)!=="object"&&typeof s!="function"?O(r):s}(this,n)}}si(),Xm();var ft=function(t){return Ar(t)[0]},Ar=function(t){if(typeof t!="string"||t==="")return["localhost"];var e,n=(t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return n&&(e=(n.match(/[^\.]+\.[^\.]+$/)||[])[0]),[n,e]},rl=rt(Kt()),as={exists:function(){var t=rl.default.performance;return(t&&t.timing)!==void 0},domContentLoadedEventEnd:function(){var t=rl.default.performance,e=t&&t.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var t=rl.default.performance,e=t&&t.timing;return e&&e.navigationStart}};function ke(t,e,n){n=n===void 0?1:n,t[e]=t[e]||0,t[e]+=n}function Io(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),i.forEach(function(a){S(t,a,n[a])})}return t}function $u(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):function(n){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);i.push.apply(i,a)}return i}(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}var up=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],zb=["x-cdn","content-type"].concat(up);function qu(t){var e={};return(t=t||"").trim().split(/[\r\n]+/).forEach(function(n){if(n){var i=n.split(": "),a=i.shift();a&&(zb.indexOf(a.toLowerCase())>=0||a.toLowerCase().indexOf("x-litix-")===0)&&(e[a]=i.join(": "))}}),e}function So(t){if(t){var e=up.find(function(n){return t[n]!==void 0});return e?t[e]:void 0}}var cp=function(t){var e={};for(var n in t){var i=t[n];i["DATA-ID"].search("io.litix.data.")!==-1&&(e[i["DATA-ID"].replace("io.litix.data.","")]=i.VALUE)}return e},Nr=function(t){if(!t)return{};var e=as.navigationStart(),n=t.loading,i=n?n.start:t.trequest,a=n?n.first:t.tfirst,r=n?n.end:t.tload;return{bytesLoaded:t.total,requestStart:Math.round(e+i),responseStart:Math.round(e+a),responseEnd:Math.round(e+r)}},ba=function(t){if(t&&typeof t.getAllResponseHeaders=="function")return qu(t.getAllResponseHeaders())},xc=function(t,e){if(!t||!t.requestEndDate)return{};var n,i=ft(t.url),a=t.url,r=t.bytesLoaded,s=new Date(t.requestStartDate).getTime(),o=new Date(t.firstByteDate).getTime(),l=new Date(t.requestEndDate).getTime(),d=isNaN(t.duration)?0:t.duration,u=typeof e.getMetricsFor=="function"?e.getMetricsFor(t.mediaType).HttpList:e.getDashMetrics().getHttpRequests(t.mediaType);return u.length>0&&(n=qu(u[u.length-1]._responseHeaders||"")),{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:r,requestResponseHeaders:n,requestMediaDuration:d,requestHostname:i,requestUrl:a,requestId:n?So(n):void 0}},Xb=function(t){var e;return(e=t.match(/.*codecs\*?="(.*)"/))===null||e===void 0?void 0:e[1]},Jb=function(t,e,n){var i=t.log;if(n&&n.on){var a=function(b){try{var f,T;return(T=b.getVersion)===null||T===void 0||(f=T.call(b))===null||f===void 0?void 0:f.split(".").map(function(A){return parseInt(A)})[0]}catch{return!1}}(n),r=function(b,f){return t.emit(e,b,f)},s=function(b){var f=b.type,T=(b.data||{}).url;r("requestcompleted",{request_event_type:f,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:ft(T),request_url:T})};n.on("manifestLoaded",s);var o={},l=function(b){if(typeof b.getRequests!="function")return null;var f=b.getRequests({state:"executed"});return f.length===0?null:f[f.length-1]},d=function(b){var f=b.type,T=b.chunk,A=b.request,E=(T||{}).mediaInfo||{},_=E.type,w=E.bitrateList,I={};(w=w||[]).forEach(function(He,Ee){I[Ee]={},I[Ee].width=He.width,I[Ee].height=He.height,I[Ee].bitrate=He.bandwidth,I[Ee].attrs={}}),_==="video"?o.video=I:_==="audio"?o.audio=I:o.media=I;var D=xc(A,n),V=D.requestStart,$=D.requestResponseStart,F=D.requestResponseEnd,re=D.requestResponseHeaders,oe=D.requestMediaDuration,J=D.requestHostname,ee=D.requestUrl,Ne=D.requestId;r("requestcompleted",{request_event_type:f,request_start:V,request_response_start:$,request_response_end:F,request_bytes_loaded:-1,request_type:_+"_init",request_response_headers:re,request_hostname:J,request_id:Ne,request_url:ee,request_media_duration:oe,request_rendition_lists:o})};a>=4?n.on("initFragmentLoaded",d):n.on("initFragmentLoaded",function(b){var f=b.type,T=b.fragmentModel,A=b.chunk,E=l(T);d({type:f,request:E,chunk:A})});var u=function(b){var f=b.type,T=b.chunk,A=b.request,E=T||{},_=E.mediaInfo,w=E.start,I=(_||{}).type,D=xc(A,n),V=D.requestStart,$=D.requestResponseStart,F=D.requestResponseEnd,re=D.requestBytesLoaded,oe=D.requestResponseHeaders,J=D.requestMediaDuration,ee=D.requestHostname,Ne=D.requestUrl,He=D.requestId,Ee=function(yt,Ke){var Oe=Ke.getQualityFor(yt),st=Ke.getCurrentTrackFor(yt).bitrateList;return st?{currentLevel:Oe,renditionWidth:st[Oe].width||null,renditionHeight:st[Oe].height||null,renditionBitrate:st[Oe].bandwidth}:{}}(I,n),de=Ee.currentLevel,qe=Ee.renditionWidth,Yt=Ee.renditionHeight,Gt=Ee.renditionBitrate;r("requestcompleted",{request_event_type:f,request_start:V,request_response_start:$,request_response_end:F,request_bytes_loaded:re,request_type:I,request_response_headers:oe,request_hostname:ee,request_id:He,request_url:Ne,request_media_start_time:w,request_media_duration:J,request_current_level:de,request_labeled_bitrate:Gt,request_video_width:qe,request_video_height:Yt})};a>=4?n.on("mediaFragmentLoaded",u):n.on("mediaFragmentLoaded",function(b){var f=b.type,T=b.fragmentModel,A=b.chunk,E=l(T);u({type:f,request:E,chunk:A})});var c={video:void 0,audio:void 0,totalBitrate:void 0},m=function(b,f,T){if(typeof b.newQuality=="number"){var A=b.mediaType;if(A==="audio"||A==="video"){var E=n.getBitrateInfoListFor(A).find(function(w){return w.qualityIndex===b.newQuality});if(!E||typeof E.bitrate!="number")return void i.warn("missing bitrate info for ".concat(A));c[A]=$u(Io({},E),{codec:n.getCurrentTrackFor(A).codec});var _=function(){if(c.video&&typeof c.video.bitrate=="number"){if(!c.video.width||!c.video.height)return void i.warn("have bitrate info for video but missing width/height");var w=c.video.bitrate;if(c.audio&&typeof c.audio.bitrate=="number"&&(w+=c.audio.bitrate),w!==c.totalBitrate)return c.totalBitrate=w,{video_source_bitrate:w,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:Xb(c.video.codec)}}}();_&&r("renditionchange",_)}}else i.warn("missing evt.newQuality in qualityChangeRendered event",b)};n.on("qualityChangeRendered",m);var p=function(b){var f=b.request,T=b.mediaType;r("requestcanceled",{request_event_type:(f=f||{}).type+"_"+f.action,request_url:f.url,request_type:T,request_hostname:ft(f.url)})};n.on("fragmentLoadingAbandoned",p);var v=function(b){var f,T,A=b.error,E=(A==null||(f=A.data)===null||f===void 0?void 0:f.request)||{},_=(A==null||(T=A.data)===null||T===void 0?void 0:T.response)||{};A?.code===27&&r("requestfailed",{request_error:E.type+"_"+E.action,request_url:E.url,request_hostname:ft(E.url),request_type:E.mediaType,request_error_code:_.status,request_error_text:_.statusText});var w="".concat(E!=null&&E.url?"url: ".concat(E.url,`
|
|
4
|
+
`):"")+"".concat(_!=null&&_.status||_!=null&&_.statusText?"response: ".concat(_?.status,", ").concat(_?.statusText,`
|
|
5
|
+
`):"");r("error",{player_error_code:A?.code,player_error_message:A?.message,player_error_context:w})};n.on("error",v),n._stopMuxMonitor=function(){n.off("manifestLoaded",s),n.off("initFragmentLoaded",d),n.off("mediaFragmentLoaded",u),n.off("qualityChangeRendered",m),n.off("error",v),n.off("fragmentLoadingAbandoned",p),delete n._stopMuxMonitor}}else i.warn("Invalid dash.js player reference. Monitoring blocked.")},Nc=0,ef=function(){function t(){we(this,t),S(this,"_listeners",void 0)}return Ft(t,[{key:"on",value:function(e,n,i){return n._eventEmitterGuid=n._eventEmitterGuid||++Nc,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(n=n.bind(i)),this._listeners[e].push(n),n}},{key:"off",value:function(e,n){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(a,r){a._eventEmitterGuid===n._eventEmitterGuid&&i.splice(r,1)})}},{key:"one",value:function(e,n,i){var a=this;n._eventEmitterGuid=n._eventEmitterGuid||++Nc;var r=function(){a.off(e,r),n.apply(i||this,arguments)};r._eventEmitterGuid=n._eventEmitterGuid,this.on(e,r)}},{key:"emit",value:function(e,n){var i=this;if(this._listeners){n=n||{};var a=this._listeners["before"+e]||[],r=this._listeners["before*"]||[],s=this._listeners[e]||[],o=this._listeners["after"+e]||[],l=function(d,u){(d=d.slice()).forEach(function(c){c.call(i,{type:e},u)})};l(a,n),l(r,n),l(s,n),l(o,n)}}}]),t}(),sl=rt(Kt()),tf=function(){function t(e){var n=this;we(this,t),S(this,"_playbackHeartbeatInterval",void 0),S(this,"_playheadShouldBeProgressing",void 0),S(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",function(){n._playheadShouldBeProgressing=!0}),e.on("play",this._startPlaybackHeartbeatInterval.bind(this)),e.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),e.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),e.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("seeked",function(){e.data.player_is_paused?n._stopPlaybackHeartbeatInterval():n._startPlaybackHeartbeatInterval()}),e.on("timeupdate",function(){n._playbackHeartbeatInterval!==null&&e.emit("playbackheartbeat")}),e.on("devicesleep",function(i,a){n._playbackHeartbeatInterval!==null&&(sl.default.clearInterval(n._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:a.viewer_time}),n._playbackHeartbeatInterval=null)})}return Ft(t,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=sl.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(sl.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),t}(),nf=function t(e){var n=this;we(this,t),S(this,"viewErrored",void 0),e.on("viewinit",function(){n.viewErrored=!1}),e.on("error",function(i,a){try{var r=e.errorTranslator({player_error_code:a.player_error_code,player_error_message:a.player_error_message,player_error_context:a.player_error_context,player_error_severity:a.player_error_severity,player_error_business_exception:a.player_error_business_exception});r&&(e.data.player_error_code=r.player_error_code||a.player_error_code,e.data.player_error_message=r.player_error_message||a.player_error_message,e.data.player_error_context=r.player_error_context||a.player_error_context,e.data.player_error_severity=r.player_error_severity||a.player_error_severity,e.data.player_error_business_exception=r.player_error_business_exception||a.player_error_business_exception,n.viewErrored=!0)}catch(s){e.mux.log.warn("Exception in error translator callback.",s),n.viewErrored=!0}}),e.on("aftererror",function(){var i,a,r,s,o;(i=e.data)===null||i===void 0||delete i.player_error_code,(a=e.data)===null||a===void 0||delete a.player_error_message,(r=e.data)===null||r===void 0||delete r.player_error_context,(s=e.data)===null||s===void 0||delete s.player_error_severity,(o=e.data)===null||o===void 0||delete o.player_error_business_exception})},af=function(){function t(e){we(this,t),S(this,"_watchTimeTrackerLastCheckedTime",void 0),S(this,"pm",void 0),this.pm=e,this._watchTimeTrackerLastCheckedTime=null,e.on("playbackheartbeat",this._updateWatchTime.bind(this)),e.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return Ft(t,[{key:"_updateWatchTime",value:function(e,n){var i=n.viewer_time;this._watchTimeTrackerLastCheckedTime===null&&(this._watchTimeTrackerLastCheckedTime=i),ke(this.pm.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=i}},{key:"_clearWatchTimeState",value:function(e,n){this._updateWatchTime(e,n),this._watchTimeTrackerLastCheckedTime=null}}]),t}(),rf=function(){function t(e){var n=this;we(this,t),S(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),S(this,"_lastTime",void 0),S(this,"_isAdPlaying",void 0),S(this,"_callbackUpdatePlaybackTime",void 0),S(this,"pm",void 0),this.pm=e,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=xe.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,e.on("viewinit",function(){n.pm.data.view_playing_time_ms_cumulative=0});var i=this._startPlaybackTimeTracking.bind(this);e.on("playing",i),e.on("adplaying",i),e.on("seeked",i),e.on("rebufferend",i);var a=this._stopPlaybackTimeTracking.bind(this);e.on("playbackheartbeatend",a),e.on("seeking",a),e.on("rebufferstart",a),e.on("adplaying",function(){n._isAdPlaying=!0}),e.on("adended",function(){n._isAdPlaying=!1}),e.on("adpause",function(){n._isAdPlaying=!1}),e.on("adbreakstart",function(){n._isAdPlaying=!1}),e.on("adbreakend",function(){n._isAdPlaying=!1}),e.on("adplay",function(){n._isAdPlaying=!1}),e.on("viewinit",function(){n._playbackTimeTrackerLastPlayheadPosition=-1,n._lastTime=xe.now(),n._isAdPlaying=!1,n._callbackUpdatePlaybackTime=null})}return Ft(t,[{key:"_startPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime===null&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=xe.now(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,n=xe.now(),i=n-this._lastTime,a=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?a=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(a=i),a>0&&a<=1e3&&ke(this.pm.data,"view_content_playback_time",a),this._callbackUpdatePlaybackTime!==null&&i>0&&i<=1e3&&(this._isAdPlaying&&ke(this.pm.data,"ad_playing_time_ms_cumulative",i),ke(this.pm.data,"view_playing_time_ms_cumulative",i)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=n}}]),t}(),sf=function(){function t(e){we(this,t),S(this,"pm",void 0),this.pm=e;var n=this._updatePlayheadTime.bind(this);e.on("playbackheartbeat",n),e.on("playbackheartbeatend",n),e.on("timeupdate",n),e.on("destroy",function(){e.off("timeupdate",n)})}return Ft(t,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=this.pm.data.view_max_playhead_position===void 0?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,n){var i=this,a=function(){i.pm.currentFragmentPDT&&i.pm.currentFragmentStart&&(i.pm.data.player_program_time=i.pm.currentFragmentPDT+i.pm.data.player_playhead_time-i.pm.currentFragmentStart)};if(n&&n.player_playhead_time)this.pm.data.player_playhead_time=n.player_playhead_time,a(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var r=this.pm.getPlayheadTime();r!==void 0&&(this.pm.data.player_playhead_time=r,a(),this._updateMaxPlayheadPosition())}}}]),t}(),Oc=3e5,of=function t(e){if(we(this,t),!e.disableRebufferTracking){var n,i=function(r,s){a(s),n=void 0},a=function(r){if(n){var s=r.viewer_time-n;ke(e.data,"view_rebuffer_duration",s),n=r.viewer_time,e.data.view_rebuffer_duration>Oc&&(e.emit("viewend"),e.send("viewend"),e.mux.log.warn("Ending view after rebuffering for longer than ".concat(Oc,"ms, future events will be ignored unless a programchange or videochange occurs.")))}e.data.view_watch_time>=0&&e.data.view_rebuffer_count>0&&(e.data.view_rebuffer_frequency=e.data.view_rebuffer_count/e.data.view_watch_time,e.data.view_rebuffer_percentage=e.data.view_rebuffer_duration/e.data.view_watch_time)};e.on("playbackheartbeat",function(r,s){return a(s)}),e.on("rebufferstart",function(r,s){n||(ke(e.data,"view_rebuffer_count",1),n=s.viewer_time,e.one("rebufferend",i))}),e.on("viewinit",function(){n=void 0,e.off("rebufferend",i)})}},lf=function(){function t(e){var n=this;we(this,t),S(this,"_lastCheckedTime",void 0),S(this,"_lastPlayheadTime",void 0),S(this,"_lastPlayheadTimeUpdatedTime",void 0),S(this,"_rebuffering",void 0),S(this,"pm",void 0),this.pm=e,!e.disableRebufferTracking&&!e.disablePlayheadRebufferTracking&&(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,e.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),e.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),e.on("seeking",function(){n._cleanupRebufferTracker(null,{viewer_time:xe.now()})}))}return Ft(t,[{key:"_checkIfRebuffering",value:function(e,n){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)this._cleanupRebufferTracker(e,n);else if(this._lastCheckedTime!==null)if(this._lastPlayheadTime===this.pm.data.player_playhead_time){var i=n.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.sustainedRebufferThreshold=="number"&&i>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=n.viewer_time}else this._cleanupRebufferTracker(e,n,!0);else this._prepareRebufferTrackerState(n.viewer_time)}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:n.viewer_time});else{if(this._lastCheckedTime===null)return;var a=this.pm.data.player_playhead_time-this._lastPlayheadTime,r=n.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.minimumRebufferDuration=="number"&&a>0&&r-a>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-a}))}i?this._prepareRebufferTrackerState(n.viewer_time):this._clearRebufferTrackerState()}}]),t}(),df=function(){function t(e){var n=this;we(this,t),S(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){var i=e.data,a=i.view_id;if(!i.view_program_changed){var r=function(s,o){var l=o.viewer_time;(s.type==="playing"&&e.data.view_time_to_first_frame===void 0||s.type==="adplaying"&&(e.data.view_time_to_first_frame===void 0||n._inPrerollPosition()))&&n.calculateTimeToFirstFrame(l||xe.now(),a)};e.one("playing",r),e.one("adplaying",r),e.one("viewend",function(){e.off("playing",r),e.off("adplaying",r)})}})}return Ft(t,[{key:"_inPrerollPosition",value:function(){return this.pm.data.view_content_playback_time===void 0||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,n){n===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),t}(),uf=function t(e){var n=this;we(this,t),S(this,"_lastPlayerHeight",void 0),S(this,"_lastPlayerWidth",void 0),S(this,"_lastPlayheadPosition",void 0),S(this,"_lastSourceHeight",void 0),S(this,"_lastSourceWidth",void 0),e.on("viewinit",function(){n._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"].forEach(function(i){e.on(i,function(){if(n._lastPlayheadPosition>=0&&e.data.player_playhead_time>=0&&n._lastPlayerWidth>=0&&n._lastSourceWidth>0&&n._lastPlayerHeight>=0&&n._lastSourceHeight>0){var a=e.data.player_playhead_time-n._lastPlayheadPosition;if(a<0)return void(n._lastPlayheadPosition=-1);var r=Math.min(n._lastPlayerWidth/n._lastSourceWidth,n._lastPlayerHeight/n._lastSourceHeight),s=Math.max(0,r-1),o=Math.max(0,1-r);e.data.view_max_upscale_percentage=Math.max(e.data.view_max_upscale_percentage||0,s),e.data.view_max_downscale_percentage=Math.max(e.data.view_max_downscale_percentage||0,o),ke(e.data,"view_total_content_playback_time",a),ke(e.data,"view_total_upscaling",s*a),ke(e.data,"view_total_downscaling",o*a)}n._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange","playbackmodechange"].forEach(function(i){e.on(i,function(){n._lastPlayheadPosition=e.data.player_playhead_time,n._lastPlayerWidth=e.data.player_width,n._lastPlayerHeight=e.data.player_height,n._lastSourceWidth=e.data.video_source_width,n._lastSourceHeight=e.data.video_source_height})})},cf=function t(e){var n=this;we(this,t),S(this,"isSeeking",void 0),this.isSeeking=!1;var i=-1,a=function(){var r=xe.now(),s=(e.data.viewer_time||r)-(i||r);ke(e.data,"view_seek_duration",s),e.data.view_max_seek_time=Math.max(e.data.view_max_seek_time||0,s),n.isSeeking=!1,i=-1};e.on("seeking",function(r,s){Object.assign(e.data,s),n.isSeeking&&s.viewer_time-i<=2e3?i=s.viewer_time:(n.isSeeking&&a(),n.isSeeking=!0,i=s.viewer_time,ke(e.data,"view_seek_count",1),e.send("seeking"))}),e.on("seeked",function(){a()}),e.on("viewend",function(){n.isSeeking&&(a(),e.send("seeked")),n.isSeeking=!1,i=-1})},Pc=function(t,e){t.push(e),t.sort(function(n,i){return n.viewer_time-i.viewer_time})},hf=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],mf=function(){function t(e){var n=this;we(this,t),S(this,"_adHasPlayed",void 0),S(this,"_adRequests",void 0),S(this,"_adResponses",void 0),S(this,"_currentAdRequestNumber",void 0),S(this,"_currentAdResponseNumber",void 0),S(this,"_prerollPlayTime",void 0),S(this,"_wouldBeNewAdPlay",void 0),S(this,"isAdBreak",void 0),S(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){n.isAdBreak=!1,n._currentAdRequestNumber=0,n._currentAdResponseNumber=0,n._adRequests=[],n._adResponses=[],n._adHasPlayed=!1,n._wouldBeNewAdPlay=!0,n._prerollPlayTime=void 0}),hf.forEach(function(a){return e.on(a,n._updateAdData.bind(n))});var i=function(){n.isAdBreak=!1};e.on("adbreakstart",function(){n.isAdBreak=!0}),e.on("play",i),e.on("playing",i),e.on("viewend",i),e.on("adrequest",function(a,r){r=Object.assign({ad_request_id:"generatedAdRequestId"+n._currentAdRequestNumber++},r),Pc(n._adRequests,r),ke(e.data,"view_ad_request_count"),n.inPrerollPosition()&&(e.data.view_preroll_requested=!0,n._adHasPlayed||ke(e.data,"view_preroll_request_count"))}),e.on("adresponse",function(a,r){r=Object.assign({ad_request_id:"generatedAdRequestId"+n._currentAdResponseNumber++},r),Pc(n._adResponses,r);var s=n.findAdRequest(r.ad_request_id);s&&ke(e.data,"view_ad_request_time",Math.max(0,r.viewer_time-s.viewer_time))}),e.on("adplay",function(a,r){n._adHasPlayed=!0,n._wouldBeNewAdPlay&&(n._wouldBeNewAdPlay=!1,ke(e.data,"view_ad_played_count")),n.inPrerollPosition()&&!e.data.view_preroll_played&&(e.data.view_preroll_played=!0,n._adRequests.length>0&&(e.data.view_preroll_request_time=Math.max(0,r.viewer_time-n._adRequests[0].viewer_time)),e.data.view_start&&(e.data.view_startup_preroll_request_time=Math.max(0,r.viewer_time-e.data.view_start)),n._prerollPlayTime=r.viewer_time)}),e.on("adplaying",function(a,r){n.inPrerollPosition()&&e.data.view_preroll_load_time===void 0&&n._prerollPlayTime!==void 0&&(e.data.view_preroll_load_time=r.viewer_time-n._prerollPlayTime,e.data.view_startup_preroll_load_time=r.viewer_time-n._prerollPlayTime)}),e.on("adclicked",function(a,r){n._wouldBeNewAdPlay||ke(e.data,"view_ad_clicked_count")}),e.on("adskipped",function(a,r){n._wouldBeNewAdPlay||ke(e.data,"view_ad_skipped_count")}),e.on("adended",function(){n._wouldBeNewAdPlay=!0}),e.on("aderror",function(){n._wouldBeNewAdPlay=!0})}return Ft(t,[{key:"inPrerollPosition",value:function(){return this.pm.data.view_content_playback_time===void 0||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var n=0;n<this._adRequests.length;n++)if(this._adRequests[n].ad_request_id===e)return this._adRequests[n]}},{key:"_updateAdData",value:function(e,n){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&n.ad_tag_url){var i=an(Ar(n.ad_tag_url),2),a=i[0],r=i[1];this.pm.data.view_preroll_ad_tag_domain=r,this.pm.data.view_preroll_ad_tag_hostname=a}if(!this.pm.data.view_preroll_ad_asset_hostname&&n.ad_asset_url){var s=an(Ar(n.ad_asset_url),2),o=s[0],l=s[1];this.pm.data.view_preroll_ad_asset_domain=l,this.pm.data.view_preroll_ad_asset_hostname=o}this.pm.data.ad_type="preroll"}this.pm.data.ad_asset_url=n?.ad_asset_url,this.pm.data.ad_tag_url=n?.ad_tag_url,this.pm.data.ad_creative_id=n?.ad_creative_id,this.pm.data.ad_id=n?.ad_id,this.pm.data.ad_universal_id=n?.ad_universal_id,n!=null&&n.ad_type&&(this.pm.data.ad_type=n?.ad_type)}}]),t}(),pf=function t(e){var n=this;we(this,t),S(this,"lastWallClockTime",void 0);var i=function(){n.lastWallClockTime=xe.now(),e.on("before*",a)},a=function(r){var s=xe.now(),o=n.lastWallClockTime;n.lastWallClockTime=s,s-o>3e4&&(e.emit("devicesleep",{viewer_time:o}),Object.assign(e.data,{viewer_time:o}),e.send("devicesleep"),e.emit("devicewake",{viewer_time:s}),Object.assign(e.data,{viewer_time:s}),e.send("devicewake"))};e.one("playbackheartbeat",i),e.on("playbackheartbeatend",function(){e.off("before*",a),e.one("playbackheartbeat",i)})},ol=rt(Kt()),hp=function(){var t=function(){for(var n=0,i={};n<arguments.length;n++){var a=arguments[n];for(var r in a)i[r]=a[r]}return i};function e(n){function i(a,r,s){var o;if(typeof document<"u"){if(arguments.length>1){if(typeof(s=t({path:"/"},i.defaults,s)).expires=="number"){var l=new Date;l.setMilliseconds(l.getMilliseconds()+864e5*s.expires),s.expires=l}try{o=JSON.stringify(r),/^[\{\[]/.test(o)&&(r=o)}catch{}return r=n.write?n.write(r,a):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),a=(a=(a=encodeURIComponent(String(a))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[a,"=",r,s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}a||(o={});for(var d=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,c=0;c<d.length;c++){var m=d[c].split("="),p=m.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{var v=m[0].replace(u,decodeURIComponent);if(p=n.read?n.read(p,v):n(p,v)||p.replace(u,decodeURIComponent),this.json)try{p=JSON.parse(p)}catch{}if(a===v){o=p;break}a||(o[v]=p)}catch{}}return o}}return i.set=i,i.get=function(a){return i.call(i,a)},i.getJSON=function(){return i.apply({json:!0},[].slice.call(arguments))},i.defaults={},i.remove=function(a,r){i(a,"",t(r,{expires:-1}))},i.withConverter=e,i}return e(function(){})}(),mp="muxData",Uc=function(){var t;try{t=(hp.get(mp)||"").split("&").reduce(function(e,n){var i=an(n.split("="),2),a=i[0],r=i[1],s=+r,o=r&&s==r?s:r;return e[a]=o,e},{})}catch{t={}}return t},Hc=function(t){try{hp.set(mp,(e=t,Object.entries(e).map(function(n){var i=an(n,2),a=i[0],r=i[1];return"".concat(a,"=").concat(r)}).join("&")),{expires:365})}catch{}var e},vf=rt(Kt()),pp=function(){var t;switch(vp()){case"cellular":t="cellular";break;case"ethernet":t="wired";break;case"wifi":t="wifi";break;case void 0:break;default:t="other"}return t},vp=function(){var t=vf.default.navigator,e=t&&(t.connection||t.mozConnection||t.webkitConnection);return e&&e.type};pp.getConnectionFromAPI=vp;var bf=pp,ff=bp({a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"}),Wc=bp({ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"connection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function bp(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function ad(t){var e={},n={};return Object.keys(t).forEach(function(i){var a=!1;if(t.hasOwnProperty(i)&&t[i]!==void 0){var r=i.split("_"),s=r[0],o=ff[s];o||(X.info("Data key word `"+r[0]+"` not expected in "+i),o=s+"_"),r.splice(1).forEach(function(l){l==="url"&&(a=!0),Wc[l]?o+=Wc[l]:Number.isInteger(Number(l))?o+=l:(X.info("Data key word `"+l+"` not expected in "+i),o+="_"+l+"_")}),a?n[o]=t[i]:e[o]=t[i]}}),Object.assign(e,n)}var jn=rt(Kt()),gf=rt(ap()),Ef={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},yf=["hb","requestcompleted","requestfailed","requestcanceled"],Zt=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._beaconUrl=t||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},Ef,e)};Zt.prototype.queueEvent=function(t,e){var n=Object.assign({},e);return(this._eventQueue.length<=this._options.maxQueueLength||t==="eventrateexceeded")&&(this._eventQueue.push(n),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},Zt.prototype.flushEvents=function(){arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this._eventQueue.length===1?this._eventQueue.pop():(this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending())},Zt.prototype.destroy=function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.destroyed=!0,t?this._clearBeaconQueue():this.flushEvents(),jn.default.clearTimeout(this._sendTimeout)},Zt.prototype._clearBeaconQueue=function(){var t=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,e=this._eventQueue.slice(t);t>0&&Object.assign(e[e.length-1],ad({mux_view_message:"event queue truncated"}));var n=this._createPayload(e);Bc(this._beaconUrl,n,!0,function(){})},Zt.prototype._sendBeaconQueue=function(){var t=this;if(this._postInFlight)this._resendAfterPost=!0;else{var e=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var n=this._createPayload(e),i=xe.now();Bc(this._beaconUrl,n,!1,function(a,r){r?(t._eventQueue=e.concat(t._eventQueue),t._failureCount+=1,X.info("Error sending beacon: "+r)):t._failureCount=0,t._roundTripTime=xe.now()-i,t._postInFlight=!1,t._resendAfterPost&&(t._resendAfterPost=!1,t._eventQueue.length>0&&t._sendBeaconQueue())})}},Zt.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var t=Math.pow(2,this._failureCount-1);return(1+(t*=Math.random()))*this._options.baseTimeBetweenBeacons},Zt.prototype._startBeaconSending=function(){var t=this;jn.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=jn.default.setTimeout(function(){t._eventQueue.length&&t._sendBeaconQueue(),t._startBeaconSending()},this._getNextBeaconTime()))},Zt.prototype._createPayload=function(t){var e=this,n={transmission_timestamp:Math.round(xe.now())};this._roundTripTime&&(n.rtt_ms=Math.round(this._roundTripTime));var i,a,r,s=function(){i=JSON.stringify({metadata:n,events:a||t}),r=i.length/1024},o=function(){return r<=e._options.maxPayloadKBSize};return s(),o()||(X.info("Payload size is too big ("+r+" kb). Removing unnecessary events."),a=t.filter(function(l){return yf.indexOf(l.e)===-1}),s()),o()||(X.info("Payload size still too big ("+r+" kb). Cropping fields.."),a.forEach(function(l){for(var d in l){var u=l[d];typeof u=="string"&&u.length>51200&&(l[d]=u.substring(0,51200))}}),s()),i};var _f=typeof gf.default.exitPictureInPicture=="function"?function(t){return t.length<=57344}:function(t){return!1},Bc=function(t,e,n,i){if(n&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(t,e))i();else if(jn.default.fetch)jn.default.fetch(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},keepalive:_f(e)}).then(function(r){return i(null,r.ok?null:"Error")}).catch(function(r){return i(null,r)});else{if(jn.default.XMLHttpRequest){var a=new jn.default.XMLHttpRequest;return a.onreadystatechange=function(){if(a.readyState===4)return i(null,a.status!==200?"error":void 0)},a.open("POST",t),a.setRequestHeader("Content-Type","text/plain"),void a.send(e)}i()}},Tf=Zt,Af=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],kf=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],wf=["ad_id","ad_creative_id","ad_universal_id"],If=["viewstart","error","ended","viewend"],Sf=function(){function t(e,n){var i,a,r,s,o,l,d,u,c,m,p,v,b,f,T,A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};we(this,t),S(this,"mux",void 0),S(this,"envKey",void 0),S(this,"options",void 0),S(this,"eventQueue",void 0),S(this,"sampleRate",void 0),S(this,"disableCookies",void 0),S(this,"respectDoNotTrack",void 0),S(this,"previousBeaconData",void 0),S(this,"lastEventTime",void 0),S(this,"rateLimited",void 0),S(this,"pageLevelData",void 0),S(this,"viewerData",void 0),this.mux=e,this.envKey=n,this.options=A,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new Tf(function(E,_){var w=_.beaconCollectionDomain,I=_.beaconDomain;if(w)return"https://"+w;var D=I||"litix.io";return(E=E||"inferred").match(/^[a-z0-9]+$/)?"https://"+E+"."+D:"https://img.litix.io/a.gif"}(this.envKey,this.options)),this.sampleRate=(b=this.options.sampleRate)!==null&&b!==void 0?b:1,this.disableCookies=(f=this.options.disableCookies)!==null&&f!==void 0&&f,this.respectDoNotTrack=(T=this.options.respectDoNotTrack)!==null&&T!==void 0&&T,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:(i=this.options.platform)===null||i===void 0?void 0:i.name,viewer_application_version:(a=this.options.platform)===null||a===void 0?void 0:a.version,viewer_application_engine:(r=this.options.platform)===null||r===void 0?void 0:r.layout,viewer_device_name:(s=this.options.platform)===null||s===void 0?void 0:s.product,viewer_device_category:"",viewer_device_manufacturer:(o=this.options.platform)===null||o===void 0?void 0:o.manufacturer,viewer_os_family:(d=this.options.platform)===null||d===void 0||(l=d.os)===null||l===void 0?void 0:l.family,viewer_os_architecture:(c=this.options.platform)===null||c===void 0||(u=c.os)===null||u===void 0?void 0:u.architecture,viewer_os_version:(p=this.options.platform)===null||p===void 0||(m=p.os)===null||m===void 0?void 0:m.version,viewer_connection_type:bf(),page_url:ol.default===null||ol.default===void 0||(v=ol.default.location)===null||v===void 0?void 0:v.href},this.viewerData=this.disableCookies?{}:function(){var E=Uc();return E.mux_viewer_id=E.mux_viewer_id||_r(),E.msn=E.msn||Math.random(),Hc(E),{mux_viewer_id:E.mux_viewer_id,mux_sample_number:E.msn}}()}return Ft(t,[{key:"send",value:function(e,n){if(e&&n!=null&&n.view_id){if(this.respectDoNotTrack&&nd())return X.info("Not sending `"+e+"` because Do Not Track is enabled");if(!n||typeof n!="object")return X.error("A data object was expected in send() but was not provided");var i=this.disableCookies?{}:function(){var l=Uc(),d=xe.now();return l.session_start&&(l.sst=l.session_start,delete l.session_start),l.session_id&&(l.sid=l.session_id,delete l.session_id),l.session_expires&&(l.sex=l.session_expires,delete l.session_expires),(!l.sex||l.sex<d)&&(l.sid=_r(),l.sst=d),l.sex=d+15e5,Hc(l),{session_id:l.sid,session_start:l.sst,session_expires:l.sex}}(),a=$u(Io({},this.pageLevelData,n,i,this.viewerData),{event:e,env_key:this.envKey});a.user_id&&(a.viewer_user_id=a.user_id,delete a.user_id);var r,s=((r=a.mux_sample_number)!==null&&r!==void 0?r:0)>=this.sampleRate,o=ad(this._deduplicateBeaconData(e,a));if(this.lastEventTime=this.mux.utils.now(),s)return X.info("Not sending event due to sample rate restriction",e,a,o);if(this.envKey||X.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,a,o),!this.rateLimited)if(X.info("Sending event",e,a,o),this.rateLimited=!this.eventQueue.queueEvent(e,o),this.mux.WINDOW_UNLOADING&&e==="viewend")this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&e==="hb")this.eventQueue.flushEvents(!0);else if(If.indexOf(e)>=0){if(e==="error"&&n.player_error_severity==="warning")return;this.eventQueue.flushEvents()}if(this.rateLimited)return a.event="eventrateexceeded",o=ad(a),this.eventQueue.queueEvent(a.event,o),X.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,n){var i=this,a={},r=n.view_id;if(r==="-1"||e==="viewstart"||e==="viewend"||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)a=Io({},n),r&&(this.previousBeaconData=a),r&&e==="viewend"&&(this.previousBeaconData=null);else{var s=e.indexOf("request")===0;Object.entries(n).forEach(function(o){var l=an(o,2),d=l[0],u=l[1];i.previousBeaconData&&(u!==i.previousBeaconData[d]||Af.indexOf(d)>-1||i.objectHasChanged(s,d,u,i.previousBeaconData[d])||i.eventRequiresKey(e,d))&&(a[d]=u,i.previousBeaconData[d]=u)})}return a}},{key:"objectHasChanged",value:function(e,n,i,a){return!(!e||n.indexOf("request_")!==0)&&(n==="request_response_headers"||typeof i!="object"||typeof a!="object"||Object.keys(i||{}).length!==Object.keys(a||{}).length)}},{key:"eventRequiresKey",value:function(e,n){return!!(e==="renditionchange"&&n.indexOf("video_source_")===0||wf.includes(n)&&kf.includes(e))}}]),t}(),Rf=function t(e){we(this,t);var n=0,i=0,a=0,r=0,s=0,o=0,l=0;e.on("requestcompleted",function(d,u){var c,m,p=u.request_start,v=u.request_response_start,b=u.request_response_end,f=u.request_bytes_loaded;if(r++,v?(c=v-(p??0),m=(b??0)-v):m=(b??0)-(p??0),m>0&&f&&f>0){var T=f/m*8e3;s++,i+=f,a+=m,e.data.view_min_request_throughput=Math.min(e.data.view_min_request_throughput||1/0,T),e.data.view_average_request_throughput=i/a*8e3,e.data.view_request_count=r,c>0&&(n+=c,e.data.view_max_request_latency=Math.max(e.data.view_max_request_latency||0,c),e.data.view_average_request_latency=n/s)}}),e.on("requestfailed",function(d,u){r++,o++,e.data.view_request_count=r,e.data.view_request_failed_count=o}),e.on("requestcanceled",function(d,u){r++,l++,e.data.view_request_count=r,e.data.view_request_canceled_count=l})},Cf=function t(e){var n=this;we(this,t),S(this,"_lastEventTime",void 0),e.on("before*",function(i,a){var r=a.viewer_time,s=xe.now(),o=n._lastEventTime;if(n._lastEventTime=s,o&&s-o>36e5){var l=Object.keys(e.data).reduce(function(u,c){return c.indexOf("video_")===0?Object.assign(u,S({},c,e.data[c])):u},{});e.mux.log.info("Received event after at least an hour inactivity, creating a new view");var d=e.playbackHeartbeat._playheadShouldBeProgressing;e._resetView(Object.assign({viewer_time:r},l)),e.playbackHeartbeat._playheadShouldBeProgressing=d,e.playbackHeartbeat._playheadShouldBeProgressing&&i.type!=="play"&&i.type!=="adbreakstart"&&(e.emit("play",{viewer_time:r}),i.type!=="playing"&&e.emit("playing",{viewer_time:r}))}})};function Vc(t,e){return t?.toLowerCase()===e?.toLowerCase()}var Df=function t(e){we(this,t);var n=function(o){var l,d=function(m){var p;return m!=null&&m.request_type&&(m.request_type==="media"||m.request_type==="video")&&(p=m.request_response_headers)!==null&&p!==void 0&&p["x-cdn"]?m.request_response_headers["x-cdn"]:m!=null&&m.video_cdn?m.video_cdn:null}(o),u=(l=o)!=null&&l.request_start?l.request_start:l!=null&&l.viewer_time?l.viewer_time:Date.now();if(d!=null&&!Vc(d,r)&&s<=u){r=d,s=u;var c={video_cdn:d};e.emit("cdnchange",c)}},i=null,a=null,r=null,s=0;e.on("viewinit",function(){i=null,a=null,r=null,s=0}),e.on("beforecdnchange",function(o,l){var d=l?.video_cdn;d&&(l.video_previous_cdn===void 0||l.video_previous_cdn===null)&&(Vc(d,a)?l.video_previous_cdn=i??void 0:(l.video_previous_cdn=a??void 0,i=a,a=d))}),e.on("requestcompleted",function(o,l){n(l)})},Lf=function t(e){var n=this;we(this,t),S(this,"_emittingAutomaticEvent",!1),S(this,"_hasInitialized",!1),S(this,"_currentMode","standard"),e.on("viewstart",function(){n._hasInitialized||(n._hasInitialized=!0,n._emittingAutomaticEvent=!0,e.emit("playbackmodechange",{player_playback_mode:n._currentMode,player_playback_mode_data:"{}"}),n._emittingAutomaticEvent=!1)}),e.on("viewend",function(){n._hasInitialized=!1}),e.on("playbackmodechange",function(i,a){n._emittingAutomaticEvent||(a.player_playback_mode_data?function(r){try{return JSON.parse(r),!0}catch{return!1}}(a.player_playback_mode_data)||(e.mux.log.warn("Invalid JSON string for player_playback_mode_data"),a.player_playback_mode_data="{}"):a.player_playback_mode_data="{}",e.data.player_playback_mode_data=a.player_playback_mode_data,e.data.player_playback_mode=a.player_playback_mode,n._currentMode=a.player_playback_mode)})},Mf=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange","cdnchange","playbackmodechange"],xf=new Set(["requestcompleted","requestfailed","requestcanceled"]),Nf=function(){(function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),i&&dp(n,i)})(e,ef);var t=Zb(e);function e(n,i,a){var r;we(this,e),S(O(r=t.call(this)),"pageLoadEndTime",void 0),S(O(r),"pageLoadInitTime",void 0),S(O(r),"_destroyed",void 0),S(O(r),"_heartBeatTimeout",void 0),S(O(r),"adTracker",void 0),S(O(r),"dashjs",void 0),S(O(r),"data",void 0),S(O(r),"disablePlayheadRebufferTracking",void 0),S(O(r),"disableRebufferTracking",void 0),S(O(r),"errorTracker",void 0),S(O(r),"errorTranslator",void 0),S(O(r),"emitTranslator",void 0),S(O(r),"getAdData",void 0),S(O(r),"getPlayheadTime",void 0),S(O(r),"getStateData",void 0),S(O(r),"stateDataTranslator",void 0),S(O(r),"hlsjs",void 0),S(O(r),"id",void 0),S(O(r),"longResumeTracker",void 0),S(O(r),"minimumRebufferDuration",void 0),S(O(r),"mux",void 0),S(O(r),"playbackEventDispatcher",void 0),S(O(r),"playbackHeartbeat",void 0),S(O(r),"playbackHeartbeatTime",void 0),S(O(r),"playheadTime",void 0),S(O(r),"seekingTracker",void 0),S(O(r),"sustainedRebufferThreshold",void 0),S(O(r),"watchTimeTracker",void 0),S(O(r),"currentFragmentPDT",void 0),S(O(r),"currentFragmentStart",void 0),r.pageLoadInitTime=as.navigationStart(),r.pageLoadEndTime=as.domContentLoadedEventEnd();var s={debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(u){return u},emitTranslator:function(){for(var u=arguments.length,c=new Array(u),m=0;m<u;m++)c[m]=arguments[m];return c},stateDataTranslator:function(u){return u}};r.mux=n,r.id=i,a!=null&&a.beaconDomain&&r.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(a=Object.assign(s,a)).data=a.data||{},a.data.property_key&&(a.data.env_key=a.data.property_key,delete a.data.property_key),X.level=a.debug?op:lp,r.getPlayheadTime=a.getPlayheadTime,r.getStateData=a.getStateData||function(){return{}},r.getAdData=a.getAdData||function(){},r.minimumRebufferDuration=a.minimumRebufferDuration,r.sustainedRebufferThreshold=a.sustainedRebufferThreshold,r.playbackHeartbeatTime=a.playbackHeartbeatTime,r.disableRebufferTracking=a.disableRebufferTracking,r.disableRebufferTracking&&r.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),r.disablePlayheadRebufferTracking=a.disablePlayheadRebufferTracking,r.errorTranslator=a.errorTranslator,r.emitTranslator=a.emitTranslator,r.stateDataTranslator=a.stateDataTranslator,r.playbackEventDispatcher=new Sf(n,a.data.env_key,a),r.data={player_instance_id:_r(),mux_sample_rate:a.sampleRate,beacon_domain:a.beaconCollectionDomain||a.beaconDomain},r.data.view_sequence_number=1,r.data.player_sequence_number=1;var o=(function(){this.data.view_start===void 0&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"),this.emit("renditionchange"))}).bind(O(r));if(r.on("viewinit",function(u,c){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,c),this._initializeViewData(),this.one("play",o),this.one("adbreakstart",o)}),r.on("videochange",function(u,c){this._resetView(c)}),r.on("programchange",function(u,c){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(c,{view_program_changed:!0})),o(),this.emit("play"),this.emit("playing")}),r.on("fragmentchange",function(u,c){this.currentFragmentPDT=c.currentFragmentPDT,this.currentFragmentStart=c.currentFragmentStart}),r.on("destroy",r.destroy),typeof window<"u"&&typeof window.addEventListener=="function"&&typeof window.removeEventListener=="function"){var l=function(){var u=r.data.view_start!==void 0;r.mux.WINDOW_HIDDEN=document.visibilityState==="hidden",u&&r.mux.WINDOW_HIDDEN&&(r.data.player_is_paused||r.emit("hb"))};window.addEventListener("visibilitychange",l,!1);var d=function(u){u.persisted||r.destroy()};window.addEventListener("pagehide",d,!1),r.on("destroy",function(){window.removeEventListener("visibilitychange",l),window.removeEventListener("pagehide",d)})}return r.on("playerready",function(u,c){Object.assign(this.data,c)}),Mf.forEach(function(u){r.on(u,function(c,m){u.indexOf("ad")!==0&&this._updateStateData(),Object.assign(this.data,m),this._sanitizeData()}),r.on("after"+u,function(){(u!=="error"||this.errorTracker.viewErrored)&&this.send(u)})}),r.on("viewend",function(u,c){Object.assign(r.data,c)}),r.one("playerready",function(u){var c=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=c-this.data.player_init_time),this.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),r.longResumeTracker=new Cf(O(r)),r.errorTracker=new nf(O(r)),new pf(O(r)),r.seekingTracker=new cf(O(r)),r.playheadTime=new sf(O(r)),r.playbackHeartbeat=new tf(O(r)),new uf(O(r)),r.watchTimeTracker=new af(O(r)),new rf(O(r)),r.adTracker=new mf(O(r)),new lf(O(r)),new of(O(r)),new df(O(r)),new Rf(O(r)),new Df(O(r)),new Lf(O(r)),a.hlsjs&&r.addHLSJS(a),a.dashjs&&r.addDashJS(a),r.emit("viewinit",a.data),r}return Ft(e,[{key:"emit",value:function(n,i){var a,r=Object.assign({viewer_time:this.mux.utils.now()},i),s=[n,r];if(this.emitTranslator)try{s=this.emitTranslator(n,r)}catch(o){this.mux.log.warn("Exception in emit translator callback.",o)}s!=null&&s.length&&(a=id(Tr(e.prototype),"emit",this)).call.apply(a,[this].concat(ht(s)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.data.view_start!==void 0&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(n){if(this.data.view_id){var i=Object.assign({},this.data);if(i.video_source_is_live===void 0&&(i.player_source_duration===1/0||i.video_source_duration===1/0?i.video_source_is_live=!0:(i.player_source_duration>0||i.video_source_duration>0)&&(i.video_source_is_live=!1)),i.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach(function(o){i[o]=void 0}),i.video_source_url=i.video_source_url||i.player_source_url,i.video_source_url){var a=an(Ar(i.video_source_url),2),r=a[0],s=a[1];i.video_source_domain=s,i.video_source_hostname=r}delete i.ad_request_id,this.playbackEventDispatcher.send(n,i),this.data.view_sequence_number++,this.data.player_sequence_number++,xf.has(n)||this._restartHeartBeat(),n==="viewend"&&delete this.data.view_id}}},{key:"_resetView",value:function(n){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",n)}},{key:"_updateStateData",value:function(){var n,i=this.getStateData();if(typeof this.stateDataTranslator=="function")try{i=this.stateDataTranslator(i)}catch(a){this.mux.log.warn("Exception in stateDataTranslator translator callback.",a)}(n=this.data)!==null&&n!==void 0&&n.video_cdn&&i!=null&&i.video_cdn&&(i.video_cdn,i=Qb(i,["video_cdn"])),Object.assign(this.data,i),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var n=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(i){var a=parseInt(n.data[i],10);n.data[i]=isNaN(a)?void 0:a}),["player_source_url","video_source_url"].forEach(function(i){if(n.data[i]){var a=n.data[i].toLowerCase();(a.indexOf("data:")===0||a.indexOf("blob:")===0)&&(n.data[i]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var n=this;Object.keys(this.data).forEach(function(i){i.indexOf("video_")===0&&delete n.data[i]})}},{key:"_resetViewData",value:function(){var n=this;Object.keys(this.data).forEach(function(i){i.indexOf("view_")===0&&delete n.data[i]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var n=this,i=this.data.view_id=_r(),a=function(){i===n.data.view_id&&ke(n.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",a):a()}},{key:"_restartHeartBeat",value:function(){var n=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){n.data.player_is_paused||n.emit("hb")},1e4)}},{key:"addHLSJS",value:function(n){n.hlsjs?this.hlsjs?this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):(this.hlsjs=n.hlsjs,function(i,a,r){var s=arguments.length>4?arguments[4]:void 0,o=i.log,l=i.utils.secondsToMs,d=function(E){var _,w=parseInt(s.version);return w===1&&E.programDateTime!==null&&(_=E.programDateTime),w===0&&E.pdt!==null&&(_=E.pdt),_};if(as.exists()){var u=function(E,_){return i.emit(a,E,_)},c=function(E,_){var w=_.levels,I=_.audioTracks,D=_.url,V=_.stats,$=_.networkDetails,F=_.sessionData,re={},oe={};w.forEach(function(de,qe){re[qe]={width:de.width,height:de.height,bitrate:de.bitrate,attrs:de.attrs}}),I.forEach(function(de,qe){oe[qe]={name:de.name,language:de.lang,bitrate:de.bitrate}});var J=Nr(V),ee=J.bytesLoaded,Ne=J.requestStart,He=J.responseStart,Ee=J.responseEnd;u("requestcompleted",$u(Io({},cp(F)),{request_event_type:E,request_bytes_loaded:ee,request_start:Ne,request_response_start:He,request_response_end:Ee,request_type:"manifest",request_hostname:ft(D),request_response_headers:ba($),request_rendition_lists:{media:re,audio:oe,video:{}}}))};r.on(s.Events.MANIFEST_LOADED,c);var m=function(E,_){var w=_.details,I=_.level,D=_.networkDetails,V=_.stats,$=Nr(V),F=$.bytesLoaded,re=$.requestStart,oe=$.responseStart,J=$.responseEnd,ee=w.fragments[w.fragments.length-1],Ne=d(ee)+l(ee.duration);u("requestcompleted",{request_event_type:E,request_bytes_loaded:F,request_start:re,request_response_start:oe,request_response_end:J,request_current_level:I,request_type:"manifest",request_hostname:ft(w.url),request_response_headers:ba(D),video_holdback:w.holdBack&&l(w.holdBack),video_part_holdback:w.partHoldBack&&l(w.partHoldBack),video_part_target_duration:w.partTarget&&l(w.partTarget),video_target_duration:w.targetduration&&l(w.targetduration),video_source_is_live:w.live,player_manifest_newest_program_time:isNaN(Ne)?void 0:Ne})};r.on(s.Events.LEVEL_LOADED,m);var p=function(E,_){var w=_.details,I=_.networkDetails,D=_.stats,V=Nr(D),$=V.bytesLoaded,F=V.requestStart,re=V.responseStart,oe=V.responseEnd;u("requestcompleted",{request_event_type:E,request_bytes_loaded:$,request_start:F,request_response_start:re,request_response_end:oe,request_type:"manifest",request_hostname:ft(w.url),request_response_headers:ba(I)})};r.on(s.Events.AUDIO_TRACK_LOADED,p);var v=function(E,_){var w=_.stats,I=_.networkDetails,D=_.frag;w=w||D.stats;var V=Nr(w),$=V.bytesLoaded,F=V.requestStart,re=V.responseStart,oe=V.responseEnd,J=I?ba(I):void 0,ee={request_event_type:E,request_bytes_loaded:$,request_start:F,request_response_start:re,request_response_end:oe,request_hostname:I?ft(I.responseURL):void 0,request_id:J?So(J):void 0,request_response_headers:J,request_media_duration:D.duration,request_url:I?.responseURL};D.type==="main"?(ee.request_type="media",ee.request_current_level=D.level,ee.request_video_width=(r.levels[D.level]||{}).width,ee.request_video_height=(r.levels[D.level]||{}).height,ee.request_labeled_bitrate=(r.levels[D.level]||{}).bitrate):ee.request_type=D.type,u("requestcompleted",ee)};r.on(s.Events.FRAG_LOADED,v);var b=function(E,_){var w=_.frag,I=w.start,D={currentFragmentPDT:d(w),currentFragmentStart:l(I)};u("fragmentchange",D)};r.on(s.Events.FRAG_CHANGED,b);var f=function(E,_){var w=_.type,I=_.details,D=_.response,V=_.fatal,$=_.frag,F=_.networkDetails,re=$?.url||_.url||"",oe=F?ba(F):void 0;if((I===s.ErrorDetails.MANIFEST_LOAD_ERROR||I===s.ErrorDetails.MANIFEST_LOAD_TIMEOUT||I===s.ErrorDetails.FRAG_LOAD_ERROR||I===s.ErrorDetails.FRAG_LOAD_TIMEOUT||I===s.ErrorDetails.LEVEL_LOAD_ERROR||I===s.ErrorDetails.LEVEL_LOAD_TIMEOUT||I===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||I===s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||I===s.ErrorDetails.SUBTITLE_LOAD_ERROR||I===s.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||I===s.ErrorDetails.KEY_LOAD_ERROR||I===s.ErrorDetails.KEY_LOAD_TIMEOUT)&&u("requestfailed",{request_error:I,request_url:re,request_hostname:ft(re),request_id:oe?So(oe):void 0,request_type:I===s.ErrorDetails.FRAG_LOAD_ERROR||I===s.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":I===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||I===s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":I===s.ErrorDetails.SUBTITLE_LOAD_ERROR||I===s.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":I===s.ErrorDetails.KEY_LOAD_ERROR||I===s.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:D?.code,request_error_text:D?.text}),V){var J,ee="".concat(re?"url: ".concat(re,`
|
|
6
|
+
`):"")+"".concat(D&&(D.code||D.text)?"response: ".concat(D.code,", ").concat(D.text,`
|
|
7
|
+
`):"")+"".concat(_.reason?"failure reason: ".concat(_.reason,`
|
|
8
|
+
`):"")+"".concat(_.level?"level: ".concat(_.level,`
|
|
9
|
+
`):"")+"".concat(_.parent?"parent stream controller: ".concat(_.parent,`
|
|
10
|
+
`):"")+"".concat(_.buffer?"buffer length: ".concat(_.buffer,`
|
|
11
|
+
`):"")+"".concat(_.error?"error: ".concat(_.error,`
|
|
12
|
+
`):"")+"".concat(_.event?"event: ".concat(_.event,`
|
|
13
|
+
`):"")+"".concat(_.err?"error message: ".concat((J=_.err)===null||J===void 0?void 0:J.message,`
|
|
14
|
+
`):"");u("error",{player_error_code:w,player_error_message:I,player_error_context:ee})}};r.on(s.Events.ERROR,f);var T=function(E,_){var w=_.frag,I=w&&w._url||"";u("requestcanceled",{request_event_type:E,request_url:I,request_type:"media",request_hostname:ft(I)})};r.on(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,T);var A=function(E,_){var w=_.level,I=r.levels[w];if(I&&I.attrs&&I.attrs.BANDWIDTH){var D,V=I.attrs.BANDWIDTH,$=parseFloat(I.attrs["FRAME-RATE"]);isNaN($)||(D=$),V?u("renditionchange",{video_source_fps:D,video_source_bitrate:V,video_source_width:I.width,video_source_height:I.height,video_source_rendition_name:I.name,video_source_codec:I?.videoCodec}):o.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};r.on(s.Events.LEVEL_SWITCHED,A),r._stopMuxMonitor=function(){r.off(s.Events.MANIFEST_LOADED,c),r.off(s.Events.LEVEL_LOADED,m),r.off(s.Events.AUDIO_TRACK_LOADED,p),r.off(s.Events.FRAG_LOADED,v),r.off(s.Events.FRAG_CHANGED,b),r.off(s.Events.ERROR,f),r.off(s.Events.FRAG_LOAD_EMERGENCY_ABORTED,T),r.off(s.Events.LEVEL_SWITCHED,A),r.off(s.Events.DESTROYING,r._stopMuxMonitor),delete r._stopMuxMonitor},r.on(s.Events.DESTROYING,r._stopMuxMonitor)}else o.warn("performance timing not supported. Not tracking HLS.js.")}(this.mux,this.id,n.hlsjs,{},n.Hls||window.Hls)):this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(function(n){n&&typeof n._stopMuxMonitor=="function"&&n._stopMuxMonitor()}(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(n){n.dashjs?this.dashjs?this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):(this.dashjs=n.dashjs,Jb(this.mux,this.id,n.dashjs)):this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(function(n){n&&typeof n._stopMuxMonitor=="function"&&n._stopMuxMonitor()}(this.dashjs),this.dashjs=void 0)}}]),e}(),fa=rt(ap());function ll(){return fa.default&&!!(fa.default.fullscreenElement||fa.default.webkitFullscreenElement||fa.default.mozFullScreenElement||fa.default.msFullscreenElement)}var Of=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],Pf={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},bi,nr=rt(Kt());nr.default&&nr.default.WeakMap&&(bi=new WeakMap);var Uf="#EXT-X-TARGETDURATION",Hf="#EXT-X-PART-INF",Wf="#EXT-X-SERVER-CONTROL",Bf="#EXTINF",Vf="#EXT-X-PROGRAM-DATE-TIME",$f="#EXT-X-VERSION",qf="#EXT-X-SESSION-DATA",rs=function(t){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(t),this.manifest};rs.prototype.process=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf(`
|
|
15
|
+
`);e>-1;e=this.buffer.indexOf(`
|
|
16
|
+
`))this.processLine(this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},rs.prototype.processLine=function(t){var e=t.indexOf(":"),n=Gf(t,e),i=n[0],a=n.length===2?Ku(n[1]):void 0;if(i[0]!=="#")this.currentUri.uri=i,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(i){case Uf:if(!isFinite(a)||a<0)return;this.manifest.targetDuration=a,this.setHoldBack();break;case Hf:dl(this.manifest,n),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case Wf:dl(this.manifest,n),this.setHoldBack();break;case Bf:a===0?this.currentUri.duration=.01:a>0&&(this.currentUri.duration=a);break;case Vf:var r=a,s=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=s),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=s;break;case $f:dl(this.manifest,n);break;case qf:var o=jf(n[1]),l=cp(o);Object.assign(this.manifest.sessionData,l)}},rs.prototype.setHoldBack=function(){var t=this.manifest,e=t.serverControl,n=t.targetDuration,i=t.partTargetDuration;if(e){var a="holdBack",r="partHoldBack",s=n&&3*n,o=i&&2*i;n&&!e.hasOwnProperty(a)&&(e[a]=s),s&&e[a]<s&&(e[a]=s),i&&!e.hasOwnProperty(r)&&(e[r]=3*i),i&&e[r]<o&&(e[r]=o)}};var dl=function(t,e){var n,i=fp(e[0].replace("#EXT-X-",""));Yf(e[1])?(n={},n=Object.assign(Ff(e[1]),n)):n=Ku(e[1]),t[i]=n},fp=function(t){return t.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},Ku=function(t){if(t.toLowerCase()==="yes"||t.toLowerCase()==="no")return t.toLowerCase()==="yes";var e=t.indexOf(":")!==-1?t:parseFloat(t);return isNaN(e)?t:e},Kf=function(t){var e={},n=t.split("=");return n.length>1&&(e[fp(n[0])]=Ku(n[1])),e},Ff=function(t){for(var e=t.split(","),n={},i=0;e.length>i;i++){var a=e[i],r=Kf(a);n=Object.assign(r,n)}return n},Yf=function(t){return t.indexOf("=")>-1},Gf=function(t,e){return e===-1?[t]:[t.substring(0,e),t.substring(e+1)]},jf=function(t){var e={};if(t){var n=t.search(",");return[t.slice(0,n),t.slice(n+1)].forEach(function(i,a){for(var r=i.replace(/['"]+/g,"").split("="),s=0;s<r.length;s++)r[s]==="DATA-ID"&&(e["DATA-ID"]=r[1-s]),r[s]==="VALUE"&&(e.VALUE=r[1-s])}),{data:e}}},Qf=rs,Zf={safeCall:function(t,e,n,i){var a=i;if(t&&typeof t[e]=="function")try{a=t[e].apply(t,n)}catch(r){X.info("safeCall error",r)}return a},safeIncrement:ke,getComputedStyle:function(t,e){return t&&e&&nr.default&&typeof nr.default.getComputedStyle=="function"?(bi&&bi.has(t)&&(n=bi.get(t)),n||(n=nr.default.getComputedStyle(t,null),bi&&bi.set(t,n)),n.getPropertyValue(e)):"";var n},secondsToMs:function(t){return Math.floor(1e3*t)},assign:Object.assign,headersStringToObject:qu,cdnHeadersToRequestId:So,extractHostnameAndDomain:Ar,extractHostname:ft,manifestParser:Qf,generateShortID:sp,generateUUID:_r,now:xe.now,findMediaElement:is},zf={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",PLAYBACK_MODE_CHANGE:"playbackmodechange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},pe={},Sn=function(t){var e=arguments;typeof t=="string"?Sn.hasOwnProperty(t)?tr.default.setTimeout(function(){e=Array.prototype.splice.call(e,1),Sn[t].apply(null,e)},0):X.warn("`"+t+"` is an unknown task"):typeof t=="function"?tr.default.setTimeout(function(){t(Sn)},0):X.warn("`"+t+"` is invalid.")},Xf={loaded:xe.now(),NAME:"mux-embed",VERSION:"5.15.0",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(t,e){return function(n,i,a){var r=an(is(i),3),s=r[0],o=r[1],l=r[2],d=n.log,u=n.utils.getComputedStyle,c=n.utils.secondsToMs;if(!s)return d.error("No element was found with the `"+o+"` query selector.");if(l!=="video"&&l!=="audio")return d.error("The element of `"+o+"` was not a media element.");s.mux&&(s.mux.destroy(),delete s.mux,d.warn("Already monitoring this video element, replacing existing event listeners"));var m={getPlayheadTime:function(){return c(s.currentTime)},getStateData:function(){var v,b,f=((v=this.getPlayheadTime)===null||v===void 0?void 0:v.call(this))||c(s.currentTime),T=this.hlsjs&&this.hlsjs.url,A=this.dashjs&&typeof this.dashjs.getSource=="function"&&this.dashjs.getSource(),E={player_is_paused:s.paused,player_width:parseInt(u(s,"width")),player_height:parseInt(u(s,"height")),player_autoplay_on:s.autoplay,player_preload_on:s.preload,player_language_code:s.lang,player_is_fullscreen:ll(),video_poster_url:s.poster,video_source_url:T||A||s.currentSrc,video_source_duration:c(s.duration),video_source_height:s.videoHeight,video_source_width:s.videoWidth,view_dropped_frame_count:s==null||(b=s.getVideoPlaybackQuality)===null||b===void 0?void 0:b.call(s).droppedVideoFrames};if(s.getStartDate&&f>0){var _=s.getStartDate();if(_&&typeof _.getTime=="function"&&_.getTime()){var w=_.getTime();if(E.player_program_time=w+f,s.seekable.length>0){var I=w+s.seekable.end(s.seekable.length-1);E.player_live_edge_program_time=I}}}return E}};(a=Object.assign({automaticErrorTracking:!0},a,m)).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:n.VERSION},a.data),s.mux=s.mux||{},s.mux.deleted=!1,s.mux.emit=function(v,b){n.emit(o,v,b)},s.mux.updateData=function(v){s.mux.emit("hb",v)};var p=function(){d.error("The monitor for this video element has already been destroyed.")};s.mux.destroy=function(){Object.keys(s.mux.listeners).forEach(function(v){s.removeEventListener(v,s.mux.listeners[v],!1)}),delete s.mux.listeners,s.mux.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",s.mux.fullscreenChangeListener,!1),delete s.mux.fullscreenChangeListener),s.mux.destroy=p,s.mux.swapElement=p,s.mux.emit=p,s.mux.addHLSJS=p,s.mux.addDashJS=p,s.mux.removeHLSJS=p,s.mux.removeDashJS=p,s.mux.updateData=p,s.mux.setEmitTranslator=p,s.mux.setStateDataTranslator=p,s.mux.setGetPlayheadTime=p,s.mux.deleted=!0,n.emit(o,"destroy")},s.mux.swapElement=function(v){var b=an(is(v),3),f=b[0],T=b[1],A=b[2];return f?A!=="video"&&A!=="audio"?n.log.error("The element of `"+T+"` was not a media element."):(f.muxId=s.muxId,delete s.muxId,f.mux=f.mux||{},f.mux.listeners=Object.assign({},s.mux.listeners),delete s.mux.listeners,Object.keys(f.mux.listeners).forEach(function(E){s.removeEventListener(E,f.mux.listeners[E],!1),f.addEventListener(E,f.mux.listeners[E],!1)}),f.mux.fullscreenChangeListener=s.mux.fullscreenChangeListener,delete s.mux.fullscreenChangeListener,f.mux.swapElement=s.mux.swapElement,f.mux.destroy=s.mux.destroy,delete s.mux,void(s=f)):n.log.error("No element was found with the `"+T+"` query selector.")},s.mux.addHLSJS=function(v){n.addHLSJS(o,v)},s.mux.addDashJS=function(v){n.addDashJS(o,v)},s.mux.removeHLSJS=function(){n.removeHLSJS(o)},s.mux.removeDashJS=function(){n.removeDashJS(o)},s.mux.setEmitTranslator=function(v){n.setEmitTranslator(o,v)},s.mux.setStateDataTranslator=function(v){n.setStateDataTranslator(o,v)},s.mux.setGetPlayheadTime=function(v){v||(v=a.getPlayheadTime),n.setGetPlayheadTime(o,v)},n.init(o,a),n.emit(o,"playerready"),s.paused||(n.emit(o,"play"),s.readyState>2&&n.emit(o,"playing")),s.mux.listeners={},Of.forEach(function(v){v==="error"&&!a.automaticErrorTracking||(s.mux.listeners[v]=function(){var b={};if(v==="error"){if(!s.error||s.error.code===1)return;b.player_error_code=s.error.code,b.player_error_message=Pf[s.error.code]||s.error.message}n.emit(o,v,b)},s.addEventListener(v,s.mux.listeners[v],!1))}),s.mux.listeners.enterpictureinpicture=function(){n.emit(o,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},s.mux.listeners.leavepictureinpicture=function(){var v=ll()?"fullscreen":"standard";n.emit(o,"playbackmodechange",{player_playback_mode:v,player_playback_mode_data:"{}"})},s.addEventListener("enterpictureinpicture",s.mux.listeners.enterpictureinpicture,!1),s.addEventListener("leavepictureinpicture",s.mux.listeners.leavepictureinpicture,!1),s.mux.fullscreenChangeListener=function(){var v=ll(),b=document.fullscreenElement;if(v&&(b===s||b!=null&&b.contains(s)))n.emit(o,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!v){var f=document.pictureInPictureElement===s?"pip":"standard";n.emit(o,"playbackmodechange",{player_playback_mode:f,player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",s.mux.fullscreenChangeListener,!1)}(Sn,t,e)},destroyMonitor:function(t){var e=an(is(t),1)[0];e&&e.mux&&typeof e.mux.destroy=="function"?e.mux.destroy():X.error("A video element monitor for `"+t+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(t,e){var n=ct(t);pe[n]?pe[n].addHLSJS(e):X.error("A monitor for `"+n+"` has not been initialized.")},addDashJS:function(t,e){var n=ct(t);pe[n]?pe[n].addDashJS(e):X.error("A monitor for `"+n+"` has not been initialized.")},removeHLSJS:function(t){var e=ct(t);pe[e]?pe[e].removeHLSJS():X.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(t){var e=ct(t);pe[e]?pe[e].removeDashJS():X.error("A monitor for `"+e+"` has not been initialized.")},init:function(t,e){nd()&&e&&e.respectDoNotTrack&&X.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var n=ct(t);pe[n]=new Nf(Sn,n,e)},emit:function(t,e,n){var i=ct(t);pe[i]?(pe[i].emit(e,n),e==="destroy"&&delete pe[i]):X.error("A monitor for `"+i+"` has not been initialized.")},updateData:function(t,e){var n=ct(t);pe[n]?pe[n].emit("hb",e):X.error("A monitor for `"+n+"` has not been initialized.")},setEmitTranslator:function(t,e){var n=ct(t);pe[n]?pe[n].emitTranslator=e:X.error("A monitor for `"+n+"` has not been initialized.")},setStateDataTranslator:function(t,e){var n=ct(t);pe[n]?pe[n].stateDataTranslator=e:X.error("A monitor for `"+n+"` has not been initialized.")},setGetPlayheadTime:function(t,e){var n=ct(t);pe[n]?pe[n].getPlayheadTime=e:X.error("A monitor for `"+n+"` has not been initialized.")},checkDoNotTrack:nd,log:X,utils:Zf,events:zf,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(Sn,Xf),tr.default!==void 0&&typeof tr.default.addEventListener=="function"&&tr.default.addEventListener("pagehide",function(t){t.persisted||(Sn.WINDOW_UNLOADING=!0)},!1);var Fu=Sn,H=Lb,ai="video",Te="drm",N={NOT_AN_ERROR:0,NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_NO_STATUS:2000001,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_GENERIC_SERVER_FAIL:25e5,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_KEY_SYSTEM:5000001,ENCRYPTED_GENERATE_REQUEST_FAILED:5000002,ENCRYPTED_UPDATE_LICENSE_FAILED:5000003,ENCRYPTED_UPDATE_SERVER_CERT_FAILED:5000004,ENCRYPTED_CDM_ERROR:5000005,ENCRYPTED_OUTPUT_RESTRICTED:5000006,ENCRYPTED_MISSING_TOKEN:5000002},Ro=t=>t===ai?"playback":t,hn=class Ca extends Error{constructor(e,n=Ca.MEDIA_ERR_CUSTOM,i,a){var r;super(e),this.name="MediaError",this.code=n,this.context=a,this.fatal=i??(n>=Ca.MEDIA_ERR_NETWORK&&n<=Ca.MEDIA_ERR_ENCRYPTED),this.message||(this.message=(r=Ca.defaultMessages[this.code])!=null?r:"")}};hn.MEDIA_ERR_ABORTED=1,hn.MEDIA_ERR_NETWORK=2,hn.MEDIA_ERR_DECODE=3,hn.MEDIA_ERR_SRC_NOT_SUPPORTED=4,hn.MEDIA_ERR_ENCRYPTED=5,hn.MEDIA_ERR_CUSTOM=100,hn.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var C=hn,Yu=(t,e)=>!(n=>n==null)(e)&&t in e,rd={ANY:"any",MUTED:"muted"},j={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},kr="mse",wr="native",Da={HEADER:"header",QUERY:"query",NONE:"none"},Co=Object.values(Da),Rn={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},$c={HLS:Rn.M3U8},h0={upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"},m0={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},p0={DESCENDING:"desc"},sd={code:"en"},be=(t,e,n,i,a=t)=>{a.addEventListener(e,n,i),t.addEventListener("teardown",()=>{a.removeEventListener(e,n)},{once:!0})},Gu=t=>{let e=t.indexOf("?");return e<0?[t]:[t.slice(0,e),t.slice(e)]},Do=t=>{let{type:e}=t;if(e){let n=e.toUpperCase();return Yu(n,$c)?$c[n]:e}return Jf(t)},gp=t=>t==="VOD"?j.ON_DEMAND:j.LIVE,Ep=t=>t==="EVENT"?Number.POSITIVE_INFINITY:t==="VOD"?Number.NaN:0,Jf=t=>{let{src:e}=t;if(!e)return"";let n="";try{n=new URL(e).pathname}catch{console.error("invalid url")}let i=n.lastIndexOf(".");if(i<0)return eg(t)?Rn.M3U8:"";let a=n.slice(i+1).toUpperCase();return Yu(a,Rn)?Rn[a]:""},eg=({src:t,customDomain:e="mux.com"})=>{let n;try{n=new URL(`${t}`)}catch{return!1}let i=n.protocol==="https:",a=n.hostname===`stream.${e}`.toLowerCase(),r=n.pathname.split("/"),s=r.length===2,o=!(r!=null&&r[1].includes("."));return i&&a&&s&&o},fi=t=>{let e=(t??"").split(".")[1];if(e)try{let n=e.replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(n).split("").map(function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}catch{return}};function M(t,e=!0){var n,i;let a=e&&(i=(n=sd)==null?void 0:n[t])!=null?i:t;return new tg(a,e?sd.code:"en")}var tg=class{constructor(t,e=(n=>(n=sd)!=null?n:"en")()){this.message=t,this.locale=e}format(t){return this.message.replace(/\{(\w+)\}/g,(e,n)=>{var i;return(i=t[n])!=null?i:""})}toString(){return this.message}},ng=Object.values(rd),qc=t=>typeof t=="boolean"||typeof t=="string"&&ng.includes(t),ul=(t,e)=>{if(!e)return;let n=t.muted,i=()=>t.muted=n;switch(e){case rd.ANY:t.play().catch(()=>{t.muted=!0,t.play().catch(i)});break;case rd.MUTED:t.muted=!0,t.play().catch(i);break;default:t.play().catch(()=>{})}};function ig(t,e){var n;if(!("videoTracks"in t))return;let i=new WeakMap;e.on(H.Events.MANIFEST_PARSED,function(s,o){r();let l=t.addVideoTrack("main");l.selected=!0;for(let[d,u]of o.levels.entries()){let c=l.addRendition(u.url[0],u.width,u.height,u.videoCodec,u.bitrate);i.set(u,`${d}`),c.id=`${d}`}}),e.on(H.Events.AUDIO_TRACKS_UPDATED,function(s,o){a();for(let l of o.audioTracks){let d=l.default?"main":"alternative",u=t.addAudioTrack(d,l.name,l.lang);u.id=`${l.id}`,l.default&&(u.enabled=!0)}}),t.audioTracks.addEventListener("change",()=>{var s;let o=+((s=[...t.audioTracks].find(d=>d.enabled))==null?void 0:s.id),l=e.audioTracks.map(d=>d.id);o!=e.audioTrack&&l.includes(o)&&(e.audioTrack=o)}),e.on(H.Events.LEVELS_UPDATED,function(s,o){var l;let d=t.videoTracks[(l=t.videoTracks.selectedIndex)!=null?l:0];if(!d)return;let u=o.levels.map(c=>i.get(c));for(let c of t.videoRenditions)c.id&&!u.includes(c.id)&&d.removeRendition(c)}),(n=t.videoRenditions)==null||n.addEventListener("change",s=>{let o=s.target.selectedIndex;o!=e.nextLevel&&(e.nextLevel=o)});let a=()=>{for(let s of t.audioTracks)t.removeAudioTrack(s)},r=()=>{(()=>{for(let s of t.videoTracks)t.removeVideoTrack(s)})(),a()};e.once(H.Events.DESTROYING,r)}var cl=t=>"time"in t?t.time:t.startTime;function ju(t,e,n,i,a,r){let s=document.createElement("track");return s.kind=e,s.label=n,i&&(s.srclang=i),a&&(s.id=a),r&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(e)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),t.append(s),s.track}function Ir(t,e,n){var i;return(i=Array.from(t.querySelectorAll("track")).find(a=>a.track.label===e&&a.track.kind===n))==null?void 0:i.track}async function yp(t,e,n,i){let a=Ir(t,n,i);return a||(a=ju(t,i,n),a.mode="hidden",await new Promise(r=>setTimeout(()=>r(void 0),0))),a.mode!=="hidden"&&(a.mode="hidden"),[...e].sort((r,s)=>cl(s)-cl(r)).forEach(r=>{var s,o;let l=r.value,d=cl(r);if("endTime"in r&&r.endTime!=null)a?.addCue(new VTTCue(d,r.endTime,i==="chapters"?l:JSON.stringify(l??null)));else{let u=Array.prototype.findIndex.call(a?.cues,v=>v.startTime>=d),c=(s=a?.cues)==null?void 0:s[u],m=c?c.startTime:Number.isFinite(t.duration)?t.duration:Number.MAX_SAFE_INTEGER,p=(o=a?.cues)==null?void 0:o[u-1];p&&(p.endTime=d),a?.addCue(new VTTCue(d,m,i==="chapters"?l:JSON.stringify(l??null)))}}),t.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),a}var Qu="cuepoints",_p=Object.freeze({label:Qu});async function Tp(t,e,n=_p){return yp(t,e,n.label,"metadata")}var od=t=>({time:t.startTime,value:JSON.parse(t.text)});function Ap(t,e={label:Qu}){var n,i;let a=Ir(t,e.label,"metadata");if((n=a?.activeCues)==null||!n.length)return;if(a.activeCues.length===1)return od(a.activeCues[0]);let{currentTime:r}=t,s=Array.prototype.find.call((i=a.activeCues)!=null?i:[],({startTime:o,endTime:l})=>o<=r&&l>r);return od(s||a.activeCues[0])}var Zu="chapters",kp=Object.freeze({label:Zu}),ld=t=>({startTime:t.startTime,endTime:t.endTime,value:t.text});async function wp(t,e,n=kp){return yp(t,e,n.label,"chapters")}function Ip(t,e={label:Zu}){var n,i;let a=Ir(t,e.label,"chapters");if((n=a?.activeCues)==null||!n.length)return;if(a.activeCues.length===1)return ld(a.activeCues[0]);let{currentTime:r}=t,s=Array.prototype.find.call((i=a.activeCues)!=null?i:[],({startTime:o,endTime:l})=>o<=r&&l>r);return ld(s||a.activeCues[0])}var ag="v",rg="t",sg="s",Sp="d",Lo=(t,e,n,i,a=!1,r=!(s=>(s=globalThis.navigator)==null?void 0:s.onLine)())=>{var s,o;if(r){let T,A=M("Your device appears to be offline",a),E=C.MEDIA_ERR_NETWORK,_=new C(A,E,!1,T);return _.errorCategory=e,_.muxCode=N.NETWORK_OFFLINE,_.data=t,_}let l="status"in t?t.status:t.code,d=Date.now(),u=C.MEDIA_ERR_NETWORK;if(l===200)return;let c=Ro(e),m=((T,A)=>{var E,_;let w=Ro(T),I=`${w}Token`;return(E=A.tokens)!=null&&E[w]?(_=A.tokens)==null?void 0:_[w]:Yu(I,A)?A[I]:void 0})(e,n),p=(T=>T===ai?ag:T===Te?Sp:void 0)(e),[v]=Gu((s=n.playbackId)!=null?s:"");if(!l||!v)return;let b=fi(m);if(m&&!b){let T=M("The {tokenNamePrefix}-token provided is invalid or malformed.",a).format({tokenNamePrefix:c}),A=M("Compact JWT string: {token}",a).format({token:m}),E=new C(T,u,!0,A);return E.errorCategory=e,E.muxCode=N.NETWORK_TOKEN_MALFORMED,E.data=t,E}if(l>=500){let T=new C("",u,i==null||i);return T.errorCategory=e,T.muxCode=N.NETWORK_UNKNOWN_ERROR,T}if(l===403){if(!b){let T=M("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",a).format({tokenNamePrefix:c,category:e}),A=M("Specified playback ID: {playbackId}",a).format({playbackId:v}),E=new C(T,u,i==null||i,A);return E.errorCategory=e,E.muxCode=N.NETWORK_TOKEN_MISSING,E.data=t,E}if((({exp:T},A=Date.now())=>!T||1e3*T<A)(b,d)){let T={timeStyle:"medium",dateStyle:"medium"},A=M("The video’s secured {tokenNamePrefix}-token has expired.",a).format({tokenNamePrefix:c}),E=M("Expired at: {expiredDate}. Current time: {currentDate}.",a).format({expiredDate:new Intl.DateTimeFormat("en",T).format((o=b.exp)!=null?o:0),currentDate:new Intl.DateTimeFormat("en",T).format(d)}),_=new C(A,u,!0,E);return _.errorCategory=e,_.muxCode=N.NETWORK_TOKEN_EXPIRED,_.data=t,_}if((({sub:T},A)=>T!==A)(b,v)){let T=M("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",a).format({tokenNamePrefix:c}),A=M("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",a).format({tokenNamePrefix:c,playbackId:v,tokenPlaybackId:b.sub}),E=new C(T,u,!0,A);return E.errorCategory=e,E.muxCode=N.NETWORK_TOKEN_SUB_MISMATCH,E.data=t,E}if((({aud:T})=>!T)(b)){let T=M("The {tokenNamePrefix}-token is formatted with incorrect information.",a).format({tokenNamePrefix:c}),A=M("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",a).format({tokenNamePrefix:c,expectedAud:p}),E=new C(T,u,!0,A);return E.errorCategory=e,E.muxCode=N.NETWORK_TOKEN_AUD_MISSING,E.data=t,E}if((({aud:T},A)=>T!==A)(b,p)){let T=M("The {tokenNamePrefix}-token is formatted with incorrect information.",a).format({tokenNamePrefix:c}),A=M("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",a).format({tokenNamePrefix:c,expectedAud:p,aud:b.aud}),E=new C(T,u,!0,A);return E.errorCategory=e,E.muxCode=N.NETWORK_TOKEN_AUD_MISMATCH,E.data=t,E}}if(l===412){let T=M("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",a),A=M("Specified playback ID: {playbackId}",a).format({playbackId:v}),E=new C(T,u,i==null||i,A);return E.errorCategory=e,E.muxCode=N.NETWORK_NOT_READY,E.streamType=n.streamType===j.LIVE?"live":n.streamType===j.ON_DEMAND?"on-demand":"unknown",E.data=t,E}if(l===404){let T=M("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",a),A=M("Specified playback ID: {playbackId}",a).format({playbackId:v}),E=new C(T,u,i==null||i,A);return E.errorCategory=e,E.muxCode=N.NETWORK_NOT_FOUND,E.data=t,E}if(l===400){let T=M("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),A=M("Specified playback ID: {playbackId}",a).format({playbackId:v}),E=new C(T,u,i==null||i,A);return E.errorCategory=e,E.muxCode=N.NETWORK_INVALID_URL,E.data=t,E}let f=new C("",u,i==null||i);return f.errorCategory=e,f.muxCode=N.NETWORK_UNKNOWN_ERROR,f.data=t,f},Kc=H.DefaultConfig.capLevelController,og={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400},dd=class La extends Kc{constructor(e){super(e)}static setMaxAutoResolution(e,n){n?La.maxAutoResolution.set(e,n):La.maxAutoResolution.delete(e)}getMaxAutoResolution(){var e;let n=this.hls;return(e=La.maxAutoResolution.get(n))!=null?e:void 0}get levels(){var e;return(e=this.hls.levels)!=null?e:[]}getValidLevels(e){return this.levels.filter((n,i)=>this.isLevelAllowed(n)&&i<=e)}getMaxLevelCapped(e){let n=this.getValidLevels(e),i=this.getMaxAutoResolution();if(!i)return super.getMaxLevel(e);let a=function(l){let d=l.toLowerCase().trim();return og[d]}(i);if(!a)return super.getMaxLevel(e);let r=n.filter(l=>l.width*l.height<=a),s=r.findIndex(l=>l.width*l.height===a);if(s!==-1){let l=r[s];return n.findIndex(d=>d===l)}if(r.length===0)return 0;let o=r[r.length-1];return n.findIndex(l=>l===o)}getMaxLevel(e){if(this.getMaxAutoResolution()!==void 0)return this.getMaxLevelCapped(e);let n=super.getMaxLevel(e),i=this.getValidLevels(e);if(!i[n])return n;let a=Math.min(i[n].width,i[n].height),r=La.minMaxResolution;return a>=r?n:Kc.getMaxLevelByMediaSize(i,r*(16/9),r)}};dd.minMaxResolution=720,dd.maxAutoResolution=new WeakMap;var hl=dd,Rp="fairplay",lg="playready",dg="widevine",ug=t=>{let e=t.split(`
|
|
17
|
+
`).filter(i=>i.startsWith("#EXT-X-SESSION-DATA"));if(!e.length)return{};let n={};for(let i of e){let a=hg(i),r=a["DATA-ID"];r&&(n[r]={...a})}return{sessionData:n}},cg=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g;function hg(t){let e=[...t.matchAll(cg)];return Object.fromEntries(e.map(([,n,i])=>[n,i]))}var Fc,Yc,Gc,jc,Qc,Zc,zc,mg=t=>{var e,n,i;let a,r=t.split(`
|
|
18
|
+
`),s=(n=((e=r.find(d=>d.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:n.trim(),o=gp(s),l=Ep(s);if(o===j.LIVE){let d=r.find(u=>u.startsWith("#EXT-X-PART-INF"));if(d)a=2*+d.split(":")[1].split("=")[1];else{let u=r.find(m=>m.startsWith("#EXT-X-TARGETDURATION")),c=(i=u?.split(":"))==null?void 0:i[1];a=3*+(c??6)}}return{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:a}},pg=async(t,e)=>{if(e===Rn.MP4)return{streamType:j.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(e===Rn.M3U8){let n=await fetch(t);if(!n.ok)return Promise.reject(n);let i=await n.text(),a=await(r=>{let s=r.split(`
|
|
19
|
+
`).find((o,l,d)=>l&&d[l-1].startsWith("#EXT-X-STREAM-INF"));return fetch(s).then(o=>o.status!==200?Promise.reject(o):o.text())})(i);return{...ug(i),...mg(a)}}return console.error(`Media type ${e} is an unrecognized or unsupported type for src ${t}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}},ud=async(t,e)=>{var n,i;try{let a=await fetch(t);if(!a.ok)throw new Error(`Failed to fetch Mux metadata: ${a.status} ${a.statusText}`);let r=await a.json(),s={};if((n=r?.[0])==null||!n.metadata)return;for(let l of r[0].metadata)l.key&&l.value&&(s[l.key]=l.value);((i=ce.get(e))!=null?i:{}).metadata=s;let o=new CustomEvent("muxmetadata");e.dispatchEvent(o)}catch(a){console.error(a)}},vg=(t,e,n)=>{var i,a,r,s,o,l,d,u;let{streamType:c,targetLiveWindow:m,liveEdgeStartOffset:p,lowLatency:v}=(b=>{var f;let T,A=b.type,E=gp(A),_=Ep(A),w=!((f=b.partList)==null||!f.length);return E===j.LIVE&&(T=w?2*b.partTarget:3*b.targetduration),{streamType:E,targetLiveWindow:_,liveEdgeStartOffset:T,lowLatency:w}})(t);if(c===j.LIVE){v?(n.config.backBufferLength=(i=n.userConfig.backBufferLength)!=null?i:4,n.config.maxFragLookUpTolerance=(a=n.userConfig.maxFragLookUpTolerance)!=null?a:.001,n.config.abrBandWidthUpFactor=(r=n.userConfig.abrBandWidthUpFactor)!=null?r:n.config.abrBandWidthFactor):n.config.backBufferLength=(s=n.userConfig.backBufferLength)!=null?s:8;let b=Object.freeze({get length(){return e.seekable.length},start:f=>e.seekable.start(f),end(f){var T;return f>this.length||f<0||Number.isFinite(e.duration)?e.seekable.end(f):(T=n.liveSyncPosition)!=null?T:e.seekable.end(f)}});((o=ce.get(e))!=null?o:{}).seekable=b}((l=ce.get(e))!=null?l:{}).liveEdgeStartOffset=p,((d=ce.get(e))!=null?d:{}).targetLiveWindow=m,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((u=ce.get(e))!=null?u:{}).streamType=c,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Cp=(Yc=(Fc=globalThis?.navigator)==null?void 0:Fc.userAgent)!=null?Yc:"",bg=(Qc=(jc=(Gc=globalThis?.navigator)==null?void 0:Gc.userAgentData)==null?void 0:jc.platform)!=null?Qc:"",fg=Cp.toLowerCase().includes("android")||["x11","android"].some(t=>bg.toLowerCase().includes(t)),ce=new WeakMap,rn="mux.com",Dp=(zc=(Zc=H).isSupported)==null?void 0:zc.call(Zc),gg=t=>fg||!(e=>/^((?!chrome|android).)*safari/i.test(Cp)&&!!e.canPlayType("application/vnd.apple.mpegurl"))(t),zu=()=>Fu.utils.now(),Eg=Fu.utils.generateUUID,cd=({playbackId:t,customDomain:e=rn,maxResolution:n,minResolution:i,renditionOrder:a,programStartTime:r,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:u=d}={},extraSourceParams:c={}}={})=>{if(!t)return;let[m,p=""]=Gu(t),v=new URL(`https://stream.${e}/${m}.m3u8${p}`);return u||v.searchParams.has("token")?(v.searchParams.forEach((b,f)=>{f!="token"&&v.searchParams.delete(f)}),u&&v.searchParams.set("token",u)):(n&&v.searchParams.set("max_resolution",n),i&&(v.searchParams.set("min_resolution",i),n&&+n.slice(0,-1)<+i.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",i,"maxResolution",n)),a&&v.searchParams.set("rendition_order",a),r&&v.searchParams.set("program_start_time",`${r}`),s&&v.searchParams.set("program_end_time",`${s}`),o&&v.searchParams.set("asset_start_time",`${o}`),l&&v.searchParams.set("asset_end_time",`${l}`),Object.entries(c).forEach(([b,f])=>{f!=null&&v.searchParams.set(b,f)})),v.toString()},Jo=t=>{if(!t)return;let[e]=t.split("?");return e||void 0},Xu=t=>{if(!t||!t.startsWith("https://stream."))return;let[e]=new URL(t).pathname.slice(1).split(/\.m3u8|\//);return e||void 0},Lp=t=>{var e;return(e=ce.get(t))==null?void 0:e.error},hd=t=>{var e,n;return(n=(e=ce.get(t))==null?void 0:e.streamType)!=null?n:j.UNKNOWN},md=t=>{var e,n;return(n=(e=ce.get(t))==null?void 0:e.seekable)!=null?n:t.seekable},pd=.034,Mp=(t,e,n=pd)=>t>e||((i,a,r=pd)=>Math.abs(i-a)<=r)(t,e,n),xp=(t,e)=>{var n,i,a;if(!e||!t.buffered.length)return;if(t.readyState>2)return!1;let r=e.currentLevel>=0?(i=(n=e.levels)==null?void 0:n[e.currentLevel])==null?void 0:i.details:(a=e.levels.find(c=>!!c.details))==null?void 0:a.details;if(!r||r.live)return;let{fragments:s}=r;if(s==null||!s.length)return;if(t.currentTime<t.duration-(r.targetduration+.5))return!1;let o=s[s.length-1];if(t.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=t.buffered.start(t.buffered.length-1),u=t.buffered.end(t.buffered.length-1);return l>d&&l<u},Np=(t,e)=>t.ended||t.loop?t.ended:!(!e||!xp(t,e))||((n,i=pd)=>n.paused&&Mp(n.currentTime,n.duration,i))(t),yg=(t,e,n)=>{Op(e,n,t);let{metadata:i={}}=t,{view_session_id:a=Eg()}=i,r=(d=>{var u,c,m;return(u=d?.metadata)!=null&&u.video_id?d.metadata.video_id:Hp(d)&&(m=(c=Jo(d.playbackId))!=null?c:Xu(d.src))!=null?m:d.src})(t);i.view_session_id=a,i.video_id=r,t.metadata=i,t.drmTypeCb=d=>{var u;(u=e.mux)==null||u.emit("hb",{view_drm_type:d})},ce.set(e,{retryCount:0});let s=_g(t,e),o=(({preload:d,src:u},c,m)=>{let p=_=>{_!=null&&["","none","metadata","auto"].includes(_)?c.setAttribute("preload",_):c.removeAttribute("preload")};if(!m)return p(d),p;let v=!1,b=!1,f=m.config.maxBufferLength,T=m.config.maxBufferSize,A=_=>{p(_);let w=_??c.preload;b||w==="none"||(w==="metadata"?(m.config.maxBufferLength=1,m.config.maxBufferSize=1):(m.config.maxBufferLength=f,m.config.maxBufferSize=T),E())},E=()=>{!v&&u&&(v=!0,m.loadSource(u))};return be(c,"play",()=>{b=!0,m.config.maxBufferLength=f,m.config.maxBufferSize=T,E()},{once:!0}),A(d),A})(t,e,s);t!=null&&t.muxDataKeepSession&&e!=null&&e.mux&&!e.mux.deleted?s&&e.mux.addHLSJS({hlsjs:s,Hls:s?H:void 0}):wg(t,e,s),Ig(t,e,s),async function(d,u=_p){new Promise(c=>{be(d,"loadstart",async()=>{let m=await Tp(d,[],u);be(d,"cuechange",()=>{let p=Ap(d);if(p){let v=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:p});d.dispatchEvent(v)}},{},m),c(m)})})}(e),async function(d,u=kp){new Promise(c=>{be(d,"loadstart",async()=>{let m=await wp(d,[],u);be(d,"cuechange",()=>{let p=Ip(d);if(p){let v=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:p});d.dispatchEvent(v)}},{},m),c(m)})})}(e);let l=((d,u,c)=>{let{autoplay:m}=d,p=!1,v=!1,b=qc(m)?m:!!m,f=()=>{p||be(u,"playing",()=>{p=!0},{once:!0})};if(f(),be(u,"loadstart",()=>{p=!1,f(),ul(u,b)},{once:!0}),be(u,"loadstart",()=>{c||(v=d.streamType&&d.streamType!==j.UNKNOWN?d.streamType===j.LIVE:!Number.isFinite(u.duration)),ul(u,b)},{once:!0}),c&&c.once(H.Events.LEVEL_LOADED,(T,A)=>{var E;v=d.streamType&&d.streamType!==j.UNKNOWN?d.streamType===j.LIVE:(E=A.details.live)!=null&&E}),!b){let T=()=>{!v||Number.isFinite(d.startTime)||(c!=null&&c.liveSyncPosition?u.currentTime=c.liveSyncPosition:Number.isFinite(u.seekable.end(0))&&(u.currentTime=u.seekable.end(0)))};c&&be(u,"play",()=>{u.preload==="metadata"?c.once(H.Events.LEVEL_UPDATED,T):T()},{once:!0})}return T=>{p||(b=qc(T)?T:!!T,ul(u,b))}})(t,e,s);return{engine:s,setAutoplay:l,setPreload:o}},Op=(t,e,n)=>{let i=e?.engine;t!=null&&t.mux&&!t.mux.deleted&&(n!=null&&n.muxDataKeepSession?i&&t.mux.removeHLSJS():(t.mux.destroy(),delete t.mux)),i&&(i.detachMedia(),i.destroy()),t&&(t.hasAttribute("src")&&(t.removeAttribute("src"),t.load()),t.removeEventListener("error",Bp),t.removeEventListener("error",vd),t.removeEventListener("durationchange",Wp),ce.delete(t),t.dispatchEvent(new Event("teardown")))};function Pp(t,e){var n;let i=Do(t);if(i!==Rn.M3U8)return!0;let a=!i||(n=e.canPlayType(i))==null||n,{preferPlayback:r}=t,s=r===wr,o=Dp&&(r===kr||gg(e));return a&&(s||!o)}var _g=(t,e)=>{let{debug:n,streamType:i,startTime:a=-1,metadata:r,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l}=t,d=Do(t)===Rn.M3U8,u=Pp(t,e);if(d&&!u&&Dp){let c={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},m=Tg(i),p=Ag(t),v=[Da.QUERY,Da.HEADER].includes(s)?{useHeaders:s===Da.HEADER,sessionId:r?.view_session_id,contentId:r?.video_id}:void 0,b=o.capLevelToPlayerSize==null?{capLevelController:hl}:{},f=new H({debug:n,startPosition:a,cmcd:v,xhrSetup:(T,A)=>{var E,_;if(s&&s!==Da.QUERY)return;let w=new URL(A);if(!w.searchParams.has("CMCD"))return;let I=((_=(E=w.searchParams.get("CMCD"))==null?void 0:E.split(","))!=null?_:[]).filter(D=>D.startsWith("sid")||D.startsWith("cid")).join(",");w.searchParams.set("CMCD",I),T.open("GET",w)},...b,...c,...m,...p,...o});return b.capLevelController===hl&&l!==void 0&&hl.setMaxAutoResolution(f,l),f.on(H.Events.MANIFEST_PARSED,async function(T,A){var E,_;let w=(E=A.sessionData)==null?void 0:E["com.apple.hls.chapters"];(w!=null&&w.URI||w!=null&&w.VALUE.toLocaleLowerCase().startsWith("http"))&&ud((_=w?.URI)!=null?_:w?.VALUE,e)}),f}},Tg=t=>t===j.LIVE?{backBufferLength:8}:{},Ag=t=>{let{tokens:{drm:e}={},playbackId:n,drmTypeCb:i}=t,a=Jo(n);return e&&a?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:ss(t,"fairplay"),serverCertificateUrl:Up(t,"fairplay")},"com.widevine.alpha":{licenseUrl:ss(t,"widevine")},"com.microsoft.playready":{licenseUrl:ss(t,"playready")}},requestMediaKeySystemAccessFunc:(r,s)=>(r==="com.widevine.alpha"&&(s=[...s.map(o=>{var l;let d=(l=o.videoCapabilities)==null?void 0:l.map(u=>({...u,robustness:"HW_SECURE_ALL"}));return{...o,videoCapabilities:d}}),...s]),navigator.requestMediaKeySystemAccess(r,s).then(o=>{let l=(d=>d.includes("fps")?Rp:d.includes("playready")?lg:d.includes("widevine")?dg:void 0)(r);return i?.(l),o}))}:{}},kg=(t,e)=>{let n=async a=>{let r=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[a],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(o=>{var l;return(l=t.drmTypeCb)==null||l.call(t,Rp),o}).catch(()=>{let o=M("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),l=new C(o,C.MEDIA_ERR_ENCRYPTED,!0);l.errorCategory=Te,l.muxCode=N.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,ze(e,l)});if(!r)return;let s=await r.createMediaKeys();try{let o=await(async l=>{let d=await fetch(l);return d.status!==200?Promise.reject(d):await d.arrayBuffer()})(Up(t,"fairplay")).catch(l=>{if(l instanceof Response){let d=Lo(l,Te,t);return console.error("mediaError",d?.message,d?.context),d?Promise.reject(d):Promise.reject(new Error("Unexpected error in app cert request"))}return Promise.reject(l)});await s.setServerCertificate(o).catch(()=>{let l=M("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),d=new C(l,C.MEDIA_ERR_ENCRYPTED,!0);return d.errorCategory=Te,d.muxCode=N.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(d)})}catch(o){return void ze(e,o)}await e.setMediaKeys(s)},i=async(a,r)=>{let s=e.mediaKeys.createSession(),o=()=>{s.keyStatuses.forEach(d=>(u=>{let c;if(u==="internal-error"){let m=M("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");c=new C(m,C.MEDIA_ERR_ENCRYPTED,!0),c.errorCategory=Te,c.muxCode=N.ENCRYPTED_CDM_ERROR}else if(u==="output-restricted"||u==="output-downscaled"){let m=M("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");c=new C(m,C.MEDIA_ERR_ENCRYPTED,!1),c.errorCategory=Te,c.muxCode=N.ENCRYPTED_OUTPUT_RESTRICTED}c&&ze(e,c)})(d))},l=async d=>{let u=d.message;try{let c=await(async(m,p)=>{let v=await fetch(p,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:m});if(v.status!==200)return Promise.reject(v);let b=await v.arrayBuffer();return new Uint8Array(b)})(u,ss(t,"fairplay"));try{await s.update(c)}catch{let m=M("Failed to update DRM license. This may be an issue with the player or your protected content."),p=new C(m,C.MEDIA_ERR_ENCRYPTED,!0);p.errorCategory=Te,p.muxCode=N.ENCRYPTED_UPDATE_LICENSE_FAILED,ze(e,p)}}catch(c){if(c instanceof Response){let m=Lo(c,Te,t);return console.error("mediaError",m?.message,m?.context),m?void ze(e,m):void console.error("Unexpected error in license key request",c)}console.error(c)}};s.addEventListener("keystatuseschange",o),s.addEventListener("message",l),e.addEventListener("teardown",()=>{s.removeEventListener("keystatuseschange",o),s.removeEventListener("message",l),s.close()},{once:!0}),await s.generateRequest(a,r).catch(d=>{console.error("Failed to generate license request",d);let u=M("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),c=new C(u,C.MEDIA_ERR_ENCRYPTED,!0);return c.errorCategory=Te,c.muxCode=N.ENCRYPTED_GENERATE_REQUEST_FAILED,Promise.reject(c)})};be(e,"encrypted",async a=>{try{let r=a.initDataType;if(r!=="skd")return void console.error(`Received unexpected initialization data type "${r}"`);e.mediaKeys||await n(r);let s=a.initData;if(s==null)return void console.error(`Could not start encrypted playback due to missing initData in ${a.type} event`);await i(r,s)}catch(r){return void ze(e,r)}})},ss=({playbackId:t,tokens:{drm:e}={},customDomain:n=rn},i)=>{let a=Jo(t);return`https://license.${n.toLocaleLowerCase().endsWith(rn)?n:rn}/license/${i}/${a}?token=${e}`},Up=({playbackId:t,tokens:{drm:e}={},customDomain:n=rn},i)=>{let a=Jo(t);return`https://license.${n.toLocaleLowerCase().endsWith(rn)?n:rn}/appcert/${i}/${a}?token=${e}`},Hp=({playbackId:t,src:e,customDomain:n})=>{if(t)return!0;if(typeof e!="string")return!1;let i=window?.location.href,a=new URL(e,i).hostname.toLocaleLowerCase();return a.includes(rn)||!!n&&a.includes(n.toLocaleLowerCase())},wg=(t,e,n)=>{var i;let{envKey:a,disableTracking:r,muxDataSDK:s=Fu,muxDataSDKOptions:o={}}=t,l=Hp(t);if(!r&&(a||l)){let{playerInitTime:d,playerSoftwareName:u,playerSoftwareVersion:c,beaconCollectionDomain:m,debug:p,disableCookies:v}=t,b={...t.metadata,video_title:((i=t?.metadata)==null?void 0:i.video_title)||void 0},f=T=>typeof T.player_error_code!="string"&&(typeof t.errorTranslator=="function"?t.errorTranslator(T):T);s.monitor(e,{debug:p,beaconCollectionDomain:m,hlsjs:n,Hls:n?H:void 0,automaticErrorTracking:!1,errorTranslator:f,disableCookies:v,...o,data:{...a?{env_key:a}:{},player_software_name:u,player_software:u,player_software_version:c,player_init_time:d,...b}})}},Ig=(t,e,n)=>{var i,a;let r,s,o=Pp(t,e),{src:l,customDomain:d=rn}=t,u=()=>{e.ended||t.disablePseudoEnded||!Np(e,n)||(xp(e,n)?e.currentTime=e.buffered.end(e.buffered.length-1):e.dispatchEvent(new Event("ended")))},c=()=>{let m,p,v=md(e);v.length>0&&(m=v.start(0),p=v.end(0)),(s!==p||r!==m)&&e.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),r=m,s=p};if(be(e,"durationchange",c),e&&o){let m=Do(t);if(typeof l=="string"){if(l.endsWith(".mp4")&&l.includes(d)){let b=Xu(l),f=new URL(`https://stream.${d}/${b}/metadata.json`);ud(f.toString(),e)}let p=()=>{if(hd(e)!==j.LIVE||Number.isFinite(e.duration))return;let b=setInterval(c,1e3);e.addEventListener("teardown",()=>{clearInterval(b)},{once:!0}),be(e,"durationchange",()=>{Number.isFinite(e.duration)&&clearInterval(b)})},v=async()=>(async(b,f,T=Do({src:b}))=>{var A,E,_,w;let{streamType:I,targetLiveWindow:D,liveEdgeStartOffset:V,sessionData:$}=await pg(b,T),F=$?.["com.apple.hls.chapters"];(F!=null&&F.URI||F!=null&&F.VALUE.toLocaleLowerCase().startsWith("http"))&&ud((A=F.URI)!=null?A:F.VALUE,f),((E=ce.get(f))!=null?E:{}).liveEdgeStartOffset=V,((_=ce.get(f))!=null?_:{}).targetLiveWindow=D,f.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((w=ce.get(f))!=null?w:{}).streamType=I,f.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))})(l,e,m).then(p).catch(b=>{if(b instanceof Response){let f=Lo(b,ai,t);if(f)return void ze(e,f)}});if(e.preload==="none"){let b=()=>{v(),e.removeEventListener("loadedmetadata",f)},f=()=>{v(),e.removeEventListener("play",b)};be(e,"play",b,{once:!0}),be(e,"loadedmetadata",f,{once:!0})}else v();(i=t.tokens)!=null&&i.drm?kg(t,e):be(e,"encrypted",()=>{let b=M("Attempting to play DRM-protected content without providing a DRM token."),f=new C(b,C.MEDIA_ERR_ENCRYPTED,!0);f.errorCategory=Te,f.muxCode=N.ENCRYPTED_MISSING_TOKEN,ze(e,f)},{once:!0}),e.setAttribute("src",l),t.startTime&&(((a=ce.get(e))!=null?a:{}).startTime=t.startTime,e.addEventListener("durationchange",Wp,{once:!0}))}else e.removeAttribute("src");e.addEventListener("error",Bp),e.addEventListener("error",vd),e.addEventListener("emptied",()=>{e.querySelectorAll("track[data-removeondestroy]").forEach(p=>{p.remove()})},{once:!0}),be(e,"pause",u),be(e,"seeked",u),be(e,"play",()=>{e.ended||Mp(e.currentTime,e.duration)&&(e.currentTime=e.seekable.length?e.seekable.start(0):0)})}else n&&l?(n.once(H.Events.LEVEL_LOADED,(m,p)=>{vg(p.details,e,n),c(),hd(e)===j.LIVE&&!Number.isFinite(e.duration)&&(n.on(H.Events.LEVEL_UPDATED,c),be(e,"durationchange",()=>{Number.isFinite(e.duration)&&n.off(H.Events.LEVELS_UPDATED,c)}))}),n.on(H.Events.ERROR,(m,p)=>{var v,b;let f=Sg(p,t);if(f.muxCode===N.NETWORK_NOT_READY){let T=(v=ce.get(e))!=null?v:{},A=(b=T.retryCount)!=null?b:0;if(A<6){let E=A===0?5e3:6e4,_=new C(`Retrying in ${E/1e3} seconds...`,f.code,f.fatal);return Object.assign(_,f),ze(e,_),void setTimeout(()=>{T.retryCount=A+1,p.details==="manifestLoadError"&&p.url&&n.loadSource(p.url)},E)}{T.retryCount=0;let E=new C('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',f.code,f.fatal);return Object.assign(E,f),void ze(e,E)}}ze(e,f)}),n.on(H.Events.MANIFEST_LOADED,()=>{let m=ce.get(e);m&&m.error&&(m.error=null,m.retryCount=0,e.dispatchEvent(new Event("emptied")),e.dispatchEvent(new Event("loadstart")))}),e.addEventListener("error",vd),be(e,"waiting",u),ig(t,n),function(m,p){p.on(H.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(f,{tracks:T})=>{T.forEach(A=>{var E,_;let w=(E=A.subtitleTrack)!=null?E:A.closedCaptions,I=p.subtitleTracks.findIndex(({lang:V,name:$,type:F})=>V==w?.lang&&$===A.label&&F.toLowerCase()===A.kind),D=((_=A._id)!=null?_:A.default)?"default":`${A.kind}${I}`;ju(m,A.kind,A.label,w?.lang,D,A.default)})});let v=()=>{if(!p.subtitleTracks.length)return;let f=Array.from(m.textTracks).find(E=>E.id&&E.mode==="showing"&&["subtitles","captions"].includes(E.kind));if(!f)return;let T=p.subtitleTracks[p.subtitleTrack],A=T?T.default?"default":`${p.subtitleTracks[p.subtitleTrack].type.toLowerCase()}${p.subtitleTrack}`:void 0;if(p.subtitleTrack<0||f?.id!==A){let E=p.subtitleTracks.findIndex(({lang:_,name:w,type:I,default:D})=>f.id==="default"&&D||_==f.language&&w===f.label&&I.toLowerCase()===f.kind);p.subtitleTrack=E}f?.id===A&&f.cues&&Array.from(f.cues).forEach(E=>{f.addCue(E)})};m.textTracks.addEventListener("change",v),p.on(H.Events.CUES_PARSED,(f,{track:T,cues:A})=>{let E=m.textTracks.getTrackById(T);if(!E)return;let _=E.mode==="disabled";_&&(E.mode="hidden"),A.forEach(w=>{var I;(I=E.cues)!=null&&I.getCueById(w.id)||E.addCue(w)}),_&&(E.mode="disabled")}),p.once(H.Events.DESTROYING,()=>{m.textTracks.removeEventListener("change",v),m.querySelectorAll("track[data-removeondestroy]").forEach(f=>{f.remove()})});let b=()=>{Array.from(m.textTracks).forEach(f=>{var T,A;if(!["subtitles","caption"].includes(f.kind)&&(f.label==="thumbnails"||f.kind==="chapters")){if((T=f.cues)==null||!T.length){let E="track";f.kind&&(E+=`[kind="${f.kind}"]`),f.label&&(E+=`[label="${f.label}"]`);let _=m.querySelector(E),w=(A=_?.getAttribute("src"))!=null?A:"";_?.removeAttribute("src"),setTimeout(()=>{_?.setAttribute("src",w)},0)}f.mode!=="hidden"&&(f.mode="hidden")}})};p.once(H.Events.MANIFEST_LOADED,b),p.once(H.Events.MEDIA_ATTACHED,b)}(e,n),n.attachMedia(e)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")};function Wp(t){var e;let n=t.target,i=(e=ce.get(n))==null?void 0:e.startTime;if(i&&function(a,r,s){r&&s>r&&(s=r);for(let o=0;o<a.length;o++)if(a.start(o)<=s&&a.end(o)>=s)return!0;return!1}(n.seekable,n.duration,i)){let a=n.preload==="auto";a&&(n.preload="none"),n.currentTime=i,a&&(n.preload="auto")}}async function Bp(t){if(!t.isTrusted)return;t.stopImmediatePropagation();let e=t.target;if(e==null||!e.error)return;let{message:n,code:i}=e.error,a=new C(n,i);if(e.src&&i===C.MEDIA_ERR_SRC_NOT_SUPPORTED&&e.readyState===HTMLMediaElement.HAVE_NOTHING)setTimeout(()=>{var r;let s=(r=Lp(e))!=null?r:e.error;s?.code===C.MEDIA_ERR_SRC_NOT_SUPPORTED&&ze(e,a)},500);else{if(e.src&&(i!==C.MEDIA_ERR_DECODE||i!==void 0))try{let{status:r}=await fetch(e.src);a.data={response:{code:r}}}catch{}ze(e,a)}}function ze(t,e){var n;e.fatal&&(((n=ce.get(t))!=null?n:{}).error=e,t.dispatchEvent(new CustomEvent("error",{detail:e})))}function vd(t){var e,n;if(!(t instanceof CustomEvent&&t.detail instanceof C))return;let i=t.target,a=t.detail;!a||!a.fatal||(((e=ce.get(i))!=null?e:{}).error=a,(n=i.mux)==null||n.emit("error",{player_error_code:a.code,player_error_message:a.message,player_error_context:a.context}))}var wt,Ma,os,xa,ls,ds,us,cs,hs,Na,gi,Oa,Sg=(t,e)=>{var n,i,a;t.fatal?console.error("getErrorFromHlsErrorData()",t):e.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",t);let r,s={[H.ErrorTypes.NETWORK_ERROR]:C.MEDIA_ERR_NETWORK,[H.ErrorTypes.MEDIA_ERROR]:C.MEDIA_ERR_DECODE,[H.ErrorTypes.KEY_SYSTEM_ERROR]:C.MEDIA_ERR_ENCRYPTED},o=(l=t,[H.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,H.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(l.details)?C.MEDIA_ERR_NETWORK:s[l.type]);var l;if(o===C.MEDIA_ERR_NETWORK&&t.response){let d=(n=(u=>u.type===H.ErrorTypes.KEY_SYSTEM_ERROR?Te:u.type===H.ErrorTypes.NETWORK_ERROR?ai:void 0)(t))!=null?n:ai;r=(i=Lo(t.response,d,e,t.fatal))!=null?i:new C("",o,t.fatal)}else if(o===C.MEDIA_ERR_ENCRYPTED)if(t.details===H.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE){let d=M("Attempting to play DRM-protected content without providing a DRM token.");r=new C(d,C.MEDIA_ERR_ENCRYPTED,t.fatal),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_MISSING_TOKEN}else if(t.details===H.ErrorDetails.KEY_SYSTEM_NO_ACCESS){let d=M("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.");r=new C(d,C.MEDIA_ERR_ENCRYPTED,t.fatal),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM}else if(t.details===H.ErrorDetails.KEY_SYSTEM_NO_SESSION){let d=M("Failed to generate a DRM license request. This may be an issue with the player or your protected content.");r=new C(d,C.MEDIA_ERR_ENCRYPTED,!0),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_GENERATE_REQUEST_FAILED}else if(t.details===H.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED){let d=M("Failed to update DRM license. This may be an issue with the player or your protected content.");r=new C(d,C.MEDIA_ERR_ENCRYPTED,t.fatal),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_UPDATE_LICENSE_FAILED}else if(t.details===H.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED){let d=M("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate.");r=new C(d,C.MEDIA_ERR_ENCRYPTED,t.fatal),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_UPDATE_SERVER_CERT_FAILED}else if(t.details===H.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR){let d=M("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");r=new C(d,C.MEDIA_ERR_ENCRYPTED,t.fatal),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_CDM_ERROR}else if(t.details===H.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED){let d=M("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");r=new C(d,C.MEDIA_ERR_ENCRYPTED,!1),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_OUTPUT_RESTRICTED}else r=new C(t.error.message,C.MEDIA_ERR_ENCRYPTED,t.fatal),r.errorCategory=Te,r.muxCode=N.ENCRYPTED_ERROR;else r=new C("",o,t.fatal);return r.context||(r.context=`${t.url?`url: ${t.url}
|
|
20
|
+
`:""}${t.response&&(t.response.code||t.response.text)?`response: ${t.response.code}, ${t.response.text}
|
|
21
|
+
`:""}${t.reason?`failure reason: ${t.reason}
|
|
22
|
+
`:""}${t.level?`level: ${t.level}
|
|
23
|
+
`:""}${t.parent?`parent stream controller: ${t.parent}
|
|
24
|
+
`:""}${t.buffer?`buffer length: ${t.buffer}
|
|
25
|
+
`:""}${t.error?`error: ${t.error}
|
|
26
|
+
`:""}${t.event?`event: ${t.event}
|
|
27
|
+
`:""}${t.err?`error message: ${(a=t.err)==null?void 0:a.message}
|
|
28
|
+
`:""}`),r.data=t,r},Vp=t=>{throw TypeError(t)},Ju=(t,e,n)=>e.has(t)||Vp("Cannot "+n),Me=(t,e,n)=>(Ju(t,e,"read from private field"),n?n.call(t):e.get(t)),dt=(t,e,n)=>e.has(t)?Vp("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),et=(t,e,n,i)=>(Ju(t,e,"write to private field"),e.set(t,n),n),Or=(t,e,n)=>(Ju(t,e,"access private method"),n),Rg=(()=>{try{return"0.29.1"}catch{}return"UNKNOWN"})(),y={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo"},Cg=Object.values(y),Xc=Rg,Jc="mux-video",Dg=class extends xr{constructor(){super(),dt(this,gi),dt(this,wt),dt(this,Ma),dt(this,os),dt(this,xa,{}),dt(this,ls,{}),dt(this,ds),dt(this,us),dt(this,cs),dt(this,hs),dt(this,Na,""),et(this,os,zu()),this.nativeEl.addEventListener("muxmetadata",t=>{var e;let n=(a=>{var r;return(r=ce.get(a))==null?void 0:r.metadata})(this.nativeEl),i=(e=this.metadata)!=null?e:{};this.metadata={...n,...i},n?.["com.mux.video.branding"]==="mux-free-plan"&&(et(this,Na,"default"),this.updateLogo())})}static get NAME(){return Jc}static get VERSION(){return Xc}static get observedAttributes(){var t;return[...Cg,...(t=xr.observedAttributes)!=null?t:[]]}static getLogoHTML(t){return t&&t!=="false"?t==="default"?`
|
|
29
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`:`<img part="logo" src="${t}" />`:""}static getTemplateHTML(t={}){var e;return`
|
|
30
|
+
${xr.getTemplateHTML(t)}
|
|
31
|
+
<style>
|
|
32
|
+
:host {
|
|
33
|
+
position: relative;
|
|
34
|
+
}
|
|
35
|
+
slot[name="logo"] {
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: end;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 1rem;
|
|
40
|
+
right: 1rem;
|
|
41
|
+
opacity: 0;
|
|
42
|
+
transition: opacity 0.25s ease-in-out;
|
|
43
|
+
z-index: 1;
|
|
44
|
+
}
|
|
45
|
+
slot[name="logo"]:has([part="logo"]) {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
slot[name="logo"] [part="logo"] {
|
|
49
|
+
width: 5rem;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
user-select: none;
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
54
|
+
<slot name="logo">
|
|
55
|
+
${this.getLogoHTML((e=t[y.LOGO])!=null?e:"")}
|
|
56
|
+
</slot>
|
|
57
|
+
`}get preferCmcd(){var t;return(t=this.getAttribute(y.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?Co.includes(t)?this.setAttribute(y.PREFER_CMCD,t):console.warn(`Invalid value for preferCmcd. Must be one of ${Co.join()}`):this.removeAttribute(y.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(y.PLAYER_INIT_TIME)?+this.getAttribute(y.PLAYER_INIT_TIME):Me(this,os)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(y.PLAYER_INIT_TIME):this.setAttribute(y.PLAYER_INIT_TIME,""+ +t))}get playerSoftwareName(){var t;return(t=Me(this,cs))!=null?t:Jc}set playerSoftwareName(t){et(this,cs,t)}get playerSoftwareVersion(){var t;return(t=Me(this,us))!=null?t:Xc}set playerSoftwareVersion(t){et(this,us,t)}get _hls(){var t;return(t=Me(this,wt))==null?void 0:t.engine}get mux(){var t;return(t=this.nativeEl)==null?void 0:t.mux}get error(){var t;return(t=Lp(this.nativeEl))!=null?t:null}get errorTranslator(){return Me(this,hs)}set errorTranslator(t){et(this,hs,t)}get src(){return this.getAttribute("src")}set src(t){t!==this.src&&(t==null?this.removeAttribute("src"):this.setAttribute("src",t))}get type(){var t;return(t=this.getAttribute(y.TYPE))!=null?t:void 0}set type(t){t!==this.type&&(t?this.setAttribute(y.TYPE,t):this.removeAttribute(y.TYPE))}get preload(){let t=this.getAttribute("preload");return t===""?"auto":["none","metadata","auto"].includes(t)?t:super.preload}set preload(t){t!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(t)?this.setAttribute("preload",t):this.removeAttribute("preload"))}get debug(){return this.getAttribute(y.DEBUG)!=null}set debug(t){t!==this.debug&&(t?this.setAttribute(y.DEBUG,""):this.removeAttribute(y.DEBUG))}get disableTracking(){return this.hasAttribute(y.DISABLE_TRACKING)}set disableTracking(t){t!==this.disableTracking&&this.toggleAttribute(y.DISABLE_TRACKING,!!t)}get disableCookies(){return this.hasAttribute(y.DISABLE_COOKIES)}set disableCookies(t){t!==this.disableCookies&&(t?this.setAttribute(y.DISABLE_COOKIES,""):this.removeAttribute(y.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(y.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(t){t!==this.disablePseudoEnded&&(t?this.setAttribute(y.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(y.DISABLE_PSEUDO_ENDED))}get startTime(){let t=this.getAttribute(y.START_TIME);if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}set startTime(t){t!==this.startTime&&(t==null?this.removeAttribute(y.START_TIME):this.setAttribute(y.START_TIME,`${t}`))}get playbackId(){var t;return this.hasAttribute(y.PLAYBACK_ID)?this.getAttribute(y.PLAYBACK_ID):(t=Xu(this.src))!=null?t:void 0}set playbackId(t){t!==this.playbackId&&(t?this.setAttribute(y.PLAYBACK_ID,t):this.removeAttribute(y.PLAYBACK_ID))}get maxResolution(){var t;return(t=this.getAttribute(y.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(y.MAX_RESOLUTION,t):this.removeAttribute(y.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(y.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(y.MIN_RESOLUTION,t):this.removeAttribute(y.MIN_RESOLUTION))}get maxAutoResolution(){var t;return(t=this.getAttribute(y.MAX_AUTO_RESOLUTION))!=null?t:void 0}set maxAutoResolution(t){t==null?this.removeAttribute(y.MAX_AUTO_RESOLUTION):this.setAttribute(y.MAX_AUTO_RESOLUTION,t)}get renditionOrder(){var t;return(t=this.getAttribute(y.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(y.RENDITION_ORDER,t):this.removeAttribute(y.RENDITION_ORDER))}get programStartTime(){let t=this.getAttribute(y.PROGRAM_START_TIME);if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}set programStartTime(t){t==null?this.removeAttribute(y.PROGRAM_START_TIME):this.setAttribute(y.PROGRAM_START_TIME,`${t}`)}get programEndTime(){let t=this.getAttribute(y.PROGRAM_END_TIME);if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}set programEndTime(t){t==null?this.removeAttribute(y.PROGRAM_END_TIME):this.setAttribute(y.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){let t=this.getAttribute(y.ASSET_START_TIME);if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}set assetStartTime(t){t==null?this.removeAttribute(y.ASSET_START_TIME):this.setAttribute(y.ASSET_START_TIME,`${t}`)}get assetEndTime(){let t=this.getAttribute(y.ASSET_END_TIME);if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}set assetEndTime(t){t==null?this.removeAttribute(y.ASSET_END_TIME):this.setAttribute(y.ASSET_END_TIME,`${t}`)}get customDomain(){var t;return(t=this.getAttribute(y.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(y.CUSTOM_DOMAIN,t):this.removeAttribute(y.CUSTOM_DOMAIN))}get drmToken(){var t;return(t=this.getAttribute(y.DRM_TOKEN))!=null?t:void 0}set drmToken(t){t!==this.drmToken&&(t?this.setAttribute(y.DRM_TOKEN,t):this.removeAttribute(y.DRM_TOKEN))}get playbackToken(){var t,e,n,i;if(this.hasAttribute(y.PLAYBACK_TOKEN))return(t=this.getAttribute(y.PLAYBACK_TOKEN))!=null?t:void 0;if(this.hasAttribute(y.PLAYBACK_ID)){let[,a]=Gu((e=this.playbackId)!=null?e:"");return(n=new URLSearchParams(a).get("token"))!=null?n:void 0}return this.src&&(i=new URLSearchParams(this.src).get("token"))!=null?i:void 0}set playbackToken(t){t!==this.playbackToken&&(t?this.setAttribute(y.PLAYBACK_TOKEN,t):this.removeAttribute(y.PLAYBACK_TOKEN))}get tokens(){let t=this.getAttribute(y.PLAYBACK_TOKEN),e=this.getAttribute(y.DRM_TOKEN);return{...Me(this,ls),...t!=null?{playback:t}:{},...e!=null?{drm:e}:{}}}set tokens(t){et(this,ls,t??{})}get ended(){return Np(this.nativeEl,this._hls)}get envKey(){var t;return(t=this.getAttribute(y.ENV_KEY))!=null?t:void 0}set envKey(t){t!==this.envKey&&(t?this.setAttribute(y.ENV_KEY,t):this.removeAttribute(y.ENV_KEY))}get beaconCollectionDomain(){var t;return(t=this.getAttribute(y.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(y.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(y.BEACON_COLLECTION_DOMAIN))}get streamType(){var t;return(t=this.getAttribute(y.STREAM_TYPE))!=null?t:hd(this.nativeEl)}set streamType(t){t!==this.streamType&&(t?this.setAttribute(y.STREAM_TYPE,t):this.removeAttribute(y.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(y.TARGET_LIVE_WINDOW)?+this.getAttribute(y.TARGET_LIVE_WINDOW):(t=this.nativeEl,(n=(e=ce.get(t))==null?void 0:e.targetLiveWindow)!=null?n:Number.NaN);var t,e,n}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(y.TARGET_LIVE_WINDOW):this.setAttribute(y.TARGET_LIVE_WINDOW,""+ +t))}get liveEdgeStart(){var t,e;if(this.hasAttribute(y.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:n}=this,i=(t=this.nativeEl.seekable.end(0))!=null?t:0,a=(e=this.nativeEl.seekable.start(0))!=null?e:0;return Math.max(a,i-n)}return(n=>{var i;let a=(i=ce.get(n))==null?void 0:i.liveEdgeStartOffset;if(typeof a!="number")return Number.NaN;let r=md(n);return r.length?r.end(r.length-1)-a:Number.NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(y.LIVE_EDGE_OFFSET))return+this.getAttribute(y.LIVE_EDGE_OFFSET)}set liveEdgeOffset(t){t!=this.liveEdgeOffset&&(t==null?this.removeAttribute(y.LIVE_EDGE_OFFSET):this.setAttribute(y.LIVE_EDGE_OFFSET,""+ +t))}get seekable(){return md(this.nativeEl)}async addCuePoints(t){return Tp(this.nativeEl,t)}get activeCuePoint(){return Ap(this.nativeEl)}get cuePoints(){return function(t,e={label:Qu}){let n=Ir(t,e.label,"metadata");return n!=null&&n.cues?Array.from(n.cues,i=>od(i)):[]}(this.nativeEl)}async addChapters(t){return wp(this.nativeEl,t)}get activeChapter(){return Ip(this.nativeEl)}get chapters(){return function(t,e={label:Zu}){var n;let i=Ir(t,e.label,"chapters");return(n=i?.cues)!=null&&n.length?Array.from(i.cues,a=>ld(a)):[]}(this.nativeEl)}getStartDate(){return function(t,e){if(e){let n=e.playingDate;if(n!=null)return new Date(n.getTime()-1e3*t.currentTime)}return typeof t.getStartDate=="function"?t.getStartDate():new Date(NaN)}(this.nativeEl,this._hls)}get currentPdt(){return function(t,e){if(e&&e.playingDate)return e.playingDate;if(typeof t.getStartDate=="function"){let n=t.getStartDate();return new Date(n.getTime()+1e3*t.currentTime)}return new Date(NaN)}(this.nativeEl,this._hls)}get preferPlayback(){let t=this.getAttribute(y.PREFER_PLAYBACK);if(t===kr||t===wr)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===kr||t===wr?this.setAttribute(y.PREFER_PLAYBACK,t):this.removeAttribute(y.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(t=>t.startsWith("metadata-")&&![y.METADATA_URL].includes(t)).reduce((t,e)=>{let n=this.getAttribute(e);return n!=null&&(t[e.replace(/^metadata-/,"").replace(/-/g,"_")]=n),t},{}),...Me(this,xa)}}set metadata(t){et(this,xa,t??{}),this.mux&&this.mux.emit("hb",Me(this,xa))}get _hlsConfig(){return Me(this,ds)}set _hlsConfig(t){et(this,ds,t)}get logo(){var t;return(t=this.getAttribute(y.LOGO))!=null?t:Me(this,Na)}set logo(t){t?this.setAttribute(y.LOGO,t):this.removeAttribute(y.LOGO)}load(){et(this,wt,yg(this,this.nativeEl,Me(this,wt)))}unload(){Op(this.nativeEl,Me(this,wt),this),et(this,wt,void 0)}attributeChangedCallback(t,e,n){var i,a;switch(xr.observedAttributes.includes(t)&&!["src","autoplay","preload"].includes(t)&&super.attributeChangedCallback(t,e,n),t){case y.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=n??void 0;break;case y.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=n??void 0;break;case"src":{let r=!!e,s=!!n;!r&&s?Or(this,gi,Oa).call(this):r&&!s?this.unload():r&&s&&(this.unload(),Or(this,gi,Oa).call(this));break}case"autoplay":if(n===e)break;(i=Me(this,wt))==null||i.setAutoplay(this.autoplay);break;case"preload":if(n===e)break;(a=Me(this,wt))==null||a.setPreload(n);break;case y.PLAYBACK_ID:this.src=cd(this);break;case y.DEBUG:{let r=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=r);break}case y.METADATA_URL:n&&fetch(n).then(r=>r.json()).then(r=>this.metadata=r).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${n}!`));break;case y.STREAM_TYPE:(n==null||n!==e)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case y.TARGET_LIVE_WINDOW:(n==null||n!==e)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case y.LOGO:(n==null||n!==e)&&this.updateLogo();break;case y.DISABLE_TRACKING:if(n==null||n!==e){let r=this.currentTime,s=this.paused;this.unload(),Or(this,gi,Oa).call(this).then(()=>{this.currentTime=r,s||this.play()})}break;case y.DISABLE_COOKIES:(n==null||n!==e)&&this.disableCookies&&document.cookie.split(";").forEach(r=>{r.trim().startsWith("muxData")&&(document.cookie=r.replace(/^ +/,"").replace(/=.*/,"=;expires="+new Date().toUTCString()+";path=/"))})}}updateLogo(){if(!this.shadowRoot)return;let t=this.shadowRoot.querySelector('slot[name="logo"]');if(!t)return;let e=this.constructor.getLogoHTML(Me(this,Na)||this.logo);t.innerHTML=e}connectedCallback(){var t;(t=super.connectedCallback)==null||t.call(this),this.nativeEl&&this.src&&!Me(this,wt)&&Or(this,gi,Oa).call(this)}disconnectedCallback(){this.unload()}handleEvent(t){t.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(t.type,{composed:!0,detail:t.detail}))}};wt=new WeakMap,Ma=new WeakMap,os=new WeakMap,xa=new WeakMap,ls=new WeakMap,ds=new WeakMap,us=new WeakMap,cs=new WeakMap,hs=new WeakMap,Na=new WeakMap,gi=new WeakSet,Oa=async function(){Me(this,Ma)||(await et(this,Ma,Promise.resolve()),et(this,Ma,null),this.load())};const ni=new WeakMap;class ml extends Error{}class Lg extends Error{}const Mg=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function kn(){return globalThis.cast?.framework?.CastContext.getInstance()}function ec(){return kn()?.getCurrentSession()}function pl(){return ec()?.getSessionObj().media[0]}function eh(t){return kn().setOptions({receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0,...t})}const ms=new(globalThis.WeakRef?class extends Set{add(t){super.add(new WeakRef(t))}forEach(t){super.forEach(e=>{const n=e.deref();n&&t(n)})}}:Set),ln=new WeakSet;let _e;var Pr;Pr=()=>{globalThis.chrome?.cast?.isAvailable?_e||(_e=cast.framework,kn().addEventListener(_e.CastContextEventType.CAST_STATE_CHANGED,t=>{ms.forEach(e=>ni.get(e).onCastStateChanged?.(t))}),kn().addEventListener(_e.CastContextEventType.SESSION_STATE_CHANGED,t=>{ms.forEach(e=>ni.get(e).onSessionStateChanged?.(t))}),ms.forEach(t=>ni.get(t).init?.())):console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable)},globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?Pr():customElements.whenDefined("google-cast-button").then(Pr):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(Pr)};let th=0;class xg extends EventTarget{#t;#s;#n;#i;#e="disconnected";#a=!1;#o=new Set;#c=new WeakMap;constructor(e){super(),this.#t=e,ms.add(this),ni.set(this,{init:()=>this.#d(),onCastStateChanged:()=>this.#l(),onSessionStateChanged:()=>this.#p(),getCastPlayer:()=>this.#r}),this.#d()}get#r(){if(ln.has(this.#t))return this.#n}get state(){return this.#e}async watchAvailability(e){if(this.#t.disableRemotePlayback)throw new ml("disableRemotePlayback attribute is present.");return this.#c.set(e,++th),this.#o.add(e),queueMicrotask(()=>e(this.#m())),th}async cancelWatchAvailability(e){if(this.#t.disableRemotePlayback)throw new ml("disableRemotePlayback attribute is present.");e?this.#o.delete(e):this.#o.clear()}async prompt(){if(this.#t.disableRemotePlayback)throw new ml("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new Lg("The RemotePlayback API is disabled on this platform.");const e=ln.has(this.#t);ln.add(this.#t),eh(this.#t.castOptions),Object.entries(this.#i).forEach(([n,i])=>{this.#n.controller.addEventListener(n,i)});try{await kn().requestSession()}catch(n){if(e||ln.delete(this.#t),n==="cancel")return;throw new Error(n)}ni.get(this.#t)?.loadOnPrompt?.()}#h(){ln.has(this.#t)&&(Object.entries(this.#i).forEach(([e,n])=>{this.#n.controller.removeEventListener(e,n)}),ln.delete(this.#t),this.#t.muted=this.#n.isMuted,this.#t.currentTime=this.#n.savedPlayerState.currentTime,this.#n.savedPlayerState.isPaused===!1&&this.#t.play())}#m(){const e=kn()?.getCastState();return e&&e!=="NO_DEVICES_AVAILABLE"}#l(){const e=kn().getCastState();if(ln.has(this.#t)&&e==="CONNECTING"&&(this.#e="connecting",this.dispatchEvent(new Event("connecting"))),!this.#a&&e?.includes("CONNECT")){this.#a=!0;for(let n of this.#o)n(!0)}else if(this.#a&&(!e||e==="NO_DEVICES_AVAILABLE")){this.#a=!1;for(let n of this.#o)n(!1)}}async#p(){const{SESSION_RESUMED:e}=_e.SessionState;if(kn().getSessionState()===e&&this.#t.castSrc===pl()?.media.contentId){ln.add(this.#t),Object.entries(this.#i).forEach(([i,a])=>{this.#n.controller.addEventListener(i,a)});try{await(n=new chrome.cast.media.GetStatusRequest,new Promise((i,a)=>{pl().getStatus(n,i,a)}))}catch(i){console.error(i)}this.#i[_e.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#i[_e.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}var n}#d(){_e&&!this.#s&&(this.#s=!0,eh(this.#t.castOptions),this.#t.textTracks.addEventListener("change",()=>this.#u()),this.#l(),this.#n=new _e.RemotePlayer,new _e.RemotePlayerController(this.#n),this.#i={[_e.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{e===!0?(this.#e="connected",this.dispatchEvent(new Event("connect"))):(this.#h(),this.#e="disconnected",this.dispatchEvent(new Event("disconnect")))},[_e.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#t.dispatchEvent(new Event("durationchange"))},[_e.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[_e.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[_e.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#r?.isMediaLoaded&&this.#t.dispatchEvent(new Event("timeupdate"))},[_e.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#t.dispatchEvent(new Event("resize"))},[_e.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#t.dispatchEvent(new Event(this.paused?"pause":"play"))},[_e.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#r?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#t.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#r?.playerState]))},[_e.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#r?.isMediaLoaded&&(await Promise.resolve(),this.#v())}})}#v(){this.#u()}async#u(){if(!this.#r)return;const e=(this.#n.mediaInfo?.tracks??[]).filter(({type:u})=>u===chrome.cast.media.TrackType.TEXT),n=[...this.#t.textTracks].filter(({kind:u})=>u==="subtitles"||u==="captions"),i=e.map(({language:u,name:c,trackId:m})=>{const{mode:p}=n.find(v=>v.language===u&&v.label===c)??{};return!!p&&{mode:p,trackId:m}}).filter(Boolean),a=i.filter(({mode:u})=>u!=="showing").map(({trackId:u})=>u),r=i.find(({mode:u})=>u==="showing"),s=ec()?.getSessionObj().media[0]?.activeTrackIds??[];let o=s;if(s.length&&(o=o.filter(u=>!a.includes(u))),r?.trackId&&(o=[...o,r.trackId]),o=[...new Set(o)],d=o,(l=s).length!==d.length||!l.every(u=>d.includes(u)))try{const u=new chrome.cast.media.EditTracksInfoRequest(o);await function(c){return new Promise((m,p)=>{pl().editTracksInfo(c,m,p)})}(u)}catch(u){console.error(u)}var l,d}}const Ng=t=>class extends t{static observedAttributes=[...t.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#t={paused:!1};#s={receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0};#n;#i;get remote(){return this.#i?this.#i:globalThis.chrome?(this.disableRemotePlayback||function(){const e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${e}"]`))return;const n=document.createElement("script");n.src=e,document.head.append(n)}(),ni.set(this,{loadOnPrompt:()=>this.#a()}),this.#i=new xg(this)):super.remote}get#e(){return ni.get(this.remote)?.getCastPlayer?.()}attributeChangedCallback(e,n,i){if(super.attributeChangedCallback(e,n,i),e==="cast-receiver"&&i)this.#s.receiverApplicationId=i;else if(this.#e)switch(e){case"cast-stream-type":case"cast-src":this.load()}}async#a(){this.#t.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(e){console.error(e)}}async load(){if(!this.#e)return super.load();const e=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);e.customData=this.castCustomData;const n=[...this.querySelectorAll("track")].filter(({kind:s,src:o})=>o&&(s==="subtitles"||s==="captions")),i=[];let a=0;if(n.length&&(e.tracks=n.map(s=>{const o=++a;i.length===0&&s.track.mode==="showing"&&i.push(o);const l=new chrome.cast.media.Track(o,chrome.cast.media.TrackType.TEXT);return l.trackContentId=s.src,l.trackContentType="text/vtt",l.subtype=s.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,l.name=s.label,l.language=s.srclang,l})),this.castStreamType==="live"?e.streamType=chrome.cast.media.StreamType.LIVE:e.streamType=chrome.cast.media.StreamType.BUFFERED,e.metadata=new chrome.cast.media.GenericMediaMetadata,e.metadata.title=this.title,e.metadata.images=[{url:this.poster}],async function(s){try{const o=(await fetch(s,{method:"HEAD"})).headers.get("Content-Type");return Mg.some(l=>o===l)}catch(o){return console.error("Error while trying to get the Content-Type of the manifest",o),!1}}(this.castSrc)){const s=await async function(o){try{const l=await(await fetch(o)).text();let d=l;const u=function(c){const m=c.split(`
|
|
58
|
+
`),p=[];for(let v=0;v<m.length;v++)if(m[v].trim().startsWith("#EXT-X-STREAM-INF")){const b=m[v+1]?m[v+1].trim():"";b&&!b.startsWith("#")&&p.push(b)}return p}(l);if(u.length>0){const c=new URL(u[0],o).toString();d=await(await fetch(c)).text()}return function(c){if(!c)return;const m=c.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);return m?m[1]:null}(d.split(`
|
|
59
|
+
`).find(c=>!c.trim().startsWith("#")&&c.trim()!==""))}catch(l){return void console.error("Error while trying to parse the manifest playlist",l)}}(this.castSrc);s?.includes("m4s")||s?.includes("mp4")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):s?.includes("ts")&&(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}const r=new chrome.cast.media.LoadRequest(e);r.currentTime=super.currentTime??0,r.autoplay=!this.#t.paused,r.activeTrackIds=i,await ec()?.loadMedia(r),this.dispatchEvent(new Event("volumechange"))}play(){if(!this.#e)return super.play();this.#e.isPaused&&this.#e.controller?.playOrPause()}pause(){this.#e?this.#e.isPaused||this.#e.controller?.playOrPause():super.pause()}get castOptions(){return this.#s}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(e){this.castSrc!=e&&this.setAttribute("cast-src",`${e}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(e){this.setAttribute("cast-content-type",`${e}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(e){this.setAttribute("cast-stream-type",`${e}`)}get castCustomData(){return this.#n}set castCustomData(e){const n=typeof e;["object","undefined"].includes(n)?this.#n=e:console.error(`castCustomData must be nullish or an object but value was of type ${n}`)}get readyState(){if(this.#e)switch(this.#e.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.#e?this.#e.isPaused:super.paused}get muted(){return this.#e?this.#e?.isMuted:super.muted}set muted(e){this.#e?(e&&!this.#e.isMuted||!e&&this.#e.isMuted)&&this.#e.controller?.muteOrUnmute():super.muted=e}get volume(){return this.#e?this.#e?.volumeLevel??1:super.volume}set volume(e){if(this.#e)return this.#e.volumeLevel=+e,void this.#e.controller?.setVolumeLevel();super.volume=e}get duration(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.duration??NaN:super.duration}get currentTime(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.currentTime??0:super.currentTime}set currentTime(e){if(this.#e)return this.#e.currentTime=e,void this.#e.controller?.seek();super.currentTime=e}};var $p=t=>{throw TypeError(t)},nh=(t,e,n)=>e.has(t)||$p("Cannot "+n),qp=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends qp{}globalThis.DocumentFragment=t}var ps,Og=class extends qp{},Pg={customElements:{get(t){},define(t,e,n){},getName:t=>null,upgrade(t){},whenDefined:t=>Promise.resolve(Og)}},vl=typeof window>"u"||globalThis.customElements===void 0?Pg:globalThis,ih=class extends Ng(Mb(Dg)){constructor(){var t,e,n;super(...arguments),t=this,(e=ps).has(t)?$p("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n)}get autoplay(){let t=this.getAttribute("autoplay");return t!==null&&(t===""||t)}set autoplay(t){t!==this.autoplay&&(t?this.setAttribute("autoplay",typeof t=="string"?t:""):this.removeAttribute("autoplay"))}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var t;return(t=((e,n,i)=>(nh(e,n,"read from private field"),i?i.call(e):n.get(e)))(this,ps))!=null?t:this.muxCastCustomData}set castCustomData(t){((e,n,i)=>{nh(e,n,"write to private field"),n.set(e,i)})(this,ps,t)}};ps=new WeakMap,vl.customElements.get("mux-video")||(vl.customElements.define("mux-video",ih),vl.MuxVideoElement=ih);const R={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},K={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},Kp={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Fp=Object.entries(Kp),h=Fp.reduce((t,[e,n])=>(t[e]=n.toLowerCase(),t),{}),sn=Fp.reduce((t,[e,n])=>(t[e]=n.toLowerCase(),t),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(sn).reduce((t,[e,n])=>{const i=h[e];return i&&(t[n]=i),t},{userinactivechange:"userinactive"});const Ug=Object.entries(h).reduce((t,[e,n])=>{const i=sn[e];return i&&(t[n]=i),t},{userinactive:"userinactivechange"}),$t={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},bd="disabled",tc="showing",Hg="mouse",Wg="pen",Bg="touch",ga="unavailable",dn="unsupported",en={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},Vg="fullscreen";function $g(t){if(t){const{id:e,width:n,height:i}=t;return[e,n,i].filter(a=>a!=null).join(":")}}function qg(t){if(t){const[e,n,i]=t.split(":");return{id:e,width:+n,height:+i}}}function Kg(t){if(t){const{id:e,kind:n,language:i,label:a}=t;return[e,n,i,a].filter(r=>r!=null).join(":")}}function Fg(t){if(t){const[e,n,i,a]=t.split(":");return{id:e,kind:n,language:i,label:a}}}function Yg(t){return t.replace(/[-_]([a-z])/g,(e,n)=>n.toUpperCase())}function nc(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Yp(t){return typeof t=="string"&&!isNaN(t)&&!isNaN(parseFloat(t))}const Gp=t=>new Promise(e=>setTimeout(e,t)),ah=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],ir=t=>{if(!nc(t))return"";const e=Math.abs(t),n=e!==t,i=new Date(0,0,0,0,0,e,0);return`${[i.getHours(),i.getMinutes(),i.getSeconds()].map((a,r)=>a&&((s,o)=>`${s} ${s===1?ah[o].singular:ah[o].plural}`)(a,r)).filter(a=>a).join(", ")}${n?" remaining":""}`};function Cn(t,e){let n=!1;t<0&&(n=!0,t=0-t),t=t<0?0:t;let i=Math.floor(t%60),a=Math.floor(t/60%60),r=Math.floor(t/3600);const s=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(r=a=i="0"),r=r>0||o>0?r+":":"",a=((r||s>=10)&&a<10?"0"+a:a)+":",i=i<10?"0"+i:i,(n?"-":"")+r+a+i}var rh;const bl={en:{"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."}};let fd=((rh=globalThis.navigator)==null?void 0:rh.language)||"en";const L=(t,e={})=>(n=>{var i,a,r;const[s]=fd.split("-");return((i=bl[fd])==null?void 0:i[n])||((a=bl[s])==null?void 0:a[n])||((r=bl.en)==null?void 0:r[n])||n})(t).replace(/\{(\w+)\}/g,(n,i)=>i in e?String(e[i]):`{${i}}`);let jp=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}};class Qp extends jp{}let sh=class extends Qp{constructor(){super(...arguments),this.role=null}};const Zp={createElement:function(){return new Sr.HTMLElement},createElementNS:function(){return new Sr.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:t=>!1},Sr={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:Zp,Node:Qp,Element:sh,HTMLElement:class extends sh{constructor(){super(...arguments),this.innerHTML=""}get content(){return new Sr.DocumentFragment}},DocumentFragment:class extends jp{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:t=>null,setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:t=>({matches:!1,media:t}),DOMParser:class{parseFromString(t,e){return{body:{textContent:t}}}}},zp="global"in globalThis&&globalThis?.global===globalThis||typeof window>"u"||window.customElements===void 0,Xp=Object.keys(Sr).every(t=>t in globalThis),g=zp&&!Xp?Sr:globalThis,ge=zp&&!Xp?Zp:globalThis.document,oh=new WeakMap,ic=t=>{let e=oh.get(t);return e||oh.set(t,e=new Set),e},Jp=new g.ResizeObserver(t=>{for(const e of t)for(const n of ic(e.target))n(e)});function da(t,e){ic(t).add(e),Jp.observe(t)}function ua(t,e){const n=ic(t);n.delete(e),n.size||Jp.unobserve(t)}function Xe(t){const e={};for(const n of t)e[n.name]=n.value;return e}function Ve(t){var e;return(e=gd(t))!=null?e:ha(t,"media-controller")}function gd(t){var e;const{MEDIA_CONTROLLER:n}=K,i=t.getAttribute(n);if(i)return(e=el(t))==null?void 0:e.getElementById(i)}const ev=(t,e,n=".value")=>{const i=t.querySelector(n);i&&(i.textContent=e)},tv=(t,e)=>((n,i)=>{const a=`slot[name="${i}"]`,r=n.shadowRoot.querySelector(a);return r?r.children:[]})(t,e)[0],on=(t,e)=>!(!t||!e)&&(!!t?.contains(e)||on(t,e.getRootNode().host)),ha=(t,e)=>t?t.closest(e)||ha(t.getRootNode().host,e):null;function ac(t=document){var e;const n=t?.activeElement;return n?(e=ac(n.shadowRoot))!=null?e:n:null}function el(t){var e;const n=(e=t?.getRootNode)==null?void 0:e.call(t);return n instanceof ShadowRoot||n instanceof Document?n:null}function nv(t,{depth:e=3,checkOpacity:n=!0,checkVisibilityCSS:i=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:n,checkVisibilityCSS:i});let a=t;for(;a&&e>0;){const r=getComputedStyle(a);if(n&&r.opacity==="0"||i&&r.visibility==="hidden"||r.display==="none")return!1;a=a.parentElement,e--}return!0}function Ae(t,e){return function(i,a){var r,s;let o;for(o of(r=i.querySelectorAll("style:not([media])"))!=null?r:[]){let l;try{l=(s=o.sheet)==null?void 0:s.cssRules}catch{continue}for(const d of l??[])if(a(d.selectorText))return d}}(t,i=>i===e)||rc(t,e)}function rc(t,e){var n,i;const a=(n=t.querySelectorAll("style:not([media])"))!=null?n:[],r=a?.[a.length-1];return r?.sheet?(r?.sheet.insertRule(`${e}{}`,r.sheet.cssRules.length),(i=r.sheet.cssRules)==null?void 0:i[r.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ne(t,e,n=Number.NaN){const i=t.getAttribute(e);return i!=null?+i:n}function he(t,e,n){const i=+n;n==null||Number.isNaN(i)?t.hasAttribute(e)&&t.removeAttribute(e):ne(t,e,void 0)!==i&&t.setAttribute(e,`${i}`)}function W(t,e){return t.hasAttribute(e)}function B(t,e,n){n!=null?W(t,e)!=n&&t.toggleAttribute(e,n):t.hasAttribute(e)&&t.removeAttribute(e)}function ie(t,e,n=null){var i;return(i=t.getAttribute(e))!=null?i:n}function ae(t,e,n){if(n==null)return void(t.hasAttribute(e)&&t.removeAttribute(e));const i=`${n}`;ie(t,e,void 0)!==i&&t.setAttribute(e,i)}var We,iv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},un=(t,e,n)=>(iv(t,e,"read from private field"),n?n.call(t):e.get(t)),Ur=(t,e,n,i)=>(iv(t,e,"write to private field"),e.set(t,n),n);class vs extends g.HTMLElement{constructor(){if(super(),((e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)})(this,We,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[K.MEDIA_CONTROLLER,h.MEDIA_PAUSED]}attributeChangedCallback(e,n,i){var a,r,s,o,l;e===K.MEDIA_CONTROLLER&&(n&&((r=(a=un(this,We))==null?void 0:a.unassociateElement)==null||r.call(a,this),Ur(this,We,null)),i&&this.isConnected&&(Ur(this,We,(s=this.getRootNode())==null?void 0:s.getElementById(i)),(l=(o=un(this,We))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,n,i,a;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Ur(this,We,function(r){var s;const o=r.getAttribute(K.MEDIA_CONTROLLER);return o?(s=r.getRootNode())==null?void 0:s.getElementById(o):ha(r,"media-controller")}(this)),this.getAttribute(K.MEDIA_CONTROLLER)&&((n=(e=un(this,We))==null?void 0:e.associateElement)==null||n.call(e,this)),(i=un(this,We))==null||i.addEventListener("pointerdown",this),(a=un(this,We))==null||a.addEventListener("click",this)}disconnectedCallback(){var e,n,i,a;this.getAttribute(K.MEDIA_CONTROLLER)&&((n=(e=un(this,We))==null?void 0:e.unassociateElement)==null||n.call(e,this)),(i=un(this,We))==null||i.removeEventListener("pointerdown",this),(a=un(this,We))==null||a.removeEventListener("click",this),Ur(this,We,null)}handleEvent(e){var n;const i=(n=e.composedPath())==null?void 0:n[0];if(["video","media-controller"].includes(i?.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){const{clientX:a,clientY:r}=e,{left:s,top:o,width:l,height:d}=this.getBoundingClientRect(),u=a-s,c=r-o;if(u<0||c<0||u>l||c>d||l===0&&d===0)return;const m=this._pointerType||"mouse";if(this._pointerType=void 0,m===Bg)return void this.handleTap(e);if(m===Hg||m===Wg)return void this.handleMouseClick(e)}}}get mediaPaused(){return W(this,h.MEDIA_PAUSED)}set mediaPaused(e){B(this,h.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const n=this.mediaPaused?R.MEDIA_PLAY_REQUEST:R.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new g.CustomEvent(n,{composed:!0,bubbles:!0}))}}We=new WeakMap,vs.shadowRootOptions={mode:"open"},vs.getTemplateHTML=function(t){return`
|
|
60
|
+
<style>
|
|
61
|
+
:host {
|
|
62
|
+
display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
66
|
+
`},g.customElements.get("media-gesture-receiver")||g.customElements.define("media-gesture-receiver",vs);var Mo,Ei,Pa,Yi,bs,Ed,av,Ua,fs,yd,rv,_d,sv,ar,gs,Es,fl,Gi,Ha,lh=vs,sc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ze=(t,e,n)=>(sc(t,e,"read from private field"),n?n.call(t):e.get(t)),Ge=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},On=(t,e,n,i)=>(sc(t,e,"write to private field"),e.set(t,n),n),nt=(t,e,n)=>(sc(t,e,"access private method"),n);const x={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"},Gg=Object.values(h);function dh(t,e){var n;if(!t.isConnected)return;const i=function(s){const o=s.split(/\s+/);return Object.fromEntries(o.map(l=>l.split(":")))}((n=t.getAttribute(x.BREAKPOINTS))!=null?n:"sm:384 md:576 lg:768 xl:960"),a=function(s,o){return Object.keys(s).filter(l=>o>=parseInt(s[l]))}(i,e);let r=!1;if(Object.keys(i).forEach(s=>{a.includes(s)?t.hasAttribute(`breakpoint${s}`)||(t.setAttribute(`breakpoint${s}`,""),r=!0):t.hasAttribute(`breakpoint${s}`)&&(t.removeAttribute(`breakpoint${s}`),r=!0)}),r){const s=new CustomEvent(sn.BREAKPOINTS_CHANGE,{detail:a});t.dispatchEvent(s)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(sn.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class ys extends g.HTMLElement{constructor(){if(super(),Ge(this,Ed),Ge(this,yd),Ge(this,_d),Ge(this,ar),Ge(this,Es),Ge(this,Gi),Ge(this,Mo,0),Ge(this,Ei,null),Ge(this,Pa,null),Ge(this,Yi,void 0),this.breakpointsComputed=!1,Ge(this,bs,new MutationObserver(nt(this,Ed,av).bind(this))),Ge(this,Ua,!1),Ge(this,fs,n=>{Ze(this,Ua)||(setTimeout(()=>{(function(i){dh(i.target,i.contentRect.width)})(n),On(this,Ua,!1)},0),On(this,Ua,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const n=Xe(this.attributes),i=this.constructor.getTemplateHTML(n);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}const e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{e.assignedElements({flatten:!0}).length?this.handleMediaUpdated(this.media):Ze(this,Ei)&&this.mediaUnsetCallback(Ze(this,Ei))})}static get observedAttributes(){return[x.AUTOHIDE,x.GESTURES_DISABLED].concat(Gg).filter(e=>![h.MEDIA_RENDITION_LIST,h.MEDIA_AUDIO_TRACK_LIST,h.MEDIA_CHAPTERS_CUES,h.MEDIA_WIDTH,h.MEDIA_HEIGHT,h.MEDIA_ERROR,h.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,n,i){e.toLowerCase()==x.AUTOHIDE&&(this.autohide=i)}get media(){let e=this.querySelector(":scope > [slot=media]");return e?.nodeName=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(On(this,Ei,e),e.localName.includes("-")&&await g.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;Ze(this,bs).observe(this,{childList:!0,subtree:!0}),da(this,Ze(this,fs));const n=this.getAttribute(x.AUDIO)!=null,i=L(n?"audio player":"video player");this.setAttribute("role","region"),this.setAttribute("aria-label",i),this.handleMediaUpdated(this.media),this.setAttribute(x.USER_INACTIVE,""),dh(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=g.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;Ze(this,bs).disconnect(),ua(this,Ze(this,fs)),this.media&&this.mediaUnsetCallback(this.media),(e=g.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){On(this,Ei,null)}handleEvent(e){switch(e.type){case"pointerdown":On(this,Mo,e.timeStamp);break;case"pointermove":nt(this,yd,rv).call(this,e);break;case"pointerup":nt(this,_d,sv).call(this,e);break;case"mouseleave":nt(this,ar,gs).call(this);break;case"mouseup":this.removeAttribute(x.KEYBOARD_CONTROL);break;case"keyup":nt(this,Gi,Ha).call(this),this.setAttribute(x.KEYBOARD_CONTROL,"")}}set autohide(e){const n=Number(e);On(this,Yi,isNaN(n)?0:n)}get autohide(){return(Ze(this,Yi)===void 0?2:Ze(this,Yi)).toString()}get breakpoints(){return ie(this,x.BREAKPOINTS)}set breakpoints(e){ae(this,x.BREAKPOINTS,e)}get audio(){return W(this,x.AUDIO)}set audio(e){B(this,x.AUDIO,e)}get gesturesDisabled(){return W(this,x.GESTURES_DISABLED)}set gesturesDisabled(e){B(this,x.GESTURES_DISABLED,e)}get keyboardControl(){return W(this,x.KEYBOARD_CONTROL)}set keyboardControl(e){B(this,x.KEYBOARD_CONTROL,e)}get noAutohide(){return W(this,x.NO_AUTOHIDE)}set noAutohide(e){B(this,x.NO_AUTOHIDE,e)}get autohideOverControls(){return W(this,x.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){B(this,x.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return W(this,x.USER_INACTIVE)}set userInteractive(e){B(this,x.USER_INACTIVE,e)}}Mo=new WeakMap,Ei=new WeakMap,Pa=new WeakMap,Yi=new WeakMap,bs=new WeakMap,Ed=new WeakSet,av=function(t){const e=this.media;for(const n of t){if(n.type!=="childList")continue;const i=n.removedNodes;for(const a of i){if(a.slot!="media"||n.target!=this)continue;let r=n.previousSibling&&n.previousSibling.previousElementSibling;if(r&&e){let s=r.slot!=="media";for(;(r=r.previousSibling)!==null;)r.slot=="media"&&(s=!1);s&&this.mediaUnsetCallback(a)}else this.mediaUnsetCallback(a)}if(e)for(const a of n.addedNodes)a===e&&this.handleMediaUpdated(e)}},Ua=new WeakMap,fs=new WeakMap,yd=new WeakSet,rv=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-Ze(this,Mo)<250)return;nt(this,Es,fl).call(this),clearTimeout(Ze(this,Pa));const e=this.hasAttribute(x.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&nt(this,Gi,Ha).call(this)},_d=new WeakSet,sv=function(t){if(t.pointerType==="touch"){const e=!this.hasAttribute(x.USER_INACTIVE);[this,this.media].includes(t.target)&&e?nt(this,ar,gs).call(this):nt(this,Gi,Ha).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e?.localName))&&nt(this,Gi,Ha).call(this)},ar=new WeakSet,gs=function(){if(Ze(this,Yi)<0||this.hasAttribute(x.USER_INACTIVE))return;this.setAttribute(x.USER_INACTIVE,"");const t=new g.CustomEvent(sn.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)},Es=new WeakSet,fl=function(){if(!this.hasAttribute(x.USER_INACTIVE))return;this.removeAttribute(x.USER_INACTIVE);const t=new g.CustomEvent(sn.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)},Gi=new WeakSet,Ha=function(){nt(this,Es,fl).call(this),clearTimeout(Ze(this,Pa));const t=parseInt(this.autohide);t<0||On(this,Pa,setTimeout(()=>{nt(this,ar,gs).call(this)},1e3*t))},ys.shadowRootOptions={mode:"open"},ys.getTemplateHTML=function(t){return`
|
|
67
|
+
<style>
|
|
68
|
+
|
|
69
|
+
:host([${h.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
|
|
70
|
+
outline: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host {
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
position: relative;
|
|
76
|
+
display: inline-block;
|
|
77
|
+
line-height: 0;
|
|
78
|
+
background-color: var(--media-background-color, #000);
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host(:not([${x.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 0;
|
|
85
|
+
left: 0;
|
|
86
|
+
bottom: 0;
|
|
87
|
+
right: 0;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-flow: column nowrap;
|
|
90
|
+
align-items: start;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
background: none;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
slot[name=media] {
|
|
96
|
+
display: var(--media-slot-display, contents);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
:host([${x.AUDIO}]) slot[name=media] {
|
|
101
|
+
display: var(--media-slot-display, none);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
:host([${x.AUDIO}]) [part~=layer][part~=gesture-layer] {
|
|
106
|
+
height: 0;
|
|
107
|
+
display: block;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
:host(:not([${x.AUDIO}])[${x.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
|
|
112
|
+
:host(:not([${x.AUDIO}])[${x.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {
|
|
118
|
+
pointer-events: auto;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host(:not([${x.AUDIO}])) *[part~=layer][part~=centered-layer] {
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
:host(:not([${x.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
|
|
127
|
+
:host(:not([${x.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
|
|
128
|
+
align-self: stretch;
|
|
129
|
+
flex-grow: 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
slot[name=middle-chrome] {
|
|
133
|
+
display: inline;
|
|
134
|
+
flex-grow: 1;
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
background: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
::slotted([slot=media]),
|
|
141
|
+
::slotted([slot=poster]) {
|
|
142
|
+
width: 100%;
|
|
143
|
+
height: 100%;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
:host(:not([${x.AUDIO}])) .spacer {
|
|
148
|
+
flex-grow: 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
:host(:-webkit-full-screen) {
|
|
153
|
+
|
|
154
|
+
width: 100% !important;
|
|
155
|
+
height: 100% !important;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
::slotted(:not([slot=media]):not([slot=poster]):not([${x.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {
|
|
160
|
+
opacity: 1;
|
|
161
|
+
transition: var(--media-control-transition-in, opacity 0.25s);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
:host([${x.USER_INACTIVE}]:not([${h.MEDIA_PAUSED}]):not([${h.MEDIA_IS_AIRPLAYING}]):not([${h.MEDIA_IS_CASTING}]):not([${x.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${x.NO_AUTOHIDE}]):not([role=dialog])) {
|
|
166
|
+
opacity: 0;
|
|
167
|
+
transition: var(--media-control-transition-out, opacity 1s);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([${x.USER_INACTIVE}]:not([${x.NO_AUTOHIDE}]):not([${h.MEDIA_PAUSED}]):not([${h.MEDIA_IS_CASTING}]):not([${x.AUDIO}])) ::slotted([slot=media]) {
|
|
171
|
+
cursor: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host([${x.USER_INACTIVE}][${x.AUTOHIDE_OVER_CONTROLS}]:not([${x.NO_AUTOHIDE}]):not([${h.MEDIA_PAUSED}]):not([${h.MEDIA_IS_CASTING}]):not([${x.AUDIO}])) * {
|
|
175
|
+
--media-cursor: none;
|
|
176
|
+
cursor: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
::slotted(media-control-bar) {
|
|
181
|
+
align-self: stretch;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
:host(:not([${x.AUDIO}])[${h.MEDIA_HAS_PLAYED}]) slot[name=poster] {
|
|
186
|
+
display: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
::slotted([role=dialog]) {
|
|
190
|
+
width: 100%;
|
|
191
|
+
height: 100%;
|
|
192
|
+
align-self: center;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
::slotted([role=menu]) {
|
|
196
|
+
align-self: end;
|
|
197
|
+
}
|
|
198
|
+
</style>
|
|
199
|
+
|
|
200
|
+
<slot name="media" part="layer media-layer"></slot>
|
|
201
|
+
<slot name="poster" part="layer poster-layer"></slot>
|
|
202
|
+
<slot name="gestures-chrome" part="layer gesture-layer">
|
|
203
|
+
<media-gesture-receiver slot="gestures-chrome">
|
|
204
|
+
<template shadowrootmode="${lh.shadowRootOptions.mode}">
|
|
205
|
+
${lh.getTemplateHTML({})}
|
|
206
|
+
</template>
|
|
207
|
+
</media-gesture-receiver>
|
|
208
|
+
</slot>
|
|
209
|
+
<span part="layer vertical-layer">
|
|
210
|
+
<slot name="top-chrome" part="top chrome"></slot>
|
|
211
|
+
<slot name="middle-chrome" part="middle chrome"></slot>
|
|
212
|
+
<slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>
|
|
213
|
+
|
|
214
|
+
<slot part="bottom chrome"></slot>
|
|
215
|
+
</span>
|
|
216
|
+
<slot name="dialog" part="layer dialog-layer"></slot>
|
|
217
|
+
`},g.customElements.get("media-container")||g.customElements.define("media-container",ys);var yi,_i,xo,Qn,zt,mn,ov=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Re=(t,e,n)=>(ov(t,e,"read from private field"),n?n.call(t):e.get(t)),Ea=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Hr=(t,e,n,i)=>(ov(t,e,"write to private field"),e.set(t,n),n);class oc{constructor(e,n,{defaultValue:i}={defaultValue:void 0}){Ea(this,zt),Ea(this,yi,void 0),Ea(this,_i,void 0),Ea(this,xo,void 0),Ea(this,Qn,new Set),Hr(this,yi,e),Hr(this,_i,n),Hr(this,xo,new Set(i))}[Symbol.iterator](){return Re(this,zt,mn).values()}get length(){return Re(this,zt,mn).size}get value(){var e;return(e=[...Re(this,zt,mn)].join(" "))!=null?e:""}set value(e){var n;e!==this.value&&(Hr(this,Qn,new Set),this.add(...(n=e?.split(" "))!=null?n:[]))}toString(){return this.value}item(e){return[...Re(this,zt,mn)][e]}values(){return Re(this,zt,mn).values()}forEach(e,n){Re(this,zt,mn).forEach(e,n)}add(...e){var n,i;e.forEach(a=>Re(this,Qn).add(a)),(this.value!==""||(n=Re(this,yi))!=null&&n.hasAttribute(`${Re(this,_i)}`))&&((i=Re(this,yi))==null||i.setAttribute(`${Re(this,_i)}`,`${this.value}`))}remove(...e){var n;e.forEach(i=>Re(this,Qn).delete(i)),(n=Re(this,yi))==null||n.setAttribute(`${Re(this,_i)}`,`${this.value}`)}contains(e){return Re(this,zt,mn).has(e)}toggle(e,n){return n!==void 0?n?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,n){return this.remove(e),this.add(n),e===n}}yi=new WeakMap,_i=new WeakMap,xo=new WeakMap,Qn=new WeakMap,zt=new WeakSet,mn=function(){return Re(this,Qn).size?Re(this,Qn):Re(this,xo)};const lv=(t="")=>{const[e,n,i]=t.split(":"),a=i?decodeURIComponent(i):void 0;return{kind:e==="cc"?$t.CAPTIONS:$t.SUBTITLES,language:n,label:a}},tl=(t="",e={})=>((n="")=>n.split(/\s+/))(t).map(n=>{const i=lv(n);return{...e,...i}}),dv=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?lv(e):e):typeof t=="string"?tl(t):[t]:[],Td=({kind:t,label:e,language:n}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${n}:${encodeURIComponent(e)}`:n,Rr=(t=[])=>Array.prototype.map.call(t,Td).join(" "),uv=t=>{const e=Object.entries(t).map(([n,i])=>((a,r)=>s=>s[a]===r)(n,i));return n=>e.every(i=>i(n))},rr=(t,e=[],n=[])=>{const i=dv(n).map(uv);Array.from(e).filter(a=>i.some(r=>r(a))).forEach(a=>{a.mode=t})},nl=(t,e=()=>!0)=>{if(!t?.textTracks)return[];const n=typeof e=="function"?e:uv(e);return Array.from(t.textTracks).filter(n)},cv=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(h.MEDIA_SUBTITLES_SHOWING)},uh="exitFullscreen"in ge?"exitFullscreen":"webkitExitFullscreen"in ge?"webkitExitFullscreen":"webkitCancelFullScreen"in ge?"webkitCancelFullScreen":void 0,ya="fullscreenElement"in ge?"fullscreenElement":"webkitFullscreenElement"in ge?"webkitFullscreenElement":void 0,jg=t=>{var e;const{media:n,documentElement:i,fullscreenElement:a=n}=t;if(!n||!i)return!1;const r=(s=>{const{documentElement:o,media:l}=s,d=o?.[ya];return!d&&"webkitDisplayingFullscreen"in l&&"webkitPresentationMode"in l&&l.webkitDisplayingFullscreen&&l.webkitPresentationMode===Vg?l:d})(t);if(!r)return!1;if(r===a||r===n)return!0;if(r.localName.includes("-")){let s=r.shadowRoot;if(!(ya in s))return on(r,a);for(;s?.[ya];){if(s[ya]===a)return!0;s=(e=s[ya])==null?void 0:e.shadowRoot}}return!1},Qg="fullscreenEnabled"in ge?"fullscreenEnabled":"webkitFullscreenEnabled"in ge?"webkitFullscreenEnabled":void 0;let gl;const lc=()=>{var t,e;return gl||(gl=(e=(t=ge)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),gl)},Zg=(t,e)=>new Promise(n=>{t.addEventListener("volumechange",()=>n(!0),{signal:e})}),zg=async(t,e)=>{for(let n=0;n<10;n++){if(t.volume===e)return!1;await Gp(10)}return t.volume!==e},Xg=/.*Version\/.*Safari\/.*/.test(g.navigator.userAgent),hv=(t=lc())=>(!g.matchMedia("(display-mode: standalone)").matches||!Xg)&&typeof t?.requestPictureInPicture=="function",mv=(t=lc())=>(e=>{const{documentElement:n,media:i}=e;return!!n?.[Qg]||i&&"webkitSupportsFullscreen"in i})({documentElement:ge,media:t}),Jg=mv(),eE=hv(),tE=!!g.WebKitPlaybackTargetAvailabilityEvent,nE=!!g.chrome,No=t=>nl(t.media,e=>[$t.SUBTITLES,$t.CAPTIONS].includes(e.kind)).sort((e,n)=>e.kind>=n.kind?1:-1),pv=t=>nl(t.media,e=>e.mode===tc&&[$t.SUBTITLES,$t.CAPTIONS].includes(e.kind)),vv=(t,e)=>{const n=No(t),i=pv(t),a=!!i.length;if(n.length){if(e===!1||a&&e!==!0)rr(bd,n,i);else if(e===!0||!a&&e!==!1){let r=n[0];const{options:s}=t;if(!s?.noSubtitlesLangPref){const u=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),c=u?[u,...globalThis.navigator.languages]:globalThis.navigator.languages,m=n.filter(p=>c.some(v=>p.language.toLowerCase().startsWith(v.split("-")[0]))).sort((p,v)=>c.findIndex(b=>p.language.toLowerCase().startsWith(b.split("-")[0]))-c.findIndex(b=>v.language.toLowerCase().startsWith(b.split("-")[0])));m[0]&&(r=m[0])}const{language:o,label:l,kind:d}=r;rr(bd,n,i),rr(tc,n,[{language:o,label:l,kind:d}])}}},dc=(t,e)=>t===e||t!=null&&e!=null&&typeof t==typeof e&&(!(typeof t!="number"||!Number.isNaN(t)||!Number.isNaN(e))||typeof t=="object"&&(Array.isArray(t)?iE(t,e):Object.entries(t).every(([n,i])=>n in e&&dc(i,e[n])))),iE=(t,e)=>{const n=Array.isArray(t),i=Array.isArray(e);return n===i&&(!n&&!i||t.length===e.length&&t.every((a,r)=>dc(a,e[r])))},aE=Object.values(en);let Oo;const rE=(async(t=lc())=>{if(!t)return!1;const e=t.volume;t.volume=e/2+.1;const n=new AbortController,i=await Promise.race([Zg(t,n.signal),zg(t,e)]);return n.abort(),i})().then(t=>(Oo=t,Oo)),sE=new g.DOMParser,oE=t=>t&&sE.parseFromString(t,"text/html").body.textContent||t,Wa={mediaError:{get(t,e){const{media:n}=t;if(e?.type!=="playing")return n?.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var n;const{media:i}=t;if(e?.type!=="playing")return(n=i?.error)==null?void 0:n.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var n,i;const{media:a}=t;if(e?.type!=="playing")return(i=(n=a?.error)==null?void 0:n.message)!=null?i:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;const{media:n}=t;return(e=n?.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;const{media:n}=t;return(e=n?.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;const{media:n}=t;return(e=n?.paused)==null||e},set(t,e){var n;const{media:i}=e;i&&(t?i.pause():(n=i.play())==null||n.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){const{media:n}=t;return!!n&&(e?e.type==="playing":!n.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;const{media:n}=t;return(e=n?.ended)!=null&&e},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;const{media:n}=t;return(e=n?.playbackRate)!=null?e:1},set(t,e){const{media:n}=e;n&&Number.isFinite(+t)&&(n.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;const{media:n}=t;return(e=n?.muted)!=null&&e},set(t,e){const{media:n,options:{noMutedPref:i}={}}=e;if(n){n.muted=t;try{const a=g.localStorage.getItem("media-chrome-pref-muted")!==null,r=n.hasAttribute("muted");if(i)return void(a&&g.localStorage.removeItem("media-chrome-pref-muted"));if(r&&!a)return;g.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(a){console.debug("Error setting muted pref",a)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noMutedPref:n}}=e,{media:i}=e;if(i&&!i.muted&&!n)try{const a=g.localStorage.getItem("media-chrome-pref-muted")==="true";Wa.mediaMuted.set(a,e),t(a)}catch(a){console.debug("Error getting muted pref",a)}}]},mediaLoop:{get(t){const{media:e}=t;return e?.loop},set(t,e){const{media:n}=e;n&&(n.loop=t)},mediaEvents:["medialooprequest"]},mediaVolume:{get(t){var e;const{media:n}=t;return(e=n?.volume)!=null?e:1},set(t,e){const{media:n,options:{noVolumePref:i}={}}=e;if(n){try{t==null?g.localStorage.removeItem("media-chrome-pref-volume"):n.hasAttribute("muted")||i||g.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(a){console.debug("Error setting volume pref",a)}Number.isFinite(+t)&&(n.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noVolumePref:n}}=e;if(!n)try{const{media:i}=e;if(!i)return;const a=g.localStorage.getItem("media-chrome-pref-volume");if(a==null)return;Wa.mediaVolume.set(+a,e),t(+a)}catch(i){console.debug("Error getting volume pref",i)}}]},mediaVolumeLevel:{get(t){const{media:e}=t;return e?.volume===void 0?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;const{media:n}=t;return(e=n?.currentTime)!=null?e:0},set(t,e){const{media:n}=e;n&&nc(t)&&(n.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){const{media:e,options:{defaultDuration:n}={}}=t;return!n||e&&e.duration&&!Number.isNaN(e.duration)&&Number.isFinite(e.duration)?Number.isFinite(e?.duration)?e.duration:Number.NaN:n},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){const{media:e}=t;return e?.readyState<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;const{media:n}=t;if(!((e=n?.seekable)!=null&&e.length))return;const i=n.seekable.start(0),a=n.seekable.end(n.seekable.length-1);return i||a?[Number(i.toFixed(3)),Number(a.toFixed(3))]:void 0},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;const{media:n}=t,i=(e=n?.buffered)!=null?e:[];return Array.from(i).map((a,r)=>[Number(i.start(r).toFixed(3)),Number(i.end(r).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){const{media:e,options:{defaultStreamType:n}={}}=t,i=[en.LIVE,en.ON_DEMAND].includes(n)?n:void 0;if(!e)return i;const{streamType:a}=e;if(aE.includes(a))return a===en.UNKNOWN?i:a;const r=e.duration;return r===1/0?en.LIVE:Number.isFinite(r)?en.ON_DEMAND:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){const{media:e}=t;if(!e)return Number.NaN;const{targetLiveWindow:n}=e,i=Wa.mediaStreamType.get(t);return n!=null&&!Number.isNaN(n)||i!==en.LIVE?n:0},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){const{media:e,options:{liveEdgeOffset:n=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return!Number.isNaN(e.liveEdgeStart)&&e.currentTime>=e.liveEdgeStart;if(Wa.mediaStreamType.get(t)!==en.LIVE)return!1;const i=e.seekable;if(!i)return!0;if(!i.length)return!1;const a=i.end(i.length-1)-n;return e.currentTime>=a},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get:t=>No(t).map(({kind:e,label:n,language:i})=>({kind:e,label:n,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:t=>pv(t).map(({kind:e,label:n,language:i})=>({kind:e,label:n,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var n,i;const{media:a,options:r}=e;if(!a)return;const s=o=>{var l;r.defaultSubtitles&&(o&&![$t.CAPTIONS,$t.SUBTITLES].includes((l=o?.track)==null?void 0:l.kind)||vv(e,!0))};return a.addEventListener("loadstart",s),(n=a.textTracks)==null||n.addEventListener("addtrack",s),(i=a.textTracks)==null||i.addEventListener("removetrack",s),()=>{var o,l;a.removeEventListener("loadstart",s),(o=a.textTracks)==null||o.removeEventListener("addtrack",s),(l=a.textTracks)==null||l.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;const{media:n}=t;if(!n)return[];const[i]=nl(n,{kind:$t.CHAPTERS});return Array.from((e=i?.cues)!=null?e:[]).map(({text:a,startTime:r,endTime:s})=>({text:oE(a),startTime:r,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var n;const{media:i}=e;if(!i)return;const a=i.querySelector('track[kind="chapters"][default][src]'),r=(n=i.shadowRoot)==null?void 0:n.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return a?.addEventListener("load",t),r?.addEventListener("load",t),()=>{a?.removeEventListener("load",t),r?.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,n;const{media:i,documentElement:a}=t;if(!i||!a||!a.pictureInPictureElement)return!1;if(a.pictureInPictureElement===i)return!0;if(a.pictureInPictureElement instanceof HTMLMediaElement)return!!((e=i.localName)!=null&&e.includes("-"))&&on(i,a.pictureInPictureElement);if(a.pictureInPictureElement.localName.includes("-")){let r=a.pictureInPictureElement.shadowRoot;for(;r?.pictureInPictureElement;){if(r.pictureInPictureElement===i)return!0;r=(n=r.pictureInPictureElement)==null?void 0:n.shadowRoot}}return!1},set(t,e){const{media:n}=e;if(n)if(t){if(!ge.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!n.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");const i=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};n.requestPictureInPicture().catch(a=>{if(a.code!==11)throw a;if(n.src){if(n.readyState!==0||n.preload!=="none")throw a;{const r=()=>{n.removeEventListener("loadedmetadata",s),n.preload="none"},s=()=>{n.requestPictureInPicture().catch(i),r()};n.addEventListener("loadedmetadata",s),n.preload="metadata",setTimeout(()=>{n.readyState===0&&i(),r()},1e3)}}else console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.")})}else ge.pictureInPictureElement&&ge.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;const{media:n}=t;return[...(e=n?.videoRenditions)!=null?e:[]].map(i=>({...i}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,n,i;const{media:a}=t;return(i=(n=a?.videoRenditions)==null?void 0:n[(e=a.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:i.id},set(t,e){const{media:n}=e;if(!n?.videoRenditions)return void console.warn("MediaController: Rendition selection not supported by this media.");const i=t,a=Array.prototype.findIndex.call(n.videoRenditions,r=>r.id==i);n.videoRenditions.selectedIndex!=a&&(n.videoRenditions.selectedIndex=a)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;const{media:n}=t;return[...(e=n?.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,n;const{media:i}=t;return(n=[...(e=i?.audioTracks)!=null?e:[]].find(a=>a.enabled))==null?void 0:n.id},set(t,e){const{media:n}=e;if(!n?.audioTracks)return void console.warn("MediaChrome: Audio track selection not supported by this media.");const i=t;for(const a of n.audioTracks)a.enabled=i==a.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get:t=>jg(t),set(t,e,n){var i;t?((a=>{var r;const{media:s,fullscreenElement:o}=a;try{const l=o&&"requestFullscreen"in o?"requestFullscreen":o&&"webkitRequestFullScreen"in o?"webkitRequestFullScreen":void 0;if(l){const d=(r=o[l])==null?void 0:r.call(o);if(d instanceof Promise)return d.catch(()=>{})}else s?.webkitEnterFullscreen?s.webkitEnterFullscreen():s?.requestFullscreen&&s.requestFullscreen()}catch(l){console.error(l)}})(e),n.detail&&((i=e.media)==null||i.focus())):(a=>{var r;const{documentElement:s}=a;if(uh){const o=(r=s?.[uh])==null?void 0:r.call(s);o instanceof Promise&&o.catch(()=>{})}})(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;const{media:n}=t;return!(!n?.remote||((e=n.remote)==null?void 0:e.state)==="disconnected")&&!!n.remote.state},set(t,e){var n,i;const{media:a}=e;a&&(t&&((n=a.remote)==null?void 0:n.state)!=="disconnected"||(t||((i=a.remote)==null?void 0:i.state)==="connected")&&(typeof a.remote.prompt=="function"?a.remote.prompt().catch(()=>{}):console.warn("MediaChrome: Casting is not supported in this environment")))},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get:()=>!1,set(t,e){const{media:n}=e;n&&(n.webkitShowPlaybackTargetPicker&&g.WebKitPlaybackTargetAvailabilityEvent?n.webkitShowPlaybackTargetPicker():console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment"))},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){const{media:e}=t;if(!Jg||!mv(e))return dn}},mediaPipUnavailable:{get(t){const{media:e}=t;return eE&&hv(e)?e?.disablePictureInPicture?ga:void 0:dn}},mediaVolumeUnavailable:{get(t){const{media:e}=t;if(Oo===!1||e?.volume==null)return dn},stateOwnersUpdateHandlers:[t=>{Oo==null&&rE.then(e=>t(e?void 0:dn))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var n;const{media:i}=t;return nE&&((n=i?.remote)!=null&&n.state)?e!=null&&e!=="available"?ga:void 0:dn},stateOwnersUpdateHandlers:[(t,e)=>{var n;const{media:i}=e;if(i)return i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||(n=i?.remote)==null||n.watchAvailability(a=>{t({availability:a?"available":"not-available"})}).catch(a=>{a.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var a;(a=i?.remote)==null||a.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get:(t,e)=>tE?e?.availability==="not-available"?ga:void 0:dn,mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var n;const{media:i}=e;if(i)return i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||(n=i?.remote)==null||n.watchAvailability(a=>{t({availability:a?"available":"not-available"})}).catch(a=>{a.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var a;(a=i?.remote)==null||a.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(t){var e;const{media:n}=t;return n?.videoRenditions?(e=n.videoRenditions)!=null&&e.length?void 0:ga:dn},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,n;const{media:i}=t;return i?.audioTracks?((n=(e=i.audioTracks)==null?void 0:e.length)!=null?n:0)<=1?ga:void 0:dn},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){const{options:{mediaLang:e}={}}=t;return e??"en"}}},lE={[R.MEDIA_PREVIEW_REQUEST](t,e,{detail:n}){var i,a,r;const{media:s}=e,o=n??void 0;let l,d;if(s&&o!=null){const[m]=nl(s,{kind:$t.METADATA,label:"thumbnails"}),p=Array.prototype.find.call((i=m?.cues)!=null?i:[],(v,b,f)=>b===0?v.endTime>o:b===f.length-1?v.startTime<=o:v.startTime<=o&&v.endTime>o);if(p){const v=/'^(?:[a-z]+:)?\/\//i.test(p.text)||(a=s?.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,b=new URL(p.text,v);d=new URLSearchParams(b.hash).get("#xywh").split(",").map(f=>+f),l=b.href}}const u=t.mediaDuration.get(e);let c=(r=t.mediaChaptersCues.get(e).find((m,p,v)=>p===v.length-1&&u===m.endTime?m.startTime<=o&&m.endTime>=o:m.startTime<=o&&m.endTime>o))==null?void 0:r.text;return n!=null&&c==null&&(c=""),{mediaPreviewTime:o,mediaPreviewImage:l,mediaPreviewCoords:d,mediaPreviewChapter:c}},[R.MEDIA_PAUSE_REQUEST](t,e){t.mediaPaused.set(!0,e)},[R.MEDIA_PLAY_REQUEST](t,e){var n,i,a,r;const s=t.mediaStreamType.get(e)===en.LIVE,o=!((n=e.options)!=null&&n.noAutoSeekToLive),l=t.mediaTargetLiveWindow.get(e)>0;if(s&&o&&!l){const d=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(d){const u=d-((r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0);t.mediaCurrentTime.set(u,e)}}t.mediaPaused.set(!1,e)},[R.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:n}){const i=n;t.mediaPlaybackRate.set(i,e)},[R.MEDIA_MUTE_REQUEST](t,e){t.mediaMuted.set(!0,e)},[R.MEDIA_UNMUTE_REQUEST](t,e){t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t.mediaMuted.set(!1,e)},[R.MEDIA_LOOP_REQUEST](t,e,{detail:n}){const i=!!n;return t.mediaLoop.set(i,e),{mediaLoop:i}},[R.MEDIA_VOLUME_REQUEST](t,e,{detail:n}){const i=n;i&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t.mediaVolume.set(i,e)},[R.MEDIA_SEEK_REQUEST](t,e,{detail:n}){const i=n;t.mediaCurrentTime.set(i,e)},[R.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var n,i,a;const r=(n=t.mediaSeekable.get(e))==null?void 0:n[1];if(Number.isNaN(Number(r)))return;const s=r-((a=(i=e.options)==null?void 0:i.seekToLiveOffset)!=null?a:0);t.mediaCurrentTime.set(s,e)},[R.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:n}){var i;const{options:a}=e,r=No(e),s=dv(n),o=(i=s[0])==null?void 0:i.language;o&&!a.noSubtitlesLangPref&&g.localStorage.setItem("media-chrome-pref-subtitles-lang",o),rr(tc,r,s)},[R.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:n}){const i=No(e);rr(bd,i,n??[])},[R.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:n}){vv(e,n)},[R.MEDIA_RENDITION_REQUEST](t,e,{detail:n}){const i=n;t.mediaRenditionSelected.set(i,e)},[R.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:n}){const i=n;t.mediaAudioTrackEnabled.set(i,e)},[R.MEDIA_ENTER_PIP_REQUEST](t,e){t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t.mediaIsPip.set(!0,e)},[R.MEDIA_EXIT_PIP_REQUEST](t,e){t.mediaIsPip.set(!1,e)},[R.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e,n){t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t.mediaIsFullscreen.set(!0,e,n)},[R.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t.mediaIsFullscreen.set(!1,e)},[R.MEDIA_ENTER_CAST_REQUEST](t,e){t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t.mediaIsCasting.set(!0,e)},[R.MEDIA_EXIT_CAST_REQUEST](t,e){t.mediaIsCasting.set(!1,e)},[R.MEDIA_AIRPLAY_REQUEST](t,e){t.mediaIsAirplaying.set(!0,e)}},dE=({media:t,fullscreenElement:e,documentElement:n,stateMediator:i=Wa,requestMap:a=lE,options:r={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{const o=[],l={options:{...r}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const u=b=>{b!=null&&(dc(b,d)||(d=Object.freeze({...d,...b}),o.forEach(f=>f(d))))},c=()=>{const b=Object.entries(i).reduce((f,[T,{get:A}])=>(f[T]=A(l),f),{});u(b)},m={};let p;const v=async(b,f)=>{var T,A,E,_,w,I,D,V,$,F,re,oe,J,ee,Ne,He;const Ee=!!p;if(p={...l,...p??{},...b},Ee)return;await(async(...G)=>{await Promise.all(G.filter(Fe=>Fe).map(async Fe=>{if(!("localName"in Fe&&Fe instanceof g.HTMLElement))return;const va=Fe.localName;if(!va.includes("-"))return;const Lr=g.customElements.get(va);Lr&&Fe instanceof Lr||(await g.customElements.whenDefined(va),g.customElements.upgrade(Fe))}))})(...Object.values(b));const de=o.length>0&&f===0&&s,qe=l.media!==p.media,Yt=((T=l.media)==null?void 0:T.textTracks)!==((A=p.media)==null?void 0:A.textTracks),Gt=((E=l.media)==null?void 0:E.videoRenditions)!==((_=p.media)==null?void 0:_.videoRenditions),yt=((w=l.media)==null?void 0:w.audioTracks)!==((I=p.media)==null?void 0:I.audioTracks),Ke=((D=l.media)==null?void 0:D.remote)!==((V=p.media)==null?void 0:V.remote),Oe=l.documentElement!==p.documentElement,st=!!l.media&&(qe||de),Dn=!!(($=l.media)!=null&&$.textTracks)&&(Yt||de),Cr=!!((F=l.media)!=null&&F.videoRenditions)&&(Gt||de),Dr=!!((re=l.media)!=null&&re.audioTracks)&&(yt||de),ot=!!((oe=l.media)!=null&&oe.remote)&&(Ke||de),_t=!!l.documentElement&&(Oe||de),pa=st||Dn||Cr||Dr||ot||_t,oi=o.length===0&&f===1&&s,kc=!!p.media&&(qe||oi),wc=!!((J=p.media)!=null&&J.textTracks)&&(Yt||oi),Ic=!!((ee=p.media)!=null&&ee.videoRenditions)&&(Gt||oi),Sc=!!((Ne=p.media)!=null&&Ne.audioTracks)&&(yt||oi),Rc=!!((He=p.media)!=null&&He.remote)&&(Ke||oi),Cc=!!p.documentElement&&(Oe||oi),Dc=kc||wc||Ic||Sc||Rc||Cc;if(!(pa||Dc))return Object.entries(p).forEach(([G,Fe])=>{l[G]=Fe}),c(),void(p=void 0);Object.entries(i).forEach(([G,{get:Fe,mediaEvents:va=[],textTracksEvents:Lr=[],videoRenditionsEvents:Ib=[],audioTracksEvents:Sb=[],remoteEvents:Rb=[],rootEvents:Cb=[],stateOwnersUpdateHandlers:Db=[]}])=>{m[G]||(m[G]={});const Ye=te=>{const De=Fe(l,te);u({[G]:De})};let Ie;Ie=m[G].mediaEvents,va.forEach(te=>{Ie&&st&&(l.media.removeEventListener(te,Ie),m[G].mediaEvents=void 0),kc&&(p.media.addEventListener(te,Ye),m[G].mediaEvents=Ye)}),Ie=m[G].textTracksEvents,Lr.forEach(te=>{var De,lt;Ie&&Dn&&((De=l.media.textTracks)==null||De.removeEventListener(te,Ie),m[G].textTracksEvents=void 0),wc&&((lt=p.media.textTracks)==null||lt.addEventListener(te,Ye),m[G].textTracksEvents=Ye)}),Ie=m[G].videoRenditionsEvents,Ib.forEach(te=>{var De,lt;Ie&&Cr&&((De=l.media.videoRenditions)==null||De.removeEventListener(te,Ie),m[G].videoRenditionsEvents=void 0),Ic&&((lt=p.media.videoRenditions)==null||lt.addEventListener(te,Ye),m[G].videoRenditionsEvents=Ye)}),Ie=m[G].audioTracksEvents,Sb.forEach(te=>{var De,lt;Ie&&Dr&&((De=l.media.audioTracks)==null||De.removeEventListener(te,Ie),m[G].audioTracksEvents=void 0),Sc&&((lt=p.media.audioTracks)==null||lt.addEventListener(te,Ye),m[G].audioTracksEvents=Ye)}),Ie=m[G].remoteEvents,Rb.forEach(te=>{var De,lt;Ie&&ot&&((De=l.media.remote)==null||De.removeEventListener(te,Ie),m[G].remoteEvents=void 0),Rc&&((lt=p.media.remote)==null||lt.addEventListener(te,Ye),m[G].remoteEvents=Ye)}),Ie=m[G].rootEvents,Cb.forEach(te=>{Ie&&_t&&(l.documentElement.removeEventListener(te,Ie),m[G].rootEvents=void 0),Cc&&(p.documentElement.addEventListener(te,Ye),m[G].rootEvents=Ye)});const Mr=m[G].stateOwnersUpdateHandlers;if(Mr&&pa&&(Array.isArray(Mr)?Mr:[Mr]).forEach(te=>{typeof te=="function"&&te()}),Dc){const te=Db.map(De=>De(Ye,p)).filter(De=>typeof De=="function");m[G].stateOwnersUpdateHandlers=te.length===1?te[0]:te}else pa&&(m[G].stateOwnersUpdateHandlers=void 0)}),Object.entries(p).forEach(([G,Fe])=>{l[G]=Fe}),c(),p=void 0};return v({media:t,fullscreenElement:e,documentElement:n,options:r}),{dispatch(b){const{type:f,detail:T}=b;a[f]&&d.mediaErrorCode==null?u(a[f](i,l,b)):f==="mediaelementchangerequest"?v({media:T}):f==="fullscreenelementchangerequest"?v({fullscreenElement:T}):f==="documentelementchangerequest"?v({documentElement:T}):f==="optionschangerequest"&&(Object.entries(T??{}).forEach(([A,E])=>{l.options[A]=E}),c())},getState:()=>d,subscribe:b=>(v({},o.length+1),o.push(b),b(d),()=>{const f=o.indexOf(b);f>=0&&(v({},o.length-1),o.splice(f,1))})}};var Tn,Ba,Y,Pn,Va,It,_s,Ts,Ad,Yn,Ti,As,kd,wd,bv,uc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},P=(t,e,n)=>(uc(t,e,"read from private field"),n?n.call(t):e.get(t)),ut=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Xt=(t,e,n,i)=>(uc(t,e,"write to private field"),e.set(t,n),n),Ht=(t,e,n)=>(uc(t,e,"access private method"),n);const ch=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],Ai="defaultsubtitles",ki="defaultstreamtype",sr="defaultduration",El="fullscreenelement",li="hotkeys",hh="keyboardbackwardseekoffset",mh="keyboardforwardseekoffset",ph="keyboarddownvolumestep",vh="keyboardupvolumestep",yl="keysused",bh="lang",fh="loop",Wt="liveedgeoffset",$a="noautoseektolive",Wr="nodefaultstore",di="nohotkeys",wi="nomutedpref",Id="nosubtitleslangpref",Ii="novolumepref",ji="seektoliveoffset";class fv extends ys{constructor(){super(),ut(this,Ts),ut(this,Yn),ut(this,As),ut(this,wd),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,ut(this,Tn,new oc(this,li)),ut(this,Ba,void 0),ut(this,Y,void 0),ut(this,Pn,null),ut(this,Va,void 0),ut(this,It,void 0),ut(this,_s,n=>{var i;(i=P(this,Y))==null||i.dispatch(n)}),this.associateElement(this);let e={};Xt(this,Va,n=>{Object.entries(n).forEach(([i,a])=>{if(i in e&&e[i]===a)return;this.propagateMediaState(i,a);const r=i.toLowerCase(),s=new g.CustomEvent(Ug[r],{composed:!0,detail:a});this.dispatchEvent(s)}),e=n}),this.hasAttribute(di)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(di,li,ki,Ai,sr,wi,Ii,bh,fh)}get mediaStore(){return P(this,Y)}set mediaStore(e){var n,i;P(this,Y)&&((n=P(this,It))==null||n.call(this),Xt(this,It,void 0)),Xt(this,Y,e),P(this,Y)||this.hasAttribute(Wr)?Xt(this,It,(i=P(this,Y))==null?void 0:i.subscribe(P(this,Va))):Ht(this,Ts,Ad).call(this)}get fullscreenElement(){var e;return(e=P(this,Ba))!=null?e:this}set fullscreenElement(e){var n;this.hasAttribute(El)&&this.removeAttribute(El),Xt(this,Ba,e),(n=P(this,Y))==null||n.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return W(this,Ai)}set defaultSubtitles(e){B(this,Ai,e)}get defaultStreamType(){return ie(this,ki)}set defaultStreamType(e){ae(this,ki,e)}get defaultDuration(){return ne(this,sr)}set defaultDuration(e){he(this,sr,e)}get noHotkeys(){return W(this,di)}set noHotkeys(e){B(this,di,e)}get keysUsed(){return ie(this,yl)}set keysUsed(e){ae(this,yl,e)}get liveEdgeOffset(){return ne(this,Wt)}set liveEdgeOffset(e){he(this,Wt,e)}get noAutoSeekToLive(){return W(this,$a)}set noAutoSeekToLive(e){B(this,$a,e)}get noVolumePref(){return W(this,Ii)}set noVolumePref(e){B(this,Ii,e)}get noMutedPref(){return W(this,wi)}set noMutedPref(e){B(this,wi,e)}get noSubtitlesLangPref(){return W(this,Id)}set noSubtitlesLangPref(e){B(this,Id,e)}get noDefaultStore(){return W(this,Wr)}set noDefaultStore(e){B(this,Wr,e)}attributeChangedCallback(e,n,i){var a,r,s,o,l,d,u,c,m,p,v,b;if(super.attributeChangedCallback(e,n,i),e===di)i!==n&&i===""?(this.hasAttribute(li)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):i!==n&&i===null&&this.enableHotkeys();else if(e===li)P(this,Tn).value=i;else if(e===Ai&&i!==n)(a=P(this,Y))==null||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(Ai)}});else if(e===ki)(s=P(this,Y))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(r=this.getAttribute(ki))!=null?r:void 0}});else if(e===Wt)(o=P(this,Y))==null||o.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(Wt)?+this.getAttribute(Wt):void 0,seekToLiveOffset:this.hasAttribute(ji)?void 0:+this.getAttribute(Wt)}});else if(e===ji)(l=P(this,Y))==null||l.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(ji)?+this.getAttribute(ji):void 0}});else if(e===$a)(d=P(this,Y))==null||d.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute($a)}});else if(e===El){const f=i?(u=this.getRootNode())==null?void 0:u.getElementById(i):void 0;Xt(this,Ba,f),(c=P(this,Y))==null||c.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===bh&&i!==n?(fd=i,(m=P(this,Y))==null||m.dispatch({type:"optionschangerequest",detail:{mediaLang:i}})):e===fh&&i!==n?(p=P(this,Y))==null||p.dispatch({type:R.MEDIA_LOOP_REQUEST,detail:i!=null}):e===Ii&&i!==n?(v=P(this,Y))==null||v.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(Ii)}}):e===wi&&i!==n&&((b=P(this,Y))==null||b.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(wi)}}))}connectedCallback(){var e,n;P(this,Y)||this.hasAttribute(Wr)||Ht(this,Ts,Ad).call(this),(e=P(this,Y))==null||e.dispatch({type:"documentelementchangerequest",detail:ge}),super.connectedCallback(),P(this,Y)&&!P(this,It)&&Xt(this,It,(n=P(this,Y))==null?void 0:n.subscribe(P(this,Va))),this.hasAttribute(di)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,n,i,a;(e=super.disconnectedCallback)==null||e.call(this),P(this,Y)&&((n=P(this,Y))==null||n.dispatch({type:"documentelementchangerequest",detail:void 0}),(i=P(this,Y))==null||i.dispatch({type:R.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),P(this,It)&&((a=P(this,It))==null||a.call(this),Xt(this,It,void 0))}mediaSetCallback(e){var n;super.mediaSetCallback(e),(n=P(this,Y))==null||n.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var n;super.mediaUnsetCallback(e),(n=P(this,Y))==null||n.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,n){yh(this.mediaStateReceivers,e,n)}associateElement(e){if(!e)return;const{associatedElementSubscriptions:n}=this;if(n.has(e))return;const i=this.registerMediaStateReceiver.bind(this),a=this.unregisterMediaStateReceiver.bind(this),r=hE(e,i,a);Object.values(R).forEach(s=>{e.addEventListener(s,P(this,_s))}),n.set(e,r)}unassociateElement(e){if(!e)return;const{associatedElementSubscriptions:n}=this;n.has(e)&&(n.get(e)(),n.delete(e),Object.values(R).forEach(i=>{e.removeEventListener(i,P(this,_s))}))}registerMediaStateReceiver(e){if(!e)return;const n=this.mediaStateReceivers;n.indexOf(e)>-1||(n.push(e),P(this,Y)&&Object.entries(P(this,Y).getState()).forEach(([i,a])=>{yh([e],i,a)}))}unregisterMediaStateReceiver(e){const n=this.mediaStateReceivers,i=n.indexOf(e);i<0||n.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",Ht(this,As,kd))}disableHotkeys(){this.removeEventListener("keydown",Ht(this,As,kd)),this.removeEventListener("keyup",Ht(this,Yn,Ti))}get hotkeys(){return ie(this,li)}set hotkeys(e){ae(this,li,e)}keyboardShortcutHandler(e){var n,i,a,r,s,o,l,d,u;const c=e.target;if(((a=(i=(n=c.getAttribute(yl))==null?void 0:n.split(" "))!=null?i:c?.keysUsed)!=null?a:[]).map(b=>b==="Space"?" ":b).filter(Boolean).includes(e.key))return;let m,p,v;if(!P(this,Tn).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&P(this,Tn).contains("nospace"))&&(!(e.shiftKey&&(e.key==="/"||e.key==="?"))||!P(this,Tn).contains("noshift+/")))switch(e.key){case" ":case"k":m=P(this,Y).getState().mediaPaused?R.MEDIA_PLAY_REQUEST:R.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new g.CustomEvent(m,{composed:!0,bubbles:!0}));break;case"m":m=this.mediaStore.getState().mediaVolumeLevel==="off"?R.MEDIA_UNMUTE_REQUEST:R.MEDIA_MUTE_REQUEST,this.dispatchEvent(new g.CustomEvent(m,{composed:!0,bubbles:!0}));break;case"f":m=this.mediaStore.getState().mediaIsFullscreen?R.MEDIA_EXIT_FULLSCREEN_REQUEST:R.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new g.CustomEvent(m,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new g.CustomEvent(R.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{const b=this.hasAttribute(hh)?+this.getAttribute(hh):10;p=Math.max(((r=this.mediaStore.getState().mediaCurrentTime)!=null?r:0)-b,0),v=new g.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(v);break}case"ArrowRight":case"l":{const b=this.hasAttribute(mh)?+this.getAttribute(mh):10;p=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+b,0),v=new g.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(v);break}case"ArrowUp":{const b=this.hasAttribute(vh)?+this.getAttribute(vh):.025;p=Math.min(((o=this.mediaStore.getState().mediaVolume)!=null?o:1)+b,1),v=new g.CustomEvent(R.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(v);break}case"ArrowDown":{const b=this.hasAttribute(ph)?+this.getAttribute(ph):.025;p=Math.max(((l=this.mediaStore.getState().mediaVolume)!=null?l:1)-b,0),v=new g.CustomEvent(R.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(v);break}case"<":{const b=(d=this.mediaStore.getState().mediaPlaybackRate)!=null?d:1;p=Math.max(b-.25,.25).toFixed(2),v=new g.CustomEvent(R.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(v);break}case">":{const b=(u=this.mediaStore.getState().mediaPlaybackRate)!=null?u:1;p=Math.min(b+.25,2).toFixed(2),v=new g.CustomEvent(R.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:p}),this.dispatchEvent(v);break}case"/":case"?":e.shiftKey&&Ht(this,wd,bv).call(this);break;case"p":m=this.mediaStore.getState().mediaIsPip?R.MEDIA_EXIT_PIP_REQUEST:R.MEDIA_ENTER_PIP_REQUEST,v=new g.CustomEvent(m,{composed:!0,bubbles:!0}),this.dispatchEvent(v)}}}Tn=new WeakMap,Ba=new WeakMap,Y=new WeakMap,Pn=new WeakMap,Va=new WeakMap,It=new WeakMap,_s=new WeakMap,Ts=new WeakSet,Ad=function(){var t;this.mediaStore=dE({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(Ai),defaultDuration:this.hasAttribute(sr)?+this.getAttribute(sr):void 0,defaultStreamType:(t=this.getAttribute(ki))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(Wt)?+this.getAttribute(Wt):void 0,seekToLiveOffset:this.hasAttribute(ji)?+this.getAttribute(ji):this.hasAttribute(Wt)?+this.getAttribute(Wt):void 0,noAutoSeekToLive:this.hasAttribute($a),noVolumePref:this.hasAttribute(Ii),noMutedPref:this.hasAttribute(wi),noSubtitlesLangPref:this.hasAttribute(Id)}})},Yn=new WeakSet,Ti=function(t){const{key:e,shiftKey:n}=t;n&&(e==="/"||e==="?")||ch.includes(e)?this.keyboardShortcutHandler(t):this.removeEventListener("keyup",Ht(this,Yn,Ti))},As=new WeakSet,kd=function(t){var e;const{metaKey:n,altKey:i,key:a,shiftKey:r}=t,s=r&&(a==="/"||a==="?");if(s&&((e=P(this,Pn))!=null&&e.open))return void this.removeEventListener("keyup",Ht(this,Yn,Ti));if(n||i||!s&&!ch.includes(a))return void this.removeEventListener("keyup",Ht(this,Yn,Ti));const o=t.target,l=o instanceof HTMLElement&&(o.tagName.toLowerCase()==="media-volume-range"||o.tagName.toLowerCase()==="media-time-range");![" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(a)||P(this,Tn).contains(`no${a.toLowerCase()}`)||a===" "&&P(this,Tn).contains("nospace")||l||t.preventDefault(),this.addEventListener("keyup",Ht(this,Yn,Ti),{once:!0})},wd=new WeakSet,bv=function(){P(this,Pn)||(Xt(this,Pn,ge.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(P(this,Pn))),P(this,Pn).open=!0};const uE=Object.values(h),cE=Object.values(Kp),gv=t=>{var e,n,i,a;let{observedAttributes:r}=t.constructor;!r&&((e=t.nodeName)!=null&&e.includes("-"))&&(g.customElements.upgrade(t),{observedAttributes:r}=t.constructor);const s=(a=(i=(n=t?.getAttribute)==null?void 0:n.call(t,K.MEDIA_CHROME_ATTRIBUTES))==null?void 0:i.split)==null?void 0:a.call(i,/\s+/);return Array.isArray(r||s)?(r||s).filter(o=>uE.includes(o)):[]},Sd=t=>{return!((n=(e=t).nodeName)!=null&&n.includes("-"))||!g.customElements.get((i=e.nodeName)==null?void 0:i.toLowerCase())||e instanceof g.customElements.get(e.nodeName.toLowerCase())||g.customElements.upgrade(e),cE.some(a=>a in e)||!!gv(t).length;var e,n,i},gh=t=>{var e;return(e=t?.join)==null?void 0:e.call(t,":")},Eh={[h.MEDIA_SUBTITLES_LIST]:Rr,[h.MEDIA_SUBTITLES_SHOWING]:Rr,[h.MEDIA_SEEKABLE]:gh,[h.MEDIA_BUFFERED]:t=>t?.map(gh).join(" "),[h.MEDIA_PREVIEW_COORDS]:t=>t?.join(" "),[h.MEDIA_RENDITION_LIST]:function(t){return t?.map($g).join(" ")},[h.MEDIA_AUDIO_TRACK_LIST]:function(t){return t?.map(Kg).join(" ")}},Un=(t,e)=>{if((i=(n=t).closest)!=null&&i.call(n,'*[slot="media"]'))return;var n,i;const a=(s,o)=>{var l,d;Sd(s)&&o(s);const{children:u=[]}=s??{};[...u,...(d=(l=s?.shadowRoot)==null?void 0:l.children)!=null?d:[]].forEach(c=>Un(c,o))},r=t?.nodeName.toLowerCase();!r.includes("-")||Sd(t)?a(t,e):g.customElements.whenDefined(r).then(()=>{a(t,e)})},yh=(t,e,n)=>{t.forEach(i=>{if(e in i)return void(i[e]=n);const a=gv(i),r=e.toLowerCase();a.includes(r)&&(async(s,o,l)=>{var d,u;if(s.isConnected||await Gp(0),typeof l=="boolean"||l==null)return B(s,o,l);if(typeof l=="number")return he(s,o,l);if(typeof l=="string")return ae(s,o,l);if(Array.isArray(l)&&!l.length)return s.removeAttribute(o);const c=(u=(d=Eh[o])==null?void 0:d.call(Eh,l))!=null?u:l;s.setAttribute(o,c)})(i,r,n)})},hE=(t,e,n)=>{Un(t,e);const i=l=>{var d;const u=(d=l?.composedPath()[0])!=null?d:l.target;e(u)},a=l=>{var d;const u=(d=l?.composedPath()[0])!=null?d:l.target;n(u)};t.addEventListener(R.REGISTER_MEDIA_STATE_RECEIVER,i),t.addEventListener(R.UNREGISTER_MEDIA_STATE_RECEIVER,a);let r=[];const s=l=>{const d=l.target;d.name!=="media"&&(r.forEach(u=>Un(u,n)),r=[...d.assignedElements({flatten:!0})],r.forEach(u=>Un(u,e)))};t.addEventListener("slotchange",s);const o=new MutationObserver(l=>{l.forEach(d=>{const{addedNodes:u=[],removedNodes:c=[],type:m,target:p,attributeName:v}=d;m==="childList"?(Array.prototype.forEach.call(u,b=>Un(b,e)),Array.prototype.forEach.call(c,b=>Un(b,n))):m==="attributes"&&v===K.MEDIA_CHROME_ATTRIBUTES&&(Sd(p)?e(p):n(p))})});return o.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{Un(t,n),t.removeEventListener("slotchange",s),o.disconnect(),t.removeEventListener(R.REGISTER_MEDIA_STATE_RECEIVER,i),t.removeEventListener(R.UNREGISTER_MEDIA_STATE_RECEIVER,a)}};g.customElements.get("media-controller")||g.customElements.define("media-controller",fv);var mE=fv;const _l="placement",Tl="bounds";class ks extends g.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!nv(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const n=this.placement;if(n==="left"||n==="right")return void this.style.removeProperty("--media-tooltip-offset-x");const i=getComputedStyle(this),a=(e=ha(this,"#"+this.bounds))!=null?e:Ve(this);if(!a)return;const{x:r,width:s}=a.getBoundingClientRect(),{x:o,width:l}=this.getBoundingClientRect(),d=o+l,u=r+s,c=i.getPropertyValue("--media-tooltip-offset-x"),m=c?parseFloat(c.replace("px","")):0,p=i.getPropertyValue("--media-tooltip-container-margin"),v=p?parseFloat(p.replace("px","")):0,b=o-r+m-v,f=d-u+m+v;b<0?this.style.setProperty("--media-tooltip-offset-x",`${b}px`):f>0?this.style.setProperty("--media-tooltip-offset-x",`${f}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[_l,Tl]}get placement(){return ie(this,_l)}set placement(e){ae(this,_l,e)}get bounds(){return ie(this,Tl)}set bounds(e){ae(this,Tl,e)}}ks.shadowRootOptions={mode:"open"},ks.getTemplateHTML=function(t){return`
|
|
218
|
+
<style>
|
|
219
|
+
:host {
|
|
220
|
+
--_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
|
|
221
|
+
--_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
|
|
222
|
+
--_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
|
|
223
|
+
--_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
|
|
224
|
+
--_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
|
|
225
|
+
position: relative;
|
|
226
|
+
pointer-events: none;
|
|
227
|
+
display: var(--media-tooltip-display, inline-flex);
|
|
228
|
+
justify-content: center;
|
|
229
|
+
align-items: center;
|
|
230
|
+
box-sizing: border-box;
|
|
231
|
+
z-index: var(--media-tooltip-z-index, 1);
|
|
232
|
+
background: var(--_tooltip-background);
|
|
233
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
234
|
+
font: var(--media-font,
|
|
235
|
+
var(--media-font-weight, 400)
|
|
236
|
+
var(--media-font-size, 13px) /
|
|
237
|
+
var(--media-text-content-height, var(--media-control-height, 18px))
|
|
238
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
239
|
+
padding: var(--media-tooltip-padding, .35em .7em);
|
|
240
|
+
border: var(--media-tooltip-border, none);
|
|
241
|
+
border-radius: var(--media-tooltip-border-radius, 5px);
|
|
242
|
+
filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
|
|
243
|
+
white-space: var(--media-tooltip-white-space, nowrap);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
:host([hidden]) {
|
|
247
|
+
display: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
img, svg {
|
|
251
|
+
display: inline-block;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
#arrow {
|
|
255
|
+
position: absolute;
|
|
256
|
+
width: 0px;
|
|
257
|
+
height: 0px;
|
|
258
|
+
border-style: solid;
|
|
259
|
+
display: var(--media-tooltip-arrow-display, block);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host(:not([placement])),
|
|
263
|
+
:host([placement="top"]) {
|
|
264
|
+
position: absolute;
|
|
265
|
+
bottom: calc(100% + var(--media-tooltip-distance, 12px));
|
|
266
|
+
left: 50%;
|
|
267
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
268
|
+
}
|
|
269
|
+
:host(:not([placement])) #arrow,
|
|
270
|
+
:host([placement="top"]) #arrow {
|
|
271
|
+
top: 100%;
|
|
272
|
+
left: 50%;
|
|
273
|
+
border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
|
|
274
|
+
border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
|
|
275
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
:host([placement="right"]) {
|
|
279
|
+
position: absolute;
|
|
280
|
+
left: calc(100% + var(--media-tooltip-distance, 12px));
|
|
281
|
+
top: 50%;
|
|
282
|
+
transform: translate(0, -50%);
|
|
283
|
+
}
|
|
284
|
+
:host([placement="right"]) #arrow {
|
|
285
|
+
top: 50%;
|
|
286
|
+
right: 100%;
|
|
287
|
+
border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
|
|
288
|
+
border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
|
|
289
|
+
transform: translate(0, -50%);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
:host([placement="bottom"]) {
|
|
293
|
+
position: absolute;
|
|
294
|
+
top: calc(100% + var(--media-tooltip-distance, 12px));
|
|
295
|
+
left: 50%;
|
|
296
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
297
|
+
}
|
|
298
|
+
:host([placement="bottom"]) #arrow {
|
|
299
|
+
bottom: 100%;
|
|
300
|
+
left: 50%;
|
|
301
|
+
border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
|
|
302
|
+
border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
|
|
303
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
:host([placement="left"]) {
|
|
307
|
+
position: absolute;
|
|
308
|
+
right: calc(100% + var(--media-tooltip-distance, 12px));
|
|
309
|
+
top: 50%;
|
|
310
|
+
transform: translate(0, -50%);
|
|
311
|
+
}
|
|
312
|
+
:host([placement="left"]) #arrow {
|
|
313
|
+
top: 50%;
|
|
314
|
+
left: 100%;
|
|
315
|
+
border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
|
|
316
|
+
border-color: transparent transparent transparent var(--_tooltip-arrow-background);
|
|
317
|
+
transform: translate(0, -50%);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
:host([placement="none"]) #arrow {
|
|
321
|
+
display: none;
|
|
322
|
+
}
|
|
323
|
+
</style>
|
|
324
|
+
<slot></slot>
|
|
325
|
+
<div id="arrow"></div>
|
|
326
|
+
`},g.customElements.get("media-tooltip")||g.customElements.define("media-tooltip",ks);var St,Qi,An,Si,ws,Rd,Ev,_h=ks,cc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ve=(t,e,n)=>(cc(t,e,"read from private field"),n?n.call(t):e.get(t)),ui=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Br=(t,e,n,i)=>(cc(t,e,"write to private field"),e.set(t,n),n);const Vr="tooltipplacement",Th="disabled",Ah="notooltip";class Ce extends g.HTMLElement{constructor(){if(super(),ui(this,Rd),ui(this,St,void 0),this.preventClick=!1,this.tooltipEl=null,ui(this,Qi,e=>{this.preventClick||this.handleClick(e),setTimeout(ve(this,An),0)}),ui(this,An,()=>{var e,n;(n=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||n.call(e)}),ui(this,Si,e=>{const{key:n}=e;this.keysUsed.includes(n)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",ve(this,Si))}),ui(this,ws,e=>{const{metaKey:n,altKey:i,key:a}=e;n||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",ve(this,Si)):this.addEventListener("keyup",ve(this,Si),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes),n=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(n):this.shadowRoot.innerHTML=n}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",Vr,K.MEDIA_CONTROLLER,h.MEDIA_LANG]}enable(){this.addEventListener("click",ve(this,Qi)),this.addEventListener("keydown",ve(this,ws)),this.tabIndex=0}disable(){this.removeEventListener("click",ve(this,Qi)),this.removeEventListener("keydown",ve(this,ws)),this.removeEventListener("keyup",ve(this,Si)),this.tabIndex=-1}attributeChangedCallback(e,n,i){var a,r,s,o,l;e===K.MEDIA_CONTROLLER?(n&&((r=(a=ve(this,St))==null?void 0:a.unassociateElement)==null||r.call(a,this),Br(this,St,null)),i&&this.isConnected&&(Br(this,St,(s=this.getRootNode())==null?void 0:s.getElementById(i)),(l=(o=ve(this,St))==null?void 0:o.associateElement)==null||l.call(o,this))):e==="disabled"&&i!==n?i==null?this.enable():this.disable():e===Vr&&this.tooltipEl&&i!==n?this.tooltipEl.placement=i:e===h.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),ve(this,An).call(this)}connectedCallback(){var e,n,i;const{style:a}=Ae(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const r=this.getAttribute(K.MEDIA_CONTROLLER);r&&(Br(this,St,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(i=(n=ve(this,St))==null?void 0:n.associateElement)==null||i.call(n,this)),g.customElements.whenDefined("media-tooltip").then(()=>{return(s=this,o=Rd,l=Ev,cc(s,o,"access private method"),l).call(this);var s,o,l})}disconnectedCallback(){var e,n;this.disable(),(n=(e=ve(this,St))==null?void 0:e.unassociateElement)==null||n.call(e,this),Br(this,St,null),this.removeEventListener("mouseenter",ve(this,An)),this.removeEventListener("focus",ve(this,An)),this.removeEventListener("click",ve(this,Qi))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ie(this,Vr)}set tooltipPlacement(e){ae(this,Vr,e)}get mediaController(){return ie(this,K.MEDIA_CONTROLLER)}set mediaController(e){ae(this,K.MEDIA_CONTROLLER,e)}get disabled(){return W(this,Th)}set disabled(e){B(this,Th,e)}get noTooltip(){return W(this,Ah)}set noTooltip(e){B(this,Ah,e)}handleClick(e){}}St=new WeakMap,Qi=new WeakMap,An=new WeakMap,Si=new WeakMap,ws=new WeakMap,Rd=new WeakSet,Ev=function(){this.addEventListener("mouseenter",ve(this,An)),this.addEventListener("focus",ve(this,An)),this.addEventListener("click",ve(this,Qi));const t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)},Ce.shadowRootOptions={mode:"open"},Ce.getTemplateHTML=function(t,e={}){return`
|
|
327
|
+
<style>
|
|
328
|
+
:host {
|
|
329
|
+
position: relative;
|
|
330
|
+
font: var(--media-font,
|
|
331
|
+
var(--media-font-weight, bold)
|
|
332
|
+
var(--media-font-size, 14px) /
|
|
333
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
334
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
335
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
336
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
337
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px));
|
|
338
|
+
justify-content: var(--media-button-justify-content, center);
|
|
339
|
+
display: inline-flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
vertical-align: middle;
|
|
342
|
+
box-sizing: border-box;
|
|
343
|
+
transition: background .15s linear;
|
|
344
|
+
pointer-events: auto;
|
|
345
|
+
cursor: var(--media-cursor, pointer);
|
|
346
|
+
-webkit-tap-highlight-color: transparent;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
:host(:focus-visible) {
|
|
351
|
+
box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
352
|
+
outline: 0;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
:host(:where(:focus)) {
|
|
356
|
+
box-shadow: none;
|
|
357
|
+
outline: 0;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
:host(:hover) {
|
|
361
|
+
background: var(--media-control-hover-background, rgba(50 50 70 / .7));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
365
|
+
width: var(--media-button-icon-width);
|
|
366
|
+
height: var(--media-button-icon-height, var(--media-control-height, 24px));
|
|
367
|
+
transform: var(--media-button-icon-transform);
|
|
368
|
+
transition: var(--media-button-icon-transition);
|
|
369
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
370
|
+
vertical-align: middle;
|
|
371
|
+
max-width: 100%;
|
|
372
|
+
max-height: 100%;
|
|
373
|
+
min-width: 100%;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
media-tooltip {
|
|
377
|
+
|
|
378
|
+
max-width: 0;
|
|
379
|
+
overflow-x: clip;
|
|
380
|
+
opacity: 0;
|
|
381
|
+
transition: opacity .3s, max-width 0s 9s;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
:host(:hover) media-tooltip,
|
|
385
|
+
:host(:focus-visible) media-tooltip {
|
|
386
|
+
max-width: 100vw;
|
|
387
|
+
opacity: 1;
|
|
388
|
+
transition: opacity .3s;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
:host([notooltip]) slot[name="tooltip"] {
|
|
392
|
+
display: none;
|
|
393
|
+
}
|
|
394
|
+
</style>
|
|
395
|
+
|
|
396
|
+
${this.getSlotTemplateHTML(t,e)}
|
|
397
|
+
|
|
398
|
+
<slot name="tooltip">
|
|
399
|
+
<media-tooltip part="tooltip" aria-hidden="true">
|
|
400
|
+
<template shadowrootmode="${_h.shadowRootOptions.mode}">
|
|
401
|
+
${_h.getTemplateHTML({})}
|
|
402
|
+
</template>
|
|
403
|
+
<slot name="tooltip-content">
|
|
404
|
+
${this.getTooltipContentHTML(t)}
|
|
405
|
+
</slot>
|
|
406
|
+
</media-tooltip>
|
|
407
|
+
</slot>
|
|
408
|
+
`},Ce.getSlotTemplateHTML=function(t,e){return`
|
|
409
|
+
<slot></slot>
|
|
410
|
+
`},Ce.getTooltipContentHTML=function(){return""},g.customElements.get("media-chrome-button")||g.customElements.define("media-chrome-button",Ce);const kh=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
411
|
+
<path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
|
|
412
|
+
</svg>
|
|
413
|
+
`,wh=t=>{const e=t.mediaIsAirplaying?L("stop airplay"):L("start airplay");t.setAttribute("aria-label",e)};class Al extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_IS_AIRPLAYING,h.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),wh(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_IS_AIRPLAYING&&wh(this)}get mediaIsAirplaying(){return W(this,h.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){B(this,h.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return ie(this,h.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){ae(this,h.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const e=new g.CustomEvent(R.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}Al.getSlotTemplateHTML=function(t){return`
|
|
414
|
+
<style>
|
|
415
|
+
:host([${h.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
|
|
416
|
+
display: none !important;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
:host(:not([${h.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
|
|
421
|
+
display: none !important;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
:host([${h.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
|
|
425
|
+
:host(:not([${h.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
|
|
426
|
+
display: none;
|
|
427
|
+
}
|
|
428
|
+
</style>
|
|
429
|
+
|
|
430
|
+
<slot name="icon">
|
|
431
|
+
<slot name="enter">${kh}</slot>
|
|
432
|
+
<slot name="exit">${kh}</slot>
|
|
433
|
+
</slot>
|
|
434
|
+
`},Al.getTooltipContentHTML=function(){return`
|
|
435
|
+
<slot name="tooltip-enter">${L("start airplay")}</slot>
|
|
436
|
+
<slot name="tooltip-exit">${L("stop airplay")}</slot>
|
|
437
|
+
`},g.customElements.get("media-airplay-button")||g.customElements.define("media-airplay-button",Al);const Ih=t=>{t.setAttribute("aria-checked",cv(t).toString())};class Cd extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_SUBTITLES_LIST,h.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",L("closed captions")),Ih(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_SUBTITLES_SHOWING&&Ih(this)}get mediaSubtitlesList(){return Sh(this,h.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Rh(this,h.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Sh(this,h.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Rh(this,h.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new g.CustomEvent(R.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}Cd.getSlotTemplateHTML=function(t){return`
|
|
438
|
+
<style>
|
|
439
|
+
:host([aria-checked="true"]) slot[name=off] {
|
|
440
|
+
display: none !important;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
:host(:not([aria-checked="true"])) slot[name=on] {
|
|
445
|
+
display: none !important;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
:host([aria-checked="true"]) slot[name=tooltip-enable],
|
|
449
|
+
:host(:not([aria-checked="true"])) slot[name=tooltip-disable] {
|
|
450
|
+
display: none;
|
|
451
|
+
}
|
|
452
|
+
</style>
|
|
453
|
+
|
|
454
|
+
<slot name="icon">
|
|
455
|
+
<slot name="on"><svg aria-hidden="true" viewBox="0 0 26 24">
|
|
456
|
+
<path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
|
|
457
|
+
</svg></slot>
|
|
458
|
+
<slot name="off"><svg aria-hidden="true" viewBox="0 0 26 24">
|
|
459
|
+
<path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
|
|
460
|
+
</svg></slot>
|
|
461
|
+
</slot>
|
|
462
|
+
`},Cd.getTooltipContentHTML=function(){return`
|
|
463
|
+
<slot name="tooltip-enable">${L("Enable captions")}</slot>
|
|
464
|
+
<slot name="tooltip-disable">${L("Disable captions")}</slot>
|
|
465
|
+
`};const Sh=(t,e)=>{const n=t.getAttribute(e);return n?tl(n):[]},Rh=(t,e,n)=>{if(!n?.length)return void t.removeAttribute(e);const i=Rr(n);t.getAttribute(e)!==i&&t.setAttribute(e,i)};g.customElements.get("media-captions-button")||g.customElements.define("media-captions-button",Cd);const Ch=t=>{const e=t.mediaIsCasting?L("stop casting"):L("start casting");t.setAttribute("aria-label",e)};class kl extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_IS_CASTING,h.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Ch(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_IS_CASTING&&Ch(this)}get mediaIsCasting(){return W(this,h.MEDIA_IS_CASTING)}set mediaIsCasting(e){B(this,h.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ie(this,h.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){ae(this,h.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?R.MEDIA_EXIT_CAST_REQUEST:R.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new g.CustomEvent(e,{composed:!0,bubbles:!0}))}}kl.getSlotTemplateHTML=function(t){return`
|
|
466
|
+
<style>
|
|
467
|
+
:host([${h.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
|
|
468
|
+
display: none !important;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
:host(:not([${h.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
|
|
473
|
+
display: none !important;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
:host([${h.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
|
|
477
|
+
:host(:not([${h.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
|
|
478
|
+
display: none;
|
|
479
|
+
}
|
|
480
|
+
</style>
|
|
481
|
+
|
|
482
|
+
<slot name="icon">
|
|
483
|
+
<slot name="enter"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg></slot>
|
|
484
|
+
<slot name="exit"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg></slot>
|
|
485
|
+
</slot>
|
|
486
|
+
`},kl.getTooltipContentHTML=function(){return`
|
|
487
|
+
<slot name="tooltip-enter">${L("Start casting")}</slot>
|
|
488
|
+
<slot name="tooltip-exit">${L("Stop casting")}</slot>
|
|
489
|
+
`},g.customElements.get("media-cast-button")||g.customElements.define("media-cast-button",kl);var Is,or,Hn,Ss,Dd,Ld,yv,Md,_v,xd,Tv,Nd,Av,Od,kv,hc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ln=(t,e,n)=>(hc(t,e,"read from private field"),e.get(t)),jt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Pd=(t,e,n,i)=>(hc(t,e,"write to private field"),e.set(t,n),n),Mn=(t,e,n)=>(hc(t,e,"access private method"),n);const $r="open",pE="anchor";class Zi extends g.HTMLElement{constructor(){super(),jt(this,Ss),jt(this,Ld),jt(this,Md),jt(this,xd),jt(this,Nd),jt(this,Od),jt(this,Is,!1),jt(this,or,null),jt(this,Hn,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[$r,pE]}get open(){return W(this,$r)}set open(e){B(this,$r,e)}handleEvent(e){switch(e.type){case"invoke":Mn(this,xd,Tv).call(this,e);break;case"focusout":Mn(this,Nd,Av).call(this,e);break;case"keydown":Mn(this,Od,kv).call(this,e)}}connectedCallback(){Mn(this,Ss,Dd).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,n,i){Mn(this,Ss,Dd).call(this),e===$r&&i!==n&&(this.open?Mn(this,Ld,yv).call(this):Mn(this,Md,_v).call(this))}focus(){Pd(this,or,ac());const e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),n=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||n)return;const i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');i?.focus()}get keysUsed(){return["Escape","Tab"]}}Is=new WeakMap,or=new WeakMap,Hn=new WeakMap,Ss=new WeakSet,Dd=function(){if(!Ln(this,Is)&&(Pd(this,Is,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);const t=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{const{style:e}=Ae(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},Ld=new WeakSet,yv=function(){var t;(t=Ln(this,Hn))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},Md=new WeakSet,_v=function(){var t;(t=Ln(this,Hn))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},xd=new WeakSet,Tv=function(t){Pd(this,Hn,t.relatedTarget),on(this,t.relatedTarget)||(this.open=!this.open)},Nd=new WeakSet,Av=function(t){var e;on(this,t.relatedTarget)||((e=Ln(this,or))==null||e.focus(),Ln(this,Hn)&&Ln(this,Hn)!==t.relatedTarget&&this.open&&(this.open=!1))},Od=new WeakSet,kv=function(t){var e,n,i,a,r;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;o||l||d||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(n=(e=this.previousElementSibling)==null?void 0:e.focus)==null||n.call(e):(a=(i=this.nextElementSibling)==null?void 0:i.focus)==null||a.call(i),this.blur()):s==="Escape"&&((r=Ln(this,or))==null||r.focus(),this.open=!1))},Zi.shadowRootOptions={mode:"open"},Zi.getTemplateHTML=function(t){return`
|
|
490
|
+
<style>
|
|
491
|
+
:host {
|
|
492
|
+
font: var(--media-font,
|
|
493
|
+
var(--media-font-weight, normal)
|
|
494
|
+
var(--media-font-size, 14px) /
|
|
495
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
496
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
497
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
498
|
+
display: var(--media-dialog-display, inline-flex);
|
|
499
|
+
justify-content: center;
|
|
500
|
+
align-items: center;
|
|
501
|
+
|
|
502
|
+
transition-behavior: allow-discrete;
|
|
503
|
+
visibility: hidden;
|
|
504
|
+
opacity: 0;
|
|
505
|
+
transform: translateY(2px) scale(.99);
|
|
506
|
+
pointer-events: none;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
:host([open]) {
|
|
510
|
+
transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
|
|
511
|
+
visibility: visible;
|
|
512
|
+
opacity: 1;
|
|
513
|
+
transform: translateY(0) scale(1);
|
|
514
|
+
pointer-events: auto;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
#content {
|
|
518
|
+
display: flex;
|
|
519
|
+
position: relative;
|
|
520
|
+
box-sizing: border-box;
|
|
521
|
+
width: min(320px, 100%);
|
|
522
|
+
word-wrap: break-word;
|
|
523
|
+
max-height: 100%;
|
|
524
|
+
overflow: auto;
|
|
525
|
+
text-align: center;
|
|
526
|
+
line-height: 1.4;
|
|
527
|
+
}
|
|
528
|
+
</style>
|
|
529
|
+
${this.getSlotTemplateHTML(t)}
|
|
530
|
+
`},Zi.getSlotTemplateHTML=function(t){return`
|
|
531
|
+
<slot id="content"></slot>
|
|
532
|
+
`},g.customElements.get("media-chrome-dialog")||g.customElements.define("media-chrome-dialog",Zi);var Rt,Rs,Cs,Ds,vt,Po,Ls,Ms,xs,Ud,Dh,Ns,Hd,Os,Wd,Uo,Bd,Vd,wv,$d,Iv,qd,Sv,Kd,Rv,mc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},le=(t,e,n)=>(mc(t,e,"read from private field"),n?n.call(t):e.get(t)),Le=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},pn=(t,e,n,i)=>(mc(t,e,"write to private field"),e.set(t,n),n),pt=(t,e,n)=>(mc(t,e,"access private method"),n);class ta extends g.HTMLElement{constructor(){if(super(),Le(this,Ud),Le(this,Ns),Le(this,Os),Le(this,Uo),Le(this,Vd),Le(this,$d),Le(this,qd),Le(this,Kd),Le(this,Rt,void 0),Le(this,Rs,void 0),Le(this,Cs,void 0),Le(this,Ds,void 0),Le(this,vt,{}),Le(this,Po,[]),Le(this,Ls,()=>{if(this.range.matches(":focus-visible")){const{style:e}=Ae(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),Le(this,Ms,()=>{const{style:e}=Ae(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),Le(this,xs,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes),n=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(n):this.shadowRoot.innerHTML=n}this.container=this.shadowRoot.querySelector("#container"),pn(this,Cs,this.shadowRoot.querySelector("#startpoint")),pn(this,Ds,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",K.MEDIA_CONTROLLER]}attributeChangedCallback(e,n,i){var a,r,s,o,l;e===K.MEDIA_CONTROLLER?(n&&((r=(a=le(this,Rt))==null?void 0:a.unassociateElement)==null||r.call(a,this),pn(this,Rt,null)),i&&this.isConnected&&(pn(this,Rt,(s=this.getRootNode())==null?void 0:s.getElementById(i)),(l=(o=le(this,Rt))==null?void 0:o.associateElement)==null||l.call(o,this))):(e==="disabled"||e==="aria-disabled"&&n!==i)&&(i==null?(this.range.removeAttribute(e),pt(this,Ns,Hd).call(this)):(this.range.setAttribute(e,i),pt(this,Os,Wd).call(this)))}connectedCallback(){var e,n,i;const{style:a}=Ae(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),le(this,vt).pointer=Ae(this.shadowRoot,"#pointer"),le(this,vt).progress=Ae(this.shadowRoot,"#progress"),le(this,vt).thumb=Ae(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),le(this,vt).activeSegment=Ae(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const r=this.getAttribute(K.MEDIA_CONTROLLER);r&&(pn(this,Rt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(i=(n=le(this,Rt))==null?void 0:n.associateElement)==null||i.call(n,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",le(this,Ls)),this.shadowRoot.addEventListener("focusout",le(this,Ms)),pt(this,Ns,Hd).call(this),da(this.container,le(this,xs))}disconnectedCallback(){var e,n;pt(this,Os,Wd).call(this),(n=(e=le(this,Rt))==null?void 0:e.unassociateElement)==null||n.call(e,this),pn(this,Rt,null),this.shadowRoot.removeEventListener("focusin",le(this,Ls)),this.shadowRoot.removeEventListener("focusout",le(this,Ms)),ua(this.container,le(this,xs))}updatePointerBar(e){var n;(n=le(this,vt).pointer)==null||n.style.setProperty("width",100*this.getPointerRatio(e)+"%")}updateBar(){var e,n;const i=100*this.range.valueAsNumber;(e=le(this,vt).progress)==null||e.style.setProperty("width",`${i}%`),(n=le(this,vt).thumb)==null||n.style.setProperty("left",`${i}%`)}updateSegments(e){const n=this.shadowRoot.querySelector("#segments-clipping");if(n.textContent="",this.container.classList.toggle("segments",!!e?.length),!e?.length)return;const i=[...new Set([+this.range.min,...e.flatMap(r=>[r.start,r.end]),+this.range.max])];pn(this,Po,[...i]);const a=i.pop();for(const[r,s]of i.entries()){const[o,l]=[r===0,r===i.length-1],d=o?"calc(var(--segments-gap) / -1)":100*s+"%",u=`calc(${100*((l?a:i[r+1])-s)}%${o||l?"":" - var(--segments-gap)"})`,c=ge.createElementNS("http://www.w3.org/2000/svg","rect"),m=rc(this.shadowRoot,`#segments-clipping rect:nth-child(${r+1})`);m.style.setProperty("x",d),m.style.setProperty("width",u),n.append(c)}}getPointerRatio(e){return function(n,i,a,r){const s=r.x-a.x,o=r.y-a.y,l=s*s+o*o;if(l===0)return 0;const d=((n-a.x)*s+(i-a.y)*o)/l;return Math.max(0,Math.min(1,d))}(e.clientX,e.clientY,le(this,Cs).getBoundingClientRect(),le(this,Ds).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":pt(this,Kd,Rv).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":pt(this,Vd,wv).call(this,e);break;case"pointerdown":pt(this,Uo,Bd).call(this,e);break;case"pointerup":pt(this,$d,Iv).call(this);break;case"pointerleave":pt(this,qd,Sv).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}Rt=new WeakMap,Rs=new WeakMap,Cs=new WeakMap,Ds=new WeakMap,vt=new WeakMap,Po=new WeakMap,Ls=new WeakMap,Ms=new WeakMap,xs=new WeakMap,Ud=new WeakSet,Dh=function(t){const e=le(this,vt).activeSegment;if(!e)return;const n=this.getPointerRatio(t),i=`#segments-clipping rect:nth-child(${le(this,Po).findIndex((a,r,s)=>{const o=s[r+1];return o!=null&&n>=a&&n<=o})+1})`;e.selectorText==i&&e.style.transform||(e.selectorText=i,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},Ns=new WeakSet,Hd=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},Os=new WeakSet,Wd=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=g.window)==null||t.removeEventListener("pointerup",this),(e=g.window)==null||e.removeEventListener("pointermove",this)},Uo=new WeakSet,Bd=function(t){var e;pn(this,Rs,t.composedPath().includes(this.range)),(e=g.window)==null||e.addEventListener("pointerup",this)},Vd=new WeakSet,wv=function(t){var e;t.pointerType!=="mouse"&&pt(this,Uo,Bd).call(this,t),this.addEventListener("pointerleave",this),(e=g.window)==null||e.addEventListener("pointermove",this)},$d=new WeakSet,Iv=function(){var t;(t=g.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},qd=new WeakSet,Sv=function(){var t,e;this.removeEventListener("pointerleave",this),(t=g.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=le(this,vt).activeSegment)==null||e.style.removeProperty("transform")},Kd=new WeakSet,Rv=function(t){t.pointerType==="pen"&&t.buttons===0||(this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),pt(this,Ud,Dh).call(this,t),!this.dragging||t.pointerType==="mouse"&&le(this,Rs)||(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},ta.shadowRootOptions={mode:"open"},ta.getTemplateHTML=function(t){return`
|
|
533
|
+
<style>
|
|
534
|
+
:host {
|
|
535
|
+
--_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
536
|
+
--_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));
|
|
537
|
+
|
|
538
|
+
box-shadow: var(--_focus-visible-box-shadow, none);
|
|
539
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
540
|
+
height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));
|
|
541
|
+
display: inline-flex;
|
|
542
|
+
align-items: center;
|
|
543
|
+
|
|
544
|
+
vertical-align: middle;
|
|
545
|
+
box-sizing: border-box;
|
|
546
|
+
position: relative;
|
|
547
|
+
width: 100px;
|
|
548
|
+
transition: background .15s linear;
|
|
549
|
+
cursor: var(--media-cursor, pointer);
|
|
550
|
+
pointer-events: auto;
|
|
551
|
+
touch-action: none;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
input[type=range]:focus {
|
|
556
|
+
outline: 0;
|
|
557
|
+
}
|
|
558
|
+
input[type=range]:focus::-webkit-slider-runnable-track {
|
|
559
|
+
outline: 0;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
:host(:hover) {
|
|
563
|
+
background: var(--media-control-hover-background, rgb(50 50 70 / .7));
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
#leftgap {
|
|
567
|
+
padding-left: var(--media-range-padding-left, var(--_media-range-padding));
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
#rightgap {
|
|
571
|
+
padding-right: var(--media-range-padding-right, var(--_media-range-padding));
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
#startpoint,
|
|
575
|
+
#endpoint {
|
|
576
|
+
position: absolute;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
#endpoint {
|
|
580
|
+
right: 0;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
#container {
|
|
584
|
+
|
|
585
|
+
width: var(--media-range-track-width, 100%);
|
|
586
|
+
transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));
|
|
587
|
+
position: relative;
|
|
588
|
+
height: 100%;
|
|
589
|
+
display: flex;
|
|
590
|
+
align-items: center;
|
|
591
|
+
min-width: 40px;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
#range {
|
|
595
|
+
|
|
596
|
+
display: var(--media-time-range-hover-display, block);
|
|
597
|
+
bottom: var(--media-time-range-hover-bottom, -7px);
|
|
598
|
+
height: var(--media-time-range-hover-height, max(100% + 7px, 25px));
|
|
599
|
+
width: 100%;
|
|
600
|
+
position: absolute;
|
|
601
|
+
cursor: var(--media-cursor, pointer);
|
|
602
|
+
|
|
603
|
+
-webkit-appearance: none;
|
|
604
|
+
-webkit-tap-highlight-color: transparent;
|
|
605
|
+
background: transparent;
|
|
606
|
+
margin: 0;
|
|
607
|
+
z-index: 1;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
@media (hover: hover) {
|
|
611
|
+
#range {
|
|
612
|
+
bottom: var(--media-time-range-hover-bottom, -5px);
|
|
613
|
+
height: var(--media-time-range-hover-height, max(100% + 5px, 20px));
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
#range::-webkit-slider-thumb {
|
|
620
|
+
-webkit-appearance: none;
|
|
621
|
+
background: transparent;
|
|
622
|
+
width: .1px;
|
|
623
|
+
height: .1px;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
#range::-moz-range-thumb {
|
|
628
|
+
background: transparent;
|
|
629
|
+
border: transparent;
|
|
630
|
+
width: .1px;
|
|
631
|
+
height: .1px;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
#appearance {
|
|
635
|
+
height: var(--media-range-track-height, 4px);
|
|
636
|
+
display: flex;
|
|
637
|
+
flex-direction: column;
|
|
638
|
+
justify-content: center;
|
|
639
|
+
width: 100%;
|
|
640
|
+
position: absolute;
|
|
641
|
+
|
|
642
|
+
will-change: transform;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
#track {
|
|
646
|
+
background: var(--media-range-track-background, rgb(255 255 255 / .2));
|
|
647
|
+
border-radius: var(--media-range-track-border-radius, 1px);
|
|
648
|
+
border: var(--media-range-track-border, none);
|
|
649
|
+
outline: var(--media-range-track-outline);
|
|
650
|
+
outline-offset: var(--media-range-track-outline-offset);
|
|
651
|
+
backdrop-filter: var(--media-range-track-backdrop-filter);
|
|
652
|
+
-webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
|
|
653
|
+
box-shadow: var(--media-range-track-box-shadow, none);
|
|
654
|
+
position: absolute;
|
|
655
|
+
width: 100%;
|
|
656
|
+
height: 100%;
|
|
657
|
+
overflow: hidden;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
#progress,
|
|
661
|
+
#pointer {
|
|
662
|
+
position: absolute;
|
|
663
|
+
height: 100%;
|
|
664
|
+
will-change: width;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
#progress {
|
|
668
|
+
background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));
|
|
669
|
+
transition: var(--media-range-track-transition);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
#pointer {
|
|
673
|
+
background: var(--media-range-track-pointer-background);
|
|
674
|
+
border-right: var(--media-range-track-pointer-border-right);
|
|
675
|
+
transition: visibility .25s, opacity .25s;
|
|
676
|
+
visibility: hidden;
|
|
677
|
+
opacity: 0;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
@media (hover: hover) {
|
|
681
|
+
:host(:hover) #pointer {
|
|
682
|
+
transition: visibility .5s, opacity .5s;
|
|
683
|
+
visibility: visible;
|
|
684
|
+
opacity: 1;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
#thumb,
|
|
689
|
+
::slotted([slot=thumb]) {
|
|
690
|
+
width: var(--media-range-thumb-width, 10px);
|
|
691
|
+
height: var(--media-range-thumb-height, 10px);
|
|
692
|
+
transition: var(--media-range-thumb-transition);
|
|
693
|
+
transform: var(--media-range-thumb-transform, none);
|
|
694
|
+
opacity: var(--media-range-thumb-opacity, 1);
|
|
695
|
+
translate: -50%;
|
|
696
|
+
position: absolute;
|
|
697
|
+
left: 0;
|
|
698
|
+
cursor: var(--media-cursor, pointer);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
#thumb {
|
|
702
|
+
border-radius: var(--media-range-thumb-border-radius, 10px);
|
|
703
|
+
background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));
|
|
704
|
+
box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);
|
|
705
|
+
border: var(--media-range-thumb-border, none);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
:host([disabled]) #thumb {
|
|
709
|
+
background-color: #777;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.segments #appearance {
|
|
713
|
+
height: var(--media-range-segment-hover-height, 7px);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
#track {
|
|
717
|
+
clip-path: url(#segments-clipping);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
#segments {
|
|
721
|
+
--segments-gap: var(--media-range-segments-gap, 2px);
|
|
722
|
+
position: absolute;
|
|
723
|
+
width: 100%;
|
|
724
|
+
height: 100%;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
#segments-clipping {
|
|
728
|
+
transform: translateX(calc(var(--segments-gap) / 2));
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
#segments-clipping:empty {
|
|
732
|
+
display: none;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
#segments-clipping rect {
|
|
736
|
+
height: var(--media-range-track-height, 4px);
|
|
737
|
+
y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);
|
|
738
|
+
transition: var(--media-range-segment-transition, transform .1s ease-in-out);
|
|
739
|
+
transform: var(--media-range-segment-transform, scaleY(1));
|
|
740
|
+
transform-origin: center;
|
|
741
|
+
}
|
|
742
|
+
</style>
|
|
743
|
+
<div id="leftgap"></div>
|
|
744
|
+
<div id="container">
|
|
745
|
+
<div id="startpoint"></div>
|
|
746
|
+
<div id="endpoint"></div>
|
|
747
|
+
<div id="appearance">
|
|
748
|
+
<div id="track" part="track">
|
|
749
|
+
<div id="pointer"></div>
|
|
750
|
+
<div id="progress" part="progress"></div>
|
|
751
|
+
</div>
|
|
752
|
+
<slot name="thumb">
|
|
753
|
+
<div id="thumb" part="thumb"></div>
|
|
754
|
+
</slot>
|
|
755
|
+
<svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>
|
|
756
|
+
</div>
|
|
757
|
+
<input id="range" type="range" min="0" max="1" step="any" value="0">
|
|
758
|
+
</div>
|
|
759
|
+
<div id="rightgap"></div>
|
|
760
|
+
`},g.customElements.get("media-chrome-range")||g.customElements.define("media-chrome-range",ta);var Ct,Cv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},qr=(t,e,n)=>(Cv(t,e,"read from private field"),n?n.call(t):e.get(t)),Kr=(t,e,n,i)=>(Cv(t,e,"write to private field"),e.set(t,n),n);class wl extends g.HTMLElement{constructor(){if(super(),((e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)})(this,Ct,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[K.MEDIA_CONTROLLER]}attributeChangedCallback(e,n,i){var a,r,s,o,l;e===K.MEDIA_CONTROLLER&&(n&&((r=(a=qr(this,Ct))==null?void 0:a.unassociateElement)==null||r.call(a,this),Kr(this,Ct,null)),i&&this.isConnected&&(Kr(this,Ct,(s=this.getRootNode())==null?void 0:s.getElementById(i)),(l=(o=qr(this,Ct))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,n,i;const a=this.getAttribute(K.MEDIA_CONTROLLER);a&&(Kr(this,Ct,(e=this.getRootNode())==null?void 0:e.getElementById(a)),(i=(n=qr(this,Ct))==null?void 0:n.associateElement)==null||i.call(n,this))}disconnectedCallback(){var e,n;(n=(e=qr(this,Ct))==null?void 0:e.unassociateElement)==null||n.call(e,this),Kr(this,Ct,null)}}Ct=new WeakMap,wl.shadowRootOptions={mode:"open"},wl.getTemplateHTML=function(t){return`
|
|
761
|
+
<style>
|
|
762
|
+
:host {
|
|
763
|
+
|
|
764
|
+
box-sizing: border-box;
|
|
765
|
+
display: var(--media-control-display, var(--media-control-bar-display, inline-flex));
|
|
766
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
767
|
+
--media-loading-indicator-icon-height: 44px;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
::slotted(media-time-range),
|
|
771
|
+
::slotted(media-volume-range) {
|
|
772
|
+
min-height: 100%;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
::slotted(media-time-range),
|
|
776
|
+
::slotted(media-clip-selector) {
|
|
777
|
+
flex-grow: 1;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
::slotted([role="menu"]) {
|
|
781
|
+
position: absolute;
|
|
782
|
+
}
|
|
783
|
+
</style>
|
|
784
|
+
|
|
785
|
+
<slot></slot>
|
|
786
|
+
`},g.customElements.get("media-control-bar")||g.customElements.define("media-control-bar",wl);var Dt,Dv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Fr=(t,e,n)=>(Dv(t,e,"read from private field"),n?n.call(t):e.get(t)),Yr=(t,e,n,i)=>(Dv(t,e,"write to private field"),e.set(t,n),n);class wn extends g.HTMLElement{constructor(){if(super(),((e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)})(this,Dt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[K.MEDIA_CONTROLLER]}attributeChangedCallback(e,n,i){var a,r,s,o,l;e===K.MEDIA_CONTROLLER&&(n&&((r=(a=Fr(this,Dt))==null?void 0:a.unassociateElement)==null||r.call(a,this),Yr(this,Dt,null)),i&&this.isConnected&&(Yr(this,Dt,(s=this.getRootNode())==null?void 0:s.getElementById(i)),(l=(o=Fr(this,Dt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,n,i;const{style:a}=Ae(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const r=this.getAttribute(K.MEDIA_CONTROLLER);r&&(Yr(this,Dt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(i=(n=Fr(this,Dt))==null?void 0:n.associateElement)==null||i.call(n,this))}disconnectedCallback(){var e,n;(n=(e=Fr(this,Dt))==null?void 0:e.unassociateElement)==null||n.call(e,this),Yr(this,Dt,null)}}Dt=new WeakMap,wn.shadowRootOptions={mode:"open"},wn.getTemplateHTML=function(t,e={}){return`
|
|
787
|
+
<style>
|
|
788
|
+
:host {
|
|
789
|
+
font: var(--media-font,
|
|
790
|
+
var(--media-font-weight, normal)
|
|
791
|
+
var(--media-font-size, 14px) /
|
|
792
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
793
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
794
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
795
|
+
background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));
|
|
796
|
+
padding: var(--media-control-padding, 10px);
|
|
797
|
+
display: inline-flex;
|
|
798
|
+
justify-content: center;
|
|
799
|
+
align-items: center;
|
|
800
|
+
vertical-align: middle;
|
|
801
|
+
box-sizing: border-box;
|
|
802
|
+
text-align: center;
|
|
803
|
+
pointer-events: auto;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
:host(:focus-visible) {
|
|
808
|
+
box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);
|
|
809
|
+
outline: 0;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
:host(:where(:focus)) {
|
|
814
|
+
box-shadow: none;
|
|
815
|
+
outline: 0;
|
|
816
|
+
}
|
|
817
|
+
</style>
|
|
818
|
+
|
|
819
|
+
${this.getSlotTemplateHTML(t,e)}
|
|
820
|
+
`},wn.getSlotTemplateHTML=function(t,e){return`
|
|
821
|
+
<slot></slot>
|
|
822
|
+
`},g.customElements.get("media-text-display")||g.customElements.define("media-text-display",wn);var qa,Lv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Lh=(t,e,n)=>(Lv(t,e,"read from private field"),n?n.call(t):e.get(t));class Mh extends wn{constructor(){var e,n,i,a;super(),((r,s,o)=>{if(s.has(r))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(r):s.set(r,o)})(this,qa,void 0),n=this,i=qa,a=this.shadowRoot.querySelector("slot"),Lv(n,i,"write to private field"),i.set(n,a),Lh(this,qa).textContent=Cn((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_DURATION]}attributeChangedCallback(e,n,i){e===h.MEDIA_DURATION&&(Lh(this,qa).textContent=Cn(+i)),super.attributeChangedCallback(e,n,i)}get mediaDuration(){return ne(this,h.MEDIA_DURATION)}set mediaDuration(e){he(this,h.MEDIA_DURATION,e)}}qa=new WeakMap,Mh.getSlotTemplateHTML=function(t,e){return`
|
|
823
|
+
<slot>${Cn(e.mediaDuration)}</slot>
|
|
824
|
+
`},g.customElements.get("media-duration-display")||g.customElements.define("media-duration-display",Mh);const vE={2:L("Network Error"),3:L("Decode Error"),4:L("Source Not Supported"),5:L("Encryption Error")},bE={2:L("A network error caused the media download to fail."),3:L("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:L("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:L("The media is encrypted and there are no keys to decrypt it.")},Mv=t=>{var e,n;return t.code===1?null:{title:(e=vE[t.code])!=null?e:`Error ${t.code}`,message:(n=bE[t.code])!=null?n:t.message}};var Ps,xh=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};function Nh(t){var e;const{title:n,message:i}=(e=Mv(t))!=null?e:{};let a="";return n&&(a+=`<slot name="error-${t.code}-title"><h3>${n}</h3></slot>`),i&&(a+=`<slot name="error-${t.code}-message"><p>${i}</p></slot>`),a}const Oh=[h.MEDIA_ERROR_CODE,h.MEDIA_ERROR_MESSAGE];class Us extends Zi{constructor(){super(...arguments),((e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)})(this,Ps,null)}static get observedAttributes(){return[...super.observedAttributes,...Oh]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,n,i){var a;if(super.attributeChangedCallback(e,n,i),!Oh.includes(e))return;const r=(a=this.mediaError)!=null?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};var s;this.open=(s=r).code&&Mv(s)!==null,this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r))}get mediaError(){return xh(e=this,n=Ps,"read from private field"),i?i.call(e):n.get(e);var e,n,i}set mediaError(e){((n,i,a)=>{xh(n,i,"write to private field"),i.set(n,a)})(this,Ps,e)}get mediaErrorCode(){return ne(this,"mediaerrorcode")}set mediaErrorCode(e){he(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ie(this,"mediaerrormessage")}set mediaErrorMessage(e){ae(this,"mediaerrormessage",e)}}Ps=new WeakMap,Us.getSlotTemplateHTML=function(t){return`
|
|
825
|
+
<style>
|
|
826
|
+
:host {
|
|
827
|
+
background: rgb(20 20 30 / .8);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
#content {
|
|
831
|
+
display: block;
|
|
832
|
+
padding: 1.2em 1.5em;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
h3,
|
|
836
|
+
p {
|
|
837
|
+
margin-block: 0 .3em;
|
|
838
|
+
}
|
|
839
|
+
</style>
|
|
840
|
+
<slot name="error-${t.mediaerrorcode}" id="content">
|
|
841
|
+
${Nh({code:+t.mediaerrorcode,message:t.mediaerrormessage})}
|
|
842
|
+
</slot>
|
|
843
|
+
`},Us.formatErrorMessage=Nh,g.customElements.get("media-error-dialog")||g.customElements.define("media-error-dialog",Us);var Ri,Ci,xv=Us,cn=(t,e,n)=>(((i,a,r)=>{if(!a.has(i))throw TypeError("Cannot "+r)})(t,e,"read from private field"),n?n.call(t):e.get(t)),Ph=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};class Uh extends Zi{constructor(){super(...arguments),Ph(this,Ri,e=>{var n;if(!this.open)return;const i=(n=this.shadowRoot)==null?void 0:n.querySelector("#content");if(!i)return;const a=e.composedPath(),r=a[0]===this||a.includes(this),s=a.includes(i);r&&!s&&(this.open=!1)}),Ph(this,Ci,e=>{if(!this.open)return;const n=e.shiftKey&&(e.key==="/"||e.key==="?");e.key!=="Escape"&&!n||e.ctrlKey||e.altKey||e.metaKey||(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",cn(this,Ri)),document.addEventListener("keydown",cn(this,Ci)))}disconnectedCallback(){this.removeEventListener("click",cn(this,Ri)),document.removeEventListener("keydown",cn(this,Ci))}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e==="open"&&(this.open?(this.addEventListener("click",cn(this,Ri)),document.addEventListener("keydown",cn(this,Ci))):(this.removeEventListener("click",cn(this,Ri)),document.removeEventListener("keydown",cn(this,Ci))))}}Ri=new WeakMap,Ci=new WeakMap,Uh.getSlotTemplateHTML=function(t){return`
|
|
844
|
+
<style>
|
|
845
|
+
:host {
|
|
846
|
+
position: fixed;
|
|
847
|
+
top: 0;
|
|
848
|
+
left: 0;
|
|
849
|
+
z-index: 9999;
|
|
850
|
+
background: rgb(20 20 30 / .8);
|
|
851
|
+
backdrop-filter: blur(10px);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
#content {
|
|
855
|
+
display: block;
|
|
856
|
+
width: clamp(400px, 40vw, 700px);
|
|
857
|
+
max-width: 90vw;
|
|
858
|
+
text-align: left;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
h2 {
|
|
862
|
+
margin: 0 0 1.5rem 0;
|
|
863
|
+
font-size: 1.5rem;
|
|
864
|
+
font-weight: 500;
|
|
865
|
+
text-align: center;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.shortcuts-table {
|
|
869
|
+
width: 100%;
|
|
870
|
+
border-collapse: collapse;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.shortcuts-table tr {
|
|
874
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.shortcuts-table tr:last-child {
|
|
878
|
+
border-bottom: none;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.shortcuts-table td {
|
|
882
|
+
padding: 0.75rem 0.5rem;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
.shortcuts-table td:first-child {
|
|
886
|
+
text-align: right;
|
|
887
|
+
padding-right: 1rem;
|
|
888
|
+
width: 40%;
|
|
889
|
+
min-width: 120px;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.shortcuts-table td:last-child {
|
|
893
|
+
padding-left: 1rem;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.key {
|
|
897
|
+
display: inline-block;
|
|
898
|
+
background: rgba(255, 255, 255, 0.15);
|
|
899
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
900
|
+
border-radius: 4px;
|
|
901
|
+
padding: 0.25rem 0.5rem;
|
|
902
|
+
font-family: 'Courier New', monospace;
|
|
903
|
+
font-size: 0.9rem;
|
|
904
|
+
font-weight: 500;
|
|
905
|
+
min-width: 1.5rem;
|
|
906
|
+
text-align: center;
|
|
907
|
+
margin: 0 0.2rem;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.description {
|
|
911
|
+
color: rgba(255, 255, 255, 0.9);
|
|
912
|
+
font-size: 0.95rem;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.key-combo {
|
|
916
|
+
display: flex;
|
|
917
|
+
align-items: center;
|
|
918
|
+
justify-content: flex-end;
|
|
919
|
+
gap: 0.3rem;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.key-separator {
|
|
923
|
+
color: rgba(255, 255, 255, 0.5);
|
|
924
|
+
font-size: 0.9rem;
|
|
925
|
+
}
|
|
926
|
+
</style>
|
|
927
|
+
<slot id="content">
|
|
928
|
+
|
|
929
|
+
<h2>Keyboard Shortcuts</h2>
|
|
930
|
+
<table class="shortcuts-table">${[{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["←","j"],description:"Seek back 10s"},{keys:["→","l"],description:"Seek forward 10s"},{keys:["↑"],description:"Turn volume up"},{keys:["↓"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map(({keys:e,description:n})=>`
|
|
931
|
+
<tr>
|
|
932
|
+
<td>
|
|
933
|
+
<div class="key-combo">${e.map((i,a)=>a>0?`<span class="key-separator">or</span><span class="key">${i}</span>`:`<span class="key">${i}</span>`).join("")}</div>
|
|
934
|
+
</td>
|
|
935
|
+
<td class="description">${n}</td>
|
|
936
|
+
</tr>
|
|
937
|
+
`).join("")}</table>
|
|
938
|
+
|
|
939
|
+
</slot>
|
|
940
|
+
`},g.customElements.get("media-keyboard-shortcuts-dialog")||g.customElements.define("media-keyboard-shortcuts-dialog",Uh);var Hs,Hh=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};const Wh=t=>{const e=t.mediaIsFullscreen?L("exit fullscreen mode"):L("enter fullscreen mode");t.setAttribute("aria-label",e)};class Il extends Ce{constructor(){super(...arguments),((e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)})(this,Hs,null)}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_IS_FULLSCREEN,h.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Wh(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_IS_FULLSCREEN&&Wh(this)}get mediaFullscreenUnavailable(){return ie(this,h.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){ae(this,h.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return W(this,h.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){B(this,h.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var n,i,a;a=e,Hh(n=this,i=Hs,"write to private field"),i.set(n,a);const r=((o,l)=>(Hh(o,l,"read from private field"),l.get(o)))(this,Hs)instanceof PointerEvent,s=this.mediaIsFullscreen?new g.CustomEvent(R.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new g.CustomEvent(R.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(s)}}Hs=new WeakMap,Il.getSlotTemplateHTML=function(t){return`
|
|
941
|
+
<style>
|
|
942
|
+
:host([${h.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
|
|
943
|
+
display: none !important;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
:host(:not([${h.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
|
|
948
|
+
display: none !important;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
:host([${h.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
|
|
952
|
+
:host(:not([${h.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
|
|
953
|
+
display: none;
|
|
954
|
+
}
|
|
955
|
+
</style>
|
|
956
|
+
|
|
957
|
+
<slot name="icon">
|
|
958
|
+
<slot name="enter"><svg aria-hidden="true" viewBox="0 0 26 24">
|
|
959
|
+
<path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
|
|
960
|
+
</svg></slot>
|
|
961
|
+
<slot name="exit"><svg aria-hidden="true" viewBox="0 0 26 24">
|
|
962
|
+
<path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
|
|
963
|
+
</svg></slot>
|
|
964
|
+
</slot>
|
|
965
|
+
`},Il.getTooltipContentHTML=function(){return`
|
|
966
|
+
<slot name="tooltip-enter">${L("Enter fullscreen mode")}</slot>
|
|
967
|
+
<slot name="tooltip-exit">${L("Exit fullscreen mode")}</slot>
|
|
968
|
+
`},g.customElements.get("media-fullscreen-button")||g.customElements.define("media-fullscreen-button",Il);const{MEDIA_TIME_IS_LIVE:Ws,MEDIA_PAUSED:lr}=h,{MEDIA_SEEK_TO_LIVE_REQUEST:fE,MEDIA_PLAY_REQUEST:gE}=R,Bh=t=>{var e;const n=t.mediaPaused||!t.mediaTimeIsLive,i=L(n?"seek to live":"playing live");t.setAttribute("aria-label",i);const a=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');a&&(a.textContent=L("live")),n?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")};class Vh extends Ce{static get observedAttributes(){return[...super.observedAttributes,Ws,lr]}connectedCallback(){super.connectedCallback(),Bh(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),Bh(this)}get mediaPaused(){return W(this,h.MEDIA_PAUSED)}set mediaPaused(e){B(this,h.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return W(this,h.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){B(this,h.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new g.CustomEvent(fE,{composed:!0,bubbles:!0})),this.hasAttribute(lr)&&this.dispatchEvent(new g.CustomEvent(gE,{composed:!0,bubbles:!0})))}}Vh.getSlotTemplateHTML=function(t){return`
|
|
969
|
+
<style>
|
|
970
|
+
:host { --media-tooltip-display: none; }
|
|
971
|
+
|
|
972
|
+
slot[name=indicator] > *,
|
|
973
|
+
:host ::slotted([slot=indicator]) {
|
|
974
|
+
|
|
975
|
+
min-width: auto;
|
|
976
|
+
fill: var(--media-live-button-icon-color, rgb(140, 140, 140));
|
|
977
|
+
color: var(--media-live-button-icon-color, rgb(140, 140, 140));
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
:host([${Ws}]:not([${lr}])) slot[name=indicator] > *,
|
|
981
|
+
:host([${Ws}]:not([${lr}])) ::slotted([slot=indicator]) {
|
|
982
|
+
fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
983
|
+
color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
:host([${Ws}]:not([${lr}])) {
|
|
987
|
+
cursor: var(--media-cursor, not-allowed);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
slot[name=text]{
|
|
991
|
+
text-transform: uppercase;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
</style>
|
|
995
|
+
|
|
996
|
+
<slot name="indicator"><svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg></slot>
|
|
997
|
+
|
|
998
|
+
<slot name="spacer"> </slot><slot name="text">${L("live")}</slot>
|
|
999
|
+
`},g.customElements.get("media-live-button")||g.customElements.define("media-live-button",Vh);var Lt,Bs,Nv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},_a=(t,e,n)=>(Nv(t,e,"read from private field"),n?n.call(t):e.get(t)),$h=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Ta=(t,e,n,i)=>(Nv(t,e,"write to private field"),e.set(t,n),n);const qh="loadingdelay",Kh="noautohide";class Sl extends g.HTMLElement{constructor(){if(super(),$h(this,Lt,void 0),$h(this,Bs,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[K.MEDIA_CONTROLLER,h.MEDIA_PAUSED,h.MEDIA_LOADING,qh]}attributeChangedCallback(e,n,i){var a,r,s,o,l;e===qh&&n!==i?this.loadingDelay=Number(i):e===K.MEDIA_CONTROLLER&&(n&&((r=(a=_a(this,Lt))==null?void 0:a.unassociateElement)==null||r.call(a,this),Ta(this,Lt,null)),i&&this.isConnected&&(Ta(this,Lt,(s=this.getRootNode())==null?void 0:s.getElementById(i)),(l=(o=_a(this,Lt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,n,i;const a=this.getAttribute(K.MEDIA_CONTROLLER);a&&(Ta(this,Lt,(e=this.getRootNode())==null?void 0:e.getElementById(a)),(i=(n=_a(this,Lt))==null?void 0:n.associateElement)==null||i.call(n,this))}disconnectedCallback(){var e,n;(n=(e=_a(this,Lt))==null?void 0:e.unassociateElement)==null||n.call(e,this),Ta(this,Lt,null)}get loadingDelay(){return _a(this,Bs)}set loadingDelay(e){Ta(this,Bs,e);const{style:n}=Ae(this.shadowRoot,":host");n.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return W(this,h.MEDIA_PAUSED)}set mediaPaused(e){B(this,h.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,h.MEDIA_LOADING)}set mediaLoading(e){B(this,h.MEDIA_LOADING,e)}get mediaController(){return ie(this,K.MEDIA_CONTROLLER)}set mediaController(e){ae(this,K.MEDIA_CONTROLLER,e)}get noAutohide(){return W(this,Kh)}set noAutohide(e){B(this,Kh,e)}}Lt=new WeakMap,Bs=new WeakMap,Sl.shadowRootOptions={mode:"open"},Sl.getTemplateHTML=function(t){return`
|
|
1000
|
+
<style>
|
|
1001
|
+
:host {
|
|
1002
|
+
display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
|
|
1003
|
+
vertical-align: middle;
|
|
1004
|
+
box-sizing: border-box;
|
|
1005
|
+
--_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
#status {
|
|
1009
|
+
color: rgba(0,0,0,0);
|
|
1010
|
+
width: 0px;
|
|
1011
|
+
height: 0px;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
:host slot[name=icon] > *,
|
|
1015
|
+
:host ::slotted([slot=icon]) {
|
|
1016
|
+
opacity: var(--media-loading-indicator-opacity, 0);
|
|
1017
|
+
transition: opacity 0.15s;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
:host([${h.MEDIA_LOADING}]:not([${h.MEDIA_PAUSED}])) slot[name=icon] > *,
|
|
1021
|
+
:host([${h.MEDIA_LOADING}]:not([${h.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
|
|
1022
|
+
opacity: var(--media-loading-indicator-opacity, 1);
|
|
1023
|
+
transition: opacity 0.15s var(--_loading-indicator-delay);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
:host #status {
|
|
1027
|
+
visibility: var(--media-loading-indicator-opacity, hidden);
|
|
1028
|
+
transition: visibility 0.15s;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
:host([${h.MEDIA_LOADING}]:not([${h.MEDIA_PAUSED}])) #status {
|
|
1032
|
+
visibility: var(--media-loading-indicator-opacity, visible);
|
|
1033
|
+
transition: visibility 0.15s var(--_loading-indicator-delay);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
1037
|
+
width: var(--media-loading-indicator-icon-width);
|
|
1038
|
+
height: var(--media-loading-indicator-icon-height, 100px);
|
|
1039
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
1040
|
+
vertical-align: middle;
|
|
1041
|
+
}
|
|
1042
|
+
</style>
|
|
1043
|
+
|
|
1044
|
+
<slot name="icon">
|
|
1045
|
+
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
1046
|
+
<path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
|
|
1047
|
+
<animateTransform
|
|
1048
|
+
attributeName="transform"
|
|
1049
|
+
attributeType="XML"
|
|
1050
|
+
type="rotate"
|
|
1051
|
+
dur="1s"
|
|
1052
|
+
from="0 50 50"
|
|
1053
|
+
to="360 50 50"
|
|
1054
|
+
repeatCount="indefinite" />
|
|
1055
|
+
</path>
|
|
1056
|
+
</svg>
|
|
1057
|
+
</slot>
|
|
1058
|
+
<div id="status" role="status" aria-live="polite">${L("media loading")}</div>
|
|
1059
|
+
`},g.customElements.get("media-loading-indicator")||g.customElements.define("media-loading-indicator",Sl);const Fh=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1060
|
+
<path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>
|
|
1061
|
+
</svg>`,Yh=t=>{const e=t.mediaVolumeLevel==="off",n=L(e?"unmute":"mute");t.setAttribute("aria-label",n)};class Rl extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),Yh(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_VOLUME_LEVEL&&Yh(this)}get mediaVolumeLevel(){return ie(this,h.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){ae(this,h.MEDIA_VOLUME_LEVEL,e)}handleClick(){const e=this.mediaVolumeLevel==="off"?R.MEDIA_UNMUTE_REQUEST:R.MEDIA_MUTE_REQUEST;this.dispatchEvent(new g.CustomEvent(e,{composed:!0,bubbles:!0}))}}Rl.getSlotTemplateHTML=function(t){return`
|
|
1062
|
+
<style>
|
|
1063
|
+
:host(:not([${h.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
|
|
1064
|
+
:host([${h.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
|
|
1065
|
+
display: none !important;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
:host([${h.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {
|
|
1069
|
+
display: none !important;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
:host([${h.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {
|
|
1073
|
+
display: none !important;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
:host([${h.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {
|
|
1077
|
+
display: none !important;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
:host(:not([${h.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],
|
|
1081
|
+
:host([${h.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {
|
|
1082
|
+
display: none;
|
|
1083
|
+
}
|
|
1084
|
+
</style>
|
|
1085
|
+
|
|
1086
|
+
<slot name="icon">
|
|
1087
|
+
<slot name="off"><svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1088
|
+
<path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>
|
|
1089
|
+
</svg></slot>
|
|
1090
|
+
<slot name="low">${Fh}</slot>
|
|
1091
|
+
<slot name="medium">${Fh}</slot>
|
|
1092
|
+
<slot name="high"><svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1093
|
+
<path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>
|
|
1094
|
+
</svg></slot>
|
|
1095
|
+
</slot>
|
|
1096
|
+
`},Rl.getTooltipContentHTML=function(){return`
|
|
1097
|
+
<slot name="tooltip-mute">${L("Mute")}</slot>
|
|
1098
|
+
<slot name="tooltip-unmute">${L("Unmute")}</slot>
|
|
1099
|
+
`},g.customElements.get("media-mute-button")||g.customElements.define("media-mute-button",Rl);const Gh=`<svg aria-hidden="true" viewBox="0 0 28 24">
|
|
1100
|
+
<path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>
|
|
1101
|
+
</svg>`,jh=t=>{const e=t.mediaIsPip?L("exit picture in picture mode"):L("enter picture in picture mode");t.setAttribute("aria-label",e)};class Cl extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_IS_PIP,h.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),jh(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_IS_PIP&&jh(this)}get mediaPipUnavailable(){return ie(this,h.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){ae(this,h.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return W(this,h.MEDIA_IS_PIP)}set mediaIsPip(e){B(this,h.MEDIA_IS_PIP,e)}handleClick(){const e=this.mediaIsPip?R.MEDIA_EXIT_PIP_REQUEST:R.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new g.CustomEvent(e,{composed:!0,bubbles:!0}))}}Cl.getSlotTemplateHTML=function(t){return`
|
|
1102
|
+
<style>
|
|
1103
|
+
:host([${h.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
|
|
1104
|
+
display: none !important;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
:host(:not([${h.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
|
|
1108
|
+
display: none !important;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
:host([${h.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
|
|
1112
|
+
:host(:not([${h.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
|
|
1113
|
+
display: none;
|
|
1114
|
+
}
|
|
1115
|
+
</style>
|
|
1116
|
+
|
|
1117
|
+
<slot name="icon">
|
|
1118
|
+
<slot name="enter">${Gh}</slot>
|
|
1119
|
+
<slot name="exit">${Gh}</slot>
|
|
1120
|
+
</slot>
|
|
1121
|
+
`},Cl.getTooltipContentHTML=function(){return`
|
|
1122
|
+
<slot name="tooltip-enter">${L("Enter picture in picture mode")}</slot>
|
|
1123
|
+
<slot name="tooltip-exit">${L("Exit picture in picture mode")}</slot>
|
|
1124
|
+
`},g.customElements.get("media-pip-button")||g.customElements.define("media-pip-button",Cl);var vn,ci=(t,e,n)=>(((i,a,r)=>{if(!a.has(i))throw TypeError("Cannot "+r)})(t,e,"read from private field"),n?n.call(t):e.get(t));const Dl="rates",Ov=[1,1.2,1.5,1.7,2];class Ll extends Ce{constructor(){var e;super(),((n,i,a)=>{if(i.has(n))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(n):i.set(n,a)})(this,vn,new oc(this,Dl,{defaultValue:Ov})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:1}x`}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_PLAYBACK_RATE,Dl]}attributeChangedCallback(e,n,i){if(super.attributeChangedCallback(e,n,i),e===Dl&&(ci(this,vn).value=i),e===h.MEDIA_PLAYBACK_RATE){const a=i?+i:Number.NaN,r=Number.isNaN(a)?1:a;this.container.innerHTML=`${r}x`,this.setAttribute("aria-label",L("Playback rate {playbackRate}",{playbackRate:r}))}}get rates(){return ci(this,vn)}set rates(e){e?Array.isArray(e)?ci(this,vn).value=e.join(" "):typeof e=="string"&&(ci(this,vn).value=e):ci(this,vn).value=""}get mediaPlaybackRate(){return ne(this,h.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){he(this,h.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,n;const i=Array.from(ci(this,vn).values(),s=>+s).sort((s,o)=>s-o),a=(n=(e=i.find(s=>s>this.mediaPlaybackRate))!=null?e:i[0])!=null?n:1,r=new g.CustomEvent(R.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}vn=new WeakMap,Ll.getSlotTemplateHTML=function(t){return`
|
|
1125
|
+
<style>
|
|
1126
|
+
:host {
|
|
1127
|
+
min-width: 5ch;
|
|
1128
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
1129
|
+
}
|
|
1130
|
+
</style>
|
|
1131
|
+
<slot name="icon">${t.mediaplaybackrate||1}x</slot>
|
|
1132
|
+
`},Ll.getTooltipContentHTML=function(){return L("Playback rate")},g.customElements.get("media-playback-rate-button")||g.customElements.define("media-playback-rate-button",Ll);const Qh=t=>{const e=t.mediaPaused?L("play"):L("pause");t.setAttribute("aria-label",e)};class Ml extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_PAUSED,h.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),Qh(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e!==h.MEDIA_PAUSED&&e!==h.MEDIA_LANG||Qh(this)}get mediaPaused(){return W(this,h.MEDIA_PAUSED)}set mediaPaused(e){B(this,h.MEDIA_PAUSED,e)}handleClick(){const e=this.mediaPaused?R.MEDIA_PLAY_REQUEST:R.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new g.CustomEvent(e,{composed:!0,bubbles:!0}))}}Ml.getSlotTemplateHTML=function(t){return`
|
|
1133
|
+
<style>
|
|
1134
|
+
:host([${h.MEDIA_PAUSED}]) slot[name=pause],
|
|
1135
|
+
:host(:not([${h.MEDIA_PAUSED}])) slot[name=play] {
|
|
1136
|
+
display: none !important;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
:host([${h.MEDIA_PAUSED}]) slot[name=tooltip-pause],
|
|
1140
|
+
:host(:not([${h.MEDIA_PAUSED}])) slot[name=tooltip-play] {
|
|
1141
|
+
display: none;
|
|
1142
|
+
}
|
|
1143
|
+
</style>
|
|
1144
|
+
|
|
1145
|
+
<slot name="icon">
|
|
1146
|
+
<slot name="play"><svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1147
|
+
<path d="m6 21 15-9L6 3v18Z"/>
|
|
1148
|
+
</svg></slot>
|
|
1149
|
+
<slot name="pause"><svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1150
|
+
<path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
|
|
1151
|
+
</svg></slot>
|
|
1152
|
+
</slot>
|
|
1153
|
+
`},Ml.getTooltipContentHTML=function(){return`
|
|
1154
|
+
<slot name="tooltip-play">${L("Play")}</slot>
|
|
1155
|
+
<slot name="tooltip-pause">${L("Pause")}</slot>
|
|
1156
|
+
`},g.customElements.get("media-play-button")||g.customElements.define("media-play-button",Ml);const xl="placeholdersrc",xn="src";class Nl extends g.HTMLElement{static get observedAttributes(){return[xl,xn]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,n,i){e===xn&&(i==null?this.image.removeAttribute(xn):this.image.setAttribute(xn,i)),e===xl&&(i==null?this.image.style.removeProperty("background-image"):((a,r)=>{a.style["background-image"]=`url('${r}')`})(this.image,i))}get placeholderSrc(){return ie(this,xl)}set placeholderSrc(e){ae(this,xn,e)}get src(){return ie(this,xn)}set src(e){ae(this,xn,e)}}Nl.shadowRootOptions={mode:"open"},Nl.getTemplateHTML=function(t){return`
|
|
1157
|
+
<style>
|
|
1158
|
+
:host {
|
|
1159
|
+
pointer-events: none;
|
|
1160
|
+
display: var(--media-poster-image-display, inline-block);
|
|
1161
|
+
box-sizing: border-box;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
img {
|
|
1165
|
+
max-width: 100%;
|
|
1166
|
+
max-height: 100%;
|
|
1167
|
+
min-width: 100%;
|
|
1168
|
+
min-height: 100%;
|
|
1169
|
+
background-repeat: no-repeat;
|
|
1170
|
+
background-position: var(--media-poster-image-background-position, var(--media-object-position, center));
|
|
1171
|
+
background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));
|
|
1172
|
+
object-fit: var(--media-object-fit, contain);
|
|
1173
|
+
object-position: var(--media-object-position, center);
|
|
1174
|
+
}
|
|
1175
|
+
</style>
|
|
1176
|
+
|
|
1177
|
+
<img part="poster img" aria-hidden="true" id="image"/>
|
|
1178
|
+
`},g.customElements.get("media-poster-image")||g.customElements.define("media-poster-image",Nl);var Vs,Zh=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};class EE extends wn{constructor(){var e,n,i;super(),((a,r,s)=>{if(r.has(a))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(a):r.set(a,s)})(this,Vs,void 0),e=this,n=Vs,i=this.shadowRoot.querySelector("slot"),Zh(e,n,"write to private field"),n.set(e,i)}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_PREVIEW_CHAPTER,h.MEDIA_LANG]}attributeChangedCallback(e,n,i){if(super.attributeChangedCallback(e,n,i),(e===h.MEDIA_PREVIEW_CHAPTER||e===h.MEDIA_LANG)&&i!==n&&i!=null)if((a=this,r=Vs,Zh(a,r,"read from private field"),s?s.call(a):r.get(a)).textContent=i,i!==""){const o=L("chapter: {chapterName}",{chapterName:i});this.setAttribute("aria-valuetext",o)}else this.removeAttribute("aria-valuetext");var a,r,s}get mediaPreviewChapter(){return ie(this,h.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){ae(this,h.MEDIA_PREVIEW_CHAPTER,e)}}Vs=new WeakMap,g.customElements.get("media-preview-chapter-display")||g.customElements.define("media-preview-chapter-display",EE);var Mt,Pv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Gr=(t,e,n)=>(Pv(t,e,"read from private field"),n?n.call(t):e.get(t)),jr=(t,e,n,i)=>(Pv(t,e,"write to private field"),e.set(t,n),n);class $s extends g.HTMLElement{constructor(){if(super(),((e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)})(this,Mt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[K.MEDIA_CONTROLLER,h.MEDIA_PREVIEW_IMAGE,h.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,n,i;const a=this.getAttribute(K.MEDIA_CONTROLLER);a&&(jr(this,Mt,(e=this.getRootNode())==null?void 0:e.getElementById(a)),(i=(n=Gr(this,Mt))==null?void 0:n.associateElement)==null||i.call(n,this))}disconnectedCallback(){var e,n;(n=(e=Gr(this,Mt))==null?void 0:e.unassociateElement)==null||n.call(e,this),jr(this,Mt,null)}attributeChangedCallback(e,n,i){var a,r,s,o,l;[h.MEDIA_PREVIEW_IMAGE,h.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===K.MEDIA_CONTROLLER&&(n&&((r=(a=Gr(this,Mt))==null?void 0:a.unassociateElement)==null||r.call(a,this),jr(this,Mt,null)),i&&this.isConnected&&(jr(this,Mt,(s=this.getRootNode())==null?void 0:s.getElementById(i)),(l=(o=Gr(this,Mt))==null?void 0:o.associateElement)==null||l.call(o,this)))}get mediaPreviewImage(){return ie(this,h.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ae(this,h.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(h.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(n=>+n)}set mediaPreviewCoords(e){e?this.setAttribute(h.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(h.MEDIA_PREVIEW_COORDS)}update(){const e=this.mediaPreviewCoords,n=this.mediaPreviewImage;if(!e||!n)return;const[i,a,r,s]=e,o=n.split("#")[0],l=getComputedStyle(this),{maxWidth:d,maxHeight:u,minWidth:c,minHeight:m}=l,p=Math.min(parseInt(d)/r,parseInt(u)/s),v=Math.max(parseInt(c)/r,parseInt(m)/s),b=p<1,f=b?p:v>1?v:1,{style:T}=Ae(this.shadowRoot,":host"),A=Ae(this.shadowRoot,"img").style,E=this.shadowRoot.querySelector("img"),_=b?"min":"max";T.setProperty(`${_}-width`,"initial","important"),T.setProperty(`${_}-height`,"initial","important"),T.width=r*f+"px",T.height=s*f+"px";const w=()=>{A.width=this.imgWidth*f+"px",A.height=this.imgHeight*f+"px",A.display="block"};E.src!==o&&(E.onload=()=>{this.imgWidth=E.naturalWidth,this.imgHeight=E.naturalHeight,w()},E.src=o,w()),w(),A.transform=`translate(-${i*f}px, -${a*f}px)`}}Mt=new WeakMap,$s.shadowRootOptions={mode:"open"},$s.getTemplateHTML=function(t){return`
|
|
1179
|
+
<style>
|
|
1180
|
+
:host {
|
|
1181
|
+
box-sizing: border-box;
|
|
1182
|
+
display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));
|
|
1183
|
+
overflow: hidden;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
img {
|
|
1187
|
+
display: none;
|
|
1188
|
+
position: relative;
|
|
1189
|
+
}
|
|
1190
|
+
</style>
|
|
1191
|
+
<img crossorigin loading="eager" decoding="async">
|
|
1192
|
+
`},g.customElements.get("media-preview-thumbnail")||g.customElements.define("media-preview-thumbnail",$s);var Ka,zh=$s,Uv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Xh=(t,e,n)=>(Uv(t,e,"read from private field"),n?n.call(t):e.get(t));class yE extends wn{constructor(){var e,n,i;super(),((a,r,s)=>{if(r.has(a))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(a):r.set(a,s)})(this,Ka,void 0),e=this,n=Ka,i=this.shadowRoot.querySelector("slot"),Uv(e,n,"write to private field"),n.set(e,i),Xh(this,Ka).textContent=Cn(0)}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_PREVIEW_TIME&&i!=null&&(Xh(this,Ka).textContent=Cn(parseFloat(i)))}get mediaPreviewTime(){return ne(this,h.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){he(this,h.MEDIA_PREVIEW_TIME,e)}}Ka=new WeakMap,g.customElements.get("media-preview-time-display")||g.customElements.define("media-preview-time-display",yE);const hi="seekoffset";class Ol extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_CURRENT_TIME,hi]}connectedCallback(){super.connectedCallback(),this.seekOffset=ne(this,hi,30)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===hi&&(this.seekOffset=ne(this,hi,30))}get seekOffset(){return ne(this,hi,30)}set seekOffset(e){he(this,hi,e),this.setAttribute("aria-label",L("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),ev(tv(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ne(this,h.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){he(this,h.MEDIA_CURRENT_TIME,e)}handleClick(){const e=Math.max(this.mediaCurrentTime-this.seekOffset,0),n=new g.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(n)}}Ol.getSlotTemplateHTML=function(t,e){return`
|
|
1193
|
+
<slot name="icon">${n=e.seekOffset,`
|
|
1194
|
+
<svg aria-hidden="true" viewBox="0 0 20 24">
|
|
1195
|
+
<defs>
|
|
1196
|
+
<style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
|
|
1197
|
+
</defs>
|
|
1198
|
+
<text class="text value" transform="translate(2.18 19.87)">${n}</text>
|
|
1199
|
+
<path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/>
|
|
1200
|
+
</svg>`}</slot>
|
|
1201
|
+
`;var n},Ol.getTooltipContentHTML=function(){return L("Seek backward")},g.customElements.get("media-seek-backward-button")||g.customElements.define("media-seek-backward-button",Ol);const mi="seekoffset";class Pl extends Ce{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_CURRENT_TIME,mi]}connectedCallback(){super.connectedCallback(),this.seekOffset=ne(this,mi,30)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===mi&&(this.seekOffset=ne(this,mi,30))}get seekOffset(){return ne(this,mi,30)}set seekOffset(e){he(this,mi,e),this.setAttribute("aria-label",L("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),ev(tv(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ne(this,h.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){he(this,h.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,n=new g.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(n)}}Pl.getSlotTemplateHTML=function(t,e){return`
|
|
1202
|
+
<slot name="icon">${n=e.seekOffset,`
|
|
1203
|
+
<svg aria-hidden="true" viewBox="0 0 20 24">
|
|
1204
|
+
<defs>
|
|
1205
|
+
<style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
|
|
1206
|
+
</defs>
|
|
1207
|
+
<text class="text value" transform="translate(8.9 19.87)">${n}</text>
|
|
1208
|
+
<path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/>
|
|
1209
|
+
</svg>`}</slot>
|
|
1210
|
+
`;var n},Pl.getTooltipContentHTML=function(){return L("Seek forward")},g.customElements.get("media-seek-forward-button")||g.customElements.define("media-seek-forward-button",Pl);var Di,Hv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ul=(t,e,n)=>(Hv(t,e,"read from private field"),n?n.call(t):e.get(t));const Wn={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Jh=[...Object.values(Wn),h.MEDIA_CURRENT_TIME,h.MEDIA_DURATION,h.MEDIA_SEEKABLE],em=["Enter"," "],Fd=(t,{timesSep:e=" / "}={})=>{var n,i;const a=(n=t.mediaCurrentTime)!=null?n:0,[,r]=(i=t.mediaSeekable)!=null?i:[];let s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(r)&&(s=r);const o=t.remaining?Cn(0-(s-a)):Cn(a);return t.showDuration?`${o}${e}${Cn(s)}`:o};class tm extends wn{constructor(){var e,n,i;super(),((a,r,s)=>{if(r.has(a))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(a):r.set(a,s)})(this,Di,void 0),e=this,n=Di,i=this.shadowRoot.querySelector("slot"),Hv(e,n,"write to private field"),n.set(e,i),Ul(this,Di).innerHTML=`${Fd(this)}`}static get observedAttributes(){return[...super.observedAttributes,...Jh,"disabled"]}connectedCallback(){const{style:e}=Ae(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",L("playback time"));const n=i=>{const{key:a}=i;em.includes(a)?this.toggleTimeDisplay():this.removeEventListener("keyup",n)};this.addEventListener("keydown",i=>{const{metaKey:a,altKey:r,key:s}=i;a||r||!em.includes(s)?this.removeEventListener("keyup",n):this.addEventListener("keyup",n)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,n,i){Jh.includes(e)?this.update():e==="disabled"&&i!==n&&(i==null?this.enable():this.disable()),super.attributeChangedCallback(e,n,i)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return W(this,Wn.REMAINING)}set remaining(e){B(this,Wn.REMAINING,e)}get showDuration(){return W(this,Wn.SHOW_DURATION)}set showDuration(e){B(this,Wn.SHOW_DURATION,e)}get noToggle(){return W(this,Wn.NO_TOGGLE)}set noToggle(e){B(this,Wn.NO_TOGGLE,e)}get mediaDuration(){return ne(this,h.MEDIA_DURATION)}set mediaDuration(e){he(this,h.MEDIA_DURATION,e)}get mediaCurrentTime(){return ne(this,h.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){he(this,h.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(h.MEDIA_SEEKABLE);if(e)return e.split(":").map(n=>+n)}set mediaSeekable(e){e!=null?this.setAttribute(h.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(h.MEDIA_SEEKABLE)}update(){const e=Fd(this);(n=>{var i;const a=n.mediaCurrentTime,[,r]=(i=n.mediaSeekable)!=null?i:[];let s=null;if(Number.isFinite(n.mediaDuration)?s=n.mediaDuration:Number.isFinite(r)&&(s=r),a==null||s===null)return void n.setAttribute("aria-valuetext","video not loaded, unknown time.");const o=n.remaining?ir(0-(s-a)):ir(a);if(!n.showDuration)return void n.setAttribute("aria-valuetext",o);const l=`${o} of ${ir(s)}`;n.setAttribute("aria-valuetext",l)})(this),e!==Ul(this,Di).innerHTML&&(Ul(this,Di).innerHTML=e)}}Di=new WeakMap,tm.getSlotTemplateHTML=function(t,e){return`
|
|
1211
|
+
<slot>${Fd(e)}</slot>
|
|
1212
|
+
`},g.customElements.get("media-time-display")||g.customElements.define("media-time-display",tm);var Li,qs,Mi,Fa,Ks,Fs,Ys,xi,Bn,Gs,Wv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Se=(t,e,n)=>(Wv(t,e,"read from private field"),e.get(t)),Tt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},je=(t,e,n,i)=>(Wv(t,e,"write to private field"),e.set(t,n),n);class _E{constructor(e,n,i){Tt(this,Li,void 0),Tt(this,qs,void 0),Tt(this,Mi,void 0),Tt(this,Fa,void 0),Tt(this,Ks,void 0),Tt(this,Fs,void 0),Tt(this,Ys,void 0),Tt(this,xi,void 0),Tt(this,Bn,0),Tt(this,Gs,(a=performance.now())=>{je(this,Bn,requestAnimationFrame(Se(this,Gs))),je(this,Fa,performance.now()-Se(this,Mi));const r=1e3/this.fps;if(Se(this,Fa)>r){je(this,Mi,a-Se(this,Fa)%r);const l=1e3/((a-Se(this,qs))/++(s=this,o=Ks,{set _(c){je(s,o,c)},get _(){return Se(s,o)}})._),d=(a-Se(this,Fs))/1e3/this.duration;let u=Se(this,Ys)+d*this.playbackRate;u-Se(this,Li).valueAsNumber>0?je(this,xi,this.playbackRate/this.duration/l):(je(this,xi,.995*Se(this,xi)),u=Se(this,Li).valueAsNumber+Se(this,xi)),this.callback(u)}var s,o}),je(this,Li,e),this.callback=n,this.fps=i}start(){Se(this,Bn)===0&&(je(this,Mi,performance.now()),je(this,qs,Se(this,Mi)),je(this,Ks,0),Se(this,Gs).call(this))}stop(){Se(this,Bn)!==0&&(cancelAnimationFrame(Se(this,Bn)),je(this,Bn,0))}update({start:e,duration:n,playbackRate:i}){const a=e-Se(this,Li).valueAsNumber,r=Math.abs(n-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),je(this,Ys,e),je(this,Fs,performance.now()),this.duration=n,this.playbackRate=i}}Li=new WeakMap,qs=new WeakMap,Mi=new WeakMap,Fa=new WeakMap,Ks=new WeakMap,Fs=new WeakMap,Ys=new WeakMap,xi=new WeakMap,Bn=new WeakMap,Gs=new WeakMap;var Ni,Zn,Ho,Ya,Wo,js,dr,ur,Oi,Pi,Ui,Ga,Yd,nm,Gd,Bo,jd,Vo,Qd,$o,Zd,zd,Bv,cr,Qs,Xd,Vv,pc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},me=(t,e,n)=>(pc(t,e,"read from private field"),n?n.call(t):e.get(t)),ye=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Je=(t,e,n,i)=>(pc(t,e,"write to private field"),e.set(t,n),n),Ue=(t,e,n)=>(pc(t,e,"access private method"),n);const Qr=(t,e=t.mediaCurrentTime)=>{const n=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,i=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(i))return 0;const a=(e-n)/(i-n);return Math.max(0,Math.min(a,1))},$v=(t,e=t.range.valueAsNumber)=>{const n=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,i=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(i)?0:e*(i-n)+n};class Hl extends ta{constructor(){super(),ye(this,Ui),ye(this,Yd),ye(this,Bo),ye(this,Vo),ye(this,$o),ye(this,zd),ye(this,cr),ye(this,Xd),ye(this,Ni,void 0),ye(this,Zn,void 0),ye(this,Ho,void 0),ye(this,Ya,void 0),ye(this,Wo,void 0),ye(this,js,void 0),ye(this,dr,void 0),ye(this,ur,void 0),ye(this,Oi,void 0),ye(this,Pi,void 0),ye(this,Gd,n=>{this.dragging||(nc(n)&&(this.range.valueAsNumber=n),me(this,Pi)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),Je(this,Ho,this.shadowRoot.querySelectorAll('[part~="box"]')),Je(this,Wo,this.shadowRoot.querySelector('[part~="preview-box"]')),Je(this,js,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);Je(this,dr,parseInt(e.getPropertyValue("--media-box-padding-left"))),Je(this,ur,parseInt(e.getPropertyValue("--media-box-padding-right"))),Je(this,Zn,new _E(this.range,me(this,Gd),60))}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_PAUSED,h.MEDIA_DURATION,h.MEDIA_SEEKABLE,h.MEDIA_CURRENT_TIME,h.MEDIA_PREVIEW_IMAGE,h.MEDIA_PREVIEW_TIME,h.MEDIA_PREVIEW_CHAPTER,h.MEDIA_BUFFERED,h.MEDIA_PLAYBACK_RATE,h.MEDIA_LOADING,h.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",L("seek")),Ue(this,Ui,Ga).call(this),Je(this,Ni,this.getRootNode()),(e=me(this,Ni))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),Ue(this,Ui,Ga).call(this),(e=me(this,Ni))==null||e.removeEventListener("transitionstart",this),Je(this,Ni,null)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),n!=i&&(e===h.MEDIA_CURRENT_TIME||e===h.MEDIA_PAUSED||e===h.MEDIA_ENDED||e===h.MEDIA_LOADING||e===h.MEDIA_DURATION||e===h.MEDIA_SEEKABLE?(me(this,Zn).update({start:Qr(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Ue(this,Ui,Ga).call(this),(a=>{const r=a.range,s=ir(+$v(a)),o=ir(+a.mediaSeekableEnd),l=s&&o?`${s} of ${o}`:"video not loaded, unknown time.";r.setAttribute("aria-valuetext",l)})(this)):e===h.MEDIA_BUFFERED&&this.updateBufferedBar(),e!==h.MEDIA_DURATION&&e!==h.MEDIA_SEEKABLE||(this.mediaChaptersCues=me(this,Oi),this.updateBar()))}get mediaChaptersCues(){return me(this,Oi)}set mediaChaptersCues(e){var n;Je(this,Oi,e),this.updateSegments((n=me(this,Oi))==null?void 0:n.map(i=>({start:Qr(this,i.startTime),end:Qr(this,i.endTime)})))}get mediaPaused(){return W(this,h.MEDIA_PAUSED)}set mediaPaused(e){B(this,h.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,h.MEDIA_LOADING)}set mediaLoading(e){B(this,h.MEDIA_LOADING,e)}get mediaDuration(){return ne(this,h.MEDIA_DURATION)}set mediaDuration(e){he(this,h.MEDIA_DURATION,e)}get mediaCurrentTime(){return ne(this,h.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){he(this,h.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return ne(this,h.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){he(this,h.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(h.MEDIA_BUFFERED);return e?e.split(" ").map(n=>n.split(":").map(i=>+i)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(h.MEDIA_BUFFERED);const n=e.map(i=>i.join(":")).join(" ");this.setAttribute(h.MEDIA_BUFFERED,n)}get mediaSeekable(){const e=this.getAttribute(h.MEDIA_SEEKABLE);if(e)return e.split(":").map(n=>+n)}set mediaSeekable(e){e!=null?this.setAttribute(h.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(h.MEDIA_SEEKABLE)}get mediaSeekableEnd(){var e;const[,n=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return n}get mediaSeekableStart(){var e;const[n=0]=(e=this.mediaSeekable)!=null?e:[];return n}get mediaPreviewImage(){return ie(this,h.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ae(this,h.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return ne(this,h.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){he(this,h.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return W(this,h.MEDIA_ENDED)}set mediaEnded(e){B(this,h.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const n=this.mediaBuffered;if(!n.length)return;let i;if(this.mediaEnded)i=1;else{const r=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=n.find(([o,l])=>o<=r&&r<=l))!=null?e:[];i=Qr(this,s)}const{style:a}=Ae(this.shadowRoot,"#buffered");a.setProperty("width",100*i+"%")}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const e=Ae(this.shadowRoot,"#current-rail"),n=Ae(this.shadowRoot,'[part~="current-box"]'),i=Ue(this,Bo,jd).call(this,me(this,js)),a=Ue(this,Vo,Qd).call(this,i,this.range.valueAsNumber),r=Ue(this,$o,Zd).call(this,i,this.range.valueAsNumber);e.style.transform=`translateX(${a})`,e.style.setProperty("--_range-width",`${i.range.width}`),n.style.setProperty("--_box-shift",`${r}`),n.style.setProperty("--_box-width",`${i.box.width}px`),n.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":Ue(this,Xd,Vv).call(this);break;case"pointermove":Ue(this,zd,Bv).call(this,e);break;case"pointerup":me(this,Pi)&&Je(this,Pi,!1);break;case"pointerdown":Je(this,Pi,!0);break;case"pointerleave":Ue(this,cr,Qs).call(this,null);break;case"transitionstart":on(e.target,this)&&setTimeout(()=>Ue(this,Ui,Ga).call(this),0)}}}Ni=new WeakMap,Zn=new WeakMap,Ho=new WeakMap,Ya=new WeakMap,Wo=new WeakMap,js=new WeakMap,dr=new WeakMap,ur=new WeakMap,Oi=new WeakMap,Pi=new WeakMap,Ui=new WeakSet,Ga=function(){Ue(this,Yd,nm).call(this)?me(this,Zn).start():me(this,Zn).stop()},Yd=new WeakSet,nm=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&nv(this)},Gd=new WeakMap,Bo=new WeakSet,jd=function(t){var e;const n=((e=this.getAttribute("bounds")?ha(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),i=this.range.getBoundingClientRect(),a=t.offsetWidth;return{box:{width:a,min:-(i.left-n.left-a/2),max:n.right-i.left-a/2},bounds:n,range:i}},Vo=new WeakSet,Qd=function(t,e){let n=100*e+"%";const{width:i,min:a,max:r}=t.box;return i&&(Number.isNaN(a)||(n=`max(${`calc(1 / var(--_range-width) * 100 * ${a}% + var(--media-box-padding-left))`}, ${n})`),Number.isNaN(r)||(n=`min(${n}, ${`calc(1 / var(--_range-width) * 100 * ${r}% - var(--media-box-padding-right))`})`)),n},$o=new WeakSet,Zd=function(t,e){const{width:n,min:i,max:a}=t.box,r=e*t.range.width;return r<i+me(this,dr)?`${r-n/2+(t.range.left-t.bounds.left-me(this,dr))}px`:r>a-me(this,ur)?r+n/2-(t.bounds.right-t.range.right-me(this,ur))-t.range.width+"px":0},zd=new WeakSet,Bv=function(t){const e=[...me(this,Ho)].some(u=>t.composedPath().includes(u));if(!this.dragging&&(e||!t.composedPath().includes(this)))return void Ue(this,cr,Qs).call(this,null);const n=this.mediaSeekableEnd;if(!n)return;const i=Ae(this.shadowRoot,"#preview-rail"),a=Ae(this.shadowRoot,'[part~="preview-box"]'),r=Ue(this,Bo,jd).call(this,me(this,Wo));let s=(t.clientX-r.range.left)/r.range.width;s=Math.max(0,Math.min(1,s));const o=Ue(this,Vo,Qd).call(this,r,s),l=Ue(this,$o,Zd).call(this,r,s);i.style.transform=`translateX(${o})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${l}`),a.style.setProperty("--_box-width",`${r.box.width}px`);const d=Math.round(me(this,Ya))-Math.round(s*n);Math.abs(d)<1&&s>.01&&s<.99||(Je(this,Ya,s*n),Ue(this,cr,Qs).call(this,me(this,Ya)))},cr=new WeakSet,Qs=function(t){this.dispatchEvent(new g.CustomEvent(R.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))},Xd=new WeakSet,Vv=function(){me(this,Zn).stop();const t=$v(this);this.dispatchEvent(new g.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))},Hl.shadowRootOptions={mode:"open"},Hl.getTemplateHTML=function(t){return`
|
|
1213
|
+
${ta.getTemplateHTML(t)}
|
|
1214
|
+
<style>
|
|
1215
|
+
:host {
|
|
1216
|
+
--media-box-border-radius: 4px;
|
|
1217
|
+
--media-box-padding-left: 10px;
|
|
1218
|
+
--media-box-padding-right: 10px;
|
|
1219
|
+
--media-preview-border-radius: var(--media-box-border-radius);
|
|
1220
|
+
--media-box-arrow-offset: var(--media-box-border-radius);
|
|
1221
|
+
--_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
1222
|
+
--_preview-background: var(--media-preview-background, var(--_control-background));
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
contain: layout;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
#buffered {
|
|
1229
|
+
background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));
|
|
1230
|
+
position: absolute;
|
|
1231
|
+
height: 100%;
|
|
1232
|
+
will-change: width;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
#preview-rail,
|
|
1236
|
+
#current-rail {
|
|
1237
|
+
width: 100%;
|
|
1238
|
+
position: absolute;
|
|
1239
|
+
left: 0;
|
|
1240
|
+
bottom: 100%;
|
|
1241
|
+
pointer-events: none;
|
|
1242
|
+
will-change: transform;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
[part~="box"] {
|
|
1246
|
+
width: min-content;
|
|
1247
|
+
|
|
1248
|
+
position: absolute;
|
|
1249
|
+
bottom: 100%;
|
|
1250
|
+
flex-direction: column;
|
|
1251
|
+
align-items: center;
|
|
1252
|
+
transform: translateX(-50%);
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
[part~="current-box"] {
|
|
1256
|
+
display: var(--media-current-box-display, var(--media-box-display, flex));
|
|
1257
|
+
margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));
|
|
1258
|
+
visibility: hidden;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
[part~="preview-box"] {
|
|
1262
|
+
display: var(--media-preview-box-display, var(--media-box-display, flex));
|
|
1263
|
+
margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));
|
|
1264
|
+
transition-property: var(--media-preview-transition-property, visibility, opacity);
|
|
1265
|
+
transition-duration: var(--media-preview-transition-duration-out, .25s);
|
|
1266
|
+
transition-delay: var(--media-preview-transition-delay-out, 0s);
|
|
1267
|
+
visibility: hidden;
|
|
1268
|
+
opacity: 0;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
:host(:is([${h.MEDIA_PREVIEW_IMAGE}], [${h.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
|
|
1272
|
+
transition-duration: var(--media-preview-transition-duration-in, .5s);
|
|
1273
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1274
|
+
visibility: visible;
|
|
1275
|
+
opacity: 1;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
@media (hover: hover) {
|
|
1279
|
+
:host(:is([${h.MEDIA_PREVIEW_IMAGE}], [${h.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
|
|
1280
|
+
transition-duration: var(--media-preview-transition-duration-in, .5s);
|
|
1281
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1282
|
+
visibility: visible;
|
|
1283
|
+
opacity: 1;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
media-preview-thumbnail,
|
|
1288
|
+
::slotted(media-preview-thumbnail) {
|
|
1289
|
+
visibility: hidden;
|
|
1290
|
+
|
|
1291
|
+
transition: visibility 0s .25s;
|
|
1292
|
+
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
1293
|
+
background: var(--media-preview-thumbnail-background, var(--_preview-background));
|
|
1294
|
+
box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));
|
|
1295
|
+
max-width: var(--media-preview-thumbnail-max-width, 180px);
|
|
1296
|
+
max-height: var(--media-preview-thumbnail-max-height, 160px);
|
|
1297
|
+
min-width: var(--media-preview-thumbnail-min-width, 120px);
|
|
1298
|
+
min-height: var(--media-preview-thumbnail-min-height, 80px);
|
|
1299
|
+
border: var(--media-preview-thumbnail-border);
|
|
1300
|
+
border-radius: var(--media-preview-thumbnail-border-radius,
|
|
1301
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
|
|
1305
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
|
|
1306
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1307
|
+
visibility: visible;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
@media (hover: hover) {
|
|
1311
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
|
|
1312
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
|
|
1313
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1314
|
+
visibility: visible;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
:host([${h.MEDIA_PREVIEW_TIME}]:hover) {
|
|
1318
|
+
--media-time-range-hover-display: block;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
media-preview-chapter-display,
|
|
1323
|
+
::slotted(media-preview-chapter-display) {
|
|
1324
|
+
font-size: var(--media-font-size, 13px);
|
|
1325
|
+
line-height: 17px;
|
|
1326
|
+
min-width: 0;
|
|
1327
|
+
visibility: hidden;
|
|
1328
|
+
|
|
1329
|
+
transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;
|
|
1330
|
+
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
1331
|
+
background: var(--media-preview-chapter-background, var(--_preview-background));
|
|
1332
|
+
border-radius: var(--media-preview-chapter-border-radius,
|
|
1333
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius)
|
|
1334
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
1335
|
+
padding: var(--media-preview-chapter-padding, 3.5px 9px);
|
|
1336
|
+
margin: var(--media-preview-chapter-margin, 0 0 5px);
|
|
1337
|
+
text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
|
|
1341
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
|
|
1342
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1343
|
+
border-radius: var(--media-preview-chapter-border-radius, 0);
|
|
1344
|
+
padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
|
|
1345
|
+
margin: var(--media-preview-chapter-margin, 0);
|
|
1346
|
+
min-width: 100%;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
media-preview-chapter-display[${h.MEDIA_PREVIEW_CHAPTER}],
|
|
1350
|
+
::slotted(media-preview-chapter-display[${h.MEDIA_PREVIEW_CHAPTER}]) {
|
|
1351
|
+
visibility: visible;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
media-preview-chapter-display:not([aria-valuetext]),
|
|
1355
|
+
::slotted(media-preview-chapter-display:not([aria-valuetext])) {
|
|
1356
|
+
display: none;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
media-preview-time-display,
|
|
1360
|
+
::slotted(media-preview-time-display),
|
|
1361
|
+
media-time-display,
|
|
1362
|
+
::slotted(media-time-display) {
|
|
1363
|
+
font-size: var(--media-font-size, 13px);
|
|
1364
|
+
line-height: 17px;
|
|
1365
|
+
min-width: 0;
|
|
1366
|
+
|
|
1367
|
+
transition: min-width 0s, border-radius 0s;
|
|
1368
|
+
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
1369
|
+
background: var(--media-preview-time-background, var(--_preview-background));
|
|
1370
|
+
border-radius: var(--media-preview-time-border-radius,
|
|
1371
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius)
|
|
1372
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
1373
|
+
padding: var(--media-preview-time-padding, 3.5px 9px);
|
|
1374
|
+
margin: var(--media-preview-time-margin, 0);
|
|
1375
|
+
text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));
|
|
1376
|
+
transform: translateX(min(
|
|
1377
|
+
max(calc(50% - var(--_box-width) / 2),
|
|
1378
|
+
calc(var(--_box-shift, 0))),
|
|
1379
|
+
calc(var(--_box-width) / 2 - 50%)
|
|
1380
|
+
));
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
|
|
1384
|
+
:host([${h.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
|
|
1385
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1386
|
+
border-radius: var(--media-preview-time-border-radius,
|
|
1387
|
+
0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
1388
|
+
min-width: 100%;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
:host([${h.MEDIA_PREVIEW_TIME}]:hover) {
|
|
1392
|
+
--media-time-range-hover-display: block;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
[part~="arrow"],
|
|
1396
|
+
::slotted([part~="arrow"]) {
|
|
1397
|
+
display: var(--media-box-arrow-display, inline-block);
|
|
1398
|
+
transform: translateX(min(
|
|
1399
|
+
max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),
|
|
1400
|
+
calc(var(--_box-shift, 0))),
|
|
1401
|
+
calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))
|
|
1402
|
+
));
|
|
1403
|
+
|
|
1404
|
+
border-color: transparent;
|
|
1405
|
+
border-top-color: var(--media-box-arrow-background, var(--_control-background));
|
|
1406
|
+
border-width: var(--media-box-arrow-border-width,
|
|
1407
|
+
var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);
|
|
1408
|
+
border-style: solid;
|
|
1409
|
+
justify-content: center;
|
|
1410
|
+
height: 0;
|
|
1411
|
+
}
|
|
1412
|
+
</style>
|
|
1413
|
+
<div id="preview-rail">
|
|
1414
|
+
<slot name="preview" part="box preview-box">
|
|
1415
|
+
<media-preview-thumbnail>
|
|
1416
|
+
<template shadowrootmode="${zh.shadowRootOptions.mode}">
|
|
1417
|
+
${zh.getTemplateHTML({})}
|
|
1418
|
+
</template>
|
|
1419
|
+
</media-preview-thumbnail>
|
|
1420
|
+
<media-preview-chapter-display></media-preview-chapter-display>
|
|
1421
|
+
<media-preview-time-display></media-preview-time-display>
|
|
1422
|
+
<slot name="preview-arrow"><div part="arrow"></div></slot>
|
|
1423
|
+
</slot>
|
|
1424
|
+
</div>
|
|
1425
|
+
<div id="current-rail">
|
|
1426
|
+
<slot name="current" part="box current-box">
|
|
1427
|
+
|
|
1428
|
+
</slot>
|
|
1429
|
+
</div>
|
|
1430
|
+
`},g.customElements.get("media-time-range")||g.customElements.define("media-time-range",Hl);class TE extends ta{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_VOLUME,h.MEDIA_MUTED,h.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{const e=this.range.value,n=new g.CustomEvent(R.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(n)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",L("volume"))}attributeChangedCallback(e,n,i){var a,r;super.attributeChangedCallback(e,n,i),e!==h.MEDIA_VOLUME&&e!==h.MEDIA_MUTED||(this.range.valueAsNumber=(r=this).mediaMuted?0:r.mediaVolume,this.range.setAttribute("aria-valuetext",(a=this.range.valueAsNumber,`${Math.round(100*a)}%`)),this.updateBar())}get mediaVolume(){return ne(this,h.MEDIA_VOLUME,1)}set mediaVolume(e){he(this,h.MEDIA_VOLUME,e)}get mediaMuted(){return W(this,h.MEDIA_MUTED)}set mediaMuted(e){B(this,h.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ie(this,h.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){ae(this,h.MEDIA_VOLUME_UNAVAILABLE,e)}}g.customElements.get("media-volume-range")||g.customElements.define("media-volume-range",TE);class Wl extends Ce{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=L("Loop"))}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return W(this,h.MEDIA_LOOP)}set mediaLoop(e){B(this,h.MEDIA_LOOP,e)}handleClick(){const e=!this.mediaLoop,n=new g.CustomEvent(R.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(n)}}Wl.getSlotTemplateHTML=function(t){return`
|
|
1431
|
+
<style>
|
|
1432
|
+
:host {
|
|
1433
|
+
min-width: 4ch;
|
|
1434
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
1435
|
+
width: 100%;
|
|
1436
|
+
display: grid;
|
|
1437
|
+
grid-template-columns: 1fr auto;
|
|
1438
|
+
gap: 1rem;
|
|
1439
|
+
font-weight: var(--media-button-font-weight, normal);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
#checked-indicator {
|
|
1443
|
+
display: none;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
:host([${h.MEDIA_LOOP}]) #checked-indicator {
|
|
1447
|
+
display: block;
|
|
1448
|
+
}
|
|
1449
|
+
</style>
|
|
1450
|
+
|
|
1451
|
+
<span id="icon">
|
|
1452
|
+
</span>
|
|
1453
|
+
|
|
1454
|
+
<div id="checked-indicator">
|
|
1455
|
+
<svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
|
|
1456
|
+
<path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
|
|
1457
|
+
</svg>
|
|
1458
|
+
</div>
|
|
1459
|
+
`},Wl.getTooltipContentHTML=function(){return L("Loop")},g.customElements.get("media-loop-button")||g.customElements.define("media-loop-button",Wl);var Hi,Zs,Vn,ja,bn,fn,gn,$n,Wi,zs,mt,qv=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},U=(t,e,n)=>(qv(t,e,"read from private field"),n?n.call(t):e.get(t)),Bt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},nn=(t,e,n,i)=>(qv(t,e,"write to private field"),e.set(t,n),n);const AE={processCallback(t,e,n){if(n){for(const[i,a]of e)if(i in n){const r=n[i];typeof r=="boolean"&&a instanceof Et&&typeof a.element[a.attributeName]=="boolean"?a.booleanValue=r:typeof r=="function"&&a instanceof Et?a.element[a.attributeName]=r:a.value=r}}}};class il extends g.DocumentFragment{constructor(e,n,i=AE){var a;super(),Bt(this,Hi,void 0),Bt(this,Zs,void 0),this.append(e.content.cloneNode(!0)),nn(this,Hi,Kv(this)),nn(this,Zs,i),(a=i.createCallback)==null||a.call(i,this,U(this,Hi),n),i.processCallback(this,U(this,Hi),n)}update(e){U(this,Zs).processCallback(this,U(this,Hi),e)}}Hi=new WeakMap,Zs=new WeakMap;const Kv=(t,e=[])=>{let n,i;for(const a of t.attributes||[])if(a.value.includes("{{")){const r=new kE;for([n,i]of am(a.value))if(n){const s=new Et(t,a.name,a.namespaceURI);r.append(s),e.push([i,s])}else r.append(i);a.value=r.toString()}for(const a of t.childNodes)if(a.nodeType!==1||a instanceof HTMLTemplateElement){const r=a.data;if(a.nodeType===1||r.includes("{{")){const s=[];if(r)for([n,i]of am(r))if(n){const o=new na(t);s.push(o),e.push([i,o])}else s.push(new Text(i));else if(a instanceof HTMLTemplateElement){const o=new Gv(t,a);s.push(o),e.push([o.expression,o])}a.replaceWith(...s.flatMap(o=>o.replacementNodes||[o]))}}else Kv(a,e);return e},im={},am=t=>{let e,n="",i=0,a=im[t],r=0;if(a)return a;for(a=[];e=t[r];r++)e==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(n&&a.push([0,n]),n="",r++):e!=="}"||t[r+1]!=="}"||t[r-1]==="\\"||--i?n+=e||"":(a.push([1,n.trim()]),n="",r++);return n&&a.push([0,(i>0?"{{":"")+n]),im[t]=a};class Fv{get value(){return""}set value(e){}toString(){return this.value}}const Yv=new WeakMap;class kE{constructor(){Bt(this,Vn,[])}[Symbol.iterator](){return U(this,Vn).values()}get length(){return U(this,Vn).length}item(e){return U(this,Vn)[e]}append(...e){for(const n of e)n instanceof Et&&Yv.set(n,this),U(this,Vn).push(n)}toString(){return U(this,Vn).join("")}}Vn=new WeakMap;class Et extends Fv{constructor(e,n,i){super(),Bt(this,$n),Bt(this,ja,""),Bt(this,bn,void 0),Bt(this,fn,void 0),Bt(this,gn,void 0),nn(this,bn,e),nn(this,fn,n),nn(this,gn,i)}get attributeName(){return U(this,fn)}get attributeNamespace(){return U(this,gn)}get element(){return U(this,bn)}get value(){return U(this,ja)}set value(e){U(this,ja)!==e&&(nn(this,ja,e),U(this,$n,Wi)&&U(this,$n,Wi).length!==1?U(this,bn).setAttributeNS(U(this,gn),U(this,fn),U(this,$n,Wi).toString()):e==null?U(this,bn).removeAttributeNS(U(this,gn),U(this,fn)):U(this,bn).setAttributeNS(U(this,gn),U(this,fn),e))}get booleanValue(){return U(this,bn).hasAttributeNS(U(this,gn),U(this,fn))}set booleanValue(e){if(U(this,$n,Wi)&&U(this,$n,Wi).length!==1)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}ja=new WeakMap,bn=new WeakMap,fn=new WeakMap,gn=new WeakMap,$n=new WeakSet,Wi=function(){return Yv.get(this)};class na extends Fv{constructor(e,n){super(),Bt(this,zs,void 0),Bt(this,mt,void 0),nn(this,zs,e),nn(this,mt,n?[...n]:[new Text])}get replacementNodes(){return U(this,mt)}get parentNode(){return U(this,zs)}get nextSibling(){return U(this,mt)[U(this,mt).length-1].nextSibling}get previousSibling(){return U(this,mt)[0].previousSibling}get value(){return U(this,mt).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){const n=e.flat().flatMap(i=>i==null?[new Text]:i.forEach?[...i]:i.nodeType===11?[...i.childNodes]:i.nodeType?[i]:[new Text(i)]);n.length||n.push(new Text),nn(this,mt,function(i,a,r,s=null){let o,l,d,u=0,c=r.length,m=a.length;for(;u<c&&u<m&&a[u]==r[u];)u++;for(;u<c&&u<m&&r[c-1]==a[m-1];)s=r[--m,--c];if(u==m)for(;u<c;)i.insertBefore(r[u++],s);if(u==c)for(;u<m;)i.removeChild(a[u++]);else{for(o=a[u];u<c;)d=r[u++],l=o?o.nextSibling:s,o==d?o=l:u<c&&r[u]==l?(i.replaceChild(d,o),o=l):i.insertBefore(d,o);for(;o!=s;)l=o.nextSibling,i.removeChild(o),o=l}return r}(U(this,mt)[0].parentNode,U(this,mt),n,this.nextSibling))}}zs=new WeakMap,mt=new WeakMap;class Gv extends na{constructor(e,n){const i=n.getAttribute("directive")||n.getAttribute("type");let a=n.getAttribute("expression")||n.getAttribute(i)||"";a.startsWith("{{")&&(a=a.trim().slice(2,-2).trim()),super(e),this.expression=a,this.template=n,this.directive=i}}const rm={string:t=>String(t)};class jv{constructor(e){this.template=e,this.state=void 0}}const zn=new WeakMap,Xn=new WeakMap,Jd={partial:(t,e)=>{e[t.expression]=new jv(t.template)},if:(t,e)=>{var n;if(Qv(t.expression,e))if(zn.get(t)!==t.template){zn.set(t,t.template);const i=new il(t.template,e,vc);t.replace(i),Xn.set(t,i)}else(n=Xn.get(t))==null||n.update(e);else t.replace(""),zn.delete(t),Xn.delete(t)}},wE=Object.keys(Jd),vc={processCallback(t,e,n){var i,a;if(n)for(const[r,s]of e){if(s instanceof Gv){if(!s.directive){const l=wE.find(d=>s.template.hasAttribute(d));l&&(s.directive=l,s.expression=s.template.getAttribute(l))}(i=Jd[s.directive])==null||i.call(Jd,s,n);continue}let o=Qv(r,n);o instanceof jv?zn.get(s)!==o.template?(zn.set(s,o.template),o=new il(o.template,o.state,vc),s.value=o,Xn.set(s,o)):(a=Xn.get(s))==null||a.update(o.state):o?(s instanceof Et&&s.attributeName.startsWith("aria-")&&(o=String(o)),s instanceof Et?typeof o=="boolean"?s.booleanValue=o:typeof o=="function"?s.element[s.attributeName]=o:s.value=o:(s.value=o,zn.delete(s),Xn.delete(s))):s instanceof Et?s.value=void 0:(s.value=void 0,zn.delete(s),Xn.delete(s))}}},sm={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t??e,"|":(t,e)=>{var n;return(n=rm[e])==null?void 0:n.call(rm,t)}};function Qv(t,e={}){var n,i,a,r,s,o,l;const d=function(u){return function(c,m){let p,v,b;const f=[];for(;c;){b=null,p=c.length;for(const T in m)v=m[T].exec(c),v&&v.index<p&&(b={token:v[0],type:T,matches:v.slice(1)},p=v.index);p&&f.push({token:c.substr(0,p),type:void 0}),b&&f.push(b),c=c.substr(p+(b?b.token.length:0))}return f}(u,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:c})=>c!=="ws")}(t);if(d.length===0||d.some(({type:u})=>!u))return Aa(t);if(((n=d[0])==null?void 0:n.token)===">"){const u=e[(i=d[1])==null?void 0:i.token];if(!u)return Aa(t);const c={...e};u.state=c;const m=d.slice(2);for(let p=0;p<m.length;p+=3){const v=(a=m[p])==null?void 0:a.token,b=(r=m[p+1])==null?void 0:r.token,f=(s=m[p+2])==null?void 0:s.token;v&&b==="="&&(c[v]=ka(f,e))}return u}if(d.length===1)return Zr(d[0])?ka(d[0].token,e):Aa(t);if(d.length===2){const u=(o=d[0])==null?void 0:o.token,c=sm[u];return!c||!Zr(d[1])?Aa(t):c(ka(d[1].token,e))}if(d.length===3){const u=(l=d[1])==null?void 0:l.token,c=sm[u];if(!c||!Zr(d[0])||!Zr(d[2]))return Aa(t);const m=ka(d[0].token,e);return u==="|"?c(m,d[2].token):c(m,ka(d[2].token,e))}}function Aa(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function Zr({type:t}){return["number","boolean","string","param"].includes(t)}function ka(t,e){const n=t[0],i=t.slice(-1);return t==="true"||t==="false"?t==="true":n===i&&["'",'"'].includes(n)?t.slice(1,-1):Yp(t)?parseFloat(t):e[t]}var ia,Xs,zi,eu,Zv,Js,tu,bc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},nu=(t,e,n)=>(bc(t,e,"read from private field"),n?n.call(t):e.get(t)),wa=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Jn=(t,e,n,i)=>(bc(t,e,"write to private field"),e.set(t,n),n),Bl=(t,e,n)=>(bc(t,e,"access private method"),n);const Vl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},zv=ge.createElement("template");zv.innerHTML=`
|
|
1460
|
+
<style>
|
|
1461
|
+
:host {
|
|
1462
|
+
display: inline-block;
|
|
1463
|
+
line-height: 0;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
media-controller {
|
|
1467
|
+
width: 100%;
|
|
1468
|
+
height: 100%;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
media-captions-button:not([mediasubtitleslist]),
|
|
1472
|
+
media-captions-menu:not([mediasubtitleslist]),
|
|
1473
|
+
media-captions-menu-button:not([mediasubtitleslist]),
|
|
1474
|
+
media-audio-track-menu[mediaaudiotrackunavailable],
|
|
1475
|
+
media-audio-track-menu-button[mediaaudiotrackunavailable],
|
|
1476
|
+
media-rendition-menu[mediarenditionunavailable],
|
|
1477
|
+
media-rendition-menu-button[mediarenditionunavailable],
|
|
1478
|
+
media-volume-range[mediavolumeunavailable],
|
|
1479
|
+
media-airplay-button[mediaairplayunavailable],
|
|
1480
|
+
media-fullscreen-button[mediafullscreenunavailable],
|
|
1481
|
+
media-cast-button[mediacastunavailable],
|
|
1482
|
+
media-pip-button[mediapipunavailable] {
|
|
1483
|
+
display: none;
|
|
1484
|
+
}
|
|
1485
|
+
</style>
|
|
1486
|
+
`;class eo extends g.HTMLElement{constructor(){super(),wa(this,eu),wa(this,Js),wa(this,ia,void 0),wa(this,Xs,void 0),wa(this,zi,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(n=>{var i;this.mediaController&&!((i=this.mediaController)!=null&&i.breakpointsComputed)||n.some(a=>{const r=a.target;return r===this||r.localName==="media-controller"&&(!!Vl[a.attributeName]||!!a.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(sn.BREAKPOINTS_COMPUTED,this.render),Bl(this,eu,Zv).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=nu(this,ia))!=null?e:this.constructor.template}set template(e){e!==null?typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(Jn(this,ia,e),Jn(this,zi,null),this.createRenderer()):this.removeAttribute("template")}get props(){var e,n,i;const a=[...Array.from((n=(e=this.mediaController)==null?void 0:e.attributes)!=null?n:[]).filter(({name:s})=>Vl[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(const s of a){const o=(i=Vl[s.name])!=null?i:Yg(s.name);let{value:l}=s;l!=null?(Yp(l)&&(l=parseFloat(l)),r[o]=l===""||l):r[o]=!1}return r}attributeChangedCallback(e,n,i){e==="template"&&n!=i&&Bl(this,Js,tu).call(this)}connectedCallback(){Bl(this,Js,tu).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==nu(this,Xs)&&(Jn(this,Xs,this.template),this.renderer=new il(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(zv.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}}function IE({anchor:t,floating:e,placement:n}){const i=function({anchor:s,floating:o}){return{anchor:SE(s,o.offsetParent),floating:{x:0,y:0,width:o.offsetWidth,height:o.offsetHeight}}}({anchor:t,floating:e}),{x:a,y:r}=function({anchor:s,floating:o},l){const d=function(f){return["top","bottom"].includes(om(f))?"y":"x"}(l)==="x"?"y":"x",u=d==="y"?"height":"width",c=om(l),m=s.x+s.width/2-o.width/2,p=s.y+s.height/2-o.height/2,v=s[u]/2-o[u]/2;let b;switch(c){case"top":b={x:m,y:s.y-o.height};break;case"bottom":b={x:m,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:p};break;case"left":b={x:s.x-o.width,y:p};break;default:b={x:s.x,y:s.y}}switch(l.split("-")[1]){case"start":b[d]-=v;break;case"end":b[d]+=v}return b}(i,n);return{x:a,y:r}}function SE(t,e){var n;const i=t.getBoundingClientRect(),a=(n=e?.getBoundingClientRect())!=null?n:{x:0,y:0};return{x:i.x-a.x,y:i.y-a.y,width:i.width,height:i.height}}function om(t){return t.split("-")[0]}ia=new WeakMap,Xs=new WeakMap,zi=new WeakMap,eu=new WeakSet,Zv=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}},Js=new WeakSet,tu=function(){var t;const e=this.getAttribute("template");if(!e||e===nu(this,zi))return;const n=this.getRootNode(),i=(t=n?.getElementById)==null?void 0:t.call(n,e);if(i)return Jn(this,zi,e),Jn(this,ia,i),void this.createRenderer();(function(a){if(!/^(\/|\.\/|https?:\/\/)/.test(a))return!1;const r=/^https?:\/\//.test(a)?void 0:location.origin;try{new URL(a,r)}catch{return!1}return!0})(e)&&(Jn(this,zi,e),async function(a){const r=await fetch(a);if(r.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${r.status}`);return r.text()}(e).then(a=>{const r=ge.createElement("template");r.innerHTML=a,Jn(this,ia,r),this.createRenderer()}).catch(console.error))},eo.observedAttributes=["template"],eo.processor=vc,g.customElements.get("media-theme")||g.customElements.define("media-theme",eo);class fc extends Event{constructor({action:e="auto",relatedTarget:n,...i}){super("invoke",i),this.action=e,this.relatedTarget=n}}class RE extends Event{constructor({newState:e,oldState:n,...i}){super("toggle",i),this.newState=e,this.oldState=n}}var xt,ei,yn,to,no,ti,hr,iu,Xv,qo,au,Ko,io,ru,su,Jv,ou,eb,lu,tb,aa,ra,sa,mr,Fo,du,uu,nb,cu,lm,hu,ib,mu,dm,pu,ab,vu,rb,pr,Yo,bu,sb,vr,Go,ao,fu,gc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},q=(t,e,n)=>(gc(t,e,"read from private field"),n?n.call(t):e.get(t)),Z=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Nt=(t,e,n,i)=>(gc(t,e,"write to private field"),e.set(t,n),n),z=(t,e,n)=>(gc(t,e,"access private method"),n);function ca({type:t,text:e,value:n,checked:i}){const a=ge.createElement("media-chrome-menu-item");a.type=t,a.part.add("menu-item"),a.part.add(t),a.value=n,a.checked=i;const r=ge.createElement("span");return r.textContent=e,a.append(r),a}function ii(t,e){let n=t.querySelector(`:scope > [slot="${e}"]`);if(n?.nodeName=="SLOT"&&(n=n.assignedElements({flatten:!0})[0]),n)return n=n.cloneNode(!0),n;const i=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return i?i.cloneNode(!0):""}const um="style",cm="hidden",hm="disabled",CE="anchor";class at extends g.HTMLElement{constructor(){if(super(),Z(this,iu),Z(this,qo),Z(this,io),Z(this,su),Z(this,ou),Z(this,lu),Z(this,sa),Z(this,Fo),Z(this,uu),Z(this,cu),Z(this,hu),Z(this,mu),Z(this,pu),Z(this,vu),Z(this,pr),Z(this,bu),Z(this,vr),Z(this,ao),Z(this,xt,null),Z(this,ei,null),Z(this,yn,null),Z(this,to,new Set),Z(this,no,void 0),Z(this,ti,!1),Z(this,hr,null),Z(this,Ko,()=>{const e=q(this,to),n=new Set(this.items);for(const i of e)n.has(i)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:i}));for(const i of n)e.has(i)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:i}));Nt(this,to,n)}),Z(this,aa,()=>{z(this,sa,mr).call(this),z(this,Fo,du).call(this,!1)}),Z(this,ra,()=>{z(this,sa,mr).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),Nt(this,no,new MutationObserver(q(this,Ko))),q(this,no).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[hm,cm,um,CE,K.MEDIA_CONTROLLER]}static formatMenuItemText(e,n){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":z(this,iu,Xv).call(this,e);break;case"invoke":z(this,su,Jv).call(this,e);break;case"click":z(this,uu,nb).call(this,e);break;case"toggle":z(this,hu,ib).call(this,e);break;case"focusout":z(this,pu,ab).call(this,e);break;case"keydown":z(this,vu,rb).call(this,e)}}connectedCallback(){var e,n;Nt(this,hr,rc(this.shadowRoot,":host")),z(this,io,ru).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Nt(this,xt,gd(this)),(n=(e=q(this,xt))==null?void 0:e.associateElement)==null||n.call(e,this),this.hidden||(da(br(this),q(this,aa)),da(this,q(this,ra))),z(this,qo,au).call(this)}disconnectedCallback(){var e,n;ua(br(this),q(this,aa)),ua(this,q(this,ra)),this.disable(),(n=(e=q(this,xt))==null?void 0:e.unassociateElement)==null||n.call(e,this),Nt(this,xt,null)}attributeChangedCallback(e,n,i){var a,r,s,o;e===cm&&i!==n?(q(this,ti)||Nt(this,ti,!0),this.hidden?z(this,lu,tb).call(this):z(this,ou,eb).call(this),this.dispatchEvent(new RE({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===K.MEDIA_CONTROLLER?(n&&((r=(a=q(this,xt))==null?void 0:a.unassociateElement)==null||r.call(a,this),Nt(this,xt,null)),i&&this.isConnected&&(Nt(this,xt,gd(this)),(o=(s=q(this,xt))==null?void 0:s.associateElement)==null||o.call(s,this))):e===hm&&i!==n?i==null?this.enable():this.disable():e===um&&i!==n&&z(this,io,ru).call(this)}formatMenuItemText(e,n){return this.constructor.formatMenuItemText(e,n)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=el(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(DE)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,n;return(n=(e=this.checkedItems[0])==null?void 0:e.value)!=null?n:""}set value(e){const n=this.items.find(i=>i.value===e);n&&z(this,ao,fu).call(this,n)}focus(){if(Nt(this,ei,ac()),this.items.length)return z(this,vr,Go).call(this,this.items[0]),void this.items[0].focus();const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e?.focus()}handleSelect(e){var n;const i=z(this,pr,Yo).call(this,e);i&&(z(this,ao,fu).call(this,i,i.type==="checkbox"),q(this,yn)&&!this.hidden&&((n=q(this,ei))==null||n.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var n,i;const{key:a}=e,r=this.items,s=(i=(n=z(this,pr,Yo).call(this,e))!=null?n:z(this,bu,sb).call(this))!=null?i:r[0],o=r.indexOf(s);let l=Math.max(0,o);a==="ArrowDown"?l++:a==="ArrowUp"?l--:e.key==="Home"?l=0:e.key==="End"&&(l=r.length-1),l<0&&(l=r.length-1),l>r.length-1&&(l=0),z(this,vr,Go).call(this,r[l]),r[l].focus()}}function DE(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t?.role)}function br(t){var e;return(e=t.getAttribute("bounds")?ha(t,`#${t.getAttribute("bounds")}`):Ve(t)||t.parentElement)!=null?e:t}xt=new WeakMap,ei=new WeakMap,yn=new WeakMap,to=new WeakMap,no=new WeakMap,ti=new WeakMap,hr=new WeakMap,iu=new WeakSet,Xv=function(t){const e=t.target;for(const n of e.assignedNodes({flatten:!0}))n.nodeType===3&&n.textContent.trim()===""&&n.remove();["header","title"].includes(e.name)&&z(this,qo,au).call(this),e.name||q(this,Ko).call(this)},qo=new WeakSet,au=function(){const t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0},Ko=new WeakMap,io=new WeakSet,ru=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),n=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",n==="row"?"":"width:0")},su=new WeakSet,Jv=function(t){Nt(this,yn,t.relatedTarget),on(this,t.relatedTarget)||(this.hidden=!this.hidden)},ou=new WeakSet,eb=function(){var t;(t=q(this,yn))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),da(br(this),q(this,aa)),da(this,q(this,ra))},lu=new WeakSet,tb=function(){var t;(t=q(this,yn))==null||t.setAttribute("aria-expanded","false"),ua(br(this),q(this,aa)),ua(this,q(this,ra))},aa=new WeakMap,ra=new WeakMap,sa=new WeakSet,mr=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;const{x:e,y:n}=IE({anchor:this.anchorElement,floating:this,placement:"top-start"});t!=null||(t=this.offsetWidth);const i=br(this).getBoundingClientRect(),a=i.width-e-t,r=i.height-n-this.offsetHeight,{style:s}=q(this,hr);s.setProperty("position","absolute"),s.setProperty("right",`${Math.max(0,a)}px`),s.setProperty("--_menu-bottom",`${r}px`);const o=getComputedStyle(this),l=s.getPropertyValue("--_menu-bottom")===o.bottom?r:parseFloat(o.bottom),d=i.height-l-parseFloat(o.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},Fo=new WeakSet,du=function(t){const e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),n=e?.querySelector('[role="menu"]'),{style:i}=q(this,hr);if(t||i.setProperty("--media-menu-transition-in","none"),n){const a=n.offsetHeight,r=Math.max(n.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${r}px`),this.style.setProperty("min-height",`${a}px`),z(this,sa,mr).call(this,r)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),z(this,sa,mr).call(this);i.removeProperty("--media-menu-transition-in")},uu=new WeakSet,nb=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(q(this,cu,lm)))return(e=q(this,ei))==null||e.focus(),void(this.hidden=!0);const n=z(this,pr,Yo).call(this,t);n&&!n.hasAttribute("disabled")&&(z(this,vr,Go).call(this,n),this.handleSelect(t))},cu=new WeakSet,lm=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(e=>e.matches('button[part~="back"]'))},hu=new WeakSet,ib=function(t){if(t.target===this)return;z(this,mu,dm).call(this);const e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const n of e)n.invokeTargetElement!=t.target&&(t.newState!="open"||n.getAttribute("aria-expanded")!="true"||n.invokeTargetElement.hidden||n.invokeTargetElement.dispatchEvent(new fc({relatedTarget:n})));for(const n of e)n.setAttribute("aria-expanded",`${!n.submenuElement.hidden}`);z(this,Fo,du).call(this,!0)},mu=new WeakSet,dm=function(){const t=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!t)},pu=new WeakSet,ab=function(t){var e;on(this,t.relatedTarget)||(q(this,ti)&&((e=q(this,ei))==null||e.focus()),q(this,yn)&&q(this,yn)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))},vu=new WeakSet,rb=function(t){var e,n,i,a,r;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;if(!(o||l||d)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if(q(this,ti))return void(this.hidden=!0);t.shiftKey?(n=(e=this.previousElementSibling)==null?void 0:e.focus)==null||n.call(e):(a=(i=this.nextElementSibling)==null?void 0:i.focus)==null||a.call(i),this.blur()}else s==="Escape"?((r=q(this,ei))==null||r.focus(),q(this,ti)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)},pr=new WeakSet,Yo=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},bu=new WeakSet,sb=function(){return this.items.find(t=>t.tabIndex===0)},vr=new WeakSet,Go=function(t){for(const e of this.items)e.tabIndex=e===t?0:-1},ao=new WeakSet,fu=function(t,e){const n=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(i=>i.checked=!1),t.checked=!e||!t.checked,this.checkedItems.some((i,a)=>i!=n[a])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},at.shadowRootOptions={mode:"open"},at.getTemplateHTML=function(t){return`
|
|
1487
|
+
<style>
|
|
1488
|
+
:host {
|
|
1489
|
+
font: var(--media-font,
|
|
1490
|
+
var(--media-font-weight, normal)
|
|
1491
|
+
var(--media-font-size, 14px) /
|
|
1492
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
1493
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
1494
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
1495
|
+
--_menu-bg: rgb(20 20 30 / .8);
|
|
1496
|
+
background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));
|
|
1497
|
+
border-radius: var(--media-menu-border-radius);
|
|
1498
|
+
border: var(--media-menu-border, none);
|
|
1499
|
+
display: var(--media-menu-display, inline-flex) !important;
|
|
1500
|
+
|
|
1501
|
+
transition: var(--media-menu-transition-in,
|
|
1502
|
+
visibility 0s,
|
|
1503
|
+
opacity .2s ease-out,
|
|
1504
|
+
transform .15s ease-out,
|
|
1505
|
+
left .2s ease-in-out,
|
|
1506
|
+
min-width .2s ease-in-out,
|
|
1507
|
+
min-height .2s ease-in-out
|
|
1508
|
+
) !important;
|
|
1509
|
+
|
|
1510
|
+
visibility: var(--media-menu-visibility, visible);
|
|
1511
|
+
opacity: var(--media-menu-opacity, 1);
|
|
1512
|
+
max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
|
|
1513
|
+
transform: var(--media-menu-transform-in, translateY(0) scale(1));
|
|
1514
|
+
flex-direction: column;
|
|
1515
|
+
|
|
1516
|
+
min-height: 0;
|
|
1517
|
+
position: relative;
|
|
1518
|
+
bottom: var(--_menu-bottom);
|
|
1519
|
+
box-sizing: border-box;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
@-moz-document url-prefix() {
|
|
1523
|
+
:host{
|
|
1524
|
+
--_menu-bg: rgb(20 20 30);
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
:host([hidden]) {
|
|
1529
|
+
transition: var(--media-menu-transition-out,
|
|
1530
|
+
visibility .15s ease-in,
|
|
1531
|
+
opacity .15s ease-in,
|
|
1532
|
+
transform .15s ease-in
|
|
1533
|
+
) !important;
|
|
1534
|
+
visibility: var(--media-menu-hidden-visibility, hidden);
|
|
1535
|
+
opacity: var(--media-menu-hidden-opacity, 0);
|
|
1536
|
+
max-height: var(--media-menu-hidden-max-height,
|
|
1537
|
+
var(--media-menu-max-height, var(--_menu-max-height, 300px)));
|
|
1538
|
+
transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
|
|
1539
|
+
pointer-events: none;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
:host([slot="submenu"]) {
|
|
1543
|
+
background: none;
|
|
1544
|
+
width: 100%;
|
|
1545
|
+
min-height: 100%;
|
|
1546
|
+
position: absolute;
|
|
1547
|
+
bottom: 0;
|
|
1548
|
+
right: -100%;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
#container {
|
|
1552
|
+
display: flex;
|
|
1553
|
+
flex-direction: column;
|
|
1554
|
+
min-height: 0;
|
|
1555
|
+
transition: transform .2s ease-out;
|
|
1556
|
+
transform: translate(0, 0);
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
#container.has-expanded {
|
|
1560
|
+
transition: transform .2s ease-in;
|
|
1561
|
+
transform: translate(-100%, 0);
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
button {
|
|
1565
|
+
background: none;
|
|
1566
|
+
color: inherit;
|
|
1567
|
+
border: none;
|
|
1568
|
+
padding: 0;
|
|
1569
|
+
font: inherit;
|
|
1570
|
+
outline: inherit;
|
|
1571
|
+
display: inline-flex;
|
|
1572
|
+
align-items: center;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
slot[name="header"][hidden] {
|
|
1576
|
+
display: none;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
slot[name="header"] > *,
|
|
1580
|
+
slot[name="header"]::slotted(*) {
|
|
1581
|
+
padding: .4em .7em;
|
|
1582
|
+
border-bottom: 1px solid rgb(255 255 255 / .25);
|
|
1583
|
+
cursor: var(--media-cursor, default);
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
slot[name="header"] > button[part~="back"],
|
|
1587
|
+
slot[name="header"]::slotted(button[part~="back"]) {
|
|
1588
|
+
cursor: var(--media-cursor, pointer);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
svg[part~="back"] {
|
|
1592
|
+
height: var(--media-menu-icon-height, var(--media-control-height, 24px));
|
|
1593
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
1594
|
+
display: block;
|
|
1595
|
+
margin-right: .5ch;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
slot:not([name]) {
|
|
1599
|
+
gap: var(--media-menu-gap);
|
|
1600
|
+
flex-direction: var(--media-menu-flex-direction, column);
|
|
1601
|
+
overflow: var(--media-menu-overflow, hidden auto);
|
|
1602
|
+
display: flex;
|
|
1603
|
+
min-height: 0;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
:host([role="menu"]) slot:not([name]) {
|
|
1607
|
+
padding-block: .4em;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
slot:not([name])::slotted([role="menu"]) {
|
|
1611
|
+
background: none;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
media-chrome-menu-item > span {
|
|
1615
|
+
margin-right: .5ch;
|
|
1616
|
+
max-width: var(--media-menu-item-max-width);
|
|
1617
|
+
text-overflow: ellipsis;
|
|
1618
|
+
overflow: hidden;
|
|
1619
|
+
}
|
|
1620
|
+
</style>
|
|
1621
|
+
<style id="layout-row" media="width:0">
|
|
1622
|
+
|
|
1623
|
+
slot[name="header"] > *,
|
|
1624
|
+
slot[name="header"]::slotted(*) {
|
|
1625
|
+
padding: .4em .5em;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
slot:not([name]) {
|
|
1629
|
+
gap: var(--media-menu-gap, .25em);
|
|
1630
|
+
flex-direction: var(--media-menu-flex-direction, row);
|
|
1631
|
+
padding-inline: .5em;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
media-chrome-menu-item {
|
|
1635
|
+
padding: .3em .5em;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
media-chrome-menu-item[aria-checked="true"] {
|
|
1639
|
+
background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
media-chrome-menu-item::part(checked-indicator) {
|
|
1644
|
+
display: var(--media-menu-item-checked-indicator-display, none);
|
|
1645
|
+
}
|
|
1646
|
+
</style>
|
|
1647
|
+
<div id="container" part="container">
|
|
1648
|
+
<slot name="header" hidden>
|
|
1649
|
+
<button part="back button" aria-label="Back to previous menu">
|
|
1650
|
+
<slot name="back-icon">
|
|
1651
|
+
<svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
|
|
1652
|
+
<path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
|
|
1653
|
+
</svg>
|
|
1654
|
+
</slot>
|
|
1655
|
+
<slot name="title"></slot>
|
|
1656
|
+
</button>
|
|
1657
|
+
</slot>
|
|
1658
|
+
<slot></slot>
|
|
1659
|
+
</div>
|
|
1660
|
+
<slot name="checked-indicator" hidden></slot>
|
|
1661
|
+
`},g.customElements.get("media-chrome-menu")||g.customElements.define("media-chrome-menu",at);var ro,fr,gu,ob,jo,Eu,yu,mm,Ot,Xi,Qa,_u,lb,so,Tu,Ec=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Pt=(t,e,n)=>(Ec(t,e,"read from private field"),n?n.call(t):e.get(t)),Qt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},$l=(t,e,n,i)=>(Ec(t,e,"write to private field"),e.set(t,n),n),gt=(t,e,n)=>(Ec(t,e,"access private method"),n);const zr="type",ql="value",pm="checked",Kl="disabled";class In extends g.HTMLElement{constructor(){if(super(),Qt(this,gu),Qt(this,jo),Qt(this,yu),Qt(this,Xi),Qt(this,_u),Qt(this,so),Qt(this,ro,!1),Qt(this,fr,void 0),Qt(this,Ot,()=>{var e,n;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const i=this.shadowRoot.querySelector('slot[name="description"]'),a=(e=this.submenuElement.checkedItems)==null?void 0:e[0],r=(n=a?.dataset.description)!=null?n:a?.text,s=ge.createElement("span");s.textContent=r??"",i.replaceChildren(s)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[zr,Kl,pm,ql]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),Ia(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":gt(this,gu,ob).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":gt(this,_u,lb).call(this,e);break;case"keyup":gt(this,Xi,Qa).call(this,e)}}attributeChangedCallback(e,n,i){e===pm&&Ia(this)&&!Pt(this,ro)?this.setAttribute("aria-checked",i!=null?"true":"false"):e===zr&&i!==n?this.role="menuitem"+i:e===Kl&&i!==n&&(i==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Kl)||this.enable(),this.role="menuitem"+this.type,$l(this,fr,Au(this,this.parentNode)),gt(this,so,Tu).call(this),this.submenuElement&>(this,jo,Eu).call(this)}disconnectedCallback(){this.disable(),gt(this,so,Tu).call(this),$l(this,fr,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=el(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(zr))!=null?e:""}set type(e){this.setAttribute(zr,`${e}`)}get value(){var e;return(e=this.getAttribute(ql))!=null?e:this.text}set value(e){this.setAttribute(ql,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(Ia(this))return this.getAttribute("aria-checked")==="true"}set checked(e){Ia(this)&&($l(this,ro,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){Ia(this)||this.invokeTargetElement&&on(this,e.target)&&this.invokeTargetElement.dispatchEvent(new fc({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function Ia(t){return t.type==="radio"||t.type==="checkbox"}function Au(t,e){if(!t)return null;const{host:n}=t.getRootNode();return!e&&n?Au(t,n):e?.items?e:Au(e,e?.parentNode)}ro=new WeakMap,fr=new WeakMap,gu=new WeakSet,ob=function(t){const e=t.target;if(!e?.name)for(const n of e.assignedNodes({flatten:!0}))n instanceof Text&&n.textContent.trim()===""&&n.remove();e.name==="submenu"&&(this.submenuElement?gt(this,jo,Eu).call(this):gt(this,yu,mm).call(this))},jo=new WeakSet,Eu=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Pt(this,Ot)),this.submenuElement.addEventListener("addmenuitem",Pt(this,Ot)),this.submenuElement.addEventListener("removemenuitem",Pt(this,Ot)),Pt(this,Ot).call(this)},yu=new WeakSet,mm=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Pt(this,Ot)),this.submenuElement.removeEventListener("addmenuitem",Pt(this,Ot)),this.submenuElement.removeEventListener("removemenuitem",Pt(this,Ot)),Pt(this,Ot).call(this)},Ot=new WeakMap,Xi=new WeakSet,Qa=function(t){const{key:e}=t;this.keysUsed.includes(e)?this.handleClick(t):this.removeEventListener("keyup",gt(this,Xi,Qa))},_u=new WeakSet,lb=function(t){const{metaKey:e,altKey:n,key:i}=t;e||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",gt(this,Xi,Qa)):this.addEventListener("keyup",gt(this,Xi,Qa),{once:!0})},so=new WeakSet,Tu=function(){var t;const e=(t=Pt(this,fr))==null?void 0:t.radioGroupItems;if(!e)return;let n=e.filter(i=>i.getAttribute("aria-checked")==="true").pop();n||(n=e[0]);for(const i of e)i.setAttribute("aria-checked","false");n?.setAttribute("aria-checked","true")},In.shadowRootOptions={mode:"open"},In.getTemplateHTML=function(t){return`
|
|
1662
|
+
<style>
|
|
1663
|
+
:host {
|
|
1664
|
+
transition: var(--media-menu-item-transition,
|
|
1665
|
+
background .15s linear,
|
|
1666
|
+
opacity .2s ease-in-out
|
|
1667
|
+
);
|
|
1668
|
+
outline: var(--media-menu-item-outline, 0);
|
|
1669
|
+
outline-offset: var(--media-menu-item-outline-offset, -1px);
|
|
1670
|
+
cursor: var(--media-cursor, pointer);
|
|
1671
|
+
display: flex;
|
|
1672
|
+
align-items: center;
|
|
1673
|
+
align-self: stretch;
|
|
1674
|
+
justify-self: stretch;
|
|
1675
|
+
white-space: nowrap;
|
|
1676
|
+
white-space-collapse: collapse;
|
|
1677
|
+
text-wrap: nowrap;
|
|
1678
|
+
padding: .4em .8em .4em 1em;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
:host(:focus-visible) {
|
|
1682
|
+
box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
1683
|
+
outline: var(--media-menu-item-hover-outline, 0);
|
|
1684
|
+
outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
:host(:hover) {
|
|
1688
|
+
cursor: var(--media-cursor, pointer);
|
|
1689
|
+
background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));
|
|
1690
|
+
outline: var(--media-menu-item-hover-outline);
|
|
1691
|
+
outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px));
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
:host([aria-checked="true"]) {
|
|
1695
|
+
background: var(--media-menu-item-checked-background);
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
:host([hidden]) {
|
|
1699
|
+
display: none;
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
:host([disabled]) {
|
|
1703
|
+
pointer-events: none;
|
|
1704
|
+
color: rgba(255, 255, 255, .3);
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
slot:not([name]) {
|
|
1708
|
+
width: 100%;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
slot:not([name="submenu"]) {
|
|
1712
|
+
display: inline-flex;
|
|
1713
|
+
align-items: center;
|
|
1714
|
+
transition: inherit;
|
|
1715
|
+
opacity: var(--media-menu-item-opacity, 1);
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
slot[name="description"] {
|
|
1719
|
+
justify-content: end;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
slot[name="description"] > span {
|
|
1723
|
+
display: inline-block;
|
|
1724
|
+
margin-inline: 1em .2em;
|
|
1725
|
+
max-width: var(--media-menu-item-description-max-width, 100px);
|
|
1726
|
+
text-overflow: ellipsis;
|
|
1727
|
+
overflow: hidden;
|
|
1728
|
+
font-size: .8em;
|
|
1729
|
+
font-weight: 400;
|
|
1730
|
+
text-align: right;
|
|
1731
|
+
position: relative;
|
|
1732
|
+
top: .04em;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
slot[name="checked-indicator"] {
|
|
1736
|
+
display: none;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
:host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {
|
|
1740
|
+
display: var(--media-menu-item-checked-indicator-display, inline-block);
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
1745
|
+
height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));
|
|
1746
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
1747
|
+
display: block;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
[part~="indicator"],
|
|
1752
|
+
::slotted([part~="indicator"]) {
|
|
1753
|
+
fill: var(--media-menu-item-indicator-fill,
|
|
1754
|
+
var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));
|
|
1755
|
+
height: var(--media-menu-item-indicator-height, 1.25em);
|
|
1756
|
+
margin-right: .5ch;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
[part~="checked-indicator"] {
|
|
1760
|
+
visibility: hidden;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
:host([aria-checked="true"]) [part~="checked-indicator"] {
|
|
1764
|
+
visibility: visible;
|
|
1765
|
+
}
|
|
1766
|
+
</style>
|
|
1767
|
+
<slot name="checked-indicator">
|
|
1768
|
+
<svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
|
|
1769
|
+
<path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
|
|
1770
|
+
</svg>
|
|
1771
|
+
</slot>
|
|
1772
|
+
<slot name="prefix"></slot>
|
|
1773
|
+
<slot></slot>
|
|
1774
|
+
<slot name="description"></slot>
|
|
1775
|
+
<slot name="suffix">
|
|
1776
|
+
${this.getSuffixSlotInnerHTML(t)}
|
|
1777
|
+
</slot>
|
|
1778
|
+
<slot name="submenu"></slot>
|
|
1779
|
+
`},In.getSuffixSlotInnerHTML=function(t){return""},g.customElements.get("media-chrome-menu-item")||g.customElements.define("media-chrome-menu-item",In);class vm extends at{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ve(this).querySelector("media-settings-menu-button")}}vm.getTemplateHTML=function(t){return`
|
|
1780
|
+
${at.getTemplateHTML(t)}
|
|
1781
|
+
<style>
|
|
1782
|
+
:host {
|
|
1783
|
+
--_menu-bg: rgb(20 20 30 / .8);
|
|
1784
|
+
background: var(--media-settings-menu-background,
|
|
1785
|
+
var(--media-menu-background,
|
|
1786
|
+
var(--media-control-background,
|
|
1787
|
+
var(--media-secondary-color, var(--_menu-bg)))));
|
|
1788
|
+
min-width: var(--media-settings-menu-min-width, 170px);
|
|
1789
|
+
border-radius: 2px 2px 0 0;
|
|
1790
|
+
overflow: hidden;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
@-moz-document url-prefix() {
|
|
1794
|
+
:host{
|
|
1795
|
+
--_menu-bg: rgb(20 20 30);
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
:host([role="menu"]) {
|
|
1800
|
+
|
|
1801
|
+
justify-content: end;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
slot:not([name]) {
|
|
1805
|
+
justify-content: var(--media-settings-menu-justify-content);
|
|
1806
|
+
flex-direction: var(--media-settings-menu-flex-direction, column);
|
|
1807
|
+
overflow: visible;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
#container.has-expanded {
|
|
1811
|
+
--media-settings-menu-item-opacity: 0;
|
|
1812
|
+
}
|
|
1813
|
+
</style>
|
|
1814
|
+
`},g.customElements.get("media-settings-menu")||g.customElements.define("media-settings-menu",vm);class Xr extends In{}Xr.shadowRootOptions={mode:"open"},Xr.getTemplateHTML=function(t){return`
|
|
1815
|
+
${In.getTemplateHTML.call(this,t)}
|
|
1816
|
+
<style>
|
|
1817
|
+
slot:not([name="submenu"]) {
|
|
1818
|
+
opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
:host([aria-expanded="true"]:hover) {
|
|
1822
|
+
background: transparent;
|
|
1823
|
+
}
|
|
1824
|
+
</style>
|
|
1825
|
+
`},Xr.getSuffixSlotInnerHTML=function(t){return`
|
|
1826
|
+
<svg aria-hidden="true" viewBox="0 0 20 24">
|
|
1827
|
+
<path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
|
|
1828
|
+
</svg>
|
|
1829
|
+
`},g.customElements.get("media-settings-menu-item")||g.customElements.define("media-settings-menu-item",Xr);class ma extends Ce{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=el(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new fc({relatedTarget:this}))}}g.customElements.get("media-chrome-menu-button")||g.customElements.define("media-chrome-menu-button",ma);class Fl extends ma{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Ve(this).querySelector("media-settings-menu")}}Fl.getSlotTemplateHTML=function(){return`
|
|
1830
|
+
<style>
|
|
1831
|
+
:host([aria-expanded="true"]) slot[name=tooltip] {
|
|
1832
|
+
display: none;
|
|
1833
|
+
}
|
|
1834
|
+
</style>
|
|
1835
|
+
<slot name="icon">
|
|
1836
|
+
<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1837
|
+
<path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>
|
|
1838
|
+
</svg>
|
|
1839
|
+
</slot>
|
|
1840
|
+
`},Fl.getTooltipContentHTML=function(){return L("Settings")},g.customElements.get("media-settings-menu-button")||g.customElements.define("media-settings-menu-button",Fl);var Za,oo,lo,ku,uo,wu,yc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},db=(t,e,n)=>(yc(t,e,"read from private field"),n?n.call(t):e.get(t)),Jr=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Iu=(t,e,n,i)=>(yc(t,e,"write to private field"),e.set(t,n),n),es=(t,e,n)=>(yc(t,e,"access private method"),n);class LE extends at{constructor(){super(...arguments),Jr(this,lo),Jr(this,uo),Jr(this,Za,[]),Jr(this,oo,void 0)}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_AUDIO_TRACK_LIST,h.MEDIA_AUDIO_TRACK_ENABLED,h.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,n,i){var a;super.attributeChangedCallback(e,n,i),e===h.MEDIA_AUDIO_TRACK_ENABLED&&n!==i?this.value=i:e===h.MEDIA_AUDIO_TRACK_LIST&&n!==i&&(Iu(this,Za,(a=i??"")==null?void 0:a.split(/\s+/).map(Fg)),es(this,lo,ku).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",es(this,uo,wu))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",es(this,uo,wu))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Ve(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return db(this,Za)}set mediaAudioTrackList(e){Iu(this,Za,e),es(this,lo,ku).call(this)}get mediaAudioTrackEnabled(){var e;return(e=ie(this,h.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){ae(this,h.MEDIA_AUDIO_TRACK_ENABLED,e)}}Za=new WeakMap,oo=new WeakMap,lo=new WeakSet,ku=function(){if(db(this,oo)===JSON.stringify(this.mediaAudioTrackList))return;Iu(this,oo,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort((e,n)=>e.id.localeCompare(n.id,void 0,{numeric:!0}));for(const e of t){const n=ca({type:"radio",text:this.formatMenuItemText(e.label,e),value:`${e.id}`,checked:e.enabled});n.prepend(ii(this,"checked-indicator")),this.defaultSlot.append(n)}},uo=new WeakSet,wu=function(){if(this.value==null)return;const t=new g.CustomEvent(R.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},g.customElements.get("media-audio-track-menu")||g.customElements.define("media-audio-track-menu",LE);const bm=t=>{const e=L("Audio");t.setAttribute("aria-label",e)};class Yl extends ma{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_AUDIO_TRACK_ENABLED,h.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),bm(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_LANG&&bm(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Ve(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=ie(this,h.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){ae(this,h.MEDIA_AUDIO_TRACK_ENABLED,e)}}Yl.getSlotTemplateHTML=function(){return`
|
|
1841
|
+
<style>
|
|
1842
|
+
:host([aria-expanded="true"]) slot[name=tooltip] {
|
|
1843
|
+
display: none;
|
|
1844
|
+
}
|
|
1845
|
+
</style>
|
|
1846
|
+
<slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1847
|
+
<path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
|
|
1848
|
+
<path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>
|
|
1849
|
+
</svg></slot>
|
|
1850
|
+
`},Yl.getTooltipContentHTML=function(){return L("Audio")},g.customElements.get("media-audio-track-menu-button")||g.customElements.define("media-audio-track-menu-button",Yl);var co,ho,Su,mo,Ru,Cu=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Gl=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ts=(t,e,n)=>(Cu(t,e,"access private method"),n);class ub extends at{constructor(){super(...arguments),Gl(this,ho),Gl(this,mo),Gl(this,co,void 0)}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_SUBTITLES_LIST,h.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_SUBTITLES_LIST&&n!==i?ts(this,ho,Su).call(this):e===h.MEDIA_SUBTITLES_SHOWING&&n!==i&&(this.value=i||"",ts(this,ho,Su).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ts(this,mo,Ru))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ts(this,mo,Ru))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ve(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return fm(this,h.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){gm(this,h.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return fm(this,h.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){gm(this,h.MEDIA_SUBTITLES_SHOWING,e)}}co=new WeakMap,ho=new WeakSet,Su=function(){var t;const e=(Cu(n=this,i=co,"read from private field"),i.get(n)!==JSON.stringify(this.mediaSubtitlesList));var n,i;const a=this.value!==this.getAttribute(h.MEDIA_SUBTITLES_SHOWING);if(!e&&!a)return;((l,d,u)=>{Cu(l,d,"write to private field"),d.set(l,u)})(this,co,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const r=!this.value,s=ca({type:"radio",text:this.formatMenuItemText(L("Off")),value:"off",checked:r});s.prepend(ii(this,"checked-indicator")),this.defaultSlot.append(s);const o=this.mediaSubtitlesList;for(const l of o){const d=ca({type:"radio",text:this.formatMenuItemText(l.label,l),value:Td(l),checked:this.value==Td(l)});d.prepend(ii(this,"checked-indicator")),((t=l.kind)!=null?t:"subs")==="captions"&&d.append(ii(this,"captions-indicator")),this.defaultSlot.append(d)}},mo=new WeakSet,Ru=function(){const t=this.mediaSubtitlesShowing,e=this.getAttribute(h.MEDIA_SUBTITLES_SHOWING),n=this.value!==e;if(t?.length&&n&&this.dispatchEvent(new g.CustomEvent(R.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!n)return;const i=new g.CustomEvent(R.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)},ub.getTemplateHTML=function(t){return`
|
|
1851
|
+
${at.getTemplateHTML(t)}
|
|
1852
|
+
<slot name="captions-indicator" hidden>
|
|
1853
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
|
|
1854
|
+
<path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
|
|
1855
|
+
</svg></slot>
|
|
1856
|
+
`};const fm=(t,e)=>{const n=t.getAttribute(e);return n?tl(n):[]},gm=(t,e,n)=>{if(!n?.length)return void t.removeAttribute(e);const i=Rr(n);t.getAttribute(e)!==i&&t.setAttribute(e,i)};g.customElements.get("media-captions-menu")||g.customElements.define("media-captions-menu",ub);const Em=t=>{t.setAttribute("data-captions-enabled",cv(t).toString())},ym=t=>{t.setAttribute("aria-label",L("closed captions"))};class Du extends ma{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_SUBTITLES_LIST,h.MEDIA_SUBTITLES_SHOWING,h.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),ym(this),Em(this)}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_SUBTITLES_SHOWING?Em(this):e===h.MEDIA_LANG&&ym(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Ve(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return _m(this,h.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Tm(this,h.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return _m(this,h.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Tm(this,h.MEDIA_SUBTITLES_SHOWING,e)}}Du.getSlotTemplateHTML=function(){return`
|
|
1857
|
+
<style>
|
|
1858
|
+
:host([data-captions-enabled="true"]) slot[name=off] {
|
|
1859
|
+
display: none !important;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
|
|
1863
|
+
:host(:not([data-captions-enabled="true"])) slot[name=on] {
|
|
1864
|
+
display: none !important;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
:host([aria-expanded="true"]) slot[name=tooltip] {
|
|
1868
|
+
display: none;
|
|
1869
|
+
}
|
|
1870
|
+
</style>
|
|
1871
|
+
|
|
1872
|
+
<slot name="icon">
|
|
1873
|
+
<slot name="on"><svg aria-hidden="true" viewBox="0 0 26 24">
|
|
1874
|
+
<path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
|
|
1875
|
+
</svg></slot>
|
|
1876
|
+
<slot name="off"><svg aria-hidden="true" viewBox="0 0 26 24">
|
|
1877
|
+
<path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
|
|
1878
|
+
</svg></slot>
|
|
1879
|
+
</slot>
|
|
1880
|
+
`},Du.getTooltipContentHTML=function(){return L("Captions")};const _m=(t,e)=>{const n=t.getAttribute(e);return n?tl(n):[]},Tm=(t,e,n)=>{if(!n?.length)return void t.removeAttribute(e);const i=Rr(n);t.getAttribute(e)!==i&&t.setAttribute(e,i)};g.customElements.get("media-captions-menu-button")||g.customElements.define("media-captions-menu-button",Du);var _n,Bi,za,po,Lu,cb=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Vi=(t,e,n)=>(cb(t,e,"read from private field"),n?n.call(t):e.get(t)),jl=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},pi=(t,e,n)=>(cb(t,e,"access private method"),n);const Ql="rates";class ME extends at{constructor(){super(),jl(this,Bi),jl(this,po),jl(this,_n,new oc(this,Ql,{defaultValue:Ov})),pi(this,Bi,za).call(this)}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_PLAYBACK_RATE,Ql]}attributeChangedCallback(e,n,i){super.attributeChangedCallback(e,n,i),e===h.MEDIA_PLAYBACK_RATE&&n!=i?(this.value=i,pi(this,Bi,za).call(this)):e===Ql&&n!=i&&(Vi(this,_n).value=i,pi(this,Bi,za).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",pi(this,po,Lu))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",pi(this,po,Lu))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ve(this).querySelector("media-playback-rate-menu-button")}get rates(){return Vi(this,_n)}set rates(e){e?Array.isArray(e)?Vi(this,_n).value=e.join(" "):typeof e=="string"&&(Vi(this,_n).value=e):Vi(this,_n).value="",pi(this,Bi,za).call(this)}get mediaPlaybackRate(){return ne(this,h.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){he(this,h.MEDIA_PLAYBACK_RATE,e)}}_n=new WeakMap,Bi=new WeakSet,za=function(){this.defaultSlot.textContent="";const t=this.mediaPlaybackRate,e=new Set(Array.from(Vi(this,_n)).map(i=>Number(i)));t>0&&!e.has(t)&&e.add(t);const n=Array.from(e).sort((i,a)=>i-a);for(const i of n){const a=ca({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i.toString(),checked:t===i});a.prepend(ii(this,"checked-indicator")),this.defaultSlot.append(a)}},po=new WeakSet,Lu=function(){if(!this.value)return;const t=new g.CustomEvent(R.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},g.customElements.get("media-playback-rate-menu")||g.customElements.define("media-playback-rate-menu",ME);class Zl extends ma{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:1}x`}attributeChangedCallback(e,n,i){if(super.attributeChangedCallback(e,n,i),e===h.MEDIA_PLAYBACK_RATE){const a=i?+i:Number.NaN,r=Number.isNaN(a)?1:a;this.container.innerHTML=`${r}x`,this.setAttribute("aria-label",L("Playback rate {playbackRate}",{playbackRate:r}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Ve(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return ne(this,h.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){he(this,h.MEDIA_PLAYBACK_RATE,e)}}Zl.getSlotTemplateHTML=function(t){return`
|
|
1881
|
+
<style>
|
|
1882
|
+
:host {
|
|
1883
|
+
min-width: 5ch;
|
|
1884
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
:host([aria-expanded="true"]) slot[name=tooltip] {
|
|
1888
|
+
display: none;
|
|
1889
|
+
}
|
|
1890
|
+
</style>
|
|
1891
|
+
<slot name="icon">${t.mediaplaybackrate||1}x</slot>
|
|
1892
|
+
`},Zl.getTooltipContentHTML=function(){return L("Playback rate")},g.customElements.get("media-playback-rate-menu-button")||g.customElements.define("media-playback-rate-menu-button",Zl);var Xa,$i,qi,Ja,vo,Mu,_c=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},er=(t,e,n)=>(_c(t,e,"read from private field"),n?n.call(t):e.get(t)),ns=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Am=(t,e,n,i)=>(_c(t,e,"write to private field"),e.set(t,n),n),vi=(t,e,n)=>(_c(t,e,"access private method"),n);class xE extends at{constructor(){super(...arguments),ns(this,qi),ns(this,vo),ns(this,Xa,[]),ns(this,$i,{})}static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_RENDITION_LIST,h.MEDIA_RENDITION_SELECTED,h.MEDIA_RENDITION_UNAVAILABLE,h.MEDIA_HEIGHT]}static formatMenuItemText(e,n){return super.formatMenuItemText(e,n)}static formatRendition(e,{showBitrate:n=!1}={}){const i=`${Math.min(e.width,e.height)}p`;if(n&&e.bitrate){const a=e.bitrate/1e6;return`${i} (${`${a.toFixed(a<1?1:0)} Mbps`})`}return this.formatMenuItemText(i,e)}static compareRendition(e,n){var i,a;return n.height===e.height?((i=n.bitrate)!=null?i:0)-((a=e.bitrate)!=null?a:0):n.height-e.height}attributeChangedCallback(e,n,i){var a;super.attributeChangedCallback(e,n,i),e===h.MEDIA_RENDITION_SELECTED&&n!==i?(this.value=i??"auto",vi(this,qi,Ja).call(this)):e===h.MEDIA_RENDITION_LIST&&n!==i?(Am(this,Xa,(a=i)==null?void 0:a.split(/\s+/).map(qg)),vi(this,qi,Ja).call(this)):e===h.MEDIA_HEIGHT&&n!==i&&vi(this,qi,Ja).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",vi(this,vo,Mu))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",vi(this,vo,Mu))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ve(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return er(this,Xa)}set mediaRenditionList(e){Am(this,Xa,e),vi(this,qi,Ja).call(this)}get mediaRenditionSelected(){return ie(this,h.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ae(this,h.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ne(this,h.MEDIA_HEIGHT)}set mediaHeight(e){he(this,h.MEDIA_HEIGHT,e)}compareRendition(e,n){return this.constructor.compareRendition(e,n)}formatMenuItemText(e,n){return this.constructor.formatMenuItemText(e,n)}formatRendition(e,n){return this.constructor.formatRendition(e,n)}showRenditionBitrate(e){return this.mediaRenditionList.some(n=>n!==e&&n.height===e.height&&n.bitrate!==e.bitrate)}}Xa=new WeakMap,$i=new WeakMap,qi=new WeakSet,Ja=function(){if(er(this,$i).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&er(this,$i).mediaHeight===this.mediaHeight)return;er(this,$i).mediaRenditionList=JSON.stringify(this.mediaRenditionList),er(this,$i).mediaHeight=this.mediaHeight;const t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),e=t.find(s=>s.id===this.mediaRenditionSelected);for(const s of t)s.selected=s===e;this.defaultSlot.textContent="";const n=!this.mediaRenditionSelected;for(const s of t){const o=ca({type:"radio",text:this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),value:`${s.id}`,checked:s.selected&&!n});o.prepend(ii(this,"checked-indicator")),this.defaultSlot.append(o)}const i=e&&this.showRenditionBitrate(e),a=n?e?this.formatMenuItemText(`${L("Auto")} • ${this.formatRendition(e,{showBitrate:i})}`,e):this.formatMenuItemText(`${L("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(L("Auto")),r=ca({type:"radio",text:a,value:"auto",checked:n});r.dataset.description=a,r.prepend(ii(this,"checked-indicator")),this.defaultSlot.append(r)},vo=new WeakSet,Mu=function(){if(this.value==null)return;const t=new g.CustomEvent(R.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},g.customElements.get("media-rendition-menu")||g.customElements.define("media-rendition-menu",xE);class zl extends ma{static get observedAttributes(){return[...super.observedAttributes,h.MEDIA_RENDITION_SELECTED,h.MEDIA_RENDITION_UNAVAILABLE,h.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Ve(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ie(this,h.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ae(this,h.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ne(this,h.MEDIA_HEIGHT)}set mediaHeight(e){he(this,h.MEDIA_HEIGHT,e)}}zl.getSlotTemplateHTML=function(){return`
|
|
1893
|
+
<style>
|
|
1894
|
+
:host([aria-expanded="true"]) slot[name=tooltip] {
|
|
1895
|
+
display: none;
|
|
1896
|
+
}
|
|
1897
|
+
</style>
|
|
1898
|
+
<slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1899
|
+
<path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />
|
|
1900
|
+
</svg></slot>
|
|
1901
|
+
`},zl.getTooltipContentHTML=function(){return L("Quality")},g.customElements.get("media-rendition-menu-button")||g.customElements.define("media-rendition-menu-button",zl);var Ji,gr,bo,Gn,ea,xu,km,fo,Nu,go,Ou,hb,Qo,Zo,Eo,Tc=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ut=(t,e,n)=>(Tc(t,e,"read from private field"),n?n.call(t):e.get(t)),At=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},wm=(t,e,n,i)=>(Tc(t,e,"write to private field"),e.set(t,n),n),tt=(t,e,n)=>(Tc(t,e,"access private method"),n);class Im extends at{constructor(){super(),At(this,gr),At(this,Gn),At(this,xu),At(this,fo),At(this,Ou),At(this,Ji,!1),At(this,go,e=>{const n=e.target,i=n?.nodeName==="VIDEO",a=tt(this,fo,Nu).call(this,n);(i||a)&&(Ut(this,Ji)?tt(this,Gn,ea).call(this):tt(this,Ou,hb).call(this,e))}),At(this,Qo,e=>{const n=e.target,i=this.contains(n),a=e.button===2,r=n?.nodeName==="VIDEO",s=tt(this,fo,Nu).call(this,n);i||a&&(r||s)||tt(this,Gn,ea).call(this)}),At(this,Zo,e=>{e.key==="Escape"&&tt(this,Gn,ea).call(this)}),At(this,Eo,e=>{var n,i;const a=e.target;if((n=a.matches)!=null&&n.call(a,'button[invoke="copy"]')){const r=(i=a.closest("media-context-menu-item"))==null?void 0:i.querySelector('input[slot="copy"]');r&&navigator.clipboard.writeText(r.value)}tt(this,Gn,ea).call(this)}),this.setAttribute("noautohide",""),tt(this,gr,bo).call(this)}connectedCallback(){super.connectedCallback(),Ve(this).addEventListener("contextmenu",Ut(this,go)),this.addEventListener("click",Ut(this,Eo))}disconnectedCallback(){super.disconnectedCallback(),Ve(this).removeEventListener("contextmenu",Ut(this,go)),this.removeEventListener("click",Ut(this,Eo)),document.removeEventListener("mousedown",Ut(this,Qo)),document.removeEventListener("keydown",Ut(this,Zo))}}Ji=new WeakMap,gr=new WeakSet,bo=function(){this.hidden=!Ut(this,Ji)},Gn=new WeakSet,ea=function(){wm(this,Ji,!1),tt(this,gr,bo).call(this)},xu=new WeakSet,km=function(){document.querySelectorAll("media-context-menu").forEach(t=>{var e;t!==this&&tt(e=t,Gn,ea).call(e)})},fo=new WeakSet,Nu=function(t){return t?t.hasAttribute("slot")&&t.getAttribute("slot")==="media"?!0:t.nodeName.includes("-")&&t.tagName.includes("-")?t.hasAttribute("src")||t.hasAttribute("poster")||t.hasAttribute("preload")||t.hasAttribute("playsinline"):!1:!1},go=new WeakMap,Ou=new WeakSet,hb=function(t){t.preventDefault(),tt(this,xu,km).call(this),wm(this,Ji,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,tt(this,gr,bo).call(this),document.addEventListener("mousedown",Ut(this,Qo),{once:!0}),document.addEventListener("keydown",Ut(this,Zo),{once:!0})},Qo=new WeakMap,Zo=new WeakMap,Eo=new WeakMap,Im.getTemplateHTML=function(t){return`
|
|
1902
|
+
${at.getTemplateHTML(t)}
|
|
1903
|
+
<style>
|
|
1904
|
+
:host {
|
|
1905
|
+
--_menu-bg: rgb(20 20 30 / .8);
|
|
1906
|
+
background: var(--media-settings-menu-background,
|
|
1907
|
+
var(--media-menu-background,
|
|
1908
|
+
var(--media-control-background,
|
|
1909
|
+
var(--media-secondary-color, var(--_menu-bg)))));
|
|
1910
|
+
min-width: var(--media-settings-menu-min-width, 170px);
|
|
1911
|
+
border-radius: 2px;
|
|
1912
|
+
overflow: hidden;
|
|
1913
|
+
}
|
|
1914
|
+
</style>
|
|
1915
|
+
`},g.customElements.get("media-context-menu")||g.customElements.define("media-context-menu",Im);class Xl extends In{}Xl.shadowRootOptions={mode:"open"},Xl.getTemplateHTML=function(t){return`
|
|
1916
|
+
${In.getTemplateHTML.call(this,t)}
|
|
1917
|
+
<style>
|
|
1918
|
+
::slotted(*) {
|
|
1919
|
+
color: var(--media-text-color, white);
|
|
1920
|
+
text-decoration: none;
|
|
1921
|
+
border: none;
|
|
1922
|
+
background: none;
|
|
1923
|
+
cursor: pointer;
|
|
1924
|
+
padding: 0;
|
|
1925
|
+
min-height: var(--media-control-height, 24px);
|
|
1926
|
+
}
|
|
1927
|
+
</style>
|
|
1928
|
+
`},g.customElements.get("media-context-menu-item")||g.customElements.define("media-context-menu-item",Xl);var mb=t=>{throw TypeError(t)},Ac=(t,e,n)=>e.has(t)||mb("Cannot "+n),Q=(t,e,n)=>(Ac(t,e,"read from private field"),n?n.call(t):e.get(t)),bt=(t,e,n)=>e.has(t)?mb("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),qt=(t,e,n,i)=>(Ac(t,e,"write to private field"),e.set(t,n),n),fe=(t,e,n)=>(Ac(t,e,"access private method"),n),zo=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends zo{}globalThis.DocumentFragment=t}var yo,Pu=class extends zo{},NE={get(t){},define(t,e,n){},getName:t=>null,upgrade(t){},whenDefined:t=>Promise.resolve(Pu)};yo=new WeakMap;var pb={document:{createElement:function(t,e){return new Pu}},DocumentFragment,customElements:NE,CustomEvent:class{constructor(t,e={}){bt(this,yo),qt(this,yo,e?.detail)}get detail(){return Q(this,yo)}initCustomEvent(){}},EventTarget:zo,HTMLElement:Pu,HTMLVideoElement:class extends zo{}},vb=typeof window>"u"||globalThis.customElements===void 0,Vt=vb?pb:globalThis,Xo=vb?pb.document:globalThis.document;function Uu(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function bb(t){return t.replace(/[-_]([a-z])/g,(e,n)=>n.toUpperCase())}function Qe(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function Sm(t){let e=function(n){let i={};for(let a in n)n[a]!=null&&(i[a]=n[a]);return new URLSearchParams(i)}(t).toString();return e?"?"+e:""}var fb=(t,e)=>!(!t||!e)&&(!!t.contains(e)||fb(t,e.getRootNode().host)),Rm="mux.com",OE=(()=>{try{return"3.10.1"}catch{}return"UNKNOWN"})(),gb=()=>OE,Hu=t=>{if(t){if([j.LIVE,j.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return j.LIVE}},PE={crossorigin:"crossOrigin",playsinline:"playsInline"};function UE(t){var e;return(e=PE[t])!=null?e:bb(t)}var Ki,Fi,Be,HE=class{constructor(t,e){bt(this,Ki),bt(this,Fi),bt(this,Be,[]),qt(this,Ki,t),qt(this,Fi,e)}[Symbol.iterator](){return Q(this,Be).values()}get length(){return Q(this,Be).length}get value(){var t;return(t=Q(this,Be).join(" "))!=null?t:""}set value(t){var e;t!==this.value&&(qt(this,Be,[]),this.add(...(e=t?.split(" "))!=null?e:[]))}toString(){return this.value}item(t){return Q(this,Be)[t]}values(){return Q(this,Be).values()}keys(){return Q(this,Be).keys()}forEach(t){Q(this,Be).forEach(t)}add(...t){var e,n;t.forEach(i=>{this.contains(i)||Q(this,Be).push(i)}),(this.value!==""||(e=Q(this,Ki))!=null&&e.hasAttribute(`${Q(this,Fi)}`))&&((n=Q(this,Ki))==null||n.setAttribute(`${Q(this,Fi)}`,`${this.value}`))}remove(...t){var e;t.forEach(n=>{Q(this,Be).splice(Q(this,Be).indexOf(n),1)}),(e=Q(this,Ki))==null||e.setAttribute(`${Q(this,Fi)}`,`${this.value}`)}contains(t){return Q(this,Be).includes(t)}toggle(t,e){return e!==void 0?e?(this.add(t),!0):(this.remove(t),!1):this.contains(t)?(this.remove(t),!1):(this.add(t),!0)}replace(t,e){this.remove(t),this.add(e)}};Ki=new WeakMap,Fi=new WeakMap,Be=new WeakMap;var Eb=`[mux-player ${gb()}]`;function tn(...t){console.warn(Eb,...t)}function it(...t){console.error(Eb,...t)}function yb(t){var e;let n=(e=t.message)!=null?e:"";t.context&&(n+=` ${t.context}`),t.file&&(n+=` ${M("Read more: ")}
|
|
1929
|
+
https://github.com/muxinc/elements/blob/main/errors/${t.file}`),tn(n)}var Pe={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},qn={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Cm=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),WE=[...Object.values(Pe).filter(t=>Pe.PLAYSINLINE!==t),...Object.values(qn)];function Sa(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Dm=class extends Vt.HTMLElement{static get observedAttributes(){return WE}constructor(){super()}attributeChangedCallback(t,e,n){var i,a;switch(t){case qn.MUTED:return void(this.media&&(this.media.muted=n!=null,this.media.defaultMuted=n!=null));case qn.VOLUME:{let r=(i=Qe(n))!=null?i:1;return void(this.media&&(this.media.volume=r))}case qn.PLAYBACKRATE:{let r=(a=Qe(n))!=null?a:1;return void(this.media&&(this.media.playbackRate=r,this.media.defaultPlaybackRate=r))}}}play(){var t,e;return(e=(t=this.media)==null?void 0:t.play())!=null?e:Promise.reject()}pause(){var t;(t=this.media)==null||t.pause()}load(){var t;(t=this.media)==null||t.load()}get media(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var t,e;return(e=(t=this.media)==null?void 0:t.paused)==null||e}get duration(){var t,e;return(e=(t=this.media)==null?void 0:t.duration)!=null?e:NaN}get ended(){var t,e;return(e=(t=this.media)==null?void 0:t.ended)!=null&&e}get buffered(){var t,e;return(e=(t=this.media)==null?void 0:t.buffered)!=null?e:Cm}get seekable(){var t,e;return(e=(t=this.media)==null?void 0:t.seekable)!=null?e:Cm}get readyState(){var t,e;return(e=(t=this.media)==null?void 0:t.readyState)!=null?e:0}get videoWidth(){var t,e;return(e=(t=this.media)==null?void 0:t.videoWidth)!=null?e:0}get videoHeight(){var t,e;return(e=(t=this.media)==null?void 0:t.videoHeight)!=null?e:0}get currentSrc(){var t,e;return(e=(t=this.media)==null?void 0:t.currentSrc)!=null?e:""}get currentTime(){var t,e;return(e=(t=this.media)==null?void 0:t.currentTime)!=null?e:0}set currentTime(t){this.media&&(this.media.currentTime=Number(t))}get volume(){var t,e;return(e=(t=this.media)==null?void 0:t.volume)!=null?e:1}set volume(t){this.media&&(this.media.volume=Number(t))}get playbackRate(){var t,e;return(e=(t=this.media)==null?void 0:t.playbackRate)!=null?e:1}set playbackRate(t){this.media&&(this.media.playbackRate=Number(t))}get defaultPlaybackRate(){var t;return(t=Qe(this.getAttribute(qn.PLAYBACKRATE)))!=null?t:1}set defaultPlaybackRate(t){t!=null?this.setAttribute(qn.PLAYBACKRATE,`${t}`):this.removeAttribute(qn.PLAYBACKRATE)}get crossOrigin(){return Sa(this,Pe.CROSSORIGIN)}set crossOrigin(t){this.setAttribute(Pe.CROSSORIGIN,`${t}`)}get autoplay(){return Sa(this,Pe.AUTOPLAY)!=null}set autoplay(t){t?this.setAttribute(Pe.AUTOPLAY,typeof t=="string"?t:""):this.removeAttribute(Pe.AUTOPLAY)}get loop(){return Sa(this,Pe.LOOP)!=null}set loop(t){t?this.setAttribute(Pe.LOOP,""):this.removeAttribute(Pe.LOOP)}get muted(){var t,e;return(e=(t=this.media)==null?void 0:t.muted)!=null&&e}set muted(t){this.media&&(this.media.muted=!!t)}get defaultMuted(){return Sa(this,Pe.MUTED)!=null}set defaultMuted(t){t?this.setAttribute(Pe.MUTED,""):this.removeAttribute(Pe.MUTED)}get playsInline(){return Sa(this,Pe.PLAYSINLINE)!=null}set playsInline(t){it("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(t){["","none","metadata","auto"].includes(t)?this.setAttribute(Pe.PRELOAD,t):this.removeAttribute(Pe.PRELOAD)}},Ra=new WeakMap,BE=class _b{constructor(e,n){this.element=e,this.type=n,this.element.addEventListener(this.type,this);let i=Ra.get(this.element);i&&i.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let n=Ra.get(this.element);n&&n.delete(this.type)}}static for(e){Ra.has(e.element)||Ra.set(e.element,new Map);let n=e.attributeName.slice(2),i=Ra.get(e.element);return i&&i.has(n)?i.get(n):new _b(e.element,n)}};function VE(t,e){(function(n,i){if(n instanceof Et&&i instanceof Element){let a=n.element;return a[n.attributeName]!==i&&(n.element.removeAttributeNS(n.attributeNamespace,n.attributeName),a[n.attributeName]=i),!0}return!1})(t,e)||function(n,i){if(typeof i=="boolean"&&n instanceof Et){let a=n.attributeNamespace;return i!==n.element.hasAttributeNS(a,n.attributeName)&&(n.booleanValue=i),!0}return!1}(t,e)||function(n,i){return!!(n instanceof Et&&n.attributeName.startsWith("on"))&&(BE.for(n).set(i),n.element.removeAttributeNS(n.attributeNamespace,n.attributeName),!0)}(t,e)||function(n,i){return i===!1&&n instanceof na&&(n.replace(""),!0)}(t,e)||function(n,i){return i instanceof Tb&&n instanceof na&&(i.renderInto(n),!0)}(t,e)||function(n,i){return i instanceof DocumentFragment&&n instanceof na&&(i.childNodes.length&&n.replace(...i.childNodes),!0)}(t,e)||function(n,i){if(n instanceof Et){let a=n.attributeNamespace,r=n.element.getAttributeNS(a,n.attributeName);return String(i)!==r&&(n.value=String(i)),!0}n.value=String(i)}(t,e)}var Jl=new Map,Lm=new WeakMap,Mm=new WeakMap,Tb=class{constructor(t,e,n){this.strings=t,this.values=e,this.processor=n,this.stringsKey=this.strings.join("")}get template(){if(Jl.has(this.stringsKey))return Jl.get(this.stringsKey);{let t=Xo.createElement("template"),e=this.strings.length-1;return t.innerHTML=this.strings.reduce((n,i,a)=>n+i+(a<e?`{{ ${a} }}`:""),""),Jl.set(this.stringsKey,t),t}}renderInto(t){var e;let n=this.template;if(Lm.get(t)!==n){Lm.set(t,n);let a=new il(n,this.values,this.processor);return Mm.set(t,a),void(t instanceof na?t.replace(...a.children):t.appendChild(a))}let i=Mm.get(t);(e=i?.update)==null||e.call(i,this.values)}},$E={processCallback(t,e,n){var i;if(n)for(let[a,r]of e)a in n&&VE(r,(i=n[a])!=null?i:"")}};function _o(t,...e){return new Tb(t,e,$E)}var qE=Object.values({TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"}).join(", "),KE=t=>{var e,n,i,a,r,s,o,l,d,u,c,m,p,v,b,f,T,A,E,_,w,I,D,V,$,F,re,oe,J,ee,Ne,He,Ee,de,qe,Yt,Gt,yt;return _o`
|
|
1930
|
+
<media-theme
|
|
1931
|
+
template="${t.themeTemplate||!1}"
|
|
1932
|
+
defaultstreamtype="${(e=t.defaultStreamType)!=null&&e}"
|
|
1933
|
+
hotkeys="${(Ke=>{let Oe=Ke.hotKeys?`${Ke.hotKeys}`:"";return Hu(Ke.streamType)==="live"&&(Oe+=" noarrowleft noarrowright"),Oe})(t)||!1}"
|
|
1934
|
+
nohotkeys="${t.noHotKeys||!t.hasSrc||!1}"
|
|
1935
|
+
noautoseektolive="${!((n=t.streamType)==null||!n.includes(j.LIVE))&&t.targetLiveWindow!==0}"
|
|
1936
|
+
novolumepref="${t.novolumepref||!1}"
|
|
1937
|
+
nomutedpref="${t.nomutedpref||!1}"
|
|
1938
|
+
disabled="${!t.hasSrc||t.isDialogOpen}"
|
|
1939
|
+
audio="${(i=t.audio)!=null&&i}"
|
|
1940
|
+
style="${(a=function(Ke){let Oe="";return Object.entries(Ke).forEach(([st,Dn])=>{Dn!=null&&(Oe+=`${Uu(st)}: ${Dn}; `)}),Oe?Oe.trim():void 0}({"--media-primary-color":t.primaryColor,"--media-secondary-color":t.secondaryColor,"--media-accent-color":t.accentColor}))!=null&&a}"
|
|
1941
|
+
defaultsubtitles="${!t.defaultHiddenCaptions}"
|
|
1942
|
+
forwardseekoffset="${(r=t.forwardSeekOffset)!=null&&r}"
|
|
1943
|
+
backwardseekoffset="${(s=t.backwardSeekOffset)!=null&&s}"
|
|
1944
|
+
playbackrates="${(o=t.playbackRates)!=null&&o}"
|
|
1945
|
+
defaultshowremainingtime="${(l=t.defaultShowRemainingTime)!=null&&l}"
|
|
1946
|
+
defaultduration="${(d=t.defaultDuration)!=null&&d}"
|
|
1947
|
+
hideduration="${(u=t.hideDuration)!=null&&u}"
|
|
1948
|
+
title="${(c=t.title)!=null&&c}"
|
|
1949
|
+
videotitle="${(m=t.videoTitle)!=null&&m}"
|
|
1950
|
+
proudlydisplaymuxbadge="${(p=t.proudlyDisplayMuxBadge)!=null&&p}"
|
|
1951
|
+
exportparts="${qE}"
|
|
1952
|
+
onclose="${t.onCloseErrorDialog}"
|
|
1953
|
+
onfocusin="${t.onFocusInErrorDialog}"
|
|
1954
|
+
>
|
|
1955
|
+
<mux-video
|
|
1956
|
+
slot="media"
|
|
1957
|
+
inert="${(v=t.noHotKeys)!=null&&v}"
|
|
1958
|
+
target-live-window="${(b=t.targetLiveWindow)!=null&&b}"
|
|
1959
|
+
stream-type="${(f=Hu(t.streamType))!=null&&f}"
|
|
1960
|
+
crossorigin="${(T=t.crossOrigin)!=null?T:""}"
|
|
1961
|
+
playsinline
|
|
1962
|
+
autoplay="${(A=t.autoplay)!=null&&A}"
|
|
1963
|
+
muted="${(E=t.muted)!=null&&E}"
|
|
1964
|
+
loop="${(_=t.loop)!=null&&_}"
|
|
1965
|
+
preload="${(w=t.preload)!=null&&w}"
|
|
1966
|
+
debug="${(I=t.debug)!=null&&I}"
|
|
1967
|
+
prefer-cmcd="${(D=t.preferCmcd)!=null&&D}"
|
|
1968
|
+
disable-tracking="${(V=t.disableTracking)!=null&&V}"
|
|
1969
|
+
disable-cookies="${($=t.disableCookies)!=null&&$}"
|
|
1970
|
+
prefer-playback="${(F=t.preferPlayback)!=null&&F}"
|
|
1971
|
+
start-time="${t.startTime!=null&&t.startTime}"
|
|
1972
|
+
beacon-collection-domain="${(re=t.beaconCollectionDomain)!=null&&re}"
|
|
1973
|
+
player-init-time="${(oe=t.playerInitTime)!=null&&oe}"
|
|
1974
|
+
player-software-name="${(J=t.playerSoftwareName)!=null&&J}"
|
|
1975
|
+
player-software-version="${(ee=t.playerSoftwareVersion)!=null&&ee}"
|
|
1976
|
+
env-key="${(Ne=t.envKey)!=null&&Ne}"
|
|
1977
|
+
custom-domain="${(He=t.customDomain)!=null&&He}"
|
|
1978
|
+
src="${t.src?t.src:!!t.playbackId&&cd(t)}"
|
|
1979
|
+
cast-src="${t.src?t.src:!!t.playbackId&&cd(t)}"
|
|
1980
|
+
cast-receiver="${(Ee=t.castReceiver)!=null&&Ee}"
|
|
1981
|
+
drm-token="${(qe=(de=t.tokens)==null?void 0:de.drm)!=null&&qe}"
|
|
1982
|
+
exportparts="video"
|
|
1983
|
+
disable-pseudo-ended="${(Yt=t.disablePseudoEnded)!=null&&Yt}"
|
|
1984
|
+
max-auto-resolution="${(Gt=t.maxAutoResolution)!=null&&Gt}"
|
|
1985
|
+
>
|
|
1986
|
+
${t.storyboard?_o`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:_o``}
|
|
1987
|
+
<slot></slot>
|
|
1988
|
+
</mux-video>
|
|
1989
|
+
<slot name="poster" slot="poster">
|
|
1990
|
+
<media-poster-image
|
|
1991
|
+
part="poster"
|
|
1992
|
+
exportparts="poster, img"
|
|
1993
|
+
src="${!!t.poster&&t.poster}"
|
|
1994
|
+
placeholdersrc="${(yt=t.placeholder)!=null&&yt}"
|
|
1995
|
+
></media-poster-image>
|
|
1996
|
+
</slot>
|
|
1997
|
+
</media-theme>
|
|
1998
|
+
`},xm=t=>t.charAt(0).toUpperCase()+t.slice(1),FE=(t,e=!1)=>{let n=((a,r=!1)=>{var s,o;if(a.muxCode){let l=xm((s=a.errorCategory)!=null?s:"video"),d=Ro((o=a.errorCategory)!=null?o:ai);if(a.muxCode===N.NETWORK_OFFLINE)return M("Your device appears to be offline",r);if(a.muxCode===N.NETWORK_TOKEN_EXPIRED)return M("{category} URL has expired",r).format({category:l});if([N.NETWORK_TOKEN_SUB_MISMATCH,N.NETWORK_TOKEN_AUD_MISMATCH,N.NETWORK_TOKEN_AUD_MISSING,N.NETWORK_TOKEN_MALFORMED].includes(a.muxCode))return M("{category} URL is formatted incorrectly",r).format({category:l});if(a.muxCode===N.NETWORK_TOKEN_MISSING)return M("Invalid {categoryName} URL",r).format({categoryName:d});if(a.muxCode===N.NETWORK_NOT_FOUND)return M("{category} does not exist",r).format({category:l});if(a.muxCode===N.NETWORK_NOT_READY){let u=a.streamType==="live"?"Live stream":"Video";return M("{mediaType} is not currently available",r).format({mediaType:u})}}if(a.code){if(a.code===C.MEDIA_ERR_NETWORK)return M("Network Error",r);if(a.code===C.MEDIA_ERR_DECODE)return M("Media Error",r);if(a.code===C.MEDIA_ERR_SRC_NOT_SUPPORTED)return M("Source Not Supported",r)}return M("Error",r)})(t,e).toString(),i=((a,r=!1)=>{var s,o;if(a.muxCode){let l=xm((s=a.errorCategory)!=null?s:"video"),d=Ro((o=a.errorCategory)!=null?o:ai);return a.muxCode===N.NETWORK_OFFLINE?M("Check your internet connection and try reloading this video.",r):a.muxCode===N.NETWORK_TOKEN_EXPIRED?M("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:d}):a.muxCode===N.NETWORK_TOKEN_SUB_MISMATCH?M("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:d}):a.muxCode===N.NETWORK_TOKEN_MALFORMED?M("{category} URL is formatted incorrectly",r).format({category:l}):[N.NETWORK_TOKEN_AUD_MISMATCH,N.NETWORK_TOKEN_AUD_MISSING].includes(a.muxCode)?M("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:d}):[N.NETWORK_TOKEN_MISSING,N.NETWORK_INVALID_URL].includes(a.muxCode)?M("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",r).format({tokenNamePrefix:d}):a.muxCode===N.NETWORK_NOT_FOUND?"":a.message}return a.code&&(a.code===C.MEDIA_ERR_NETWORK||a.code===C.MEDIA_ERR_DECODE||(a.code,C.MEDIA_ERR_SRC_NOT_SUPPORTED)),a.message})(t,e).toString();return{title:n,message:i}},Nm=(t,e)=>{let n=(i=>{if(i.muxCode){if(i.muxCode===N.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(i.muxCode===N.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([N.NETWORK_TOKEN_AUD_MISMATCH,N.NETWORK_TOKEN_AUD_MISSING].includes(i.muxCode))return"403-incorrect-aud-value.md";if(i.muxCode===N.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(i.muxCode===N.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(i.muxCode===N.NETWORK_NOT_FOUND)return"404-not-found.md";if(i.muxCode===N.NETWORK_NOT_READY)return"412-not-playable.md"}if(i.code){if(i.code===C.MEDIA_ERR_NETWORK)return"";if(i.code===C.MEDIA_ERR_DECODE)return"media-decode-error.md";if(i.code===C.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(t);return{message:t.message,context:t.context,file:n}},Wu=Xo.createElement("template");"innerHTML"in Wu&&(Wu.innerHTML=`<template id="media-theme-gerwig">
|
|
1999
|
+
<style>
|
|
2000
|
+
@keyframes pre-play-hide {
|
|
2001
|
+
0% {
|
|
2002
|
+
transform: scale(1);
|
|
2003
|
+
opacity: 1;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
30% {
|
|
2007
|
+
transform: scale(0.7);
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
100% {
|
|
2011
|
+
transform: scale(1.5);
|
|
2012
|
+
opacity: 0;
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
:host {
|
|
2017
|
+
--_primary-color: var(--media-primary-color, #fff);
|
|
2018
|
+
--_secondary-color: var(--media-secondary-color, transparent);
|
|
2019
|
+
--_accent-color: var(--media-accent-color, #fa50b5);
|
|
2020
|
+
--_text-color: var(--media-text-color, #000);
|
|
2021
|
+
|
|
2022
|
+
--media-icon-color: var(--_primary-color);
|
|
2023
|
+
--media-control-background: var(--_secondary-color);
|
|
2024
|
+
--media-control-hover-background: var(--_accent-color);
|
|
2025
|
+
--media-time-buffered-color: rgba(255, 255, 255, 0.4);
|
|
2026
|
+
--media-preview-time-text-shadow: none;
|
|
2027
|
+
--media-control-height: 14px;
|
|
2028
|
+
--media-control-padding: 6px;
|
|
2029
|
+
--media-tooltip-container-margin: 6px;
|
|
2030
|
+
--media-tooltip-distance: 18px;
|
|
2031
|
+
|
|
2032
|
+
color: var(--_primary-color);
|
|
2033
|
+
display: inline-block;
|
|
2034
|
+
width: 100%;
|
|
2035
|
+
height: 100%;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
:host([audio]) {
|
|
2039
|
+
--_secondary-color: var(--media-secondary-color, black);
|
|
2040
|
+
--media-preview-time-text-shadow: none;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
:host([audio]) ::slotted([slot='media']) {
|
|
2044
|
+
height: 0px;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
:host([audio]) media-loading-indicator {
|
|
2048
|
+
display: none;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
:host([audio]) media-controller {
|
|
2052
|
+
background: transparent;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
:host([audio]) media-controller::part(vertical-layer) {
|
|
2056
|
+
background: transparent;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
:host([audio]) media-control-bar {
|
|
2060
|
+
width: 100%;
|
|
2061
|
+
background-color: var(--media-control-background);
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
/*
|
|
2065
|
+
* 0.433s is the transition duration for VTT Regions.
|
|
2066
|
+
* Borrowed here, so the captions don't move too fast.
|
|
2067
|
+
*/
|
|
2068
|
+
media-controller {
|
|
2069
|
+
--media-webkit-text-track-transform: translateY(0) scale(0.98);
|
|
2070
|
+
--media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
|
|
2071
|
+
}
|
|
2072
|
+
media-controller:is([mediapaused], :not([userinactive])) {
|
|
2073
|
+
--media-webkit-text-track-transform: translateY(-50px) scale(0.98);
|
|
2074
|
+
--media-webkit-text-track-transition: transform 0.15s ease;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
/*
|
|
2078
|
+
* CSS specific to iOS devices.
|
|
2079
|
+
* See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757
|
|
2080
|
+
*/
|
|
2081
|
+
@supports (-webkit-touch-callout: none) {
|
|
2082
|
+
/* Disable subtitle adjusting for iOS Safari */
|
|
2083
|
+
media-controller[mediaisfullscreen] {
|
|
2084
|
+
--media-webkit-text-track-transform: unset;
|
|
2085
|
+
--media-webkit-text-track-transition: unset;
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
media-time-range {
|
|
2090
|
+
--media-box-padding-left: 6px;
|
|
2091
|
+
--media-box-padding-right: 6px;
|
|
2092
|
+
--media-range-bar-color: var(--_accent-color);
|
|
2093
|
+
--media-time-range-buffered-color: var(--_primary-color);
|
|
2094
|
+
--media-range-track-color: transparent;
|
|
2095
|
+
--media-range-track-background: rgba(255, 255, 255, 0.4);
|
|
2096
|
+
--media-range-thumb-background: radial-gradient(
|
|
2097
|
+
circle,
|
|
2098
|
+
#000 0%,
|
|
2099
|
+
#000 25%,
|
|
2100
|
+
var(--_accent-color) 25%,
|
|
2101
|
+
var(--_accent-color)
|
|
2102
|
+
);
|
|
2103
|
+
--media-range-thumb-width: 12px;
|
|
2104
|
+
--media-range-thumb-height: 12px;
|
|
2105
|
+
--media-range-thumb-transform: scale(0);
|
|
2106
|
+
--media-range-thumb-transition: transform 0.3s;
|
|
2107
|
+
--media-range-thumb-opacity: 1;
|
|
2108
|
+
--media-preview-background: var(--_primary-color);
|
|
2109
|
+
--media-box-arrow-background: var(--_primary-color);
|
|
2110
|
+
--media-preview-thumbnail-border: 5px solid var(--_primary-color);
|
|
2111
|
+
--media-preview-border-radius: 5px;
|
|
2112
|
+
--media-text-color: var(--_text-color);
|
|
2113
|
+
--media-control-hover-background: transparent;
|
|
2114
|
+
--media-preview-chapter-text-shadow: none;
|
|
2115
|
+
color: var(--_accent-color);
|
|
2116
|
+
padding: 0 6px;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
:host([audio]) media-time-range {
|
|
2120
|
+
--media-preview-time-padding: 1.5px 6px;
|
|
2121
|
+
--media-preview-box-margin: 0 0 -5px;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
media-time-range:hover {
|
|
2125
|
+
--media-range-thumb-transform: scale(1);
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
media-preview-thumbnail {
|
|
2129
|
+
border-bottom-width: 0;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
[part~='menu'] {
|
|
2133
|
+
border-radius: 2px;
|
|
2134
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
2135
|
+
bottom: 50px;
|
|
2136
|
+
padding: 2.5px 10px;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
[part~='menu']::part(indicator) {
|
|
2140
|
+
fill: var(--_accent-color);
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
[part~='menu']::part(menu-item) {
|
|
2144
|
+
box-sizing: border-box;
|
|
2145
|
+
display: flex;
|
|
2146
|
+
align-items: center;
|
|
2147
|
+
padding: 6px 10px;
|
|
2148
|
+
min-height: 34px;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
[part~='menu']::part(checked) {
|
|
2152
|
+
font-weight: 700;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
media-captions-menu,
|
|
2156
|
+
media-rendition-menu,
|
|
2157
|
+
media-audio-track-menu,
|
|
2158
|
+
media-playback-rate-menu {
|
|
2159
|
+
position: absolute; /* ensure they don't take up space in DOM on load */
|
|
2160
|
+
--media-menu-background: var(--_primary-color);
|
|
2161
|
+
--media-menu-item-checked-background: transparent;
|
|
2162
|
+
--media-text-color: var(--_text-color);
|
|
2163
|
+
--media-menu-item-hover-background: transparent;
|
|
2164
|
+
--media-menu-item-hover-outline: var(--_accent-color) solid 1px;
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
media-rendition-menu {
|
|
2168
|
+
min-width: 140px;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
/* The icon is a circle so make it 16px high instead of 14px for more balance. */
|
|
2172
|
+
media-audio-track-menu-button {
|
|
2173
|
+
--media-control-padding: 5px;
|
|
2174
|
+
--media-control-height: 16px;
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
media-playback-rate-menu-button {
|
|
2178
|
+
--media-control-padding: 6px 3px;
|
|
2179
|
+
min-width: 4.4ch;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
media-playback-rate-menu {
|
|
2183
|
+
--media-menu-flex-direction: row;
|
|
2184
|
+
--media-menu-item-checked-background: var(--_accent-color);
|
|
2185
|
+
--media-menu-item-checked-indicator-display: none;
|
|
2186
|
+
margin-right: 6px;
|
|
2187
|
+
padding: 0;
|
|
2188
|
+
--media-menu-gap: 0.25em;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
media-playback-rate-menu[part~='menu']::part(menu-item) {
|
|
2192
|
+
padding: 6px 6px 6px 8px;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
media-playback-rate-menu[part~='menu']::part(checked) {
|
|
2196
|
+
color: #fff;
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
:host(:not([audio])) media-time-range {
|
|
2200
|
+
/* Adding px is required here for calc() */
|
|
2201
|
+
--media-range-padding: 0px;
|
|
2202
|
+
background: transparent;
|
|
2203
|
+
z-index: 10;
|
|
2204
|
+
height: 10px;
|
|
2205
|
+
bottom: -3px;
|
|
2206
|
+
width: 100%;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
media-control-bar :is([role='button'], [role='switch'], button) {
|
|
2210
|
+
line-height: 0;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
media-control-bar :is([part*='button'], [part*='range'], [part*='display']) {
|
|
2214
|
+
border-radius: 3px;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
.spacer {
|
|
2218
|
+
flex-grow: 1;
|
|
2219
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
media-control-bar[slot~='top-chrome'] {
|
|
2223
|
+
min-height: 42px;
|
|
2224
|
+
pointer-events: none;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
media-control-bar {
|
|
2228
|
+
--gradient-steps:
|
|
2229
|
+
hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, hsl(0 0% 0% / 0.104) 22.5%,
|
|
2230
|
+
hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, hsl(0 0% 0% / 0.45) 47.1%,
|
|
2231
|
+
hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, hsl(0 0% 0% / 0.825) 71%,
|
|
2232
|
+
hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, hsl(0 0% 0%) 100%;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
:host([title]) media-control-bar[slot='top-chrome']::before,
|
|
2236
|
+
:host([videotitle]) media-control-bar[slot='top-chrome']::before {
|
|
2237
|
+
content: '';
|
|
2238
|
+
position: absolute;
|
|
2239
|
+
width: 100%;
|
|
2240
|
+
padding-bottom: min(100px, 25%);
|
|
2241
|
+
background: linear-gradient(to top, var(--gradient-steps));
|
|
2242
|
+
opacity: 0.8;
|
|
2243
|
+
pointer-events: none;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
:host(:not([audio])) media-control-bar[part~='bottom']::before {
|
|
2247
|
+
content: '';
|
|
2248
|
+
position: absolute;
|
|
2249
|
+
width: 100%;
|
|
2250
|
+
bottom: 0;
|
|
2251
|
+
left: 0;
|
|
2252
|
+
padding-bottom: min(100px, 25%);
|
|
2253
|
+
background: linear-gradient(to bottom, var(--gradient-steps));
|
|
2254
|
+
opacity: 0.8;
|
|
2255
|
+
z-index: 1;
|
|
2256
|
+
pointer-events: none;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
media-control-bar[part~='bottom'] > * {
|
|
2260
|
+
z-index: 20;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
media-control-bar[part~='bottom'] {
|
|
2264
|
+
padding: 6px 6px;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
media-control-bar[slot~='top-chrome'] > * {
|
|
2268
|
+
--media-control-background: transparent;
|
|
2269
|
+
--media-control-hover-background: transparent;
|
|
2270
|
+
position: relative;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
media-controller::part(vertical-layer) {
|
|
2274
|
+
transition: background-color 1s;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {
|
|
2278
|
+
background-color: var(--controls-backdrop-color, var(--controls, transparent));
|
|
2279
|
+
transition: background-color 0.25s;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
.center-controls {
|
|
2283
|
+
--media-button-icon-width: 100%;
|
|
2284
|
+
--media-button-icon-height: auto;
|
|
2285
|
+
--media-tooltip-display: none;
|
|
2286
|
+
pointer-events: none;
|
|
2287
|
+
width: 100%;
|
|
2288
|
+
display: flex;
|
|
2289
|
+
flex-flow: row;
|
|
2290
|
+
align-items: center;
|
|
2291
|
+
justify-content: center;
|
|
2292
|
+
paint-order: stroke;
|
|
2293
|
+
stroke: rgba(102, 102, 102, 1);
|
|
2294
|
+
stroke-width: 0.3px;
|
|
2295
|
+
text-shadow:
|
|
2296
|
+
0 0 2px rgb(0 0 0 / 0.25),
|
|
2297
|
+
0 0 6px rgb(0 0 0 / 0.25);
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
.center-controls media-play-button {
|
|
2301
|
+
--media-control-background: transparent;
|
|
2302
|
+
--media-control-hover-background: transparent;
|
|
2303
|
+
--media-control-padding: 0;
|
|
2304
|
+
width: 40px;
|
|
2305
|
+
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
[breakpointsm] .center-controls media-play-button {
|
|
2309
|
+
width: 90px;
|
|
2310
|
+
height: 90px;
|
|
2311
|
+
border-radius: 50%;
|
|
2312
|
+
transition: background 0.4s;
|
|
2313
|
+
padding: 24px;
|
|
2314
|
+
--media-control-background: #000;
|
|
2315
|
+
--media-control-hover-background: var(--_accent-color);
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
.center-controls media-seek-backward-button,
|
|
2319
|
+
.center-controls media-seek-forward-button {
|
|
2320
|
+
--media-control-background: transparent;
|
|
2321
|
+
--media-control-hover-background: transparent;
|
|
2322
|
+
padding: 0;
|
|
2323
|
+
margin: 0 20px;
|
|
2324
|
+
width: max(33px, min(8%, 40px));
|
|
2325
|
+
text-shadow:
|
|
2326
|
+
0 0 2px rgb(0 0 0 / 0.25),
|
|
2327
|
+
0 0 6px rgb(0 0 0 / 0.25);
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
[breakpointsm]:not([audio]) .center-controls.pre-playback {
|
|
2331
|
+
display: grid;
|
|
2332
|
+
align-items: initial;
|
|
2333
|
+
justify-content: initial;
|
|
2334
|
+
height: 100%;
|
|
2335
|
+
overflow: hidden;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
[breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {
|
|
2339
|
+
place-self: var(--_pre-playback-place, center);
|
|
2340
|
+
grid-area: 1 / 1;
|
|
2341
|
+
margin: 16px;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
/* Show and hide controls or pre-playback state */
|
|
2345
|
+
|
|
2346
|
+
[breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])
|
|
2347
|
+
.center-controls.pre-playback
|
|
2348
|
+
media-play-button {
|
|
2349
|
+
/* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */
|
|
2350
|
+
animation: 0.3s linear pre-play-hide;
|
|
2351
|
+
opacity: 0;
|
|
2352
|
+
pointer-events: none;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
.autoplay-unmute {
|
|
2356
|
+
--media-control-hover-background: transparent;
|
|
2357
|
+
width: 100%;
|
|
2358
|
+
display: flex;
|
|
2359
|
+
align-items: center;
|
|
2360
|
+
justify-content: center;
|
|
2361
|
+
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
.autoplay-unmute-btn {
|
|
2365
|
+
--media-control-height: 16px;
|
|
2366
|
+
border-radius: 8px;
|
|
2367
|
+
background: #000;
|
|
2368
|
+
color: var(--_primary-color);
|
|
2369
|
+
display: flex;
|
|
2370
|
+
align-items: center;
|
|
2371
|
+
padding: 8px 16px;
|
|
2372
|
+
font-size: 18px;
|
|
2373
|
+
font-weight: 500;
|
|
2374
|
+
cursor: pointer;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
.autoplay-unmute-btn:hover {
|
|
2378
|
+
background: var(--_accent-color);
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
[breakpointsm] .autoplay-unmute-btn {
|
|
2382
|
+
--media-control-height: 30px;
|
|
2383
|
+
padding: 14px 24px;
|
|
2384
|
+
font-size: 26px;
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
.autoplay-unmute-btn svg {
|
|
2388
|
+
margin: 0 6px 0 0;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
[breakpointsm] .autoplay-unmute-btn svg {
|
|
2392
|
+
margin: 0 10px 0 0;
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {
|
|
2396
|
+
display: none;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
media-error-dialog:not([mediaerrorcode]) {
|
|
2400
|
+
opacity: 0;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
media-loading-indicator {
|
|
2404
|
+
--media-loading-icon-width: 100%;
|
|
2405
|
+
--media-button-icon-height: auto;
|
|
2406
|
+
display: var(--media-control-display, var(--media-loading-indicator-display, flex));
|
|
2407
|
+
pointer-events: none;
|
|
2408
|
+
position: absolute;
|
|
2409
|
+
width: min(15%, 150px);
|
|
2410
|
+
flex-flow: row;
|
|
2411
|
+
align-items: center;
|
|
2412
|
+
justify-content: center;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
/* Intentionally don't target the div for transition but the children
|
|
2416
|
+
of the div. Prevents messing with media-chrome's autohide feature. */
|
|
2417
|
+
media-loading-indicator + div * {
|
|
2418
|
+
transition: opacity 0.15s;
|
|
2419
|
+
opacity: 1;
|
|
2420
|
+
}
|
|
2421
|
+
|
|
2422
|
+
media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {
|
|
2423
|
+
opacity: 0;
|
|
2424
|
+
transition-delay: 400ms;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
media-volume-range {
|
|
2428
|
+
width: min(100%, 100px);
|
|
2429
|
+
--media-range-padding-left: 10px;
|
|
2430
|
+
--media-range-padding-right: 10px;
|
|
2431
|
+
--media-range-thumb-width: 12px;
|
|
2432
|
+
--media-range-thumb-height: 12px;
|
|
2433
|
+
--media-range-thumb-background: radial-gradient(
|
|
2434
|
+
circle,
|
|
2435
|
+
#000 0%,
|
|
2436
|
+
#000 25%,
|
|
2437
|
+
var(--_primary-color) 25%,
|
|
2438
|
+
var(--_primary-color)
|
|
2439
|
+
);
|
|
2440
|
+
--media-control-hover-background: none;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
media-time-display {
|
|
2444
|
+
white-space: nowrap;
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
/* Generic style for explicitly disabled controls */
|
|
2448
|
+
media-control-bar[part~='bottom'] [disabled],
|
|
2449
|
+
media-control-bar[part~='bottom'] [aria-disabled='true'] {
|
|
2450
|
+
opacity: 60%;
|
|
2451
|
+
cursor: not-allowed;
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
media-text-display {
|
|
2455
|
+
--media-font-size: 16px;
|
|
2456
|
+
--media-control-padding: 14px;
|
|
2457
|
+
font-weight: 500;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
media-play-button.animated *:is(g, path) {
|
|
2461
|
+
transition: all 0.3s;
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
media-play-button.animated[mediapaused] .pause-icon-pt1 {
|
|
2465
|
+
opacity: 0;
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
media-play-button.animated[mediapaused] .pause-icon-pt2 {
|
|
2469
|
+
transform-origin: center center;
|
|
2470
|
+
transform: scaleY(0);
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
media-play-button.animated[mediapaused] .play-icon {
|
|
2474
|
+
clip-path: inset(0 0 0 0);
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
media-play-button.animated:not([mediapaused]) .play-icon {
|
|
2478
|
+
clip-path: inset(0 0 0 100%);
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
media-seek-forward-button,
|
|
2482
|
+
media-seek-backward-button {
|
|
2483
|
+
--media-font-weight: 400;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
.mute-icon {
|
|
2487
|
+
display: inline-block;
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
.mute-icon :is(path, g) {
|
|
2491
|
+
transition: opacity 0.5s;
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
.muted {
|
|
2495
|
+
opacity: 0;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high),
|
|
2499
|
+
media-mute-button[mediavolumelevel='medium'] :is(.volume-high) {
|
|
2500
|
+
opacity: 0;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
media-mute-button[mediavolumelevel='off'] .unmuted {
|
|
2504
|
+
opacity: 0;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
media-mute-button[mediavolumelevel='off'] .muted {
|
|
2508
|
+
opacity: 1;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
/**
|
|
2512
|
+
* Our defaults for these buttons are to hide them at small sizes
|
|
2513
|
+
* users can override this with CSS
|
|
2514
|
+
*/
|
|
2515
|
+
media-controller:not([breakpointsm]):not([audio]) {
|
|
2516
|
+
--bottom-play-button: none;
|
|
2517
|
+
--bottom-seek-backward-button: none;
|
|
2518
|
+
--bottom-seek-forward-button: none;
|
|
2519
|
+
--bottom-time-display: none;
|
|
2520
|
+
--bottom-playback-rate-menu-button: none;
|
|
2521
|
+
--bottom-pip-button: none;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
[part='mux-badge'] {
|
|
2525
|
+
position: absolute;
|
|
2526
|
+
bottom: 10px;
|
|
2527
|
+
right: 10px;
|
|
2528
|
+
z-index: 2;
|
|
2529
|
+
opacity: 0.6;
|
|
2530
|
+
transition:
|
|
2531
|
+
opacity 0.2s ease-in-out,
|
|
2532
|
+
bottom 0.2s ease-in-out;
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
[part='mux-badge']:hover {
|
|
2536
|
+
opacity: 1;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
[part='mux-badge'] a {
|
|
2540
|
+
font-size: 14px;
|
|
2541
|
+
font-family: var(--_font-family);
|
|
2542
|
+
color: var(--_primary-color);
|
|
2543
|
+
text-decoration: none;
|
|
2544
|
+
display: flex;
|
|
2545
|
+
align-items: center;
|
|
2546
|
+
gap: 5px;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
[part='mux-badge'] .mux-badge-text {
|
|
2550
|
+
transition: opacity 0.5s ease-in-out;
|
|
2551
|
+
opacity: 0;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
[part='mux-badge'] .mux-badge-logo {
|
|
2555
|
+
width: 40px;
|
|
2556
|
+
height: auto;
|
|
2557
|
+
display: inline-block;
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
[part='mux-badge'] .mux-badge-logo svg {
|
|
2561
|
+
width: 100%;
|
|
2562
|
+
height: 100%;
|
|
2563
|
+
fill: white;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'],
|
|
2567
|
+
media-controller:not([userinactive]) [part='mux-badge'],
|
|
2568
|
+
media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
|
|
2569
|
+
transition: bottom 0.1s ease-in-out;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
|
|
2573
|
+
transition: bottom 0.2s ease-in-out 0.62s;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text,
|
|
2577
|
+
media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text {
|
|
2578
|
+
opacity: 1;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text {
|
|
2582
|
+
opacity: 0;
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
|
|
2586
|
+
bottom: 10px;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] {
|
|
2590
|
+
bottom: 10px;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'],
|
|
2594
|
+
media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
|
|
2595
|
+
bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2);
|
|
2596
|
+
}
|
|
2597
|
+
</style>
|
|
2598
|
+
|
|
2599
|
+
<template partial="TitleDisplay">
|
|
2600
|
+
<template if="videotitle">
|
|
2601
|
+
<template if="videotitle != true">
|
|
2602
|
+
<media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display>
|
|
2603
|
+
</template>
|
|
2604
|
+
</template>
|
|
2605
|
+
<template if="!videotitle">
|
|
2606
|
+
<template if="title">
|
|
2607
|
+
<media-text-display part="top title display" class="title-display">{{title}}</media-text-display>
|
|
2608
|
+
</template>
|
|
2609
|
+
</template>
|
|
2610
|
+
</template>
|
|
2611
|
+
|
|
2612
|
+
<template partial="PlayButton">
|
|
2613
|
+
<media-play-button
|
|
2614
|
+
part="{{section ?? 'bottom'}} play button"
|
|
2615
|
+
disabled="{{disabled}}"
|
|
2616
|
+
aria-disabled="{{disabled}}"
|
|
2617
|
+
class="animated"
|
|
2618
|
+
>
|
|
2619
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">
|
|
2620
|
+
<g class="play-icon">
|
|
2621
|
+
<path
|
|
2622
|
+
d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
|
|
2623
|
+
/>
|
|
2624
|
+
</g>
|
|
2625
|
+
<g class="pause-icon">
|
|
2626
|
+
<path
|
|
2627
|
+
class="pause-icon-pt1"
|
|
2628
|
+
d="M5.90709 0H2.96889C2.46857 0 2.06299 0.405585 2.06299 0.9059V13.0941C2.06299 13.5944 2.46857 14 2.96889 14H5.90709C6.4074 14 6.81299 13.5944 6.81299 13.0941V0.9059C6.81299 0.405585 6.4074 0 5.90709 0Z"
|
|
2629
|
+
/>
|
|
2630
|
+
<path
|
|
2631
|
+
class="pause-icon-pt2"
|
|
2632
|
+
d="M15.1571 0H12.2189C11.7186 0 11.313 0.405585 11.313 0.9059V13.0941C11.313 13.5944 11.7186 14 12.2189 14H15.1571C15.6574 14 16.063 13.5944 16.063 13.0941V0.9059C16.063 0.405585 15.6574 0 15.1571 0Z"
|
|
2633
|
+
/>
|
|
2634
|
+
</g>
|
|
2635
|
+
</svg>
|
|
2636
|
+
</media-play-button>
|
|
2637
|
+
</template>
|
|
2638
|
+
|
|
2639
|
+
<template partial="PrePlayButton">
|
|
2640
|
+
<media-play-button
|
|
2641
|
+
part="{{section ?? 'center'}} play button pre-play"
|
|
2642
|
+
disabled="{{disabled}}"
|
|
2643
|
+
aria-disabled="{{disabled}}"
|
|
2644
|
+
>
|
|
2645
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)">
|
|
2646
|
+
<path
|
|
2647
|
+
d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
|
|
2648
|
+
/>
|
|
2649
|
+
</svg>
|
|
2650
|
+
</media-play-button>
|
|
2651
|
+
</template>
|
|
2652
|
+
|
|
2653
|
+
<template partial="SeekBackwardButton">
|
|
2654
|
+
<media-seek-backward-button
|
|
2655
|
+
seekoffset="{{backwardseekoffset}}"
|
|
2656
|
+
part="{{section ?? 'bottom'}} seek-backward button"
|
|
2657
|
+
disabled="{{disabled}}"
|
|
2658
|
+
aria-disabled="{{disabled}}"
|
|
2659
|
+
>
|
|
2660
|
+
<svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
|
|
2661
|
+
<path
|
|
2662
|
+
d="M3.65 2.07888L0.0864 6.7279C-0.0288 6.87812 -0.0288 7.12188 0.0864 7.2721L3.65 11.9211C3.7792 12.0896 4 11.9703 4 11.7321V2.26787C4 2.02968 3.7792 1.9104 3.65 2.07888Z"
|
|
2663
|
+
/>
|
|
2664
|
+
<text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
|
|
2665
|
+
{{backwardseekoffset}}
|
|
2666
|
+
</text>
|
|
2667
|
+
</svg>
|
|
2668
|
+
</media-seek-backward-button>
|
|
2669
|
+
</template>
|
|
2670
|
+
|
|
2671
|
+
<template partial="SeekForwardButton">
|
|
2672
|
+
<media-seek-forward-button
|
|
2673
|
+
seekoffset="{{forwardseekoffset}}"
|
|
2674
|
+
part="{{section ?? 'bottom'}} seek-forward button"
|
|
2675
|
+
disabled="{{disabled}}"
|
|
2676
|
+
aria-disabled="{{disabled}}"
|
|
2677
|
+
>
|
|
2678
|
+
<svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
|
|
2679
|
+
<g>
|
|
2680
|
+
<text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
|
|
2681
|
+
{{forwardseekoffset}}
|
|
2682
|
+
</text>
|
|
2683
|
+
<path
|
|
2684
|
+
d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208 1.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z"
|
|
2685
|
+
/>
|
|
2686
|
+
</g>
|
|
2687
|
+
</svg>
|
|
2688
|
+
</media-seek-forward-button>
|
|
2689
|
+
</template>
|
|
2690
|
+
|
|
2691
|
+
<template partial="MuteButton">
|
|
2692
|
+
<media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
2693
|
+
<svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">
|
|
2694
|
+
<g class="unmuted">
|
|
2695
|
+
<path
|
|
2696
|
+
d="M6.76786 1.21233L3.98606 3.98924H1.19937C0.593146 3.98924 0.101743 4.51375 0.101743 5.1607V6.96412L0 6.99998L0.101743 7.03583V8.83926C0.101743 9.48633 0.593146 10.0108 1.19937 10.0108H3.98606L6.76773 12.7877C7.23561 13.2547 8 12.9007 8 12.2171V1.78301C8 1.09925 7.23574 0.745258 6.76786 1.21233Z"
|
|
2697
|
+
/>
|
|
2698
|
+
<path
|
|
2699
|
+
class="volume-low"
|
|
2700
|
+
d="M10 3.54781C10.7452 4.55141 11.1393 5.74511 11.1393 6.99991C11.1393 8.25471 10.7453 9.44791 10 10.4515L10.7988 11.0496C11.6734 9.87201 12.1356 8.47161 12.1356 6.99991C12.1356 5.52821 11.6735 4.12731 10.7988 2.94971L10 3.54781Z"
|
|
2701
|
+
/>
|
|
2702
|
+
<path
|
|
2703
|
+
class="volume-medium"
|
|
2704
|
+
d="M12.3778 2.40086C13.2709 3.76756 13.7428 5.35806 13.7428 7.00026C13.7428 8.64246 13.2709 10.233 12.3778 11.5992L13.2106 12.1484C14.2107 10.6185 14.739 8.83796 14.739 7.00016C14.739 5.16236 14.2107 3.38236 13.2106 1.85156L12.3778 2.40086Z"
|
|
2705
|
+
/>
|
|
2706
|
+
<path
|
|
2707
|
+
class="volume-high"
|
|
2708
|
+
d="M15.5981 0.75L14.7478 1.2719C15.7937 2.9919 16.3468 4.9723 16.3468 7C16.3468 9.0277 15.7937 11.0082 14.7478 12.7281L15.5981 13.25C16.7398 11.3722 17.343 9.211 17.343 7C17.343 4.789 16.7398 2.6268 15.5981 0.75Z"
|
|
2709
|
+
/>
|
|
2710
|
+
</g>
|
|
2711
|
+
<g class="muted">
|
|
2712
|
+
<path
|
|
2713
|
+
fill-rule="evenodd"
|
|
2714
|
+
clip-rule="evenodd"
|
|
2715
|
+
d="M4.39976 4.98924H1.19937C1.19429 4.98924 1.17777 4.98961 1.15296 5.01609C1.1271 5.04369 1.10174 5.09245 1.10174 5.1607V8.83926C1.10174 8.90761 1.12714 8.95641 1.15299 8.984C1.17779 9.01047 1.1943 9.01084 1.19937 9.01084H4.39977L7 11.6066V2.39357L4.39976 4.98924ZM7.47434 1.92006C7.4743 1.9201 7.47439 1.92002 7.47434 1.92006V1.92006ZM6.76773 12.7877L3.98606 10.0108H1.19937C0.593146 10.0108 0.101743 9.48633 0.101743 8.83926V7.03583L0 6.99998L0.101743 6.96412V5.1607C0.101743 4.51375 0.593146 3.98924 1.19937 3.98924H3.98606L6.76786 1.21233C7.23574 0.745258 8 1.09925 8 1.78301V12.2171C8 12.9007 7.23561 13.2547 6.76773 12.7877Z"
|
|
2716
|
+
/>
|
|
2717
|
+
<path
|
|
2718
|
+
fill-rule="evenodd"
|
|
2719
|
+
clip-rule="evenodd"
|
|
2720
|
+
d="M15.2677 9.30323C15.463 9.49849 15.7796 9.49849 15.9749 9.30323C16.1701 9.10796 16.1701 8.79138 15.9749 8.59612L14.2071 6.82841L15.9749 5.06066C16.1702 4.8654 16.1702 4.54882 15.9749 4.35355C15.7796 4.15829 15.4631 4.15829 15.2678 4.35355L13.5 6.1213L11.7322 4.35348C11.537 4.15822 11.2204 4.15822 11.0251 4.35348C10.8298 4.54874 10.8298 4.86532 11.0251 5.06058L12.7929 6.82841L11.0251 8.59619C10.8299 8.79146 10.8299 9.10804 11.0251 9.3033C11.2204 9.49856 11.537 9.49856 11.7323 9.3033L13.5 7.53552L15.2677 9.30323Z"
|
|
2721
|
+
/>
|
|
2722
|
+
</g>
|
|
2723
|
+
</svg>
|
|
2724
|
+
</media-mute-button>
|
|
2725
|
+
</template>
|
|
2726
|
+
|
|
2727
|
+
<template partial="PipButton">
|
|
2728
|
+
<media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
2729
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
|
|
2730
|
+
<path
|
|
2731
|
+
d="M15.9891 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.989C0 13.0996 0.9004 14 2.011 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0ZM17 11.9891C17 12.5465 16.5465 13 15.9891 13H2.011C1.4536 13 1.0001 12.5465 1.0001 11.9891V2.0109C1.0001 1.4535 1.4536 0.9999 2.011 0.9999H15.9891C16.5465 0.9999 17 1.4535 17 2.0109V11.9891Z"
|
|
2732
|
+
/>
|
|
2733
|
+
<path
|
|
2734
|
+
d="M15.356 5.67822H8.19523C8.03253 5.67822 7.90063 5.81012 7.90063 5.97282V11.3836C7.90063 11.5463 8.03253 11.6782 8.19523 11.6782H15.356C15.5187 11.6782 15.6506 11.5463 15.6506 11.3836V5.97282C15.6506 5.81012 15.5187 5.67822 15.356 5.67822Z"
|
|
2735
|
+
/>
|
|
2736
|
+
</svg>
|
|
2737
|
+
</media-pip-button>
|
|
2738
|
+
</template>
|
|
2739
|
+
|
|
2740
|
+
<template partial="CaptionsMenu">
|
|
2741
|
+
<media-captions-menu-button part="bottom captions button">
|
|
2742
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="on">
|
|
2743
|
+
<path
|
|
2744
|
+
d="M15.989 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9004 14 2.011 14H15.989C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.989 0ZM4.2292 8.7639C4.5954 9.1902 5.0935 9.4031 5.7233 9.4031C6.1852 9.4031 6.5544 9.301 6.8302 9.0969C7.1061 8.8933 7.2863 8.614 7.3702 8.26H8.4322C8.3062 8.884 8.0093 9.3733 7.5411 9.7273C7.0733 10.0813 6.4703 10.2581 5.732 10.2581C5.108 10.2581 4.5699 10.1219 4.1168 9.8489C3.6637 9.5759 3.3141 9.1946 3.0685 8.7058C2.8224 8.2165 2.6994 7.6511 2.6994 7.009C2.6994 6.3611 2.8224 5.7927 3.0685 5.3034C3.3141 4.8146 3.6637 4.4323 4.1168 4.1559C4.5699 3.88 5.108 3.7418 5.732 3.7418C6.4703 3.7418 7.0733 3.922 7.5411 4.2818C8.0094 4.6422 8.3062 5.1461 8.4322 5.794H7.3702C7.2862 5.4283 7.106 5.1368 6.8302 4.921C6.5544 4.7052 6.1852 4.5968 5.7233 4.5968C5.0934 4.5968 4.5954 4.8116 4.2292 5.2404C3.8635 5.6696 3.6804 6.259 3.6804 7.009C3.6804 7.7531 3.8635 8.3381 4.2292 8.7639ZM11.0974 8.7639C11.4636 9.1902 11.9617 9.4031 12.5915 9.4031C13.0534 9.4031 13.4226 9.301 13.6984 9.0969C13.9743 8.8933 14.1545 8.614 14.2384 8.26H15.3004C15.1744 8.884 14.8775 9.3733 14.4093 9.7273C13.9415 10.0813 13.3385 10.2581 12.6002 10.2581C11.9762 10.2581 11.4381 10.1219 10.985 9.8489C10.5319 9.5759 10.1823 9.1946 9.9367 8.7058C9.6906 8.2165 9.5676 7.6511 9.5676 7.009C9.5676 6.3611 9.6906 5.7927 9.9367 5.3034C10.1823 4.8146 10.5319 4.4323 10.985 4.1559C11.4381 3.88 11.9762 3.7418 12.6002 3.7418C13.3385 3.7418 13.9415 3.922 14.4093 4.2818C14.8776 4.6422 15.1744 5.1461 15.3004 5.794H14.2384C14.1544 5.4283 13.9742 5.1368 13.6984 4.921C13.4226 4.7052 13.0534 4.5968 12.5915 4.5968C11.9616 4.5968 11.4636 4.8116 11.0974 5.2404C10.7317 5.6696 10.5486 6.259 10.5486 7.009C10.5486 7.7531 10.7317 8.3381 11.0974 8.7639Z"
|
|
2745
|
+
/>
|
|
2746
|
+
</svg>
|
|
2747
|
+
<svg aria-hidden="true" viewBox="0 0 18 14" slot="off">
|
|
2748
|
+
<path
|
|
2749
|
+
d="M5.73219 10.258C5.10819 10.258 4.57009 10.1218 4.11699 9.8488C3.66389 9.5758 3.31429 9.1945 3.06869 8.7057C2.82259 8.2164 2.69958 7.651 2.69958 7.0089C2.69958 6.361 2.82259 5.7926 3.06869 5.3033C3.31429 4.8145 3.66389 4.4322 4.11699 4.1558C4.57009 3.8799 5.10819 3.7417 5.73219 3.7417C6.47049 3.7417 7.07348 3.9219 7.54128 4.2817C8.00958 4.6421 8.30638 5.146 8.43238 5.7939H7.37039C7.28639 5.4282 7.10618 5.1367 6.83039 4.9209C6.55459 4.7051 6.18538 4.5967 5.72348 4.5967C5.09358 4.5967 4.59559 4.8115 4.22939 5.2403C3.86369 5.6695 3.68058 6.2589 3.68058 7.0089C3.68058 7.753 3.86369 8.338 4.22939 8.7638C4.59559 9.1901 5.09368 9.403 5.72348 9.403C6.18538 9.403 6.55459 9.3009 6.83039 9.0968C7.10629 8.8932 7.28649 8.6139 7.37039 8.2599H8.43238C8.30638 8.8839 8.00948 9.3732 7.54128 9.7272C7.07348 10.0812 6.47049 10.258 5.73219 10.258Z"
|
|
2750
|
+
/>
|
|
2751
|
+
<path
|
|
2752
|
+
d="M12.6003 10.258C11.9763 10.258 11.4382 10.1218 10.9851 9.8488C10.532 9.5758 10.1824 9.1945 9.93685 8.7057C9.69075 8.2164 9.56775 7.651 9.56775 7.0089C9.56775 6.361 9.69075 5.7926 9.93685 5.3033C10.1824 4.8145 10.532 4.4322 10.9851 4.1558C11.4382 3.8799 11.9763 3.7417 12.6003 3.7417C13.3386 3.7417 13.9416 3.9219 14.4094 4.2817C14.8777 4.6421 15.1745 5.146 15.3005 5.7939H14.2385C14.1545 5.4282 13.9743 5.1367 13.6985 4.9209C13.4227 4.7051 13.0535 4.5967 12.5916 4.5967C11.9617 4.5967 11.4637 4.8115 11.0975 5.2403C10.7318 5.6695 10.5487 6.2589 10.5487 7.0089C10.5487 7.753 10.7318 8.338 11.0975 8.7638C11.4637 9.1901 11.9618 9.403 12.5916 9.403C13.0535 9.403 13.4227 9.3009 13.6985 9.0968C13.9744 8.8932 14.1546 8.6139 14.2385 8.2599H15.3005C15.1745 8.8839 14.8776 9.3732 14.4094 9.7272C13.9416 10.0812 13.3386 10.258 12.6003 10.258Z"
|
|
2753
|
+
/>
|
|
2754
|
+
<path
|
|
2755
|
+
d="M15.9891 1C16.5465 1 17 1.4535 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H2.0109C1.4535 13 1 12.5465 1 11.9891V2.0109C1 1.4535 1.4535 0.9999 2.0109 0.9999L15.9891 1ZM15.9891 0H2.0109C0.9003 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9003 14 2.0109 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0Z"
|
|
2756
|
+
/>
|
|
2757
|
+
</svg>
|
|
2758
|
+
</media-captions-menu-button>
|
|
2759
|
+
<media-captions-menu
|
|
2760
|
+
hidden
|
|
2761
|
+
anchor="auto"
|
|
2762
|
+
part="bottom captions menu"
|
|
2763
|
+
disabled="{{disabled}}"
|
|
2764
|
+
aria-disabled="{{disabled}}"
|
|
2765
|
+
exportparts="menu-item"
|
|
2766
|
+
>
|
|
2767
|
+
<div slot="checked-indicator">
|
|
2768
|
+
<style>
|
|
2769
|
+
.indicator {
|
|
2770
|
+
position: relative;
|
|
2771
|
+
top: 1px;
|
|
2772
|
+
width: 0.9em;
|
|
2773
|
+
height: auto;
|
|
2774
|
+
fill: var(--_accent-color);
|
|
2775
|
+
margin-right: 5px;
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2778
|
+
[aria-checked='false'] .indicator {
|
|
2779
|
+
display: none;
|
|
2780
|
+
}
|
|
2781
|
+
</style>
|
|
2782
|
+
<svg viewBox="0 0 14 18" class="indicator">
|
|
2783
|
+
<path
|
|
2784
|
+
d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
|
|
2785
|
+
fill-rule="evenodd"
|
|
2786
|
+
/>
|
|
2787
|
+
</svg></div
|
|
2788
|
+
></media-captions-menu>
|
|
2789
|
+
</template>
|
|
2790
|
+
|
|
2791
|
+
<template partial="AirplayButton">
|
|
2792
|
+
<media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
2793
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
|
|
2794
|
+
<path
|
|
2795
|
+
d="M16.1383 0H1.8618C0.8335 0 0 0.8335 0 1.8617V10.1382C0 11.1664 0.8335 12 1.8618 12H3.076C3.1204 11.9433 3.1503 11.8785 3.2012 11.826L4.004 11H1.8618C1.3866 11 1 10.6134 1 10.1382V1.8617C1 1.3865 1.3866 0.9999 1.8618 0.9999H16.1383C16.6135 0.9999 17.0001 1.3865 17.0001 1.8617V10.1382C17.0001 10.6134 16.6135 11 16.1383 11H13.9961L14.7989 11.826C14.8499 11.8785 14.8798 11.9432 14.9241 12H16.1383C17.1665 12 18.0001 11.1664 18.0001 10.1382V1.8617C18 0.8335 17.1665 0 16.1383 0Z"
|
|
2796
|
+
/>
|
|
2797
|
+
<path
|
|
2798
|
+
d="M9.55061 8.21903C9.39981 8.06383 9.20001 7.98633 9.00011 7.98633C8.80021 7.98633 8.60031 8.06383 8.44951 8.21903L4.09771 12.697C3.62471 13.1838 3.96961 13.9998 4.64831 13.9998H13.3518C14.0304 13.9998 14.3754 13.1838 13.9023 12.697L9.55061 8.21903Z"
|
|
2799
|
+
/>
|
|
2800
|
+
</svg>
|
|
2801
|
+
</media-airplay-button>
|
|
2802
|
+
</template>
|
|
2803
|
+
|
|
2804
|
+
<template partial="FullscreenButton">
|
|
2805
|
+
<media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
2806
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
|
|
2807
|
+
<path
|
|
2808
|
+
d="M1.00745 4.39539L1.01445 1.98789C1.01605 1.43049 1.47085 0.978289 2.02835 0.979989L6.39375 0.992589L6.39665 -0.007411L2.03125 -0.020011C0.920646 -0.023211 0.0176463 0.874489 0.0144463 1.98509L0.00744629 4.39539H1.00745Z"
|
|
2809
|
+
/>
|
|
2810
|
+
<path
|
|
2811
|
+
d="M17.0144 2.03431L17.0076 4.39541H18.0076L18.0144 2.03721C18.0176 0.926712 17.1199 0.0237125 16.0093 0.0205125L11.6439 0.0078125L11.641 1.00781L16.0064 1.02041C16.5638 1.02201 17.016 1.47681 17.0144 2.03431Z"
|
|
2812
|
+
/>
|
|
2813
|
+
<path
|
|
2814
|
+
d="M16.9925 9.60498L16.9855 12.0124C16.9839 12.5698 16.5291 13.022 15.9717 13.0204L11.6063 13.0078L11.6034 14.0078L15.9688 14.0204C17.0794 14.0236 17.9823 13.1259 17.9855 12.0153L17.9925 9.60498H16.9925Z"
|
|
2815
|
+
/>
|
|
2816
|
+
<path
|
|
2817
|
+
d="M0.985626 11.9661L0.992426 9.60498H-0.0074737L-0.0142737 11.9632C-0.0174737 13.0738 0.880226 13.9767 1.99083 13.98L6.35623 13.9926L6.35913 12.9926L1.99373 12.98C1.43633 12.9784 0.983926 12.5236 0.985626 11.9661Z"
|
|
2818
|
+
/>
|
|
2819
|
+
</svg>
|
|
2820
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
|
|
2821
|
+
<path
|
|
2822
|
+
d="M5.39655 -0.0200195L5.38955 2.38748C5.38795 2.94488 4.93315 3.39708 4.37565 3.39538L0.0103463 3.38278L0.00744629 4.38278L4.37285 4.39538C5.48345 4.39858 6.38635 3.50088 6.38965 2.39028L6.39665 -0.0200195H5.39655Z"
|
|
2823
|
+
/>
|
|
2824
|
+
<path
|
|
2825
|
+
d="M12.6411 2.36891L12.6479 0.0078125H11.6479L11.6411 2.36601C11.6379 3.47651 12.5356 4.37951 13.6462 4.38271L18.0116 4.39531L18.0145 3.39531L13.6491 3.38271C13.0917 3.38111 12.6395 2.92641 12.6411 2.36891Z"
|
|
2826
|
+
/>
|
|
2827
|
+
<path
|
|
2828
|
+
d="M12.6034 14.0204L12.6104 11.613C12.612 11.0556 13.0668 10.6034 13.6242 10.605L17.9896 10.6176L17.9925 9.61759L13.6271 9.60499C12.5165 9.60179 11.6136 10.4995 11.6104 11.6101L11.6034 14.0204H12.6034Z"
|
|
2829
|
+
/>
|
|
2830
|
+
<path
|
|
2831
|
+
d="M5.359 11.6315L5.3522 13.9926H6.3522L6.359 11.6344C6.3622 10.5238 5.4645 9.62088 4.3539 9.61758L-0.0115043 9.60498L-0.0144043 10.605L4.351 10.6176C4.9084 10.6192 5.3607 11.074 5.359 11.6315Z"
|
|
2832
|
+
/>
|
|
2833
|
+
</svg>
|
|
2834
|
+
</media-fullscreen-button>
|
|
2835
|
+
</template>
|
|
2836
|
+
|
|
2837
|
+
<template partial="CastButton">
|
|
2838
|
+
<media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
2839
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
|
|
2840
|
+
<path
|
|
2841
|
+
d="M16.0072 0H2.0291C0.9185 0 0.0181 0.9003 0.0181 2.011V5.5009C0.357 5.5016 0.6895 5.5275 1.0181 5.5669V2.011C1.0181 1.4536 1.4716 1 2.029 1H16.0072C16.5646 1 17.0181 1.4536 17.0181 2.011V11.9891C17.0181 12.5465 16.5646 13 16.0072 13H8.4358C8.4746 13.3286 8.4999 13.6611 8.4999 13.9999H16.0071C17.1177 13.9999 18.018 13.0996 18.018 11.989V2.011C18.0181 0.9003 17.1178 0 16.0072 0ZM0 6.4999V7.4999C3.584 7.4999 6.5 10.4159 6.5 13.9999H7.5C7.5 9.8642 4.1357 6.4999 0 6.4999ZM0 8.7499V9.7499C2.3433 9.7499 4.25 11.6566 4.25 13.9999H5.25C5.25 11.1049 2.895 8.7499 0 8.7499ZM0.0181 11V14H3.0181C3.0181 12.3431 1.675 11 0.0181 11Z"
|
|
2842
|
+
/>
|
|
2843
|
+
</svg>
|
|
2844
|
+
<svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
|
|
2845
|
+
<path
|
|
2846
|
+
d="M15.9891 0H2.01103C0.900434 0 3.35947e-05 0.9003 3.35947e-05 2.011V5.5009C0.338934 5.5016 0.671434 5.5275 1.00003 5.5669V2.011C1.00003 1.4536 1.45353 1 2.01093 1H15.9891C16.5465 1 17 1.4536 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H8.41773C8.45653 13.3286 8.48183 13.6611 8.48183 13.9999H15.989C17.0996 13.9999 17.9999 13.0996 17.9999 11.989V2.011C18 0.9003 17.0997 0 15.9891 0ZM-0.0180664 6.4999V7.4999C3.56593 7.4999 6.48193 10.4159 6.48193 13.9999H7.48193C7.48193 9.8642 4.11763 6.4999 -0.0180664 6.4999ZM-0.0180664 8.7499V9.7499C2.32523 9.7499 4.23193 11.6566 4.23193 13.9999H5.23193C5.23193 11.1049 2.87693 8.7499 -0.0180664 8.7499ZM3.35947e-05 11V14H3.00003C3.00003 12.3431 1.65693 11 3.35947e-05 11Z"
|
|
2847
|
+
/>
|
|
2848
|
+
<path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />
|
|
2849
|
+
</svg>
|
|
2850
|
+
</media-cast-button>
|
|
2851
|
+
</template>
|
|
2852
|
+
|
|
2853
|
+
<template partial="LiveButton">
|
|
2854
|
+
<media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
2855
|
+
<span slot="text">Live</span>
|
|
2856
|
+
</media-live-button>
|
|
2857
|
+
</template>
|
|
2858
|
+
|
|
2859
|
+
<template partial="PlaybackRateMenu">
|
|
2860
|
+
<media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button>
|
|
2861
|
+
<media-playback-rate-menu
|
|
2862
|
+
hidden
|
|
2863
|
+
anchor="auto"
|
|
2864
|
+
rates="{{playbackrates}}"
|
|
2865
|
+
exportparts="menu-item"
|
|
2866
|
+
part="bottom playback-rate menu"
|
|
2867
|
+
disabled="{{disabled}}"
|
|
2868
|
+
aria-disabled="{{disabled}}"
|
|
2869
|
+
></media-playback-rate-menu>
|
|
2870
|
+
</template>
|
|
2871
|
+
|
|
2872
|
+
<template partial="VolumeRange">
|
|
2873
|
+
<media-volume-range
|
|
2874
|
+
part="bottom volume range"
|
|
2875
|
+
disabled="{{disabled}}"
|
|
2876
|
+
aria-disabled="{{disabled}}"
|
|
2877
|
+
></media-volume-range>
|
|
2878
|
+
</template>
|
|
2879
|
+
|
|
2880
|
+
<template partial="TimeDisplay">
|
|
2881
|
+
<media-time-display
|
|
2882
|
+
remaining="{{defaultshowremainingtime}}"
|
|
2883
|
+
showduration="{{!hideduration}}"
|
|
2884
|
+
part="bottom time display"
|
|
2885
|
+
disabled="{{disabled}}"
|
|
2886
|
+
aria-disabled="{{disabled}}"
|
|
2887
|
+
></media-time-display>
|
|
2888
|
+
</template>
|
|
2889
|
+
|
|
2890
|
+
<template partial="TimeRange">
|
|
2891
|
+
<media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}" exportparts="thumb">
|
|
2892
|
+
<media-preview-thumbnail slot="preview"></media-preview-thumbnail>
|
|
2893
|
+
<media-preview-chapter-display slot="preview"></media-preview-chapter-display>
|
|
2894
|
+
<media-preview-time-display slot="preview"></media-preview-time-display>
|
|
2895
|
+
<div slot="preview" part="arrow"></div>
|
|
2896
|
+
</media-time-range>
|
|
2897
|
+
</template>
|
|
2898
|
+
|
|
2899
|
+
<template partial="AudioTrackMenu">
|
|
2900
|
+
<media-audio-track-menu-button part="bottom audio-track button">
|
|
2901
|
+
<svg aria-hidden="true" slot="icon" viewBox="0 0 18 16">
|
|
2902
|
+
<path d="M9 15A7 7 0 1 1 9 1a7 7 0 0 1 0 14Zm0 1A8 8 0 1 0 9 0a8 8 0 0 0 0 16Z" />
|
|
2903
|
+
<path
|
|
2904
|
+
d="M5.2 6.3a.5.5 0 0 1 .5.5v2.4a.5.5 0 1 1-1 0V6.8a.5.5 0 0 1 .5-.5Zm2.4-2.4a.5.5 0 0 1 .5.5v7.2a.5.5 0 0 1-1 0V4.4a.5.5 0 0 1 .5-.5ZM10 5.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.4-.8a.5.5 0 0 1 .5.5v5.6a.5.5 0 0 1-1 0V5.2a.5.5 0 0 1 .5-.5Z"
|
|
2905
|
+
/>
|
|
2906
|
+
</svg>
|
|
2907
|
+
</media-audio-track-menu-button>
|
|
2908
|
+
<media-audio-track-menu
|
|
2909
|
+
hidden
|
|
2910
|
+
anchor="auto"
|
|
2911
|
+
part="bottom audio-track menu"
|
|
2912
|
+
disabled="{{disabled}}"
|
|
2913
|
+
aria-disabled="{{disabled}}"
|
|
2914
|
+
exportparts="menu-item"
|
|
2915
|
+
>
|
|
2916
|
+
<div slot="checked-indicator">
|
|
2917
|
+
<style>
|
|
2918
|
+
.indicator {
|
|
2919
|
+
position: relative;
|
|
2920
|
+
top: 1px;
|
|
2921
|
+
width: 0.9em;
|
|
2922
|
+
height: auto;
|
|
2923
|
+
fill: var(--_accent-color);
|
|
2924
|
+
margin-right: 5px;
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
[aria-checked='false'] .indicator {
|
|
2928
|
+
display: none;
|
|
2929
|
+
}
|
|
2930
|
+
</style>
|
|
2931
|
+
<svg viewBox="0 0 14 18" class="indicator">
|
|
2932
|
+
<path
|
|
2933
|
+
d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
|
|
2934
|
+
fill-rule="evenodd"
|
|
2935
|
+
/>
|
|
2936
|
+
</svg>
|
|
2937
|
+
</div>
|
|
2938
|
+
</media-audio-track-menu>
|
|
2939
|
+
</template>
|
|
2940
|
+
|
|
2941
|
+
<template partial="RenditionMenu">
|
|
2942
|
+
<media-rendition-menu-button part="bottom rendition button">
|
|
2943
|
+
<svg aria-hidden="true" slot="icon" viewBox="0 0 18 14">
|
|
2944
|
+
<path
|
|
2945
|
+
d="M2.25 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM9 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
|
|
2946
|
+
/>
|
|
2947
|
+
</svg>
|
|
2948
|
+
</media-rendition-menu-button>
|
|
2949
|
+
<media-rendition-menu
|
|
2950
|
+
hidden
|
|
2951
|
+
anchor="auto"
|
|
2952
|
+
part="bottom rendition menu"
|
|
2953
|
+
disabled="{{disabled}}"
|
|
2954
|
+
aria-disabled="{{disabled}}"
|
|
2955
|
+
>
|
|
2956
|
+
<div slot="checked-indicator">
|
|
2957
|
+
<style>
|
|
2958
|
+
.indicator {
|
|
2959
|
+
position: relative;
|
|
2960
|
+
top: 1px;
|
|
2961
|
+
width: 0.9em;
|
|
2962
|
+
height: auto;
|
|
2963
|
+
fill: var(--_accent-color);
|
|
2964
|
+
margin-right: 5px;
|
|
2965
|
+
}
|
|
2966
|
+
|
|
2967
|
+
[aria-checked='false'] .indicator {
|
|
2968
|
+
opacity: 0;
|
|
2969
|
+
}
|
|
2970
|
+
</style>
|
|
2971
|
+
<svg viewBox="0 0 14 18" class="indicator">
|
|
2972
|
+
<path
|
|
2973
|
+
d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
|
|
2974
|
+
fill-rule="evenodd"
|
|
2975
|
+
/>
|
|
2976
|
+
</svg>
|
|
2977
|
+
</div>
|
|
2978
|
+
</media-rendition-menu>
|
|
2979
|
+
</template>
|
|
2980
|
+
|
|
2981
|
+
<template partial="MuxBadge">
|
|
2982
|
+
<div part="mux-badge">
|
|
2983
|
+
<a href="https://www.mux.com/player" target="_blank">
|
|
2984
|
+
<span class="mux-badge-text">Powered by</span>
|
|
2985
|
+
<div class="mux-badge-logo">
|
|
2986
|
+
<svg
|
|
2987
|
+
viewBox="0 0 1600 500"
|
|
2988
|
+
style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2"
|
|
2989
|
+
>
|
|
2990
|
+
<g>
|
|
2991
|
+
<path
|
|
2992
|
+
d="M994.287,93.486c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m0,-93.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,68.943 -56.09,125.033 -125.032,125.033c-68.942,-0 -125.03,-56.09 -125.03,-125.033l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,137.853 112.149,250.003 249.999,250.003c137.851,-0 250.001,-112.15 250.001,-250.003l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486"
|
|
2993
|
+
style="fill-rule: nonzero"
|
|
2994
|
+
></path>
|
|
2995
|
+
<path
|
|
2996
|
+
d="M1537.51,468.511c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m-275.883,-218.509l-143.33,143.329c-24.402,24.402 -24.402,63.966 0,88.368c24.402,24.402 63.967,24.402 88.369,-0l143.33,-143.329l143.328,143.329c24.402,24.4 63.967,24.402 88.369,-0c24.403,-24.402 24.403,-63.966 0.001,-88.368l-143.33,-143.329l0.001,-0.004l143.329,-143.329c24.402,-24.402 24.402,-63.965 0,-88.367c-24.402,-24.402 -63.967,-24.402 -88.369,-0l-143.329,143.328l-143.329,-143.328c-24.402,-24.401 -63.967,-24.402 -88.369,-0c-24.402,24.402 -24.402,63.965 0,88.367l143.329,143.329l0,0.004Z"
|
|
2997
|
+
style="fill-rule: nonzero"
|
|
2998
|
+
></path>
|
|
2999
|
+
<path
|
|
3000
|
+
d="M437.511,468.521c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m23.915,-463.762c-23.348,-9.672 -50.226,-4.327 -68.096,13.544l-143.331,143.329l-143.33,-143.329c-17.871,-17.871 -44.747,-23.216 -68.096,-13.544c-23.349,9.671 -38.574,32.455 -38.574,57.729l0,375.026c0,34.51 27.977,62.486 62.487,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-224.173l80.843,80.844c24.404,24.402 63.965,24.402 88.369,-0l80.843,-80.844l0,224.173c0,34.51 27.976,62.486 62.486,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-375.026c0,-25.274 -15.224,-48.058 -38.573,-57.729"
|
|
3001
|
+
style="fill-rule: nonzero"
|
|
3002
|
+
></path>
|
|
3003
|
+
</g>
|
|
3004
|
+
</svg>
|
|
3005
|
+
</div>
|
|
3006
|
+
</a>
|
|
3007
|
+
</div>
|
|
3008
|
+
</template>
|
|
3009
|
+
|
|
3010
|
+
<media-controller
|
|
3011
|
+
part="controller"
|
|
3012
|
+
defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
|
|
3013
|
+
breakpoints="sm:470"
|
|
3014
|
+
gesturesdisabled="{{disabled}}"
|
|
3015
|
+
hotkeys="{{hotkeys}}"
|
|
3016
|
+
nohotkeys="{{nohotkeys}}"
|
|
3017
|
+
novolumepref="{{novolumepref}}"
|
|
3018
|
+
audio="{{audio}}"
|
|
3019
|
+
noautoseektolive="{{noautoseektolive}}"
|
|
3020
|
+
defaultsubtitles="{{defaultsubtitles}}"
|
|
3021
|
+
defaultduration="{{defaultduration ?? false}}"
|
|
3022
|
+
keyboardforwardseekoffset="{{forwardseekoffset}}"
|
|
3023
|
+
keyboardbackwardseekoffset="{{backwardseekoffset}}"
|
|
3024
|
+
exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
|
|
3025
|
+
style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
|
|
3026
|
+
>
|
|
3027
|
+
<slot name="media" slot="media"></slot>
|
|
3028
|
+
<slot name="poster" slot="poster"></slot>
|
|
3029
|
+
|
|
3030
|
+
<media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
|
|
3031
|
+
|
|
3032
|
+
<template if="!audio">
|
|
3033
|
+
<media-error-dialog slot="dialog" noautohide></media-error-dialog>
|
|
3034
|
+
<!-- Pre-playback UI -->
|
|
3035
|
+
<!-- same for both on-demand and live -->
|
|
3036
|
+
<div slot="centered-chrome" class="center-controls pre-playback">
|
|
3037
|
+
<template if="!breakpointsm">{{>PlayButton section="center"}}</template>
|
|
3038
|
+
<template if="breakpointsm">{{>PrePlayButton section="center"}}</template>
|
|
3039
|
+
</div>
|
|
3040
|
+
|
|
3041
|
+
<!-- Mux Badge -->
|
|
3042
|
+
<template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template>
|
|
3043
|
+
|
|
3044
|
+
<!-- Autoplay centered unmute button -->
|
|
3045
|
+
<!--
|
|
3046
|
+
todo: figure out how show this with available state variables
|
|
3047
|
+
needs to show when:
|
|
3048
|
+
- autoplay is enabled
|
|
3049
|
+
- playback has been successful
|
|
3050
|
+
- audio is muted
|
|
3051
|
+
- in place / instead of the pre-plaback play button
|
|
3052
|
+
- not to show again after user has interacted with this button
|
|
3053
|
+
- OR user has interacted with the mute button in the control bar
|
|
3054
|
+
-->
|
|
3055
|
+
<!--
|
|
3056
|
+
There should be a >MuteButton to the left of the "Unmute" text, but a templating bug
|
|
3057
|
+
makes it appear even if commented out in the markup, add it back when code is un-commented
|
|
3058
|
+
-->
|
|
3059
|
+
<!-- <div slot="centered-chrome" class="autoplay-unmute">
|
|
3060
|
+
<div role="button" class="autoplay-unmute-btn">Unmute</div>
|
|
3061
|
+
</div> -->
|
|
3062
|
+
|
|
3063
|
+
<template if="streamtype == 'on-demand'">
|
|
3064
|
+
<template if="breakpointsm">
|
|
3065
|
+
<media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar>
|
|
3066
|
+
</template>
|
|
3067
|
+
{{>TimeRange}}
|
|
3068
|
+
<media-control-bar part="control-bar bottom">
|
|
3069
|
+
{{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}
|
|
3070
|
+
{{>VolumeRange}}
|
|
3071
|
+
<div class="spacer"></div>
|
|
3072
|
+
{{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}}
|
|
3073
|
+
{{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
|
|
3074
|
+
</media-control-bar>
|
|
3075
|
+
</template>
|
|
3076
|
+
|
|
3077
|
+
<template if="streamtype == 'live'">
|
|
3078
|
+
<media-control-bar part="control-bar top" slot="top-chrome">
|
|
3079
|
+
{{>LiveButton}}
|
|
3080
|
+
<template if="breakpointsm"> {{>TitleDisplay}} </template>
|
|
3081
|
+
</media-control-bar>
|
|
3082
|
+
<template if="targetlivewindow > 0">{{>TimeRange}}</template>
|
|
3083
|
+
<media-control-bar part="control-bar bottom">
|
|
3084
|
+
{{>PlayButton}}
|
|
3085
|
+
<template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>
|
|
3086
|
+
{{>MuteButton}} {{>VolumeRange}}
|
|
3087
|
+
<div class="spacer"></div>
|
|
3088
|
+
{{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}
|
|
3089
|
+
{{>FullscreenButton}}
|
|
3090
|
+
</media-control-bar>
|
|
3091
|
+
</template>
|
|
3092
|
+
</template>
|
|
3093
|
+
|
|
3094
|
+
<template if="audio">
|
|
3095
|
+
<template if="streamtype == 'on-demand'">
|
|
3096
|
+
<template if="title">
|
|
3097
|
+
<media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
|
|
3098
|
+
</template>
|
|
3099
|
+
<media-control-bar part="control-bar bottom">
|
|
3100
|
+
{{>PlayButton}}
|
|
3101
|
+
<template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
|
|
3102
|
+
{{>MuteButton}}
|
|
3103
|
+
<template if="breakpointsm">{{>VolumeRange}}</template>
|
|
3104
|
+
{{>TimeDisplay}} {{>TimeRange}}
|
|
3105
|
+
<template if="breakpointsm">{{>PlaybackRateMenu}}</template>
|
|
3106
|
+
{{>AirplayButton}} {{>CastButton}}
|
|
3107
|
+
</media-control-bar>
|
|
3108
|
+
</template>
|
|
3109
|
+
|
|
3110
|
+
<template if="streamtype == 'live'">
|
|
3111
|
+
<template if="title">
|
|
3112
|
+
<media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
|
|
3113
|
+
</template>
|
|
3114
|
+
<media-control-bar part="control-bar bottom">
|
|
3115
|
+
{{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}}
|
|
3116
|
+
<template if="breakpointsm">
|
|
3117
|
+
{{>VolumeRange}}
|
|
3118
|
+
<template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
|
|
3119
|
+
</template>
|
|
3120
|
+
<template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>
|
|
3121
|
+
<template if="!targetlivewindow"><div class="spacer"></div></template>
|
|
3122
|
+
{{>AirplayButton}} {{>CastButton}}
|
|
3123
|
+
</media-control-bar>
|
|
3124
|
+
</template>
|
|
3125
|
+
</template>
|
|
3126
|
+
|
|
3127
|
+
<slot></slot>
|
|
3128
|
+
</media-controller>
|
|
3129
|
+
</template>
|
|
3130
|
+
`);var Om,Pm,Um=class extends eo{};Um.template=(Pm=(Om=Wu.content)==null?void 0:Om.children)==null?void 0:Pm[0],Vt.customElements.get("media-theme-gerwig")||Vt.customElements.define("media-theme-gerwig",Um);var Jt={SRC:"src",POSTER:"poster"},k={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},Bu=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"],YE=xv.formatErrorMessage;function GE(t){var e,n;let i=t.theme;if(i){let a=(n=(e=t.getRootNode())==null?void 0:e.getElementById)==null?void 0:n.call(e,i);if(a&&a instanceof HTMLTemplateElement)return a;i.startsWith("media-theme-")||(i=`media-theme-${i}`);let r=Vt.customElements.get(i);if(r!=null&&r.template)return r.template}}function jE(t){var e;let n=(e=t.mediaController)==null?void 0:e.querySelector("media-time-display");return n&&getComputedStyle(n).getPropertyValue("--media-duration-display-display").trim()==="none"}function Hm(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(n=>n.startsWith("metadata-")).reduce((n,i)=>{let a=t.getAttribute(i);return a!==null&&(n[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),n},e)}xv.formatErrorMessage=t=>{var e,n;if(t instanceof C){let i=FE(t,!1);return`
|
|
3131
|
+
${i!=null&&i.title?`<h3>${i.title}</h3>`:""}
|
|
3132
|
+
${i!=null&&i.message||i!=null&&i.linkUrl?`<p>
|
|
3133
|
+
${i?.message}
|
|
3134
|
+
${i!=null&&i.linkUrl?`<a
|
|
3135
|
+
href="${i.linkUrl}"
|
|
3136
|
+
target="_blank"
|
|
3137
|
+
rel="external noopener"
|
|
3138
|
+
aria-label="${(e=i.linkText)!=null?e:""} ${M("(opens in a new window)")}"
|
|
3139
|
+
>${(n=i.linkText)!=null?n:i.linkUrl}</a
|
|
3140
|
+
>`:""}
|
|
3141
|
+
</p>`:""}
|
|
3142
|
+
`}return YE(t)};var To,Ao,ko,Kn,wo,oa,ue,En,Ab,Vu,Fn,Wm,Bm,Vm,$m,QE=Object.values(y),ZE=Object.values(Jt),zE=Object.values(k),qm=gb(),Km="mux-player",Fm={isDialogOpen:!1},XE={redundant_streams:!0};function Nn(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}To=new WeakMap,Ao=new WeakMap,ko=new WeakMap,Kn=new WeakMap,wo=new WeakMap,oa=new WeakMap,ue=new WeakSet,En=function(){var t,e,n,i;if(!Q(this,Ao)){qt(this,Ao,!0),fe(this,ue,Fn).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof Vt.HTMLElement))throw""}catch{it("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{it("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof mE))throw""}catch{it("<media-controller> failed to upgrade!")}fe(this,ue,Wm).call(this),fe(this,ue,Bm).call(this),fe(this,ue,Vm).call(this),qt(this,Kn,(e=(t=this.mediaController)==null?void 0:t.hasAttribute(x.USER_INACTIVE))==null||e),fe(this,ue,$m).call(this),(n=this.media)==null||n.addEventListener("streamtypechange",()=>fe(this,ue,Fn).call(this)),(i=this.media)==null||i.addEventListener("loadstart",()=>fe(this,ue,Fn).call(this))}},Ab=function(){var t,e;try{(t=window?.CSS)==null||t.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(e=window?.CSS)==null||e.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},Vu=function(t){Object.assign(Q(this,oa),t),fe(this,ue,Fn).call(this)},Fn=function(t={}){var e,n,i,a;(function(r,s){r.renderInto(s)})((r=>_o`
|
|
3143
|
+
<style>
|
|
3144
|
+
${(s=>{let{tokens:o}=s;return o.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""})(r)}
|
|
3145
|
+
${`:host {
|
|
3146
|
+
--media-control-display: var(--controls);
|
|
3147
|
+
--media-loading-indicator-display: var(--loading-indicator);
|
|
3148
|
+
--media-dialog-display: var(--dialog);
|
|
3149
|
+
--media-play-button-display: var(--play-button);
|
|
3150
|
+
--media-live-button-display: var(--live-button);
|
|
3151
|
+
--media-seek-backward-button-display: var(--seek-backward-button);
|
|
3152
|
+
--media-seek-forward-button-display: var(--seek-forward-button);
|
|
3153
|
+
--media-mute-button-display: var(--mute-button);
|
|
3154
|
+
--media-captions-button-display: var(--captions-button);
|
|
3155
|
+
--media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display));
|
|
3156
|
+
--media-rendition-menu-button-display: var(--rendition-menu-button);
|
|
3157
|
+
--media-audio-track-menu-button-display: var(--audio-track-menu-button);
|
|
3158
|
+
--media-airplay-button-display: var(--airplay-button);
|
|
3159
|
+
--media-pip-button-display: var(--pip-button);
|
|
3160
|
+
--media-fullscreen-button-display: var(--fullscreen-button);
|
|
3161
|
+
--media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display));
|
|
3162
|
+
--media-playback-rate-button-display: var(--playback-rate-button);
|
|
3163
|
+
--media-playback-rate-menu-button-display: var(--playback-rate-menu-button);
|
|
3164
|
+
--media-volume-range-display: var(--volume-range);
|
|
3165
|
+
--media-time-range-display: var(--time-range);
|
|
3166
|
+
--media-time-display-display: var(--time-display);
|
|
3167
|
+
--media-duration-display-display: var(--duration-display);
|
|
3168
|
+
--media-title-display-display: var(--title-display);
|
|
3169
|
+
|
|
3170
|
+
display: inline-block;
|
|
3171
|
+
line-height: 0;
|
|
3172
|
+
width: 100%;
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
a {
|
|
3176
|
+
color: #fff;
|
|
3177
|
+
font-size: 0.9em;
|
|
3178
|
+
text-decoration: underline;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
media-theme {
|
|
3182
|
+
display: inline-block;
|
|
3183
|
+
line-height: 0;
|
|
3184
|
+
width: 100%;
|
|
3185
|
+
height: 100%;
|
|
3186
|
+
direction: ltr;
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
media-poster-image {
|
|
3190
|
+
display: inline-block;
|
|
3191
|
+
line-height: 0;
|
|
3192
|
+
width: 100%;
|
|
3193
|
+
height: 100%;
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
media-poster-image:not([src]):not([placeholdersrc]) {
|
|
3197
|
+
display: none;
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
::part(top),
|
|
3201
|
+
[part~='top'] {
|
|
3202
|
+
--media-control-display: var(--controls, var(--top-controls));
|
|
3203
|
+
--media-play-button-display: var(--play-button, var(--top-play-button));
|
|
3204
|
+
--media-live-button-display: var(--live-button, var(--top-live-button));
|
|
3205
|
+
--media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button));
|
|
3206
|
+
--media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button));
|
|
3207
|
+
--media-mute-button-display: var(--mute-button, var(--top-mute-button));
|
|
3208
|
+
--media-captions-button-display: var(--captions-button, var(--top-captions-button));
|
|
3209
|
+
--media-captions-menu-button-display: var(
|
|
3210
|
+
--captions-menu-button,
|
|
3211
|
+
var(--media-captions-button-display, var(--top-captions-menu-button))
|
|
3212
|
+
);
|
|
3213
|
+
--media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button));
|
|
3214
|
+
--media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button));
|
|
3215
|
+
--media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));
|
|
3216
|
+
--media-pip-button-display: var(--pip-button, var(--top-pip-button));
|
|
3217
|
+
--media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));
|
|
3218
|
+
--media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display)));
|
|
3219
|
+
--media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));
|
|
3220
|
+
--media-playback-rate-menu-button-display: var(
|
|
3221
|
+
--captions-menu-button,
|
|
3222
|
+
var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button))
|
|
3223
|
+
);
|
|
3224
|
+
--media-volume-range-display: var(--volume-range, var(--top-volume-range));
|
|
3225
|
+
--media-time-range-display: var(--time-range, var(--top-time-range));
|
|
3226
|
+
--media-time-display-display: var(--time-display, var(--top-time-display));
|
|
3227
|
+
--media-duration-display-display: var(--duration-display, var(--top-duration-display));
|
|
3228
|
+
--media-title-display-display: var(--title-display, var(--top-title-display));
|
|
3229
|
+
}
|
|
3230
|
+
|
|
3231
|
+
::part(center),
|
|
3232
|
+
[part~='center'] {
|
|
3233
|
+
--media-control-display: var(--controls, var(--center-controls));
|
|
3234
|
+
--media-play-button-display: var(--play-button, var(--center-play-button));
|
|
3235
|
+
--media-live-button-display: var(--live-button, var(--center-live-button));
|
|
3236
|
+
--media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button));
|
|
3237
|
+
--media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button));
|
|
3238
|
+
--media-mute-button-display: var(--mute-button, var(--center-mute-button));
|
|
3239
|
+
--media-captions-button-display: var(--captions-button, var(--center-captions-button));
|
|
3240
|
+
--media-captions-menu-button-display: var(
|
|
3241
|
+
--captions-menu-button,
|
|
3242
|
+
var(--media-captions-button-display, var(--center-captions-menu-button))
|
|
3243
|
+
);
|
|
3244
|
+
--media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button));
|
|
3245
|
+
--media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button));
|
|
3246
|
+
--media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));
|
|
3247
|
+
--media-pip-button-display: var(--pip-button, var(--center-pip-button));
|
|
3248
|
+
--media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));
|
|
3249
|
+
--media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display)));
|
|
3250
|
+
--media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));
|
|
3251
|
+
--media-playback-rate-menu-button-display: var(
|
|
3252
|
+
--playback-rate-menu-button,
|
|
3253
|
+
var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button))
|
|
3254
|
+
);
|
|
3255
|
+
--media-volume-range-display: var(--volume-range, var(--center-volume-range));
|
|
3256
|
+
--media-time-range-display: var(--time-range, var(--center-time-range));
|
|
3257
|
+
--media-time-display-display: var(--time-display, var(--center-time-display));
|
|
3258
|
+
--media-duration-display-display: var(--duration-display, var(--center-duration-display));
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
::part(bottom),
|
|
3262
|
+
[part~='bottom'] {
|
|
3263
|
+
--media-control-display: var(--controls, var(--bottom-controls));
|
|
3264
|
+
--media-play-button-display: var(--play-button, var(--bottom-play-button));
|
|
3265
|
+
--media-live-button-display: var(--live-button, var(--bottom-live-button));
|
|
3266
|
+
--media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button));
|
|
3267
|
+
--media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button));
|
|
3268
|
+
--media-mute-button-display: var(--mute-button, var(--bottom-mute-button));
|
|
3269
|
+
--media-captions-button-display: var(--captions-button, var(--bottom-captions-button));
|
|
3270
|
+
--media-captions-menu-button-display: var(
|
|
3271
|
+
--captions-menu-button,
|
|
3272
|
+
var(--media-captions-button-display, var(--bottom-captions-menu-button))
|
|
3273
|
+
);
|
|
3274
|
+
--media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button));
|
|
3275
|
+
--media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button));
|
|
3276
|
+
--media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));
|
|
3277
|
+
--media-pip-button-display: var(--pip-button, var(--bottom-pip-button));
|
|
3278
|
+
--media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));
|
|
3279
|
+
--media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display)));
|
|
3280
|
+
--media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));
|
|
3281
|
+
--media-playback-rate-menu-button-display: var(
|
|
3282
|
+
--playback-rate-menu-button,
|
|
3283
|
+
var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button))
|
|
3284
|
+
);
|
|
3285
|
+
--media-volume-range-display: var(--volume-range, var(--bottom-volume-range));
|
|
3286
|
+
--media-time-range-display: var(--time-range, var(--bottom-time-range));
|
|
3287
|
+
--media-time-display-display: var(--time-display, var(--bottom-time-display));
|
|
3288
|
+
--media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
|
|
3289
|
+
--media-title-display-display: var(--title-display, var(--bottom-title-display));
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3292
|
+
:host([no-tooltips]) {
|
|
3293
|
+
--media-tooltip-display: none;
|
|
3294
|
+
}
|
|
3295
|
+
`}
|
|
3296
|
+
</style>
|
|
3297
|
+
${KE(r)}
|
|
3298
|
+
`)((e=this,n={...Q(this,oa),...t},{src:!e.playbackId&&e.src,playbackId:e.playbackId,hasSrc:!!e.playbackId||!!e.src||!!e.currentSrc,poster:e.poster,storyboard:e.storyboard,storyboardSrc:e.getAttribute(k.STORYBOARD_SRC),fullscreenElement:e.getAttribute(k.FULLSCREEN_ELEMENT),placeholder:e.getAttribute("placeholder"),themeTemplate:GE(e),thumbnailTime:!e.tokens.thumbnail&&e.thumbnailTime,autoplay:e.autoplay,crossOrigin:e.crossOrigin,loop:e.loop,noHotKeys:e.hasAttribute(k.NOHOTKEYS),hotKeys:e.getAttribute(k.HOTKEYS),muted:e.muted,paused:e.paused,preload:e.preload,envKey:e.envKey,preferCmcd:e.preferCmcd,debug:e.debug,disableTracking:e.disableTracking,disableCookies:e.disableCookies,tokens:e.tokens,beaconCollectionDomain:e.beaconCollectionDomain,maxResolution:e.maxResolution,minResolution:e.minResolution,maxAutoResolution:e.maxAutoResolution,programStartTime:e.programStartTime,programEndTime:e.programEndTime,assetStartTime:e.assetStartTime,assetEndTime:e.assetEndTime,renditionOrder:e.renditionOrder,metadata:e.metadata,playerInitTime:e.playerInitTime,playerSoftwareName:e.playerSoftwareName,playerSoftwareVersion:e.playerSoftwareVersion,startTime:e.startTime,preferPlayback:e.preferPlayback,audio:e.audio,defaultStreamType:e.defaultStreamType,targetLiveWindow:e.getAttribute(y.TARGET_LIVE_WINDOW),streamType:Hu(e.getAttribute(y.STREAM_TYPE)),primaryColor:e.getAttribute(k.PRIMARY_COLOR),secondaryColor:e.getAttribute(k.SECONDARY_COLOR),accentColor:e.getAttribute(k.ACCENT_COLOR),forwardSeekOffset:e.forwardSeekOffset,backwardSeekOffset:e.backwardSeekOffset,defaultHiddenCaptions:e.defaultHiddenCaptions,defaultDuration:e.defaultDuration,defaultShowRemainingTime:e.defaultShowRemainingTime,hideDuration:jE(e),playbackRates:e.getAttribute(k.PLAYBACK_RATES),customDomain:(i=e.getAttribute(y.CUSTOM_DOMAIN))!=null?i:void 0,title:e.getAttribute(k.TITLE),videoTitle:(a=e.getAttribute(k.VIDEO_TITLE))!=null?a:e.getAttribute(k.TITLE),novolumepref:e.hasAttribute(k.NO_VOLUME_PREF),nomutedpref:e.hasAttribute(k.NO_MUTED_PREF),proudlyDisplayMuxBadge:e.hasAttribute(k.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:e.castReceiver,disablePseudoEnded:e.hasAttribute(k.DISABLE_PSEUDO_ENDED),...n,extraSourceParams:e.extraSourceParams})),this.shadowRoot)},Wm=function(){let t=e=>{var n,i;if(e==null||!e.startsWith("theme-"))return;let a=e.replace(/^theme-/,"");if(Bu.includes(a))return;let r=this.getAttribute(e);r!=null?(n=this.mediaTheme)==null||n.setAttribute(a,r):(i=this.mediaTheme)==null||i.removeAttribute(a)};new MutationObserver(e=>{for(let{attributeName:n}of e)t(n)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},Bm=function(){this.addEventListener("error",t=>{var e;let n=(e=this.media)==null?void 0:e.error;if(!(n instanceof C)){let{message:a,code:r}=n??{};n=new C(a,r)}if(n==null||!n.fatal)return tn(n),void(n.data&&tn(`${n.name} data:`,n.data));let i=Nm(n);i.message&&yb(i),it(n),n.data&&it(`${n.name} data:`,n.data),fe(this,ue,Vu).call(this,{isDialogOpen:!0})}),this.media&&(this.media.errorTranslator=(t={})=>{var e,n,i;if(!(((e=this.media)==null?void 0:e.error)instanceof C))return t;let a=Nm((n=this.media)==null?void 0:n.error);return{player_error_code:(i=this.media)==null?void 0:i.error.code,player_error_message:a.message?String(a.message):t.player_error_message,player_error_context:a.context?String(a.context):t.player_error_context}})},Vm=function(){var t,e,n,i;let a=()=>fe(this,ue,Fn).call(this);(e=(t=this.media)==null?void 0:t.textTracks)==null||e.addEventListener("addtrack",a),(i=(n=this.media)==null?void 0:n.textTracks)==null||i.addEventListener("removetrack",a)},$m=function(){var t,e;if(!/Firefox/i.test(navigator.userAgent))return;let n,i=new WeakMap,a=()=>this.streamType===j.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,r=(l,d,u=!1)=>{a()||Array.from(l&&l.activeCues||[]).forEach(c=>{if(!(!c.snapToLines||c.line<-5||c.line>=0&&c.line<10))if(!d||this.paused){let m=c.text.split(`
|
|
3299
|
+
`).length,p=-3;this.streamType===j.LIVE&&(p=-2);let v=p-m;if(c.line===v&&!u)return;i.has(c)||i.set(c,c.line),c.line=v}else setTimeout(()=>{c.line=i.get(c)||"auto"},500)})},s=()=>{var l,d;r(n,(d=(l=this.mediaController)==null?void 0:l.hasAttribute(x.USER_INACTIVE))!=null&&d)},o=()=>{var l,d;let u=Array.from(((d=(l=this.mediaController)==null?void 0:l.media)==null?void 0:d.textTracks)||[]).filter(c=>["subtitles","captions"].includes(c.kind)&&c.mode==="showing")[0];u!==n&&n?.removeEventListener("cuechange",s),n=u,n?.addEventListener("cuechange",s),r(n,Q(this,Kn))};o(),(t=this.textTracks)==null||t.addEventListener("change",o),(e=this.textTracks)==null||e.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var l,d;let u=(d=(l=this.mediaController)==null?void 0:l.hasAttribute(x.USER_INACTIVE))==null||d;Q(this,Kn)!==u&&(qt(this,Kn,u),r(n,Q(this,Kn)))})};var Ym=class extends Dm{constructor(){super(),bt(this,ue),bt(this,To),bt(this,Ao,!1),bt(this,ko,{}),bt(this,Kn,!0),bt(this,wo,new HE(this,"hotkeys")),bt(this,oa,{...Fm,onCloseErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&fe(this,ue,Vu).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&(fb(this,Xo.activeElement)||t.preventDefault())}}),qt(this,To,zu()),this.attachShadow({mode:"open"}),fe(this,ue,Ab).call(this),this.isConnected&&fe(this,ue,En).call(this)}static get NAME(){return Km}static get VERSION(){return qm}static get observedAttributes(){var t;return[...(t=Dm.observedAttributes)!=null?t:[],...ZE,...QE,...zE]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,e;return(e=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:e.querySelector("media-controller")}connectedCallback(){let t=this.media;t&&(t.metadata=Hm(this))}attributeChangedCallback(t,e,n){switch(fe(this,ue,En).call(this),super.attributeChangedCallback(t,e,n),t){case k.HOTKEYS:Q(this,wo).value=n;break;case k.THUMBNAIL_TIME:n!=null&&this.tokens.thumbnail&&tn(M("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case k.THUMBNAIL_TOKEN:if(n){let i=fi(n);if(i){let{aud:a}=i,r=rg;a!==r&&tn(M("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:a,expectedAud:r,tokenNamePrefix:"thumbnail"}))}}break;case k.STORYBOARD_TOKEN:if(n){let i=fi(n);if(i){let{aud:a}=i,r=sg;a!==r&&tn(M("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:a,expectedAud:r,tokenNamePrefix:"storyboard"}))}}break;case k.DRM_TOKEN:if(n){let i=fi(n);if(i){let{aud:a}=i,r=Sp;a!==r&&tn(M("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:a,expectedAud:r,tokenNamePrefix:"drm"}))}}break;case y.PLAYBACK_ID:n!=null&&n.includes("?token")&&it(M("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:n}));break;case y.STREAM_TYPE:n&&![j.LIVE,j.ON_DEMAND,j.UNKNOWN].includes(n)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=n.includes("dvr")?Number.POSITIVE_INFINITY:0:yb({file:"invalid-stream-type.md",message:M("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):n===j.LIVE?this.getAttribute(k.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break;case k.FULLSCREEN_ELEMENT:if(n!=null||n!==e){let i=Xo.getElementById(n),a=i?.querySelector("mux-player");this.mediaController&&i&&a&&(this.mediaController.fullscreenElement=i)}}[y.PLAYBACK_ID,Jt.SRC,k.PLAYBACK_TOKEN].includes(t)&&e!==n&&qt(this,oa,{...Q(this,oa),...Fm}),fe(this,ue,Fn).call(this,{[UE(t)]:n})}async requestFullscreen(t){var e;if(this.mediaController&&!this.mediaController.hasAttribute(h.MEDIA_IS_FULLSCREEN))return(e=this.mediaController)==null||e.dispatchEvent(new Vt.CustomEvent(R.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((n,i)=>{var a;(a=this.mediaController)==null||a.addEventListener(sn.MEDIA_IS_FULLSCREEN,()=>n(),{once:!0})})}async exitFullscreen(){var t;if(this.mediaController&&this.mediaController.hasAttribute(h.MEDIA_IS_FULLSCREEN))return(t=this.mediaController)==null||t.dispatchEvent(new Vt.CustomEvent(R.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,n)=>{var i;(i=this.mediaController)==null||i.addEventListener(sn.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var t;return(t=this.getAttribute(y.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?Co.includes(t)?this.setAttribute(y.PREFER_CMCD,t):tn(`Invalid value for preferCmcd. Must be one of ${Co.join()}`):this.removeAttribute(y.PREFER_CMCD))}get hasPlayed(){var t,e;return(e=(t=this.mediaController)==null?void 0:t.hasAttribute(h.MEDIA_HAS_PLAYED))!=null&&e}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(h.MEDIA_TIME_IS_LIVE)}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(k.THEME))!=null?t:"gerwig"}set theme(t){this.setAttribute(k.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let e={};for(let n of t.getAttributeNames()){if(Bu.includes(n))continue;let i=t.getAttribute(n);e[bb(n)]=i===""||i}return e}set themeProps(t){var e,n;fe(this,ue,En).call(this);let i={...this.themeProps,...t};for(let a in i){if(Bu.includes(a))continue;let r=t?.[a];typeof r=="boolean"||r==null?(e=this.mediaTheme)==null||e.toggleAttribute(Uu(a),!!r):(n=this.mediaTheme)==null||n.setAttribute(Uu(a),r)}}get playbackId(){var t;return(t=this.getAttribute(y.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(y.PLAYBACK_ID,t):this.removeAttribute(y.PLAYBACK_ID)}get src(){var t,e;return this.playbackId?(t=Nn(this,Jt.SRC))!=null?t:void 0:(e=this.getAttribute(Jt.SRC))!=null?e:void 0}set src(t){t?this.setAttribute(Jt.SRC,t):this.removeAttribute(Jt.SRC)}get poster(){var t;let e=this.getAttribute(Jt.POSTER);if(e!=null)return e;let{tokens:n}=this;if(!n.playback||n.thumbnail)return this.playbackId&&!this.audio?((i,{token:a,customDomain:r=Rm,thumbnailTime:s,programTime:o}={})=>{var l;let d=a==null?s:void 0,{aud:u}=(l=fi(a))!=null?l:{};if(!a||u==="t")return`https://image.${r}/${i}/thumbnail.webp${Sm({token:a,time:d,program_time:o})}`})(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(t=this.thumbnailTime)!=null?t:this.startTime,programTime:this.programStartTime,token:n.thumbnail}):void 0;tn("Missing expected thumbnail token. No poster image will be shown")}set poster(t){t||t===""?this.setAttribute(Jt.POSTER,t):this.removeAttribute(Jt.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(k.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(k.STORYBOARD_SRC,t):this.removeAttribute(k.STORYBOARD_SRC)}get storyboard(){let{tokens:t}=this;return this.storyboardSrc&&!t.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[j.LIVE,j.UNKNOWN].includes(this.streamType)||t.playback&&!t.storyboard?void 0:((e,{token:n,customDomain:i=Rm,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:o}=(s=fi(n))!=null?s:{};if(!n||o==="s")return`https://image.${i}/${e}/storyboard.vtt${Sm({token:n,format:"webp",program_start_time:a,program_end_time:r})}`})(this.playbackId,{customDomain:this.customDomain,token:t.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(k.AUDIO)}set audio(t){t?this.setAttribute(k.AUDIO,""):this.removeAttribute(k.AUDIO)}get hotkeys(){return Q(this,wo)}get nohotkeys(){return this.hasAttribute(k.NOHOTKEYS)}set nohotkeys(t){t?this.setAttribute(k.NOHOTKEYS,""):this.removeAttribute(k.NOHOTKEYS)}get thumbnailTime(){return Qe(this.getAttribute(k.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(k.THUMBNAIL_TIME,`${t}`)}get videoTitle(){var t,e;return(e=(t=this.getAttribute(k.VIDEO_TITLE))!=null?t:this.getAttribute(k.TITLE))!=null?e:""}set videoTitle(t){t!==this.videoTitle&&(t?this.setAttribute(k.VIDEO_TITLE,t):this.removeAttribute(k.VIDEO_TITLE))}get placeholder(){var t;return(t=Nn(this,k.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(k.PLACEHOLDER,`${t}`)}get primaryColor(){var t,e;let n=this.getAttribute(k.PRIMARY_COLOR);if(n!=null||this.mediaTheme&&(n=(e=(t=Vt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_primary-color"))==null?void 0:e.trim(),n))return n}set primaryColor(t){this.setAttribute(k.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var t,e;let n=this.getAttribute(k.SECONDARY_COLOR);if(n!=null||this.mediaTheme&&(n=(e=(t=Vt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_secondary-color"))==null?void 0:e.trim(),n))return n}set secondaryColor(t){this.setAttribute(k.SECONDARY_COLOR,`${t}`)}get accentColor(){var t,e;let n=this.getAttribute(k.ACCENT_COLOR);if(n!=null||this.mediaTheme&&(n=(e=(t=Vt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_accent-color"))==null?void 0:e.trim(),n))return n}set accentColor(t){this.setAttribute(k.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(k.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(k.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(k.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(k.PLAYBACK_RATES))return this.getAttribute(k.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,e)=>t-e)}set playbackRates(t){t?this.setAttribute(k.PLAYBACK_RATES,t.join(" ")):this.removeAttribute(k.PLAYBACK_RATES)}get forwardSeekOffset(){var t;return(t=Qe(this.getAttribute(k.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(k.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=Qe(this.getAttribute(k.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(k.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(k.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(k.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(k.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return Qe(this.getAttribute(k.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(k.DEFAULT_DURATION):this.setAttribute(k.DEFAULT_DURATION,`${t}`)}get playerInitTime(){return this.hasAttribute(y.PLAYER_INIT_TIME)?Qe(this.getAttribute(y.PLAYER_INIT_TIME)):Q(this,To)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(y.PLAYER_INIT_TIME):this.setAttribute(y.PLAYER_INIT_TIME,""+ +t))}get playerSoftwareName(){var t;return(t=this.getAttribute(y.PLAYER_SOFTWARE_NAME))!=null?t:Km}get playerSoftwareVersion(){var t;return(t=this.getAttribute(y.PLAYER_SOFTWARE_VERSION))!=null?t:qm}get beaconCollectionDomain(){var t;return(t=this.getAttribute(y.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(y.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(y.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(y.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(y.MAX_RESOLUTION,t):this.removeAttribute(y.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(y.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(y.MIN_RESOLUTION,t):this.removeAttribute(y.MIN_RESOLUTION))}get maxAutoResolution(){var t;return(t=this.getAttribute(y.MAX_AUTO_RESOLUTION))!=null?t:void 0}set maxAutoResolution(t){t==null?this.removeAttribute(y.MAX_AUTO_RESOLUTION):this.setAttribute(y.MAX_AUTO_RESOLUTION,t)}get renditionOrder(){var t;return(t=this.getAttribute(y.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(y.RENDITION_ORDER,t):this.removeAttribute(y.RENDITION_ORDER))}get programStartTime(){return Qe(this.getAttribute(y.PROGRAM_START_TIME))}set programStartTime(t){t==null?this.removeAttribute(y.PROGRAM_START_TIME):this.setAttribute(y.PROGRAM_START_TIME,`${t}`)}get programEndTime(){return Qe(this.getAttribute(y.PROGRAM_END_TIME))}set programEndTime(t){t==null?this.removeAttribute(y.PROGRAM_END_TIME):this.setAttribute(y.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){return Qe(this.getAttribute(y.ASSET_START_TIME))}set assetStartTime(t){t==null?this.removeAttribute(y.ASSET_START_TIME):this.setAttribute(y.ASSET_START_TIME,`${t}`)}get assetEndTime(){return Qe(this.getAttribute(y.ASSET_END_TIME))}set assetEndTime(t){t==null?this.removeAttribute(y.ASSET_END_TIME):this.setAttribute(y.ASSET_END_TIME,`${t}`)}get extraSourceParams(){return this.hasAttribute(k.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(k.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[e,n])=>(t[e]=n,t),{}):XE}set extraSourceParams(t){t==null?this.removeAttribute(k.EXTRA_SOURCE_PARAMS):this.setAttribute(k.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(y.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(y.CUSTOM_DOMAIN,t):this.removeAttribute(y.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Nn(this,y.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(y.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(k.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(k.NO_VOLUME_PREF,""):this.removeAttribute(k.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(k.NO_MUTED_PREF)}set noMutedPref(t){t?this.setAttribute(k.NO_MUTED_PREF,""):this.removeAttribute(k.NO_MUTED_PREF)}get debug(){return Nn(this,y.DEBUG)!=null}set debug(t){t?this.setAttribute(y.DEBUG,""):this.removeAttribute(y.DEBUG)}get disableTracking(){return Nn(this,y.DISABLE_TRACKING)!=null}set disableTracking(t){this.toggleAttribute(y.DISABLE_TRACKING,!!t)}get disableCookies(){return Nn(this,y.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(y.DISABLE_COOKIES,""):this.removeAttribute(y.DISABLE_COOKIES)}get streamType(){var t,e,n;return(n=(e=this.getAttribute(y.STREAM_TYPE))!=null?e:(t=this.media)==null?void 0:t.streamType)!=null?n:j.UNKNOWN}set streamType(t){this.setAttribute(y.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,e,n;return(n=(e=this.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?e:(t=this.mediaController)==null?void 0:t.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?n:j.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(k.DEFAULT_STREAM_TYPE,t):this.removeAttribute(k.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,e;return this.hasAttribute(k.TARGET_LIVE_WINDOW)?+this.getAttribute(k.TARGET_LIVE_WINDOW):(e=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?e:Number.NaN}set targetLiveWindow(t){t==this.targetLiveWindow||Number.isNaN(t)&&Number.isNaN(this.targetLiveWindow)||(t==null?this.removeAttribute(k.TARGET_LIVE_WINDOW):this.setAttribute(k.TARGET_LIVE_WINDOW,""+ +t))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return Qe(Nn(this,y.START_TIME))}set startTime(t){this.setAttribute(y.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(y.PREFER_PLAYBACK);if(t===kr||t===wr)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===kr||t===wr?this.setAttribute(y.PREFER_PLAYBACK,t):this.removeAttribute(y.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){fe(this,ue,En).call(this),this.media?this.media.metadata={...Hm(this),...t}:it("underlying media element missing when trying to set metadata. metadata will not be set.")}get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){fe(this,ue,En).call(this),this.media?this.media._hlsConfig=t:it("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.")}async addCuePoints(t){var e;if(fe(this,ue,En).call(this),this.media)return(e=this.media)==null?void 0:e.addCuePoints(t);it("underlying media element missing when trying to addCuePoints. cuePoints will not be added.")}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,e;return(e=(t=this.media)==null?void 0:t.cuePoints)!=null?e:[]}addChapters(t){var e;if(fe(this,ue,En).call(this),this.media)return(e=this.media)==null?void 0:e.addChapters(t);it("underlying media element missing when trying to addChapters. chapters will not be added.")}get activeChapter(){var t;return(t=this.media)==null?void 0:t.activeChapter}get chapters(){var t,e;return(e=(t=this.media)==null?void 0:t.chapters)!=null?e:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(k.PLAYBACK_TOKEN),e=this.getAttribute(k.DRM_TOKEN),n=this.getAttribute(k.THUMBNAIL_TOKEN),i=this.getAttribute(k.STORYBOARD_TOKEN);return{...Q(this,ko),...t!=null?{playback:t}:{},...e!=null?{drm:e}:{},...n!=null?{thumbnail:n}:{},...i!=null?{storyboard:i}:{}}}set tokens(t){qt(this,ko,t??{})}get playbackToken(){var t;return(t=this.getAttribute(k.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(k.PLAYBACK_TOKEN,`${t}`)}get drmToken(){var t;return(t=this.getAttribute(k.DRM_TOKEN))!=null?t:void 0}set drmToken(t){this.setAttribute(k.DRM_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(k.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(k.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(k.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(k.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,e,n,i){var a;let r=(a=this.media)==null?void 0:a.nativeEl;if(r)return ju(r,t,e,n,i)}removeTextTrack(t){var e;let n=(e=this.media)==null?void 0:e.nativeEl;if(n)return function(i,a){let r=Array.prototype.find.call(i.querySelectorAll("track"),s=>s.track===a);r?.remove()}(n,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}get castReceiver(){var t;return(t=this.getAttribute(k.CAST_RECEIVER))!=null?t:void 0}set castReceiver(t){t!==this.castReceiver&&(t?this.setAttribute(k.CAST_RECEIVER,t):this.removeAttribute(k.CAST_RECEIVER))}get castCustomData(){var t;return(t=this.media)==null?void 0:t.castCustomData}set castCustomData(t){this.media?this.media.castCustomData=t:it("underlying media element missing when trying to set castCustomData. castCustomData will not be set.")}get noTooltips(){return this.hasAttribute(k.NO_TOOLTIPS)}set noTooltips(t){t?this.setAttribute(k.NO_TOOLTIPS,""):this.removeAttribute(k.NO_TOOLTIPS)}get proudlyDisplayMuxBadge(){return this.hasAttribute(k.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(t){t?this.setAttribute(k.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(k.PROUDLY_DISPLAY_MUX_BADGE)}},kb=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends kb{}globalThis.DocumentFragment=t}var JE=class extends kb{},e0={customElements:{get(t){},define(t,e,n){},getName:t=>null,upgrade(t){},whenDefined:t=>Promise.resolve(JE)}},ed=typeof window>"u"||globalThis.customElements===void 0?e0:globalThis;ed.customElements.get("mux-player")||(ed.customElements.define("mux-player",Ym),ed.MuxPlayerElement=Ym);var Gm=parseInt(Er.version)>=19,jm={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},t0=(t={})=>{let{ref:e,...n}=t;return Object.entries(n).reduce((i,[a,r])=>{let s=((l,d)=>{if(Gm||typeof d!="boolean"||d){if(((u,c)=>!(m=>m==null)(c)&&u in c)(l,jm))return jm[l];if(d!==void 0)return/[A-Z]/.test(l)?(u=>u.replace(/[A-Z]/g,c=>`-${c.toLowerCase()}`))(l):l}})(a,r);if(!s)return i;let o=(l=>Gm||typeof l!="boolean"?l:"")(r);return i[s]=o,i},{})};function Qm(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function n0(...t){return yr.useCallback(function(...e){return n=>{let i=!1,a=e.map(r=>{let s=Qm(r,n);return!i&&typeof s=="function"&&(i=!0),s});if(i)return()=>{for(let r=0;r<a.length;r++){let s=a[r];typeof s=="function"?s():Qm(e[r],null)}}}}(...t),t)}var i0=Object.prototype.hasOwnProperty,wb=(t,e,n)=>!((i,a)=>{if(Object.is(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;if(Array.isArray(i))return!(!Array.isArray(a)||i.length!==a.length)&&i.some((o,l)=>a[l]===o);let r=Object.keys(i),s=Object.keys(a);if(r.length!==s.length)return!1;for(let o=0;o<r.length;o++)if(!i0.call(a,r[o])||!Object.is(i[r[o]],a[r[o]]))return!1;return!0})(e,t[n]),a0=(t,e,n)=>{t[n]=e},kt=(t,e,n,i=a0,a=wb)=>yr.useEffect(()=>{let r=n?.current;r&&a(r,e,t)&&i(r,e,t)},[n?.current,e]),r0=(()=>{try{return"3.10.1"}catch{}return"UNKNOWN"})(),se=(t,e,n)=>yr.useEffect(()=>{let i=e?.current;if(!i||!n)return;let a=t,r=n;return i.addEventListener(a,r),()=>{i.removeEventListener(a,r)}},[e?.current,n,t]),s0=Er.forwardRef(({children:t,...e},n)=>Er.createElement("mux-player",{suppressHydrationWarning:!0,...t0(e),ref:n},t)),o0=r0,l0="mux-player-react",v0=Er.forwardRef((t,e)=>{var n;let i=yr.useRef(null),a=n0(i,e),[r]=((o,l)=>{let{onAbort:d,onCanPlay:u,onCanPlayThrough:c,onEmptied:m,onLoadStart:p,onLoadedData:v,onLoadedMetadata:b,onProgress:f,onDurationChange:T,onVolumeChange:A,onRateChange:E,onResize:_,onWaiting:w,onPlay:I,onPlaying:D,onTimeUpdate:V,onPause:$,onSeeking:F,onSeeked:re,onStalled:oe,onSuspend:J,onEnded:ee,onError:Ne,onCuePointChange:He,onChapterChange:Ee,metadata:de,tokens:qe,paused:Yt,playbackId:Gt,playbackRates:yt,currentTime:Ke,themeProps:Oe,extraSourceParams:st,castCustomData:Dn,_hlsConfig:Cr,...Dr}=l;return kt("tokens",qe,o),kt("playbackId",Gt,o),kt("playbackRates",yt,o),kt("metadata",de,o),kt("extraSourceParams",st,o),kt("_hlsConfig",Cr,o),kt("themeProps",Oe,o),kt("castCustomData",Dn,o),kt("paused",Yt,o,(ot,_t)=>{_t!=null&&(_t?ot.pause():ot.play())},(ot,_t,pa)=>!(ot.hasAttribute("autoplay")&&!ot.hasPlayed)&&wb(ot,_t,pa)),kt("currentTime",Ke,o,(ot,_t)=>{_t!=null&&(ot.currentTime=_t)}),se("abort",o,d),se("canplay",o,u),se("canplaythrough",o,c),se("emptied",o,m),se("loadstart",o,p),se("loadeddata",o,v),se("loadedmetadata",o,b),se("progress",o,f),se("durationchange",o,T),se("volumechange",o,A),se("ratechange",o,E),se("resize",o,_),se("waiting",o,w),se("play",o,I),se("playing",o,D),se("timeupdate",o,V),se("pause",o,$),se("seeking",o,F),se("seeked",o,re),se("stalled",o,oe),se("suspend",o,J),se("ended",o,ee),se("error",o,Ne),se("cuepointchange",o,He),se("chapterchange",o,Ee),[Dr]})(i,t),[s]=yr.useState((n=t.playerInitTime)!=null?n:zu());return Er.createElement(s0,{ref:a,defaultHiddenCaptions:t.defaultHiddenCaptions,playerSoftwareName:l0,playerSoftwareVersion:o0,playerInitTime:s,...r})});export{h0 as MaxResolution,C as MediaError,m0 as MinResolution,p0 as RenditionOrder,v0 as default,zu as generatePlayerInitTime,l0 as playerSoftwareName,o0 as playerSoftwareVersion};
|