1import{a as qr,r as Yr}from"./typography-C5LMSFAT.js";import{H as ef}from"./hls-zzqWCr54.js";import{C as pn,M as tf}from"./mixin-DQgBe0Xc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"bb7bd624a8a3321ff6d1587f421551039a69f342"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="b1f914e1-02f0-415c-9f60-f79c7cd1cbfa",t._sentryDebugIdIdentifier="sentry-dbid-b1f914e1-02f0-415c-9f60-f79c7cd1cbfa")})()}catch{}var af=Object.create,Fh=Object.defineProperty,rf=Object.getOwnPropertyDescriptor,nf=Object.getOwnPropertyNames,sf=Object.getPrototypeOf,of=Object.prototype.hasOwnProperty,Kh=function(t,e){return function(){return t&&(e=t(t=0)),e}},He=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},lf=function(t,e,i,a){if(e&&typeof e=="object"||typeof e=="function")for(var r=nf(e),n=0,s=r.length,o;n<s;n++)o=r[n],!of.call(t,o)&&o!==i&&Fh(t,o,{get:function(l){return e[l]}.bind(null,o),enumerable:!(a=rf(e,o))||a.enumerable});return t},st=function(t,e,i){return i=t!=null?af(sf(t)):{},lf(!t||!t.__esModule?Fh(i,"default",{value:t,enumerable:!0}):i,t)},Kt=He(function(t,e){var i;typeof window<"u"?i=window:typeof global<"u"?i=global:typeof self<"u"?i=self:i={},e.exports=i});function ea(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):ea(t,e)}var ta=Kh(function(){ta()});function Vh(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var qh=Kh(function(){}),Yh=He(function(t,e){var i=Array.prototype.slice;e.exports=a;function a(r,n){for(("length"in r)||(r=[r]),r=i.call(r);r.length;){var s=r.shift(),o=n(s);if(o)return o;s.childNodes&&s.childNodes.length&&(r=i.call(s.childNodes).concat(r))}}}),df=He(function(t,e){ta(),e.exports=i;function i(a,r){if(!ea(this,i))return new i(a,r);this.data=a,this.nodeValue=a,this.length=a.length,this.ownerDocument=r||null}i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),uf=He(function(t,e){ta(),e.exports=i;function i(a,r){if(!ea(this,i))return new i(a);this.data=a||"",this.length=this.data.length,this.ownerDocument=r||null}i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(a,r,n){var s=this.data,o=s.substring(0,a),l=s.substring(a+r,s.length);this.data=o+n+l,this.length=this.data.length}}),Gh=He(function(t,e){e.exports=i;function i(a){var r=this,n=a.type;a.target||(a.target=r),r.listeners||(r.listeners={});var s=r.listeners[n];if(s)return s.forEach(function(o){a.currentTarget=r,typeof o=="function"?o(a):o.handleEvent(a)});r.parentNode&&r.parentNode.dispatchEvent(a)}}),Qh=He(function(t,e){e.exports=i;function i(a,r){var n=this;n.listeners||(n.listeners={}),n.listeners[a]||(n.listeners[a]=[]),n.listeners[a].indexOf(r)===-1&&n.listeners[a].push(r)}}),jh=He(function(t,e){e.exports=i;function i(a,r){var n=this;if(n.listeners&&n.listeners[a]){var s=n.listeners[a],o=s.indexOf(r);o!==-1&&s.splice(o,1)}}}),cf=He(function(t,e){qh(),e.exports=a;var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function a(h){switch(h.nodeType){case 3:return m(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(h){var c=[],v=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(v=v.toLowerCase()),c.push("<"+v+d(h)+o(h)),i.indexOf(v)>-1?c.push(" />"):(c.push(">"),h.childNodes.length?c.push.apply(c,h.childNodes.map(a)):h.textContent||h.innerText?c.push(m(h.textContent||h.innerText)):h.innerHTML&&c.push(h.innerHTML),c.push("</"+v+">")),c.join("")}function n(h,c){var v=Vh(h[c]);return c==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(c)&&(v==="string"||v==="boolean"||v==="number")&&c!=="nodeName"&&c!=="className"&&c!=="tagName"&&c!=="textContent"&&c!=="innerText"&&c!=="namespaceURI"&&c!=="innerHTML"}function s(h){if(typeof h=="string")return h;var c="";
vendor: 5,968 bytes, line 1
1return Object.keys(h).forEach(function(v){var g=h[v];v=v.replace(/[A-Z]/g,function(_){return"-"+_.toLowerCase()}),c+=v+":"+g+";"}),c}function o(h){var c=h.dataset,v=[];for(var g in c)v.push({name:"data-"+g,value:c[g]});return v.length?l(v):""}function l(h){var c=[];return h.forEach(function(v){var g=v.name,_=v.value;g==="style"&&(_=s(_)),c.push(g+'="'+p(_)+'"')}),c.length?" "+c.join(" "):""}function d(h){var c=[];for(var v in h)n(h,v)&&c.push({name:v,value:h[v]});for(var g in h._attributes)for(var _ in h._attributes[g]){var y=h._attributes[g][_],T=(y.prefix?y.prefix+":":"")+_;c.push({name:T,value:y.value})}return h.className&&c.push({name:"class",value:h.className}),c.length?l(c):""}function m(h){var c="";return typeof h=="string"?c=h:h&&(c=h.toString()),c.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function p(h){return m(h).replace(/"/g,""")}}),Zh=He(function(t,e){ta();var i=Yh(),a=Gh(),r=Qh(),n=jh(),s=cf(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,m,p){if(!ea(this,l))return new l(d);var h=p===void 0?o:p||null;this.tagName=h===o?String(d).toUpperCase():d,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=m||null,this.namespaceURI=h,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}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,m){d.parentNode&&d.parentNode.removeChild(d);var p=this.childNodes.indexOf(m);return m.parentNode=null,this.childNodes[p]=d,d.parentNode=this,m},l.prototype.removeChild=function(d){var m=this.childNodes.indexOf(d);return this.childNodes.splice(m,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,m){d.parentNode&&d.parentNode.removeChild(d);var p=m==null?-1:this.childNodes.indexOf(m);return p>-1?this.childNodes.splice(p,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,m,p){var h=null,c=m,v=m.indexOf(":");if(v>-1&&(h=m.substr(0,v),c=m.substr(v+1)),this.tagName==="INPUT"&&m==="type")this.type=p;else{var g=this._attributes[d]||(this._attributes[d]={});g[c]={value:p,prefix:h}}},l.prototype.getAttributeNS=function(d,m){var p=this._attributes[d],h=p&&p[m]&&p[m].value;return this.tagName==="INPUT"&&m==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,m){var p=this._attributes[d];p&&delete p[m]},l.prototype.hasAttributeNS=function(d,m){var p=this._attributes[d];return!!p&&m in p},l.prototype.setAttribute=function(d,m){return this.setAttributeNS(null,d,m)},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=n,l.prototype.addEventListener=r,l.prototype.dispatchEvent=a,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(d){var m=d.split(" "),p=[];return i(this,function(h){if(h.nodeType===1){var c=h.className||"",v=c.split(" ");m.every(function(g){return v.indexOf(g)!==-1})&&p.push(h)}}),p},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var m=[];return i(this.childNodes,function(p){p.nodeType===1&&(d==="*"||p.tagName.toLowerCase()===d)&&m.push(p)}),m},l.prototype.contains=function(d){return i(this,function(m){return d===m})||!1}}),hf=He(function(t,e){ta();var i=Zh();e.exports=a;function a(r){if(!ea(this,a))return new a;this.childNodes=[],this.parentNode=null,this.ownerDocument=r||null}a.prototype.type="DocumentFragment",a.prototype.nodeType=11,a.prototype.nodeName="#document-fragment",a.prototype.appendChild=i.prototype.appendChild,a.prototype.replaceChild=i.prototype.replaceChild,a.prototype.removeChild=i.prototype.removeChild,a.prototype.toString=function(){return this.childNodes.map(function(r){return String(r)}).join("")}}),mf=He(function(t,e){e.exports=i;function i(a){}i.prototype.initEvent=function(a,r,n){this.type=a,this.bubbles=r,this.cancelable=n},i.prototype.preventDefault=function(){}}),pf=He(function(t,e){ta();var i=Yh(),a=df(),r=uf(),n=Zh(),s=hf(),o=mf(),l=Gh(),d=Qh(),m=jh();e.exports=p;function p(){if(!ea(this,p))return new p;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}var h=p.prototype;h.createTextNode=function(c){return new r(c,this)},h.createElementNS=function(c,v){var g=c===null?null:String(c);return new n(v,this,g)},h.createElement=function(c){return new n(c,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(c){return new o(c)},h.createComment=function(c){return new a(c,this)},h.getElementById=function(c){c=String(c);var v=i(this.childNodes,function(g){if(String(g.id)===c)return g});return v||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=m,h.addEventListener=d,h.dispatchEvent=l}),vf=He(function(t,e){var i=pf();e.exports=new i}),zh=He(function(t,e){var i=typeof global<"u"?global:typeof window<"u"?window:{},a=vf(),r;typeof document<"u"?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a)),e.exports=r});function ff(t){if(Array.isArray(t))return t}function Ef(t,e){var i=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a=[],r=!0,n=!1,s,o;try{for(i=i.call(t);!(r=(s=i.next()).done)&&(a.push(s.value),!(e&&a.length===e));r=!0);}catch(l){n=!0,o=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(n)throw o}}return a}}
vendor: 26,868 bytes, lines 1-14
1function _f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dl(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}function Xh(t,e){if(t){if(typeof t=="string")return dl(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return dl(t,e)}}function ti(t,e){return ff(t)||Ef(t,e)||Xh(t,e)||_f()}var Nr=st(Kt()),sc=st(Kt()),bf=st(Kt()),gf={now:function(){var t=bf.default.performance,e=t&&t.timing,i=e&&e.navigationStart,a=typeof i=="number"&&typeof t.now=="function"?i+t.now():Date.now();return Math.round(a)}},Ie=gf,Gr=function(){var t,e,i;if(typeof((t=sc.default.crypto)===null||t===void 0?void 0:t.getRandomValues)=="function"){i=new Uint8Array(32),sc.default.crypto.getRandomValues(i);for(var a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=Math.random()*16|0}var n=0;e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(l){var d=l==="x"?i[n]:i[n]&3|8;return n++,d.toString(16)});var s=Ie.now(),o=s?.toString(16).substring(3);return o?e.substring(0,28)+o:e},Jh=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},ct=function(t){if(t&&typeof t.nodeName<"u")return t.muxId||(t.muxId=Jh()),t.muxId;var e;try{e=document.querySelector(t)}catch{}return e&&!e.muxId&&(e.muxId=t),e?.muxId||t},Ws=function(t){var e;t&&typeof t.nodeName<"u"?(e=t,t=ct(e)):e=document.querySelector(t);var i=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,t,i]};function yf(t){if(Array.isArray(t))return dl(t)}function Tf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Af(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ht(t){return yf(t)||Tf(t)||Xh(t)||Af()}var Hi={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},kf=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,i,a,r,n,s,o=[console,t],l=(i=console.trace).bind.apply(i,ht(o)),d=(a=console.info).bind.apply(a,ht(o)),m=(r=console.debug).bind.apply(r,ht(o)),p=(n=console.warn).bind.apply(n,ht(o)),h=(s=console.error).bind.apply(s,ht(o)),c=e;return{trace:function(){for(var v=arguments.length,g=new Array(v),_=0;_<v;_++)g[_]=arguments[_];if(!(c>Hi.TRACE))return l.apply(void 0,ht(g))},debug:function(){for(var v=arguments.length,g=new Array(v),_=0;_<v;_++)g[_]=arguments[_];if(!(c>Hi.DEBUG))return m.apply(void 0,ht(g))},info:function(){for(var v=arguments.length,g=new Array(v),_=0;_<v;_++)g[_]=arguments[_];if(!(c>Hi.INFO))return d.apply(void 0,ht(g))},warn:function(){for(var v=arguments.length,g=new Array(v),_=0;_<v;_++)g[_]=arguments[_];if(!(c>Hi.WARN))return p.apply(void 0,ht(g))},error:function(){for(var v=arguments.length,g=new Array(v),_=0;_<v;_++)g[_]=arguments[_];if(!(c>Hi.ERROR))return h.apply(void 0,ht(g))},get level(){return c},set level(v){v!==this.level&&(c=v??e)}}},ee=kf("[mux]"),Uo=st(Kt());function ul(){var t=Uo.default.doNotTrack||Uo.default.navigator&&Uo.default.navigator.doNotTrack;return t==="1"}function N(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}ta();function Te(t,e){if(!ea(t,e))throw new TypeError("Cannot call a class as a function")}function Sf(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function Vt(t,e,i){return e&&Sf(t.prototype,e),t}function w(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fa(t)}function wf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Fa(t),t!==null););return t}function Mn(t,e,i){return typeof Reflect<"u"&&Reflect.get?Mn=Reflect.get:Mn=function(a,r,n){var s=wf(a,r);if(s){var o=Object.getOwnPropertyDescriptor(s,r);return o.get?o.get.call(n||a):o.value}},Mn(t,e,i||t)}function cl(t,e){return cl=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},cl(t,e)}function If(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cl(t,e)}function Rf(t,e){if(t==null)return{};var i={},a=Object.keys(t),r,n;for(n=0;n<a.length;n++)r=a[n],!(e.indexOf(r)>=0)&&(i[r]=t[r]);return i}function Cf(t,e){if(t==null)return{};var i=Rf(t,e),a,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(r=0;r<n.length;r++)a=n[r],!(e.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(i[a]=t[a])}return i}function Lf(){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}}qh();function Df(t,e){return e&&(Vh(e)==="object"||typeof e=="function")?e:N(t)}function Mf(t){var e=Lf();return function(){var i=Fa(t),a;if(e){var r=Fa(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Df(this,a)}}var Et=function(t){return Qr(t)[0]},Qr=function(t){if(typeof t!="string"||t==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,i=t.match(e)||[],a=i[4],r;return a&&(r=(a.match(/[^\.]+\.[^\.]+$/)||[])[0]),[a,r]},Ho=st(Kt()),xf={exists:function(){var t=Ho.default.performance,e=t&&t.timing;return e!==void 0},domContentLoadedEventEnd:function(){var t=Ho.default.performance,e=t&&t.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var t=Ho.default.performance,e=t&&t.timing;return e&&e.navigationStart}},Fs=xf;function ge(t,e,i){i=i===void 0?1:i,t[e]=t[e]||0,t[e]+=i}function Ks(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},a=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(i).filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable}))),a.forEach(function(r){w(t,r,i[r])})}return t}function Of(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);i.push.apply(i,a)}return i}function kd(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Of(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}var Nf=["x-cdn","content-type"],em=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],Pf=Nf.concat(em);function Sd(t){t=t||"";var e={},i=t.trim().split(/[\r\n]+/);return i.forEach(function(a){if(a){var r=a.split(": "),n=r.shift();n&&(Pf.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=r.join(": "))}}),e}function Vs(t){if(t){var e=em.find(function(i){return t[i]!==void 0});return e?t[e]:void 0}}var $f=function(t){var e={};for(var i in t){var a=t[i],r=a["DATA-ID"].search("io.litix.data.");if(r!==-1){var n=a["DATA-ID"].replace("io.litix.data.","");e[n]=a.VALUE}}return e},tm=$f,vn=function(t){if(!t)return{};var e=Fs.navigationStart(),i=t.loading,a=i?i.start:t.trequest,r=i?i.first:t.tfirst,n=i?i.end:t.tload;return{bytesLoaded:t.total,requestStart:Math.round(e+a),responseStart:Math.round(e+r),responseEnd:Math.round(e+n)}},tr=function(t){if(!(!t||typeof t.getAllResponseHeaders!="function"))return Sd(t.getAllResponseHeaders())},Uf=function(t,e,i){var a=arguments.length>4?arguments[4]:void 0,r=t.log,n=t.utils.secondsToMs,s=function(_){var y=parseInt(a.version),T;return y===1&&_.programDateTime!==null&&(T=_.programDateTime),y===0&&_.pdt!==null&&(T=_.pdt),T};if(!Fs.exists()){r.warn("performance timing not supported. Not tracking HLS.js.");return}var o=function(_,y){return t.emit(e,_,y)},l=function(_,y){var T=y.levels,E=y.audioTracks,k=y.url,L=y.stats,O=y.networkDetails,H=y.sessionData,Y={},X={};T.forEach(function(he,Oe){Y[Oe]={width:he.width,height:he.height,bitrate:he.bitrate,attrs:he.attrs}}),E.forEach(function(he,Oe){X[Oe]={name:he.name,language:he.lang,bitrate:he.bitrate}});var K=vn(L),P=K.bytesLoaded,De=K.requestStart,Be=K.responseStart,We=K.responseEnd;o("requestcompleted",kd(Ks({},tm(H)),{request_event_type:_,request_bytes_loaded:P,request_start:De,request_response_start:Be,request_response_end:We,request_type:"manifest",request_hostname:Et(k),request_response_headers:tr(O),request_rendition_lists:{media:Y,audio:X,video:{}}}))};i.on(a.Events.MANIFEST_LOADED,l);var d=function(_,y){var T=y.details,E=y.level,k=y.networkDetails,L=y.stats,O=vn(L),H=O.bytesLoaded,Y=O.requestStart,X=O.responseStart,K=O.responseEnd,P=T.fragments[T.fragments.length-1],De=s(P)+n(P.duration);o("requestcompleted",{request_event_type:_,request_bytes_loaded:H,request_start:Y,request_response_start:X,request_response_end:K,request_current_level:E,request_type:"manifest",request_hostname:Et(T.url),request_response_headers:tr(k),video_holdback:T.holdBack&&n(T.holdBack),video_part_holdback:T.partHoldBack&&n(T.partHoldBack),video_part_target_duration:T.partTarget&&n(T.partTarget),video_target_duration:T.targetduration&&n(T.targetduration),video_source_is_live:T.live,player_manifest_newest_program_time:isNaN(De)?void 0:De})};i.on(a.Events.LEVEL_LOADED,d);var m=function(_,y){var T=y.details,E=y.networkDetails,k=y.stats,L=vn(k),O=L.bytesLoaded,H=L.requestStart,Y=L.responseStart,X=L.responseEnd;o("requestcompleted",{request_event_type:_,request_bytes_loaded:O,request_start:H,request_response_start:Y,request_response_end:X,request_type:"manifest",request_hostname:Et(T.url),request_response_headers:tr(E)})};i.on(a.Events.AUDIO_TRACK_LOADED,m);var p=function(_,y){var T=y.stats,E=y.networkDetails,k=y.frag;T=T||k.stats;var L=vn(T),O=L.bytesLoaded,H=L.requestStart,Y=L.responseStart,X=L.responseEnd,K=E?tr(E):void 0,P={request_event_type:_,request_bytes_loaded:O,request_start:H,request_response_start:Y,request_response_end:X,request_hostname:E?Et(E.responseURL):void 0,request_id:K?Vs(K):void 0,request_response_headers:K,request_media_duration:k.duration,request_url:E?.responseURL};k.type==="main"?(P.request_type="media",P.request_current_level=k.level,P.request_video_width=(i.levels[k.level]||{}).width,P.request_video_height=(i.levels[k.level]||{}).height,P.request_labeled_bitrate=(i.levels[k.level]||{}).bitrate):P.request_type=k.type,o("requestcompleted",P)};i.on(a.Events.FRAG_LOADED,p);var h=function(_,y){var T=y.frag,E=T.start,k=s(T),L={currentFragmentPDT:k,currentFragmentStart:n(E)};o("fragmentchange",L)};i.on(a.Events.FRAG_CHANGED,h);var c=function(_,y){var T=y.type,E=y.details,k=y.response,L=y.fatal,O=y.frag,H=y.networkDetails,Y=O?.url||y.url||"",X=H?tr(H):void 0;if((E===a.ErrorDetails.MANIFEST_LOAD_ERROR||E===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||E===a.ErrorDetails.FRAG_LOAD_ERROR||E===a.ErrorDetails.FRAG_LOAD_TIMEOUT||E===a.ErrorDetails.LEVEL_LOAD_ERROR||E===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||E===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||E===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||E===a.ErrorDetails.SUBTITLE_LOAD_ERROR||E===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||E===a.ErrorDetails.KEY_LOAD_ERROR||E===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:E,request_url:Y,request_hostname:Et(Y),request_id:X?Vs(X):void 0,request_type:E===a.ErrorDetails.FRAG_LOAD_ERROR||E===a.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":E===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||E===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":E===a.ErrorDetails.SUBTITLE_LOAD_ERROR||E===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":E===a.ErrorDetails.KEY_LOAD_ERROR||E===a.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:k?.code,request_error_text:k?.text}),L){var K,P="".concat(Y?"url: ".concat(Y,` 4`):"")+"".concat(k&&(k.code||k.text)?"response: ".concat(k.code,", ").concat(k.text,` 5`):"")+"".concat(y.reason?"failure reason: ".concat(y.reason,` 6`):"")+"".concat(y.level?"level: ".concat(y.level,` 7`):"")+"".concat(y.parent?"parent stream controller: ".concat(y.parent,` 8`):"")+"".concat(y.buffer?"buffer length: ".concat(y.buffer,` 9`):"")+"".concat(y.error?"error: ".concat(y.error,` 10`):"")+"".concat(y.event?"event: ".concat(y.event,` 11`):"")+"".concat(y.err?"error message: ".concat((K=y.err)===null||K===void 0?void 0:K.message,` 12`):"");o("error",{player_error_code:T,player_error_message:E,player_error_context:P})}};i.on(a.Events.ERROR,c);var v=function(_,y){var T=y.frag,E=T&&T._url||"";o("requestcanceled",{request_event_type:_,request_url:E,request_type:"media",request_hostname:Et(E)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v);var g=function(_,y){var T=y.level,E=i.levels[T];if(E&&E.attrs&&E.attrs.BANDWIDTH){var k=E.attrs.BANDWIDTH,L,O=parseFloat(E.attrs["FRAME-RATE"]);isNaN(O)||(L=O),k?o("renditionchange",{video_source_fps:L,video_source_bitrate:k,video_source_width:E.width,video_source_height:E.height,video_source_rendition_name:E.name,video_source_codec:E?.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(a.Events.LEVEL_SWITCHED,g),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,m),i.off(a.Events.FRAG_LOADED,p),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,c),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v),i.off(a.Events.LEVEL_SWITCHED,g),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},Hf=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},oc=function(t,e){if(!t||!t.requestEndDate)return{};var i=Et(t.url),a=t.url,r=t.bytesLoaded,n=new Date(t.requestStartDate).getTime(),s=new Date(t.firstByteDate).getTime(),o=new Date(t.requestEndDate).getTime(),l=isNaN(t.duration)?0:t.duration,d=typeof e.getMetricsFor=="function"?e.getMetricsFor(t.mediaType).HttpList:e.getDashMetrics().getHttpRequests(t.mediaType),m;d.length>0&&(m=Sd(d[d.length-1]._responseHeaders||""));var p=m?Vs(m):void 0;return{requestStart:n,requestResponseStart:s,requestResponseEnd:o,requestBytesLoaded:r,requestResponseHeaders:m,requestMediaDuration:l,requestHostname:i,requestUrl:a,requestId:p}},Bf=function(t,e){var i=e.getQualityFor(t),a=e.getCurrentTrackFor(t).bitrateList;return a?{currentLevel:i,renditionWidth:a[i].width||null,renditionHeight:a[i].height||null,renditionBitrate:a[i].bandwidth}:{}},Wf=function(t){var e;return(e=t.match(/.*codecs\*?="(.*)"/))===null||e===void 0?void 0:e[1]},Ff=function(t){try{var e,i,a=(i=t.getVersion)===null||i===void 0||(e=i.call(t))===null||e===void 0?void 0:e.split(".").map(function(r){return parseInt(r)})[0];return a}catch{return!1}},Kf=function(t,e,i){var a=t.log;if(!i||!i.on){a.warn("Invalid dash.js player reference. Monitoring blocked.");return}var r=Ff(i),n=function(T,E){return t.emit(e,T,E)},s=function(T){var E=T.type,k=T.data,L=(k||{}).url;n("requestcompleted",{request_event_type:E,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:Et(L),request_url:L})};i.on("manifestLoaded",s);var o={},l=function(T){if(typeof T.getRequests!="function")return null;var E=T.getRequests({state:"executed"});return E.length===0?null:E[E.length-1]},d=function(T){var E=T.type,k=T.fragmentModel,L=T.chunk,O=l(k);m({type:E,request:O,chunk:L})},m=function(T){var E=T.type,k=T.chunk,L=T.request,O=(k||{}).mediaInfo,H=O||{},Y=H.type,X=H.bitrateList;X=X||[];var K={};X.forEach(function(Fe,Ae){K[Ae]={},K[Ae].width=Fe.width,K[Ae].height=Fe.height,K[Ae].bitrate=Fe.bandwidth,K[Ae].attrs={}}),Y==="video"?o.video=K:Y==="audio"?o.audio=K:o.media=K;var P=oc(L,i),De=P.requestStart,Be=P.requestResponseStart,We=P.requestResponseEnd,he=P.requestResponseHeaders,Oe=P.requestMediaDuration,gt=P.requestHostname,Ne=P.requestUrl,lt=P.requestId;n("requestcompleted",{request_event_type:E,request_start:De,request_response_start:Be,request_response_end:We,request_bytes_loaded:-1,request_type:Y+"_init",request_response_headers:he,request_hostname:gt,request_id:lt,request_url:Ne,request_media_duration:Oe,request_rendition_lists:o})};r>=4?i.on("initFragmentLoaded",m):i.on("initFragmentLoaded",d);var p=function(T){var E=T.type,k=T.fragmentModel,L=T.chunk,O=l(k);h({type:E,request:O,chunk:L})},h=function(T){var E=T.type,k=T.chunk,L=T.request,O=k||{},H=O.mediaInfo,Y=O.start,X=H||{},K=X.type,P=oc(L,i),De=P.requestStart,Be=P.requestResponseStart,We=P.requestResponseEnd,he=P.requestBytesLoaded,Oe=P.requestResponseHeaders,gt=P.requestMediaDuration,Ne=P.requestHostname,lt=P.requestUrl,Fe=P.requestId,Ae=Bf(K,i),Ke=Ae.currentLevel,Xe=Ae.renditionWidth,ia=Ae.renditionHeight,mn=Ae.renditionBitrate;n("requestcompleted",{request_event_type:E,request_start:De,request_response_start:Be,request_response_end:We,request_bytes_loaded:he,request_type:K,request_response_headers:Oe,request_hostname:Ne,request_id:Fe,request_url:lt,request_media_start_time:Y,request_media_duration:gt,request_current_level:Ke,request_labeled_bitrate:mn,request_video_width:Xe,request_video_height:ia})};r>=4?i.on("mediaFragmentLoaded",h):i.on("mediaFragmentLoaded",p);var c={video:void 0,audio:void 0,totalBitrate:void 0},v=function(){if(c.video&&typeof c.video.bitrate=="number"){if(!(c.video.width&&c.video.height)){a.warn("have bitrate info for video but missing width/height");return}var T=c.video.bitrate;if(c.audio&&typeof c.audio.bitrate=="number"&&(T+=c.audio.bitrate),T!==c.totalBitrate)return c.totalBitrate=T,{video_source_bitrate:T,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:Wf(c.video.codec)}}},g=function(T,E,k){if(typeof T.newQuality!="number"){a.warn("missing evt.newQuality in qualityChangeRendered event",T);return}var L=T.mediaType;if(L==="audio"||L==="video"){var O=i.getBitrateInfoListFor(L).find(function(Y){var X=Y.qualityIndex;return X===T.newQuality});if(!(O&&typeof O.bitrate=="number")){a.warn("missing bitrate info for ".concat(L));return}c[L]=kd(Ks({},O),{codec:i.getCurrentTrackFor(L).codec});var H=v();H&&n("renditionchange",H)}};i.on("qualityChangeRendered",g);var _=function(T){var E=T.request,k=T.mediaType;E=E||{},n("requestcanceled",{request_event_type:E.type+"_"+E.action,request_url:E.url,request_type:k,request_hostname:Et(E.url)})};i.on("fragmentLoadingAbandoned",_);var y=function(T){var E=T.error,k,L,O=(E==null||(k=E.data)===null||k===void 0?void 0:k.request)||{},H=(E==null||(L=E.data)===null||L===void 0?void 0:L.response)||{};E?.code===27&&n("requestfailed",{request_error:O.type+"_"+O.action,request_url:O.url,request_hostname:Et(O.url),request_type:O.mediaType,request_error_code:H.status,request_error_text:H.statusText});var Y="".concat(O!=null&&O.url?"url: ".concat(O.url,` 13`):"")+"".concat(H!=null&&H.status||H!=null&&H.statusText?"response: ".concat(H?.status,", ").concat(H?.statusText,` 14`):"");n("error",{player_error_code:E?.code,player_error_message:E?.message,player_error_context:Y})};i.on("error",y),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",m),i.off("mediaFragmentLoaded",h),i.off("qualityChangeRendered",g),i.off("error",y),i.off("fragmentLoadingAbandoned",_),delete i._stopMuxMonitor}},Vf=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},lc=0,qf=(function(){function t(){Te(this,t),w(this,"_listeners",void 0)}return Vt(t,[{key:"on",value:function(e,i,a){return i._eventEmitterGuid=i._eventEmitterGuid||++lc,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],a&&(i=i.bind(a)),this._listeners[e].push(i),i}},{key:"off",value:function(e,i){var a=this._listeners&&this._listeners[e];a&&a.forEach(function(r,n){r._eventEmitterGuid===i._eventEmitterGuid&&a.splice(n,1)})}},{key:"one",value:function(e,i,a){var r=this;i._eventEmitterGuid=i._eventEmitterGuid||++lc;var n=function(){r.off(e,n),i.apply(a||this,arguments)};n._eventEmitterGuid=i._eventEmitterGuid,this.on(e,n)}},{key:"emit",value:function(e,i){var a=this;if(this._listeners){i=i||{};var r=this._listeners["before"+e]||[],n=this._listeners["before*"]||[],s=this._listeners[e]||[],o=this._listeners["after"+e]||[],l=function(d,m){d=d.slice(),d.forEach(function(p){p.call(a,{type:e},m)})};l(r,i),l(n,i),l(s,i),l(o,i)}}}]),t})(),Yf=qf,Bo=st(Kt()),Gf=(function(){function t(e){var i=this;Te(this,t),w(this,"_playbackHeartbeatInterval",void 0),w(this,"_playheadShouldBeProgressing",void 0),w(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",function(){i._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?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),e.on("timeupdate",function(){i._playbackHeartbeatInterval!==null&&e.emit("playbackheartbeat")}),e.on("devicesleep",function(a,r){i._playbackHeartbeatInterval!==null&&(Bo.default.clearInterval(i._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:r.viewer_time}),i._playbackHeartbeatInterval=null)})}return Vt(t,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Bo.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(Bo.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),t})(),Qf=Gf,jf=function t(e){var i=this;Te(this,t),w(this,"viewErrored",void 0),e.on("viewinit",function(){i.viewErrored=!1}),e.on("error",function(a,r){try{var n=e.errorTranslator({player_error_code:r.player_error_code,player_error_message:r.player_error_message,player_error_context:r.player_error_context,player_error_severity:r.player_error_severity,player_error_business_exception:r.player_error_business_exception});n&&(e.data.player_error_code=n.player_error_code||r.player_error_code,e.data.player_error_message=n.player_error_message||r.player_error_message,e.data.player_error_context=n.player_error_context||r.player_error_context,e.data.player_error_severity=n.player_error_severity||r.player_error_severity,e.data.player_error_business_exception=n.player_error_business_exception||r.player_error_business_exception,i.viewErrored=!0)}catch(s){e.mux.log.warn("Exception in error translator callback.",s),i.viewErrored=!0}}),e.on("aftererror",function(){var a,r,n,s,o;(a=e.data)===null||a===void 0||delete a.player_error_code,(r=e.data)===null||r===void 0||delete r.player_error_message,(n=e.data)===null||n===void 0||delete n.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})},Zf=jf,zf=(function(){function t(e){Te(this,t),w(this,"_watchTimeTrackerLastCheckedTime",void 0),w(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 Vt(t,[{key:"_updateWatchTime",value:function(e,i){var a=i.viewer_time;this._watchTimeTrackerLastCheckedTime===null&&(this._watchTimeTrackerLastCheckedTime=a),ge(this.pm.data,"view_watch_time",a-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=a}},{key:"_clearWatchTimeState",value:function(e,i){this._updateWatchTime(e,i),this._watchTimeTrackerLastCheckedTime=null}}]),t})(),Xf=zf,Jf=(function(){function t(e){var i=this;Te(this,t),w(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),w(this,"_lastTime",void 0),w(this,"_isAdPlaying",void 0),w(this,"_callbackUpdatePlaybackTime",void 0),w(this,"pm",void 0),this.pm=e,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=Ie.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,e.on("viewinit",function(){i.pm.data.view_playing_time_ms_cumulative=0});var a=this._startPlaybackTimeTracking.bind(this);e.on("playing",a),e.on("adplaying",a),e.on("seeked",a),e.on("rebufferend",a);var r=this._stopPlaybackTimeTracking.bind(this);e.on("playbackheartbeatend",r),e.on("seeking",r),e.on("rebufferstart",r),e.on("adplaying",function(){i._isAdPlaying=!0}),e.on("adended",function(){i._isAdPlaying=!1}),e.on("adpause",function(){i._isAdPlaying=!1}),e.on("adbreakstart",function(){i._isAdPlaying=!1}),e.on("adbreakend",function(){i._isAdPlaying=!1}),e.on("adplay",function(){i._isAdPlaying=!1}),e.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=Ie.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return Vt(t,[{key:"_startPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime===null&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=Ie.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,i=Ie.now(),a=i-this._lastTime,r=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>
vendor: 12,766 bytes, line 14
14this._playbackTimeTrackerLastPlayheadPosition?r=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(r=a),r>0&&r<=1e3&&ge(this.pm.data,"view_content_playback_time",r),this._callbackUpdatePlaybackTime!==null&&a>0&&a<=1e3&&(this._isAdPlaying&&ge(this.pm.data,"ad_playing_time_ms_cumulative",a),ge(this.pm.data,"view_playing_time_ms_cumulative",a)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=i}}]),t})(),eE=Jf,tE=(function(){function t(e){Te(this,t),w(this,"pm",void 0),this.pm=e;var i=this._updatePlayheadTime.bind(this);e.on("playbackheartbeat",i),e.on("playbackheartbeatend",i),e.on("timeupdate",i),e.on("destroy",function(){e.off("timeupdate",i)})}return Vt(t,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=typeof this.pm.data.view_max_playhead_position>"u"?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,i){var a=this,r=function(){a.pm.currentFragmentPDT&&a.pm.currentFragmentStart&&(a.pm.data.player_program_time=a.pm.currentFragmentPDT+a.pm.data.player_playhead_time-a.pm.currentFragmentStart)};if(i&&i.player_playhead_time)this.pm.data.player_playhead_time=i.player_playhead_time,r(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var n=this.pm.getPlayheadTime();typeof n<"u"&&(this.pm.data.player_playhead_time=n,r(),this._updateMaxPlayheadPosition())}}}]),t})(),iE=tE,dc=300*1e3,aE=function t(e){if(Te(this,t),!e.disableRebufferTracking){var i,a=function(n,s){r(s),i=void 0},r=function(n){if(i){var s=n.viewer_time-i;ge(e.data,"view_rebuffer_duration",s),i=n.viewer_time,e.data.view_rebuffer_duration>dc&&(e.emit("viewend"),e.send("viewend"),e.mux.log.warn("Ending view after rebuffering for longer than ".concat(dc,"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(n,s){return r(s)}),e.on("rebufferstart",function(n,s){i||(ge(e.data,"view_rebuffer_count",1),i=s.viewer_time,e.one("rebufferend",a))}),e.on("viewinit",function(){i=void 0,e.off("rebufferend",a)})}},rE=aE,nE=(function(){function t(e){var i=this;Te(this,t),w(this,"_lastCheckedTime",void 0),w(this,"_lastPlayheadTime",void 0),w(this,"_lastPlayheadTimeUpdatedTime",void 0),w(this,"_rebuffering",void 0),w(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(){i._cleanupRebufferTracker(null,{viewer_time:Ie.now()})}))}return Vt(t,[{key:"_checkIfRebuffering",value:function(e,i){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing){this._cleanupRebufferTracker(e,i);return}if(this._lastCheckedTime===null){this._prepareRebufferTrackerState(i.viewer_time);return}if(this._lastPlayheadTime!==this.pm.data.player_playhead_time){this._cleanupRebufferTracker(e,i,!0);return}var a=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.sustainedRebufferThreshold=="number"&&a>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=i.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,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:i.viewer_time});else{if(this._lastCheckedTime===null)return;var r=this.pm.data.player_playhead_time-this._lastPlayheadTime,n=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.minimumRebufferDuration=="number"&&r>0&&n-r>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+n-r}))}a?this._prepareRebufferTrackerState(i.viewer_time):this._clearRebufferTrackerState()}}]),t})(),sE=nE,oE=(function(){function t(e){var i=this;Te(this,t),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){var a=e.data,r=a.view_id;if(!a.view_program_changed){var n=function(s,o){var l=o.viewer_time;(s.type==="playing"&&typeof e.data.view_time_to_first_frame>"u"||s.type==="adplaying"&&(typeof e.data.view_time_to_first_frame>"u"||i._inPrerollPosition()))&&i.calculateTimeToFirstFrame(l||Ie.now(),r)};e.one("playing",n),e.one("adplaying",n),e.one("viewend",function(){e.off("playing",n),e.off("adplaying",n)})}})}return Vt(t,[{key:"_inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,i){i===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})(),lE=oE,dE=function t(e){var i=this;Te(this,t),w(this,"_lastPlayerHeight",void 0),w(this,"_lastPlayerWidth",void 0),w(this,"_lastPlayheadPosition",void 0),w(this,"_lastSourceHeight",void 0),w(this,"_lastSourceWidth",void 0),e.on("viewinit",function(){i._lastPlayheadPosition=-1});var a=["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"],r=["playing","hb","renditionchange","orientationchange","playbackmodechange"];a.forEach(function(n){e.on(n,function(){if(i._lastPlayheadPosition>=0&&e.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var s=e.data.player_playhead_time-i._lastPlayheadPosition;if(s<0){i._lastPlayheadPosition=-1;return}var o=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),l=Math.max(0,o-1),d=Math.max(0,1-o);e.data.view_max_upscale_percentage=Math.max(e.data.view_max_upscale_percentage||0,l),e.data.view_max_downscale_percentage=Math.max(e.data.view_max_downscale_percentage||0,d),ge(e.data,"view_total_content_playback_time",s),ge(e.data,"view_total_upscaling",l*s),ge(e.data,"view_total_downscaling",d*s)}i._lastPlayheadPosition=-1})}),r.forEach(function(n){e.on(n,function(){i._lastPlayheadPosition=e.data.player_playhead_time,i._lastPlayerWidth=e.data.player_width,i._lastPlayerHeight=e.data.player_height,i._lastSourceWidth=e.data.video_source_width,i._lastSourceHeight=e.data.video_source_height})})},uE=dE,cE=2e3,hE=function t(e){var i=this;Te(this,t),w(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var n=Ie.now(),s=(e.data.viewer_time||n)-(a||n);ge(e.data,"view_seek_duration",s),e.data.view_max_seek_time=Math.max(e.data.view_max_seek_time||0,s),i.isSeeking=!1,a=-1};e.on("seeking",function(n,s){if(Object.assign(e.data,s),i.isSeeking&&s.viewer_time-a<=cE){a=s.viewer_time;return}i.isSeeking&&r(),i.isSeeking=!0,a=s.viewer_time,ge(e.data,"view_seek_count",1),e.send("seeking")}),e.on("seeked",function(){r()}),e.on("viewend",function(){i.isSeeking&&(r(),e.send("seeked")),i.isSeeking=!1,a=-1})},mE=hE,uc=function(t,e){t.push(e),t.sort(function(i,a){return i.viewer_time-a.viewer_time})},pE=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],vE=(function(){function t(e){var i=this;Te(this,t),w(this,"_adHasPlayed",void 0),w(this,"_adRequests",void 0),w(this,"_adResponses",void 0),w(this,"_currentAdRequestNumber",void 0),w(this,"_currentAdResponseNumber",void 0),w(this,"_prerollPlayTime",void 0),w(this,"_wouldBeNewAdPlay",void 0),w(this,"isAdBreak",void 0),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){i.isAdBreak=!1,i._currentAdRequestNumber=0,i._currentAdResponseNumber=0,i._adRequests=[],i._adResponses=[],i._adHasPlayed=!1,i._wouldBeNewAdPlay=!0,i._prerollPlayTime=void 0}),pE.forEach(function(r){return e.on(r,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};e.on("adbreakstart",function(){i.isAdBreak=!0}),e.on("play",a),e.on("playing",a),e.on("viewend",a),e.on("adrequest",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},n),uc(i._adRequests,n),ge(e.data,"view_ad_request_count"),i.inPrerollPosition()&&(e.data.view_preroll_requested=!0,i._adHasPlayed||ge(e.data,"view_preroll_request_count"))}),e.on("adresponse",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},n),uc(i._adResponses,n);var s=i.findAdRequest(n.ad_request_id);s&&ge(e.data,"view_ad_request_time",Math.max(0,n.viewer_time-s.viewer_time))}),e.on("adplay",function(r,n){i._adHasPlayed=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,ge(e.data,"view_ad_played_count")),i.inPrerollPosition()&&!e.data.view_preroll_played&&(e.data.view_preroll_played=!0,i._adRequests.length>0&&(e.data.view_preroll_request_time=Math.max(0,n.viewer_time-i._adRequests[0].viewer_time)),e.data.view_start&&(e.data.view_startup_preroll_request_time=Math.max(0,n.viewer_time-e.data.view_start)),i._prerollPlayTime=n.viewer_time)}),e.on("adplaying",function(r,n){i.inPrerollPosition()&&typeof e.data.view_preroll_load_time>"u"&&typeof i._prerollPlayTime<"u"&&(e.data.view_preroll_load_time=n.viewer_time-i._prerollPlayTime,e.data.view_startup_preroll_load_time=n.viewer_time-i._prerollPlayTime)}),e.on("adclicked",function(r,n){i._wouldBeNewAdPlay||ge(e.data,"view_ad_clicked_count")}),e.on("adskipped",function(r,n){i._wouldBeNewAdPlay||ge(e.data,"view_ad_skipped_count")}),e.on("adended",function(){i._wouldBeNewAdPlay=!0}),e.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return Vt(t,[{key:"inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var i=0;i<this._adRequests.length;i++)if(this._adRequests[i].ad_request_id===e)return this._adRequests[i]}},{key:"_updateAdData",value:function(e,i){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&i.ad_tag_url){var a=ti(Qr(i.ad_tag_url),2),r=a[0],n=a[1];this.pm.data.view_preroll_ad_tag_domain=n,this.pm.data.view_preroll_ad_tag_hostname=r}if(!this.pm.data.view_preroll_ad_asset_hostname&&i.ad_asset_url){var s=ti(Qr(i.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=i?.ad_asset_url,this.pm.data.ad_tag_url=i?.ad_tag_url,this.pm.data.ad_creative_id=i?.ad_creative_id,this.pm.data.ad_id=i?.ad_id,this.pm.data.ad_universal_id=i?.ad_universal_id,i!=null&&i.ad_type&&(this.pm.data.ad_type=i?.ad_type)}}]),t})(),fE=vE,EE=function t(e){var i=this;Te(this,t),w(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=Ie.now(),e.on("before*",r)},r=function(n){var s=Ie.now(),o=i.lastWallClockTime;i.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",a),e.on("playbackheartbeatend",function(){e.off("before*",r),e.one("playbackheartbeat",a)})},_E=EE,Wo=st(Kt()),im=(function(t){return t()})(function(){var t=function(){for(var i=0,a={};i<arguments.length;i++){var r=arguments[i];for(var n in r)a[n]=r[n]}return a};function e(i){function a(r,n,s){var o;if(typeof document<"u"){if(arguments.length>1){if(s=t({path:"/"},a.defaults,s),typeof s.expires=="number"){var l=new Date;l.setMilliseconds(l.getMilliseconds()+s.expires*864e5),s.expires=l}try{o=JSON.stringify(n),/^[\{\[]/.test(o)&&(n=o)}catch{}return i.write?n=i.write(n,r):n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decode
vendor: 19,648 bytes, line 14
14URIComponent),r=encodeURIComponent(String(r)),r=r.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),r=r.replace(/[\(\)]/g,escape),document.cookie=[r,"=",n,s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}r||(o={});for(var d=document.cookie?document.cookie.split("; "):[],m=/(%[0-9A-Z]{2})+/g,p=0;p<d.length;p++){var h=d[p].split("="),c=h.slice(1).join("=");c.charAt(0)==='"'&&(c=c.slice(1,-1));try{var v=h[0].replace(m,decodeURIComponent);if(c=i.read?i.read(c,v):i(c,v)||c.replace(m,decodeURIComponent),this.json)try{c=JSON.parse(c)}catch{}if(r===v){o=c;break}r||(o[v]=c)}catch{}}return o}}return a.set=a,a.get=function(r){return a.call(a,r)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(r,n){a(r,"",t(n,{expires:-1}))},a.withConverter=e,a}return e(function(){})}),am="muxData",bE=function(t){return Object.entries(t).map(function(e){var i=ti(e,2),a=i[0],r=i[1];return"".concat(a,"=").concat(r)}).join("&")},gE=function(t){return t.split("&").reduce(function(e,i){var a=ti(i.split("="),2),r=a[0],n=a[1],s=+n,o=n&&s==n?s:n;return e[r]=o,e},{})},rm=function(){var t;try{t=gE(im.get(am)||"")}catch{t={}}return t},nm=function(t){try{im.set(am,bE(t),{expires:365})}catch{}},yE=function(){var t=rm();return t.mux_viewer_id=t.mux_viewer_id||Gr(),t.msn=t.msn||Math.random(),nm(t),{mux_viewer_id:t.mux_viewer_id,mux_sample_number:t.msn}},TE=function(){var t=rm(),e=Ie.now();return t.session_start&&(t.sst=t.session_start,delete t.session_start),t.session_id&&(t.sid=t.session_id,delete t.session_id),t.session_expires&&(t.sex=t.session_expires,delete t.session_expires),(!t.sex||t.sex<e)&&(t.sid=Gr(),t.sst=e),t.sex=e+1500*1e3,nm(t),{session_id:t.sid,session_start:t.sst,session_expires:t.sex}};function AE(t,e){var i=e.beaconCollectionDomain,a=e.beaconDomain;if(i)return"https://"+i;t=t||"inferred";var r=a||"litix.io";return t.match(/^[a-z0-9]+$/)?"https://"+t+"."+r:"https://img.litix.io/a.gif"}var kE=st(Kt()),sm=function(){var t;switch(om()){case"cellular":t="cellular";break;case"ethernet":t="wired";break;case"wifi":t="wifi";break;case void 0:break;default:t="other"}return t},om=function(){var t=kE.default.navigator,e=t&&(t.connection||t.mozConnection||t.webkitConnection);return e&&e.type};sm.getConnectionFromAPI=om;var SE=sm,wE={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"},IE=lm(wE),RE={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"},cc=lm(RE);function lm(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}function hl(t){var e={},i={};return Object.keys(t).forEach(function(a){var r=!1;if(t.hasOwnProperty(a)&&t[a]!==void 0){var n=a.split("_"),s=n[0],o=IE[s];o||(ee.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(l){l==="url"&&(r=!0),cc[l]?o+=cc[l]:Number.isInteger(Number(l))?o+=l:(ee.info("Data key word `"+l+"` not expected in "+a),o+="_"+l+"_")}),r?i[o]=t[a]:e[o]=t[a]}}),Object.assign(e,i)}var Wi=st(Kt()),CE=st(zh()),LE={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},DE=56*1024,ME=["hb","requestcompleted","requestfailed","requestcanceled"],xE="https://img.litix.io",ai=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._beaconUrl=t||xE,this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},LE,e)};ai.prototype.queueEvent=function(t,e){var i=Object.assign({},e);return this._eventQueue.length<=this._options.maxQueueLength||t==="eventrateexceeded"?(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength):!1};ai.prototype.flushEvents=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(t&&this._eventQueue.length===1){this._eventQueue.pop();return}this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending()};ai.prototype.destroy=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.destroyed=!0,t?this._clearBeaconQueue():this.flushEvents(),Wi.default.clearTimeout(this._sendTimeout)};ai.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],hl({mux_view_message:"event queue truncated"}));var i=this._createPayload(e);dm(this._beaconUrl,i,!0,function(){})};ai.prototype._sendBeaconQueue=function(){var t=this;if(this._postInFlight){this._resendAfterPost=!0;return}var e=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(e),a=Ie.now();dm(this._beaconUrl,i,!1,function(r,n){n?(t._eventQueue=e.concat(t._eventQueue),t._failureCount+=1,ee.info("Error sending beacon: "+n)):t._failureCount=0,t._roundTripTime=Ie.now()-a,t._postInFlight=!1,t._resendAfterPost&&(t._resendAfterPost=!1,t._eventQueue.length>0&&t._sendBeaconQueue())})};ai.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var t=Math.pow(2,this._failureCount-1);return t=t*Math.random(),(1+t)*this._options.baseTimeBetweenBeacons};ai.prototype._startBeaconSending=function(){var t=this;Wi.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=Wi.default.setTimeout(function(){t._eventQueue.length&&t._sendBeaconQueue(),t._startBeaconSending()},this._getNextBeaconTime()))};ai.prototype._createPayload=function(t){var e=this,i={transmission_timestamp:Math.round(Ie.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){a=JSON.stringify({metadata:i,events:r||t}),n=a.length/1024},o=function(){return n<=e._options.maxPayloadKBSize};return s(),o()||(ee.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=t.filter(function(l){return ME.indexOf(l.e)===-1}),s()),o()||(ee.info("Payload size still too big ("+n+" kb). Cropping fields.."),r.forEach(function(l){for(var d in l){var m=l[d],p=50*1024;typeof m=="string"&&m.length>p&&(l[d]=m.substring(0,p))}}),s()),a};var OE=typeof CE.default.exitPictureInPicture=="function"?function(t){return t.length<=DE}:function(t){return!1},dm=function(t,e,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(t,e)){a();return}if(Wi.default.fetch){Wi.default.fetch(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},keepalive:OE(e)}).then(function(n){return a(null,n.ok?null:"Error")}).catch(function(n){return a(null,n)});return}if(Wi.default.XMLHttpRequest){var r=new Wi.default.XMLHttpRequest;r.onreadystatechange=function(){if(r.readyState===4)return a(null,r.status!==200?"error":void 0)},r.open("POST",t),r.setRequestHeader("Content-Type","text/plain"),r.send(e);return}a()},NE=ai,PE=["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"],$E=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],UE=["ad_id","ad_creative_id","ad_universal_id"],HE=["viewstart","error","ended","viewend"],BE=600*1e3,WE=(function(){function t(e,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Te(this,t);var r,n,s,o,l,d,m,p,h,c,v,g;w(this,"mux",void 0),w(this,"envKey",void 0),w(this,"options",void 0),w(this,"eventQueue",void 0),w(this,"sampleRate",void 0),w(this,"disableCookies",void 0),w(this,"respectDoNotTrack",void 0),w(this,"previousBeaconData",void 0),w(this,"lastEventTime",void 0),w(this,"rateLimited",void 0),w(this,"pageLevelData",void 0),w(this,"viewerData",void 0),this.mux=e,this.envKey=i,this.options=a,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new NE(AE(this.envKey,this.options));var _;this.sampleRate=(_=this.options.sampleRate)!==null&&_!==void 0?_:1;var y;this.disableCookies=(y=this.options.disableCookies)!==null&&y!==void 0?y:!1;var T;this.respectDoNotTrack=(T=this.options.respectDoNotTrack)!==null&&T!==void 0?T:!1,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:(r=this.options.platform)===null||r===void 0?void 0:r.name,viewer_application_version:(n=this.options.platform)===null||n===void 0?void 0:n.version,viewer_application_engine:(s=this.options.platform)===null||s===void 0?void 0:s.layout,viewer_device_name:(o=this.options.platform)===null||o===void 0?void 0:o.product,viewer_device_category:"",viewer_device_manufacturer:(l=this.options.platform)===null||l===void 0?void 0:l.manufacturer,viewer_os_family:(m=this.options.platform)===null||m===void 0||(d=m.os)===null||d===void 0?void 0:d.family,viewer_os_architecture:(h=this.options.platform)===null||h===void 0||(p=h.os)===null||p===void 0?void 0:p.architecture,viewer_os_version:(v=this.options.platform)===null||v===void 0||(c=v.os)===null||c===void 0?void 0:c.version,viewer_connection_type:SE(),page_url:Wo.default===null||Wo.default===void 0||(g=Wo.default.location)===null||g===void 0?void 0:g.href},this.viewerData=this.disableCookies?{}:yE()}return Vt(t,[{key:"send",value:function(e,i){if(!(!e||!(i!=null&&i.view_id))){if(this.respectDoNotTrack&&ul())return ee.info("Not sending `"+e+"` because Do Not Track is enabled");if(!i||typeof i!="object")return ee.error("A data object was expected in send() but was not provided");var a=this.disableCookies?{}:TE(),r=kd(Ks({},this.pageLevelData,i,a,this.viewerData),{event:e,env_key:this.envKey});r.user_id&&(r.viewer_user_id=r.user_id,delete r.user_id);var n,s=((n=r.mux_sample_number)!==null&&n!==void 0?n:0)>=this.sampleRate,o=this._deduplicateBeaconData(e,r),l=hl(o);if(this.lastEventTime=this.mux.utils.now(),s)return ee.info("Not sending event due to sample rate restriction",e,r,l);if(this.envKey||ee.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,r,l),!this.rateLimited)if(ee.info("Sending event",e,r,l),this.rateLimited=!this.eventQueue.queueEvent(e,l),this.mux.WINDOW_UNLOADING&&e==="viewend")this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&e==="hb")this.eventQueue.flushEvents(!0);else if(HE.indexOf(e)>=0){if(e==="error"&&i.player_error_severity==="warning")return;this.eventQueue.flushEvents()}if(this.rateLimited)return r.event="eventrateexceeded",l=hl(r),this.eventQueue.queueEvent(r.event,l),ee.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,i){var a=this,r={},n=i.view_id;if(n==="-1"||e==="viewstart"||e==="viewend"||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=BE)r=Ks({},i),n&&(this.previousBeaconData=r),n&&e==="viewend"&&(this.previousBeaconData=null);else{var s=e.indexOf("request")===0;Object.entries(i).forEach(function(o){var l=ti(o,2),d=l[0],m=l[1];a.previousBeaconData&&(m!==a.previousBeaconData[d]||PE.indexOf(d)>-1||a.objectHasChanged(s,d,m,a.previousBeaconData[d])||a.eventRequiresKey(e,d))&&(r[d]=m,a.previousBeaconData[d]=m)})}return r}},{key:"objectHasChanged",value:function(e,i,a,r){return!e||i.indexOf("request_")!==0?!1:i==="request_response_headers"||typeof a!="object"||typeof r!="object"?!0:Object.keys(a||{}).length!==Object.keys(r||{}).length}},{key:"eventRequiresKey",value:function(e,i){return!!(e==="renditionchange"&&i.indexOf("video_source_")===0||UE.includes(i)&&$E.includes(e))}}]),t})(),FE=function t(e){Te(this,t);var i=0,a=0,r=0,n=0,s=0,o=0,l=0,d=function(h,c){var v=c.request_start,g=c.request_response_start,_=c.request_response_end,y=c.request_bytes_loaded;n++;var T,E;if(g?(T=g-(v??0),E=(_??0)-g):E=(_??0)-(v??0),E>0&&y&&y>0){var k=y/E*8e3;s++,a+=y,r+=E,e.data.view_min_request_throughput=Math.min(e.data.view_min_request_throughput||1/0,k),e.data.view_average_request_throughput=a/r*8e3,e.data.view_request_count=n,T>0&&(i+=T,e.data.view_max_request_latency=Math.max(e.data.view_max_request_latency||0,T),e.data.view_average_request_latency=i/s)}},m=function(h,c){n++,o++,e.data.view_request_count=n,e.data.view_request_failed_count=o},p=function(h,c){n++,l++,e.data.view_request_count=n,e.data.view_request_canceled_count=l};e.on("requestcompleted",d),e.on("requestfailed",m),e.on("requestcanceled",p)},KE=FE,VE=3600*1e3,qE=function t(e){var i=this;Te(this,t),w(this,"_lastEventTime",void 0),e.on("before*",function(a,r){var n=r.viewer_time,s=Ie.now(),o=i._lastEventTime;if(i._lastEventTime=s,o&&s-o>VE){var l=Object.keys(e.data).reduce(function(m,p){return p.indexOf("video_")===0?Object.assign(m,w({},p,e.data[p])):m},{});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:n},l)),e.playbackHeartbeat._playheadShouldBeProgressing=d,e.playbackHeartbeat._playheadShouldBeProgressing&&a.type!=="play"&&a.type!=="adbreakstart"&&(e.emit("play",{viewer_time:n}),a.type!=="playing"&&e.emit("playing",{viewer_time:n}))}})},YE=qE,GE=function t(e){Te(this,t);var i=function(o){var l=QE(o),d=jE(o);if(l!=null&&!hc(l,n)&&s<=d){n=l,s=d;var m={video_cdn:l};e.emit("cdnchange",m)}},a=null,r=null,n=null,s=0;e.on("viewinit",function(){a=null,r=null,n=null,s=0}),e.on("beforecdnchange",function(o,l){var d=l?.video_cdn;d&&(typeof l.video_previous_cdn>"u"||l.video_previous_cdn===null)&&(hc(d,r)?l.video_previous_cdn=a??void 0:(l.video_previous_cdn=r??void 0,a=r,r=d))}),e.on("requestcompleted",function(o,l){i(l)})};function hc(t,e){return t?.toLowerCase()===e?.toLowerCase()}function QE(t){var e;return t!=null&&t.request_type&&(t.request_type==="media"||t.request_type==="video")&&!((e=t.request_response_headers)===null||e===void 0)&&e["x-cdn"]?t.request_response_headers["x-cdn"]:t!=null&&t.video_cdn?t.video_cdn:null}function jE(t){return t!=null&&t.request_start?t.request_start:t!=null&&t.viewer_time?t.viewer_time:Date.now()}var ZE=GE,zE=function(t){try{return JSON.parse(t),!0}catch{return!1}},XE=function t(e){var i=this;Te(this,t),w(this,"_emittingAutomaticEvent",!1),w(this,"_hasInitialized",!1),e.on("viewstart",function(){i._hasInitialized||(i._hasInitialized=!0,i._emittingAutomaticEvent=!0,e.emit("playbackmodechange",{player_playback_mode:"standard",player_playback_mode_data:"{}"}),i._emittingAutomaticEvent=!1)}),e.on("viewend",function(){i._hasInitialized=!1}),e.on("playbackmodechange",function(a,r){i._emittingAutomaticEvent||(r.player_playback_mode_data?zE(r.player_playback_mode_data)||(e.mux.log.warn("Invalid JSON string for player_playback_mode_data"),r.player_playback_mode_data="{}"):r.player_playback_mode_data="{}",e.data.player_playback_mode_data=r.player_playback_mode_data,e.data.player_playback_mode=r.player_playback_mode)})},JE=XE,e_=["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"],t_=new Set(["requestcompleted","requestfailed","requestcanceled"]),i_=(function(t){If(i,t);var e=Mf(i);function i(a,r,n){Te(this,i);var s;s=e.call(this),w(N(s),"pageLoadEndTime",void 0),w(N(s),"pageLoadInitTime",void 0),w(N(s),"_destroyed",void 0),w(N(s),"_heartBeatTimeout",void 0),w(N(s),"adTracker",void 0),w(N(s),"dashjs",void 0),w(N(s),"data",void 0),w(N(s),"disablePlayheadRebufferTracking",void 0),w(N(s),"disableRebufferTracking",void 0),w(N(s),"errorTracker",void 0),w(N(s),"errorTranslator",void 0),w(N(s),"emitTranslator",void 0),w(N(s),"getAdData",void 0),w(N(s),"getPlayheadTime",void 0),w(N(s),"getStateData",void 0),w(N(s),"stateDataTranslator",void 0),w(N(s),"hlsjs",void 0),w(N(s),"id",void 0),w(N(s),"longResumeTracker",void 0),w(N(s),"minimumRebufferDuration",void 0),w(N(s),"mux",void 0),w(N(s),"playbackEventDispatcher",void 0),w(N(s),"playbackHeartbeat",void 0),w(N(s),"playbackHeartbeatTime",void 0),w(N(s),"playheadTime",void 0),w(N(s),"seekingTracker",void 0),w(N(s),"sustainedRebufferThreshold",void 0),w(N(s),"watchTimeTracker",void 0),w(N(s),"currentFragmentPDT",void 0),w(N(s),"currentFragmentStart",void 0),s.pageLoadInitTime=Fs.navigationStart(),s.pageLoadEndTime=Fs.domContentLoadedEventEnd();var o={debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(h){return h},emitTranslator:function(){for(var h=arguments.length,c=new Array(h),v=0;v<h;v++)c[v]=arguments[v];return c},stateDataTranslator:function(h){return h}};s.mux=a,s.id=r,n!=null&&n.beaconDomain&&s.mux.log.warn("The `beaconDomain` setting has been deprecated
14in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),n=Object.assign(o,n),n.data=n.data||{},n.data.property_key&&(n.data.env_key=n.data.property_key,delete n.data.property_key),ee.level=n.debug?Hi.DEBUG:Hi.WARN,s.getPlayheadTime=n.getPlayheadTime,s.getStateData=n.getStateData||function(){return{}},s.getAdData=n.getAdData||function(){},s.minimumRebufferDuration=n.minimumRebufferDuration,s.sustainedRebufferThreshold=n.sustainedRebufferThreshold,s.playbackHeartbeatTime=n.playbackHeartbeatTime,s.disableRebufferTracking=n.disableRebufferTracking,s.disableRebufferTracking&&s.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."),s.disablePlayheadRebufferTracking=n.disablePlayheadRebufferTracking,s.errorTranslator=n.errorTranslator,s.emitTranslator=n.emitTranslator,s.stateDataTranslator=n.stateDataTranslator,s.playbackEventDispatcher=new WE(a,n.data.env_key,n),s.data={player_instance_id:Gr(),mux_sample_rate:n.sampleRate,beacon_domain:n.beaconCollectionDomain||n.beaconDomain},s.data.view_sequence_number=1,s.data.player_sequence_number=1;var l=function(){typeof this.data.view_start>"u"&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"))}.bind(N(s));if(s.on("viewinit",function(h,c){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,c),this._initializeViewData(),this.one("play",l),this.one("adbreakstart",l)}),s.on("videochange",function(h,c){this._resetView(c)}),s.on("programchange",function(h,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})),l(),this.emit("play"),this.emit("playing")}),s.on("fragmentchange",function(h,c){this.currentFragmentPDT=c.currentFragmentPDT,this.currentFragmentStart=c.currentFragmentStart}),s.on("destroy",s.destroy),typeof window<"u"&&typeof window.addEventListener=="function"&&typeof window.removeEventListener=="function"){var d=function(){var h=typeof s.data.view_start<"u";s.mux.WINDOW_HIDDEN=document.visibilityState==="hidden",h&&s.mux.WINDOW_HIDDEN&&(s.data.player_is_paused||s.emit("hb"))};window.addEventListener("visibilitychange",d,!1);var m=function(h){h.persisted||s.destroy()};window.addEventListener("pagehide",m,!1),s.on("destroy",function(){window.removeEventListener("visibilitychange",d),window.removeEventListener("pagehide",m)})}s.on("playerready",function(h,c){Object.assign(this.data,c)}),e_.forEach(function(h){s.on(h,function(c,v){h.indexOf("ad")!==0&&this._updateStateData(),Object.assign(this.data,v),this._sanitizeData()}),s.on("after"+h,function(){(h!=="error"||this.errorTracker.viewErrored)&&this.send(h)})}),s.on("viewend",function(h,c){Object.assign(s.data,c)});var p=function(h){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};return s.one("playerready",p),s.longResumeTracker=new YE(N(s)),s.errorTracker=new Zf(N(s)),new _E(N(s)),s.seekingTracker=new mE(N(s)),s.playheadTime=new iE(N(s)),s.playbackHeartbeat=new Qf(N(s)),new uE(N(s)),s.watchTimeTracker=new Xf(N(s)),new eE(N(s)),s.adTracker=new fE(N(s)),new sE(N(s)),new rE(N(s)),new lE(N(s)),new KE(N(s)),new ZE(N(s)),new JE(N(s)),n.hlsjs&&s.addHLSJS(n),n.dashjs&&s.addDashJS(n),s.emit("viewinit",n.data),s}return Vt(i,[{key:"emit",value:function(a,r){var n,s=Object.assign({viewer_time:this.mux.utils.now()},r),o=[a,s];if(this.emitTranslator)try{o=this.emitTranslator(a,s)}catch(l){this.mux.log.warn("Exception in emit translator callback.",l)}o!=null&&o.length&&(n=Mn(Fa(i.prototype),"emit",this)).call.apply(n,[this].concat(ht(o)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,typeof this.data.view_start<"u"&&(this.emit
vendor: 27,627 bytes, lines 14-22
14("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(a){if(this.data.view_id){var r=Object.assign({},this.data),n=["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"];if(r.video_source_is_live===void 0&&(r.player_source_duration===1/0||r.video_source_duration===1/0?r.video_source_is_live=!0:(r.player_source_duration>0||r.video_source_duration>0)&&(r.video_source_is_live=!1)),r.video_source_is_live||n.forEach(function(d){r[d]=void 0}),r.video_source_url=r.video_source_url||r.player_source_url,r.video_source_url){var s=ti(Qr(r.video_source_url),2),o=s[0],l=s[1];r.video_source_domain=l,r.video_source_hostname=o}delete r.ad_request_id,this.playbackEventDispatcher.send(a,r),this.data.view_sequence_number++,this.data.player_sequence_number++,t_.has(a)||this._restartHeartBeat(),a==="viewend"&&delete this.data.view_id}}},{key:"_resetView",value:function(a){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",a)}},{key:"_updateStateData",value:function(){var a,r=this.getStateData();if(typeof this.stateDataTranslator=="function")try{r=this.stateDataTranslator(r)}catch(s){this.mux.log.warn("Exception in stateDataTranslator translator callback.",s)}if(!((a=this.data)===null||a===void 0)&&a.video_cdn&&r!=null&&r.video_cdn){r.video_cdn;var n=Cf(r,["video_cdn"]);r=n}Object.assign(this.data,r),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var a=this,r=["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"];r.forEach(function(s){var o=parseInt(a.data[s],10);a.data[s]=isNaN(o)?void 0:o});var n=["player_source_url","video_source_url"];n.forEach(function(s){if(a.data[s]){var o=a.data[s].toLowerCase();(o.indexOf("data:")===0||o.indexOf("blob:")===0)&&(a.data[s]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("video_")===0&&delete a.data[r]})}},{key:"_resetViewData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("view_")===0&&delete a.data[r]}),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 a=this,r=this.data.view_id=Gr(),n=function(){r===a.data.view_id&&ge(a.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",n):n()}},{key:"_restartHeartBeat",value:function(){var a=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){a.data.player_is_paused||a.emit("hb")},1e4)}},{key:"addHLSJS",value:function(a){if(!a.hlsjs){this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.");return}if(this.hlsjs){this.mux.log.warn("An instance of HLS.js is already being monitored for this player.");return}this.hlsjs=a.hlsjs,Uf(this.mux,this.id,a.hlsjs,{},a.Hls||window.Hls)}},{key:"removeHLSJS",value:function(){this.hlsjs&&(Hf(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(a){if(!a.dashjs){this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");return}if(this.dashjs){this.mux.log.warn("An instance of Dash.js is already being monitored for this player.");return}this.dashjs=a.dashjs,Kf(this.mux,this.id,a.dashjs)}},{key:"removeDashJS",value:function(){this.dashjs&&(Vf(this.dashjs),this.dashjs=void 0)}}]),i})(Yf),a_=i_,ir=st(zh());function r_(){return ir.default&&!!(ir.default.fullscreenElement||ir.default.webkitFullscreenElement||ir.default.mozFullScreenElement||ir.default.msFullscreenElement)}var n_=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],s_={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};function o_(t,e,i){var a=ti(Ws(e),3),r=a[0],n=a[1],s=a[2],o=t.log,l=t.utils.getComputedStyle,d=t.utils.secondsToMs,m={automaticErrorTracking:!0};if(r){if(s!=="video"&&s!=="audio")return o.error("The element of `"+n+"` was not a media element.")}else return o.error("No element was found with the `"+n+"` query selector.");r.mux&&(r.mux.destroy(),delete r.mux,o.warn("Already monitoring this video element, replacing existing event listeners"));var p={getPlayheadTime:function(){return d(r.currentTime)},getStateData:function(){var c,v,g,_=((c=(v=this).getPlayheadTime)===null||c===void 0?void 0:c.call(v))||d(r.currentTime),y=this.hlsjs&&this.hlsjs.url,T=this.dashjs&&typeof this.dashjs.getSource=="function"&&this.dashjs.getSource(),E={player_is_paused:r.paused,player_width:parseInt(l(r,"width")),player_height:parseInt(l(r,"height")),player_autoplay_on:r.autoplay,player_preload_on:r.preload,player_language_code:r.lang,player_is_fullscreen:r_(),video_poster_url:r.poster,video_source_url:y||T||r.currentSrc,video_source_duration:d(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:r==null||(g=r.getVideoPlaybackQuality)===null||g===void 0?void 0:g.call(r).droppedVideoFrames};if(r.getStartDate&&_>0){var k=r.getStartDate();if(k&&typeof k.getTime=="function"&&k.getTime()){var L=k.getTime();if(E.player_program_time=L+_,r.seekable.length>0){var O=L+r.seekable.end(r.seekable.length-1);E.player_live_edge_program_time=O}}}return E}};i=Object.assign(m,i,p),i.data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:t.VERSION},i.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(c,v){t.emit(n,c,v)},r.mux.updateData=function(c){r.mux.emit("hb",c)};var h=function(){o.error("The monitor for this video element has already been destroyed.")};r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(c){r.removeEventListener(c,r.mux.listeners[c],!1)}),delete r.mux.listeners,r.mux.destroy=h,r.mux.swapElement=h,r.mux.emit=h,r.mux.addHLSJS=h,r.mux.addDashJS=h,r.mux.removeHLSJS=h,r.mux.removeDashJS=h,r.mux.updateData=h,r.mux.setEmitTranslator=h,r.mux.setStateDataTranslator=h,r.mux.setGetPlayheadTime=h,r.mux.deleted=!0,t.emit(n,"destroy")},r.mux.swapElement=function(c){var v=ti(Ws(c),3),g=v[0],_=v[1],y=v[2];if(g){if(y!=="video"&&y!=="audio")return t.log.error("The element of `"+_+"` was not a media element.")}else return t.log.error("No element was found with the `"+_+"` query selector.");g.muxId=r.muxId,delete r.muxId,g.mux=g.mux||{},g.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(g.mux.listeners).forEach(function(T){r.removeEventListener(T,g.mux.listeners[T],!1),g.addEventListener(T,g.mux.listeners[T],!1)}),g.mux.swapElement=r.mux.swapElement,g.mux.destroy=r.mux.destroy,delete r.mux,r=g},r.mux.addHLSJS=function(c){t.addHLSJS(n,c)},r.mux.addDashJS=function(c){t.addDashJS(n,c)},r.mux.removeHLSJS=function(){t.removeHLSJS(n)},r.mux.removeDashJS=function(){t.removeDashJS(n)},r.mux.setEmitTranslator=function(c){t.setEmitTranslator(n,c)},r.mux.setStateDataTranslator=function(c){t.setStateDataTranslator(n,c)},r.mux.setGetPlayheadTime=function(c){c||(c=i.getPlayheadTime),t.setGetPlayheadTime(n,c)},t.init(n,i),t.emit(n,"playerready"),r.paused||(t.emit(n,"play"),r.readyState>2&&t.emit(n,"playing")),r.mux.listeners={},n_.forEach(function(c){c==="error"&&!i.automaticErrorTracking||(r.mux.listeners[c]=function(){var v={};if(c==="error"){if(!r.error||r.error.code===1)return;v.player_error_code=r.error.code,v.player_error_message=s_[r.error.code]||r.error.message}t.emit(n,c,v)},r.addEventListener(c,r.mux.listeners[c],!1))})}function l_(t,e,i,a){var r=a;if(t&&typeof t[e]=="function")try{r=t[e].apply(t,i)}catch(n){ee.info("safeCall error",n)}return r}var Pr=st(Kt()),ua;Pr.default&&Pr.default.WeakMap&&(ua=new WeakMap);function d_(t,e){if(!t||!e||!Pr.default||typeof Pr.default.getComputedStyle!="function")return"";var i;return ua&&ua.has(t)&&(i=ua.get(t)),i||(i=Pr.default.getComputedStyle(t,null),ua&&ua.set(t,i)),i.getPropertyValue(e)}function u_(t){return Math.floor(t*1e3)}var wi={TARGET_DURATION:"#EXT-X-TARGETDURATION",PART_INF:"#EXT-X-PART-INF",SERVER_CONTROL:"#EXT-X-SERVER-CONTROL",INF:"#EXTINF",PROGRAM_DATE_TIME:"#EXT-X-PROGRAM-DATE-TIME",VERSION:"#EXT-X-VERSION",SESSION_DATA:"#EXT-X-SESSION-DATA"},_o=function(t){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(t),this.manifest};_o.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)};_o.prototype.processLine=function(t){var e=t.indexOf(":"),i=p_(t,e),a=i[0],r=i.length===2?wd(i[1]):void 0;if(a[0]!=="#")this.currentUri.uri=a,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(a){case wi.TARGET_DURATION:{if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break}case wi.PART_INF:{Fo(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break}case wi.SERVER_CONTROL:{Fo(this.manifest,i),this.setHoldBack();break}case wi.INF:{r===0?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break}case wi.PROGRAM_DATE_TIME:{var n=r,s=new Date(n);this.manifest.dateTimeString||(this.manifest.dateTimeString=n,this.manifest.dateTimeObject=s),this.currentUri.dateTimeString=n,this.currentUri.dateTimeObject=s;break}case wi.VERSION:{Fo(this.manifest,i);break}case wi.SESSION_DATA:{var o=v_(i[1]),l=tm(o);Object.assign(this.manifest.sessionData,l)}}};_o.prototype.setHoldBack=function(){var t=this.manifest,e=t.serverControl,i=t.targetDuration,a=t.partTargetDuration;if(e){var r="holdBack",n="partHoldBack",s=i&&i*3,o=a&&a*2;i&&!e.hasOwnProperty(r)&&(e[r]=s),s&&e[r]<s&&(e[r]=s),a&&!e.hasOwnProperty(n)&&(e[n]=a*3),a&&e[n]<o&&(e[n]=o)}};var Fo=function(t,e){var i=um(e[0].replace("#EXT-X-","")),a;m_(e[1])?(a={},a=Object.assign(h_(e[1]),a)):a=wd(e[1]),t[i]=a},um=function(t){return t.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},wd=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},c_=function(t){var e={},i=t.split("=");if(i.length>1){var a=um(i[0]);e[a]=wd(i[1])}return e},h_=function(t){for(var e=t.split(","),i={},a=0;e.length>a;a++){var r=e[a],n=c_(r);i=Object.assign(n,i)}return i},m_=function(t){return t.indexOf("=")>-1},p_=function(t,e){return e===-1?[t]:[t.substring(0,e),t.substring(e+1)]},v_=function(t){var e={};if(t){var i=t.search(","),a=t.slice(0,i),r=t.slice(i+1),n=[a,r];return n.forEach(function(s,o){for(var l=s.replace(/['"]+/g,"").split("="),d=0;d<l.length;d++)l[d]==="DATA-ID"&&(e["DATA-ID"]=l[1-d]),l[d]==="VALUE"&&(e.VALUE=l[1-d])}),{data:e}}},f_=_o,E_={safeCall:l_,safeIncrement:ge,getComputedStyle:d_,secondsToMs:u_,assign:Object.assign,headersStringToObject:Sd,cdnHeadersToRequestId:Vs,extractHostnameAndDomain:Qr,extractHostname:Et,manifestParser:f_,generateShortID:Jh,generateUUID:Gr,now:Ie.now,findMediaElement:Ws},__=E_,b_={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"},g_=b_,y_="mux-embed",T_="5.13.0",A_="2.1",me={},yi=function(t){var e=arguments;typeof t=="string"?yi.hasOwnProperty(t)?Nr.default.setTimeout(function(){e=Array.prototype.splice.call(e,1),yi[t].apply(null,e)},0):ee.warn("`"+t+"` is an unknown task"):typeof t=="function"?Nr.default.setTimeout(function(){t(yi)},0):ee.warn("`"+t+"` is invalid.")},k_={loaded:Ie.now(),NAME:y_,VERSION:T_,API_VERSION:A_,PLAYER_TRACKED:!1,monitor:function(t,e){return o_(yi,t,e)},destroyMonitor:function(t){var e=ti(Ws(t),1),i=e[0];i&&i.mux&&typeof i.mux.destroy=="function"?i.mux.destroy():ee.error("A video element monitor for `"+t+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(t,e){var i=ct(t);me[i]?me[i].addHLSJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(t,e){var i=ct(t);me[i]?me[i].addDashJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(t){var e=ct(t);me[e]?me[e].removeHLSJS():ee.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(t){var e=ct(t);me[e]?me[e].removeDashJS():ee.error("A monitor for `"+e+"` has not been initialized.")},init:function(t,e){ul()&&e&&e.respectDoNotTrack&&ee.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=ct(t);me[i]=new a_(yi,i,e)},emit:function(t,e,i){var a=ct(t);me[a]?(me[a].emit(e,i),e==="destroy"&&delete me[a]):ee.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(t,e){var i=ct(t);me[i]?me[i].emit("hb",e):ee.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(t,e){var i=ct(t);me[i]?me[i].emitTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(t,e){var i=ct(t);me[i]?me[i].stateDataTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(t,e){var i=ct(t);me[i]?me[i].getPlayheadTime=e:ee.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:ul,log:ee,utils:__,events:g_,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(yi,k_);typeof Nr.default<"u"&&typeof Nr.default.addEventListener=="function"&&Nr.default.addEventListener("pagehide",function(t){t.persisted||(yi.WINDOW_UNLOADING=!0)},!1);var Id=yi;/*! 17* JavaScript Cookie v2.1.3 18* https://github.com/js-cookie/js-cookie 19* 20* Copyright 2006, 2015 Klaus Hartl & Fagner Brack 21* Released under the MIT license 22*/var B=ef,te={VIDEO:"video",THUMBNAIL:"thumbnail",STORYBOARD:"storyboard",DRM:"drm"},x={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},bo=t=>t===te.VIDEO?"playback":t,di=class pr extends Error{constructor(e,i=pr.MEDIA_ERR_CUSTOM,a,r){var n;super(e),this.name="MediaError",this.code=i,this.context=r,this.fatal=a??(i>=pr.MEDIA_ERR_NETWORK&&i<=pr.MEDIA_ERR_ENCRYPTED),this.message||(this.message=(n=pr.defaultMessages[this.code])!=null?n:"")}};di.MEDIA_ERR_ABORTED=1,di.MEDIA_ERR_NETWORK=2,di.MEDIA_ERR_DECODE=3,di.MEDIA_ERR_SRC_NOT_SUPPORTED=4,di.MEDIA_ERR_ENCRYPTED=5,di.MEDIA_ERR_CUSTOM=100,di.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 I=di,S_=t=>t==null,Rd=(t,e)=>S_(e)?!1:t in e,ml={ANY:"any",MUTED:"muted"},Q={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},Ut={MSE:"mse",NATIVE:"native"},vr={HEADER:"header",QUERY:"query",NONE:"none"},qs=Object.values(vr),Jt={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},mc={HLS:Jt.M3U8};[...Object.values(Jt)];var pA={upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"},vA={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},fA={DESCENDING:"desc"},w_="en",pl={code:w_},ve=(t,e,i,a,r=t)=>{r.addEventListener(e,i,a),t.addEventListener("teardown",()=>{r.removeEventListener(e,i)},{once:!0})};function I_(t,e,i){e&&i>e&&(i=e);for(let a=0;a<t.length;a++)if(t.start(a)<=i&&t.end(a)>=i)return!0;return!1}var Cd=t=>{let e=t.indexOf("?");if(e<0)return[t];let i=t.slice(0,e),a=t.slice(e);return[i,a]},go=t=>{let{type:e}=t;if(e){let i=e.toUpperCase();return Rd(i,mc)?mc[i]:e}return R_(t)},cm=t=>t==="VOD"?Q.ON_DEMAND:Q.LIVE,hm=t=>t==="EVENT"?Number.POSITIVE_INFINITY:t==="VOD"?Number.NaN:0,R_=t=>{let{src:e}=t;if(!e)return"";let i="";try{i=new URL(e).pathname}catch{console.error("invalid url")}let a=i.lastIndexOf(".");if(a<0)return L_(t)?Jt.M3U8:"";let r=i.slice(a+1).toUpperCase();return Rd(r,Jt)?Jt[r]:""},C_="mux.com",L_=({src:t,customDomain:e=C_})=>{let i;try{i=new URL(`${t}`)}catch{return!1}let a=i.protocol==="https:",r=i.hostname===`stream.${e}`.toLowerCase(),n=i.pathname.split("/"),s=n.length===2,o=!(n!=null&&n[1].includes("."));return a&&r&&s&&o},Oa=t=>{let e=(t??"").split(".")[1];if(e)try{let i=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(i).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}catch{return}},D_=({exp:t},e=Date.now())=>!t||t*1e3<e,M_=({sub:t},e)=>t!==e,x_=({aud:t},e)=>!t,O_=({aud:t},e)=>t!==e,mm="en";function D(t,e=!0){var i,a;let r=e&&(a=(i=pl)==null?void 0:i[t])!=null?a:t,n=e?pl.code:mm;return new N_(r,n)}var N_=class{constructor(e,i=(a=>(a=pl)!=null?a:mm)()){this.message=e,this.locale=i}format(e){return this.message.replace(/\{(\w+)\}/g,(i,a)=>{var r;return(r=e[a])!=null?r:""})}toString(){return this.message}},P_=Object.values(ml),pc=t=>typeof t=="boolean"||typeof t=="string"&&P_.includes(t),$_=(t,e,i)=>{let{autoplay:a}=t,r=!1,n=!1,s=pc(a)?a:!!a,o=()=>{r||ve(e,"playing",()=>{r=!0},{once:!0})};if(o(),ve(e,"loadstart",()=>{r=!1,o(),Ko(e,s)},{once:!0}),ve(e,"loadstart",()=>{i||(t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=!Number.isFinite(e.duration)),Ko(e,s)},{once:!0}),i&&i.once(B.Events.LEVEL_LOADED,(l,d)=>{var m;t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=(m=d.details.live)!=null?m:!1}),!s){let l=()=>{!n||Number.isFinite(t.startTime)||(i!=null&&i.liveSyncPosition?e.currentTime=i.liveSyncPosition:Number.isFinite(e.seekable.end(0))&&(e.currentTime=e.seekable.end(0)))};i&&ve(e,"play",()=>{e.preload==="metadata"?i.once(B.Events.LEVEL_UPDATED,l):l()},{once:!0})}return l=>{r||(s=pc(l)?l:!!l,Ko(e,s))}},Ko=(t,e)=>{if(!e)return;let i=t.muted,a=()=>t.muted=i;switch(e){case ml.ANY:t.play().catch(()=>{t.muted=!0,t.play().catch(a)});break;case ml.MUTED:t.muted=!0,t.play().catch(a);break;default:t.play().catch(()=>{});break}},U_=({preload:t,src:e},i,a)=>{let r=p=>{p!=null&&["","none","metadata","auto"].includes(p)?i.setAttribute("preload",p):i.removeAttribute("preload")};if(!a)return r(t),r;let n=!1,s=!1,o=a.config.maxBufferLength,l=a.config.maxBufferSize,d=p=>{r(p);let h=p??i.preload;s||h==="none"||(h==="metadata"?(a.config.maxBufferLength=1,a.config.maxBufferSize=1):(a.config.maxBufferLength=o,a.config.maxBufferSize=l),m())},m=()=>{!n&&e&&(n=!0,a.loadSource(e))};return ve(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,m()},{once:!0}),d(t),d};function H_(t,e){var i;if(!("videoTracks"in t))return;let a=new WeakMap;e.on(B.Events.MANIFEST_PARSED,function(l,d){o();let m=t.addVideoTrack("main");m.selected=!0;for(let[p,h]of d.levels.entries()){let c=m.addRendition(h.url[0],h.width,h.height,h.videoCodec,h.bitrate);a.set(h,`${p}`),c.id=`${p}`}}),e.on(B.Events.AUDIO_TRACKS_UPDATED,function(l,d){s();for(let m of d.audioTracks){let p=m.default?"main":"alternative",h=t.addAudioTrack(p,m.name,m.lang);h.id=`${m.id}`,m.default&&(h.enabled=!0)}}),t.audioTracks.addEventListener("change",()=>{var l;let d=+((l=[...t.audioTracks].find(p=>p.enabled))==null?void 0:l.id),m=e.audioTracks.map(p=>p.id);d!=e.audioTrack&&m.includes(d)&&(e.audioTrack=d)}),e.on(B.Events.LEVELS_UPDATED,function(l,d){var m;let p=t.videoTracks[(m=t.videoTracks.selectedIndex)!=null?m:0];if(!p)return;let h=d.levels.map(c=>a.get(c));for(let c of t.videoRenditions)c.id&&!h.includes(c.id)&&p.removeRendition(c)});let r=l=>{let d=l.target.selectedIndex;d!=e.nextLevel&&(e.nextLevel=d)};(i=t.videoRenditions)==null||i.addEventListener("change",r);let n=()=>{for(let l of t.videoTracks)t.removeVideoTrack(l)},s=()=>{for(let l of t.audioTracks)t.removeAudioTrack(l)},o=()=>{n(),s()};e.once(B.Events.DESTROYING,o)}var Vo=t=>"time"in t?t.time:t.startTime;function B_(t,e){e.on(B.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(r,{tracks:n})=>{n.forEach(s=>{var o,l;let d=(o=s.subtitleTrack)!=null?o:s.closedCaptions,m=e.subtitleTracks.findIndex(({lang:h,name:c,type:v})=>h==d?.lang&&c===s.label&&v.toLowerCase()===s.kind),p=((l=s._id)!=null?l:s.default)?"default":`${s.kind}${m}`;Ld(t,s.kind,s.label,d?.lang,p,s.default)})});let i=()=>{if(!e.subtitleTracks.length)return;let r=Array.from(t.textTracks).find(o=>o.id&&o.mode==="showing"&&["subtitles","captions"].includes(o.kind));if(!r)return;let n=e.subtitleTracks[e.subtitleTrack],s=n?n.default?"default":`${e.subtitleTracks[e.subtitleTrack].type.toLowerCase()}${e.subtitleTrack}`:void 0;if(e.subtitleTrack<0||r?.id!==s){let o=e.subtitleTracks.findIndex(({lang:l,name:d,type:m,default:p})=>r.id==="default"&&p||l==r.language&&d===r.label&&m.toLowerCase()===r.kind);e.subtitleTrack=o}r?.id===s&&r.cues&&Array.from(r.cues).forEach(o=>{r.addCue(o)})};t.textTracks.addEventListener("change",i),e.on(B.Events.CUES_PARSED,(r,{track:n,cues:s})=>{let o=t.textTracks.getTrackById(n);if(!o)return;let l=o.mode==="disabled";l&&(o.mode="hidden"),s.forEach(d=>{var m;(m=o.cues)!=null&&m.getCueById(d.id)||o.addCue(d)}),l&&(o.mode="disabled")}),e.once(B.Events.DESTROYING,()=>{t.textTracks.removeEventListener("change",i),t.querySelectorAll("track[data-removeondestroy]").forEach(r=>{r.remove()})});let a=()=>{Array.from(t.textTracks).forEach(r=>{var n,s;if(!["subtitles","caption"].includes(r.kind)&&(r.label==="thumbnails"||r.kind==="chapters")){if(!((n=r.cues)!=null&&n.length)){let o="track";r.kind&&(o+=`[kind="${r.kind}"]`),r.label&&(o+=`[label="${r.label}"]`);let l=t.querySelector(o),d=(s=l?.getAttribute("src"))!=null?s:"";l?.removeAttribute("src"),setTimeout(()=>{l?.setAttribute("src",d)},0)}r.mode!=="hidden"&&(r.mode="hidden")}})};e.once(B.Events.MANIFEST_LOADED,a),e.once(B.Events.MEDIA_ATTACHED,a)}function Ld(t,e,i,a,r,n){let s=document.createElement("track");return s.kind=e,s.label=i,a&&(s.srclang=a),r&&(s.id=r),n&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(e)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),t.append(s),s.track}function W_(t,e){let i=Array.prototype.find.call(t.querySelectorAll("track"),a=>a.track===e);i?.remove()}function cn(t,e,i){var a;return(a=Array.from(t.querySelectorAll("track")).find(r=>r.track.label===e&&r.track.kind===i))==null?void 0:a.track}async function pm(t,e,i,a){let r=cn(t,i,a);return r||(r=Ld(t,a,i),r.mode="hidden",await new Promise(n=>setTimeout(()=>n(void 0),0))),r.mode!=="hidden"&&(r.mode="hidden"),[...e].sort((n,s)=>Vo(s)-Vo(n)).forEach(n=>{var s,o;let l=n.value,d=Vo(n);if("endTime"in n&&n.endTime!=null)r?.addCue(new VTTCue(d,n.endTime,a==="chapters"?l:JSON.stringify(l??null)));else{let m=Array.prototype.findIndex.call(r?.cues,v=>v.startTime>=d),p=(s=r?.cues)==null?void 0:s[m],h=p?p.startTime:Number.isFinite(t.duration)?t.duration:Number.MAX_SAFE_INTEGER,c=(o=r?.cues)==null?void 0:o[m-1];c&&(c.endTime=d),r?.addCue(new VTTCue(d,h,a==="chapters"?l:JSON.stringify(l??null)))}}),t.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r}var Dd="cuepoints",vm=Object.freeze({label:Dd});async function fm(t,e,i=vm){return pm(t,e,i.label,"metadata")}var vl=t=>({time:t.startTime,value:JSON.parse(t.text)});function F_(t,e={label:Dd}){let i=cn(t,e.label,"metadata");return i!=null&&i.cues?Array.from(i.cues,a=>vl(a)):[]}function Em(t,e={label:Dd}){var i,a;let r=cn(t,e.label,"metadata");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return vl(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return vl(s||r.activeCues[0])}async function K_(t,e=vm){return new Promise(i=>{ve(t,"loadstart",async()=>{let a=await fm(t,[],e);ve(t,"cuechange",()=>{let r=Em(t);if(r){let n=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}var Md="chapters",_m=Object.freeze({label:Md}),fl=t=>({startTime:t.startTime,endTime:t.endTime,value:t.text});async function bm(t,e,i=_m){return pm(t,e,i.label,"chapters")}function V_(t,e={label:Md}){var i;let a=cn(t,e.label,"chapters");return(i=a?.cues)!=null&&i.length?Array.from(a.cues,r=>fl(r)):[]}function gm(t,e={label:Md}){var i,a;let r=cn(t,e.label,"chapters");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return fl(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return fl(s||r.activeCues[0])}async function q_(t,e=_m){return new Promise(i=>{ve(t,"loadstart",async()=>{let a=await bm(t,[],e);ve(t,"cuechange",()=>{let r=gm(t);if(r){let n=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}function Y_(t,e){if(e){let i=e.playingDate;if(i!=null)return new Date(i.getTime()-t.currentTime*1e3)}return typeof t.getStartDate=="function"?t.getStartDate():new Date(NaN)}function G_(t,e){if(e&&e.playingDate)return e.playingDate;if(typeof t.getStartDate=="function"){let i=t.getStartDate();return new Date(i.getTime()+t.currentTime*1e3)}return new Date(NaN)}var $r={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},Q_=t=>{if(t===te.VIDEO)return $r.VIDEO;if(t===te.DRM)return $r.DRM},j_=(t,e)=>{var i,a;let r=bo(t),n=`${r}Token`;return(i=e.tokens)!=null&&i[r]?(a=e.tokens)==null?void 0:a[r]:Rd(n,e)?e[n]:void 0},Ys=(t,e,i,a,r=!1,n=!(s=>(s=globalThis.navigator)==null?void 0:s.onLine)())=>{var s,o;if(n){let y=D("Your device appears to be offline",r),T,E=I.MEDIA_ERR_NETWORK,k=new I(y,E,!1,T);return k.errorCategory=e,k.muxCode=x.NETWORK_OFFLINE,k.data=t,k}let l="status"in t?t.status:t.code,d=Date.now(),m=I.MEDIA_ERR_NETWORK;if(l===200)return;let p=bo(e),h=j_(e,i),c=Q_(e),[v]=Cd((s=i.playbackId)!=null?s:"");if(!l||!v)return;let g=Oa(h);if(h&&!g){let y=D("The {tokenNamePrefix}
22-token provided is invalid or malformed.",r).format({tokenNamePrefix:p}),T=D("Compact JWT string: {token}",r).format({token:h}),E=new I(y,m,!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_TOKEN_MALFORMED,E.data=t,E}if(l>=500){let y=new I("",m,a??!0);return y.errorCategory=e,y.muxCode=x.NETWORK_UNKNOWN_ERROR,y}if(l===403)if(g){if(D_(g,d)){let y={timeStyle:"medium",dateStyle:"medium"},T=D("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:p}),E=D("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",y).format((o=g.exp)!=null?o:0*1e3),currentDate:new Intl.DateTimeFormat("en",y).format(d)}),k=new I(T,m,!0,E);return k.errorCategory=e,k.muxCode=x.NETWORK_TOKEN_EXPIRED,k.data=t,k}if(M_(g,v)){let y=D("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p}),T=D("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:p,playbackId:v,tokenPlaybackId:g.sub}),E=new I(y,m,!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_TOKEN_SUB_MISMATCH,E.data=t,E}if(x_(g)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:c}),E=new I(y,m,!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_TOKEN_AUD_MISSING,E.data=t,E}if(O_(g,c)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:c,aud:g.aud}),E=new I(y,m,!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_TOKEN_AUD_MISMATCH,E.data=t,E}}else{let y=D("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p,category:e}),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),E=new I(y,m,a??!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_TOKEN_MISSING,E.data=t,E}if(l===412){let y=D("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),E=new I(y,m,a??!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_NOT_READY,E.streamType=i.streamType===Q.LIVE?"live":i.streamType===Q.ON_DEMAND?"on-demand":"unknown",E.data=t,E}if(l===404){let y=D("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),E=new I(y,m,a??!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_NOT_FOUND,E.data=t,E}if(l===400){let y=D("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),E=new I(y,m,a??!0,T);return E.errorCategory=e,E.muxCode=x.NETWORK_INVALID_URL,E.data=t,E}let _=new I("",m,a??!0);return _.errorCategory=e,_.muxCode=x.NETWORK_UNKNOWN_ERROR,_.data=t,_},vc=B.DefaultConfig.capLevelController,ym=class Tm extends vc{constructor(e){super(e)}get levels(){var e;return(e=this.hls.levels)!=null?e:[]}getValidLevels(e){return this.levels.filter((i,a)=>this.isLevelAllowed(i)&&a<=e)}getMaxLevel(e){let i=super.getMaxLevel(e),a=this.getValidLevels(e);if(!a[i])return i;let r=Math.min(a[i].width,a[i].height),n=Tm.minMaxResolution;return r>=n?i:vc.getMaxLevelByMediaSize(a,n*(16/9),n)}};ym.minMaxResolution=720;var Z_=ym,z_=Z_,xn={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},X_=t=>{if(t.includes("fps"))return xn.FAIRPLAY;if(t.includes("playready"))return xn.PLAYREADY;if(t.includes("widevine"))return xn.WIDEVINE},J_=t=>{let e=t.split(` 23`).find((i,a,r)=>a&&r[a-1].startsWith("#EXT-X-STREAM-INF"));return fetch(e).then(i=>i.status!==200?Promise.reject(i):i.text())},eb=t=>{let e=t.split(` 24`).filter(a=>a.startsWith("#EXT-X-SESSION-DATA"));if(!e.length)return{};let i={};for(let a of e){let r=ib(a),n=r["DATA-ID"];n&&(i[n]={...r})}return{sessionData:i}},tb=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g;function ib(t){let e=[...t.matchAll(tb)];return Object.fromEntries(e.map(([,i,a])=>[i,a]))}var ab=t=>{var e,i,a;let r=t.split(` 25`),n=(i=((e=r.find(d=>d.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:i.trim(),s=cm(n),o=hm(n),l;if(s===Q.LIVE){let d=r.find(m=>m.startsWith("#EXT-X-PART-INF"));if(d)l=+d.split(":")[1].split("=")[1]*2;else{let m=r.find(h=>h.startsWith("#EXT-X-TARGETDURATION")),p=(a=m?.split(":"))==null?void 0:a[1];l=+(p??6)*3}}
25return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}},rb=async(t,e)=>{if(e===Jt.MP4)return{streamType:Q.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(e===Jt.M3U8){let i=await fetch(t);if(!i.ok)return Promise.reject(i);let a=await i.text(),r=await J_(a);return{...eb(a),...ab(r)}}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}},nb=async(t,e,i=go({src:t}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:m}=await rb(t,i),p=m?.["com.apple.hls.chapters"];(p!=null&&p.URI||p!=null&&p.VALUE.toLocaleLowerCase().startsWith("http"))&&xd((a=p.URI)!=null?a:p.VALUE,e),((r=le.get(e))!=null?r:{}).liveEdgeStartOffset=d,((n=le.get(e))!=null?n:{}).targetLiveWindow=l,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((s=le.get(e))!=null?s:{}).streamType=o,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},xd=async(t,e)=>{var i,a;try{let r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch Mux metadata: ${r.status} ${r.statusText}`);let n=await r.json(),s={};if(!((i=n?.[0])!=null&&i.metadata))return;for(let l of n[0].metadata)l.key&&l.value&&(s[l.key]=l.value);((a=le.get(e))!=null?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");e.dispatchEvent(o)}catch(r){console.error(r)}},sb=t=>{var e;let i=t.type,a=cm(i),r=hm(i),n,s=!!((e=t.partList)!=null&&e.length);return a===Q.LIVE&&(n=s?t.partTarget*2:t.targetduration*3),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}},ob=(t,e,i)=>{var a,r,n,s,o,l,d,m;let{streamType:p,targetLiveWindow:h,liveEdgeStartOffset:c,lowLatency:v}=sb(t);if(p===Q.LIVE){v?(i.config.backBufferLength=(a=i.userConfig.backBufferLength)!=null?a:4,i.config.maxFragLookUpTolerance=(r=i.userConfig.maxFragLookUpTolerance)!=null?r:.001,i.config.abrBandWidthUpFactor=(n=i.userConfig.abrBandWidthUpFactor)!=null?n:i.config.abrBandWidthFactor):i.config.backBufferLength=(s=i.userConfig.backBufferLength)!=null?s:8;let g=Object.freeze({get length(){return e.seekable.length},start(_){return e.seekable.start(_)},end(_){var y;return _>this.length||_<0||Number.isFinite(e.duration)?e.seekable.end(_):(y=i.liveSyncPosition)!=null?y:e.seekable.end(_)}});((o=le.get(e))!=null?o:{}).seekable=g}((l=le.get(e))!=null?l:{}).liveEdgeStartOffset=c,((d=le.get(e))!=null?d:{}).targetLiveWindow=h,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((m=le.get(e))!=null?m:{}).streamType=p,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},fc,Ec,lb=(Ec=(fc=globalThis?.navigator)==null?void 0:fc.userAgent)!=null?Ec:"",_c,bc,gc,db=(gc=(bc=(_c=globalThis?.navigator)==null?void 0:_c.userAgentData)==null?void 0:bc.platform)!=null?gc:"",yc,Tc,Ac,ub=(Ac=(Tc=(yc=globalThis?.navigator)==null?void 0:yc.userAgentData)==null?void 0:Tc.brands)!=null?Ac:[],cb=lb.toLowerCase().includes("android")||["x11","android"].some(t=>db.toLowerCase().includes(t)),kc=ub.find(t=>t.brand==="Google Chrome"),hb=t=>{var e;return kc&&parseInt((e=kc.version)!=null?e:"0")>=141&&!!t.canPlayType("application/vnd.apple.mpegurl")},le=new WeakMap,ei="mux.com",Sc,wc,Am=(wc=(Sc=B).isSupported)==null?void 0:wc.call(Sc),mb=t=>cb||hb(t),Od=()=>Id.utils.now(),pb=Id.utils.generateUUID,El=({playbackId:t,customDomain:e=ei,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:m=d}={},extraSourceParams:p={}}={})=>{if(!t)return;let[h,c=""]=Cd(t),v=new URL(`https://stream.${e}/${h}.m3u8${c}`);return m||v.searchParams.has("token")?(v.searchParams.forEach((g,_)=>{_!="token"&&v.searchParams.delete(_)}),m&&v.searchParams.set("token",m)):(i&&v.searchParams.set("max_resolution",i),a&&(v.searchParams.set("min_resolution",a),i&&+i.slice(0,-1)<+a.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",a,"maxResolution",i)),r&&v.searchParams.set("rendition_order",r),n&&v.searchParams.set("program_start_time",`${n}`),s&&v.searchParams.set("program_end_time",`${s}`),o&&v.searchParams.set("asset_start_time",`${o}`),l&&v.searchParams.set("asset_end_time",`${l}
25`),Object.entries(p).forEach(([g,_])=>{_!=null&&v.searchParams.set(g,_)})),v.toString()},yo=t=>{if(!t)return;let[e]=t.split("?");return e||void 0},Nd=t=>{if(!t||!t.startsWith("https://stream."))return;let[e]=new URL(t).pathname.slice(1).split(/\.m3u8|\//);return e||void 0},vb=t=>{var e,i,a;return(e=t?.metadata)!=null&&e.video_id?t.metadata.video_id:Dm(t)&&(a=(i=yo(t.playbackId))!=null?i:Nd(t.src))!=null?a:t.src},km=t=>{var e;return(e=le.get(t))==null?void 0:e.error},fb=t=>{var e;return(e=le.get(t))==null?void 0:e.metadata},_l=t=>{var e,i;return(i=(e=le.get(t))==null?void 0:e.streamType)!=null?i:Q.UNKNOWN},Eb=t=>{var e,i;return(i=(e=le.get(t))==null?void 0:e.targetLiveWindow)!=null?i:Number.NaN},Pd=t=>{var e,i;return(i=(e=le.get(t))==null?void 0:e.seekable)!=null?i:t.seekable},_b=t=>{var e;let i=(e=le.get(t))==null?void 0:e.liveEdgeStartOffset;if(typeof i!="number")return Number.NaN;let a=Pd(t);return a.length?a.end(a.length-1)-i:Number.NaN},$d=.034,bb=(t,e,i=$d)=>Math.abs(t-e)<=i,Sm=(t,e,i=$d)=>t>e||bb(t,e,i),gb=(t,e=$d)=>t.paused&&Sm(t.currentTime,t.duration,e),wm=(t,e)=>{var i,a,r;if(!e||!t.buffered.length)return;if(t.readyState>2)return!1;let n=e.currentLevel>=0?(a=(i=e.levels)==null?void 0:i[e.currentLevel])==null?void 0:a.details:(r=e.levels.find(p=>!!p.details))==null?void 0:r.details;if(!n||n.live)return;let{fragments:s}=n;if(!(s!=null&&s.length))return;if(t.currentTime<t.duration-(n.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),m=t.buffered.end(t.buffered.length-1);return l>d&&l<m},Im=(t,e)=>t.ended||t.loop?t.ended:e&&wm(t,e)?!0:gb(t),yb=(t,e,i)=>{Rm(e,i,t);let{metadata:a={}}=t,{view_session_id:r=pb()}=a,n=vb(t);a.view_session_id=r,a.video_id=n,t.metadata=a;let s=m=>{var p;(p=e.mux)==null||p.emit("hb",{view_drm_type:m})};t.drmTypeCb=s,le.set(e,{retryCount:0});let o=Tb(t,e),l=U_(t,e,o);t!=null&&t.muxDataKeepSession&&e!=null&&e.mux&&!e.mux.deleted?o&&e.mux.addHLSJS({hlsjs:o,Hls:o?B:void 0}):Rb(t,e,o),Cb(t,e,o),K_(e),q_(e);let d=$_(t,e,o);return{engine:o,setAutoplay:d,setPreload:l}},Rm=(t,e,i)=>{let a=e?.engine;t!=null&&t.mux&&!t.mux.deleted&&(i!=null&&i.muxDataKeepSession?a&&t.mux.removeHLSJS():(t.mux.destroy(),delete t.mux)),a&&(a.detachMedia(),a.destroy()),t&&(t.hasAttribute("src")&&(t.removeAttribute("src"),t.load()),t.removeEventListener("error",xm),t.removeEventListener("error",bl),t.removeEventListener("durationchange",Mm),le.delete(t),t.dispatchEvent(new Event("teardown")))};function Cm(t,e){var i;let a=go(t);if(a!==Jt.M3U8)return!0;let r=!a||((i=e.canPlayType(a))!=null?i:!0),{preferPlayback:n}=t,s=n===Ut.MSE,o=n===Ut.NATIVE,l=Am&&(s||mb(e));return r&&(o||!l)}var Tb=(t,e)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={}}=t,l=go(t)===Jt.M3U8,d=Cm(t,e);if(l&&!d&&Am){let m={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},p=Ab(a),h=kb(t),c=[vr.QUERY,vr.HEADER].includes(s)?{useHeaders:s===vr.HEADER,sessionId:n?.view_session_id,contentId:n?.video_id}:void 0,v=o.capLevelToPlayerSize==null?{capLevelController:z_}:{},g=new B({debug:i,startPosition:r,cmcd:c,xhrSetup:(_,y)=>{var T,E;if(s&&s!==vr.QUERY)return;let k=new URL(y);if(!k.searchParams.has("CMCD"))return;let L=((E=(T=k.searchParams.get("CMCD"))==null?void 0:T.split(","))!=null?E:[]).filter(O=>O.startsWith("sid")||O.startsWith("cid")).join(",");k.searchParams.set("CMCD",L),_.open("GET",k)},...v,...m,...p,...h,...o});return g.on(B.Events.MANIFEST_PARSED,async function(_,y){var T,E;let k=(T=y.sessionData)==null?void 0:T["com.apple.hls.chapters"];(k!=null&&k.URI||k!=null&&k.VALUE.toLocaleLowerCase().startsWith("http"))&&xd((E=k?.URI)!=null?E:k?.VALUE,e)}),g}},Ab=t=>t===Q.LIVE?{backBufferLength:8}:{},kb=t=>{let{tokens:{drm:e}={},playbackId:i,drmTypeCb:a}=t,r=yo(i);return!e||!r?{}:{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:On(t,"fairplay"),serverCertificateUrl:Lm(t,"fairplay")},"com.widevine.alpha":{licenseUrl:On(t,"widevine")},"com.microsoft.playready":{licenseUrl:On(t,"playready")}},requestMediaKeySystemAccessFunc:(n,s)=>(n==="com.widevine.alpha"&&(s=[...s.map(o=>{var l;let d=(l=o.videoCapabilities)==null?void 0:l.map(m=>({...m,robustness:"HW_SECURE_ALL"}));return{...o,videoCapabilities:d}}),...s]),navigator.requestMediaKeySystemAccess(n,s).then(o=>{let l=X_(n);return a?.(l),o}))}},Sb=async t=>{let e=await fetch(t);return e.status!==200?Promise.reject(e):await e.arrayBuffer()},wb=async(t,e)=>{let i=await fetch(e,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:t});if(i.status!==200)return Promise.reject(i);let a=await i.arrayBuffer();return new Uint8Array(a)},Ib=(t,e)=>{ve(e,"encrypted",async i=>{try{let a=i.initDataType;if(a!=="skd"){console.error(`Received unexpected initialization data type "${a}"`);return}if(!e.mediaKeys){let l=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[a],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(m=>{var p;return(p=t.drmTypeCb)==null||p.call(t,xn.FAIRPLAY),m}).catch(()=>{let m=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),p=new I(m,I.MEDIA_ERR_ENCRYPTED,!0);
25p.errorCategory=te.DRM,p.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,rt(e,p)});if(!l)return;let d=await l.createMediaKeys();try{let m=await Sb(Lm(t,"fairplay")).catch(p=>{if(p instanceof Response){let h=Ys(p,te.DRM,t);return console.error("mediaError",h?.message,h?.context),h?Promise.reject(h):Promise.reject(new Error("Unexpected error in app cert request"))}return Promise.reject(p)});await d.setServerCertificate(m).catch(()=>{let p=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),h=new I(p,I.MEDIA_ERR_ENCRYPTED,!0);return h.errorCategory=te.DRM,h.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(h)})}catch(m){rt(e,m);return}await e.setMediaKeys(d)}let r=i.initData;if(r==null){console.error(`Could not start encrypted playback due to missing initData in ${i.type} event`);return}let n=e.mediaKeys.createSession();n.addEventListener("keystatuseschange",()=>{n.keyStatuses.forEach(l=>{let d;if(l==="internal-error"){let m=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");d=new I(m,I.MEDIA_ERR_ENCRYPTED,!0),d.errorCategory=te.DRM,d.muxCode=x.ENCRYPTED_CDM_ERROR}else if(l==="output-restricted"||l==="output-downscaled"){let m=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");d=new I(m,I.MEDIA_ERR_ENCRYPTED,!1),d.errorCategory=te.DRM,d.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}d&&rt(e,d)})});let s=await Promise.all([n.generateRequest(a,r).catch(()=>{let l=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),d=new I(l,I.MEDIA_ERR_ENCRYPTED,!0);d.errorCategory=te.DRM,d.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED,rt(e,d)}),new Promise(l=>{n.addEventListener("message",d=>{l(d.message)},{once:!0})})]).then(([,l])=>l),o=await wb(s,On(t,"fairplay")).catch(l=>{if(l instanceof Response){let d=Ys(l,te.DRM,t);return console.error("mediaError",d?.message,d?.context),d?Promise.reject(d):Promise.reject(new Error("Unexpected error in license key request"))}return Promise.reject(l)});await n.update(o).catch(()=>{let l=D("Failed to update DRM license. This may be an issue with the player or your protected content."),d=new I(l,I.MEDIA_ERR_ENCRYPTED,!0);return d.errorCategory=te.DRM,d.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED,Promise.reject(d)})}catch(a){rt(e,a);return}})},On=({playbackId:t,tokens:{drm:e}={},customDomain:i=ei},a)=>{let r=yo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ei)?i:ei}/license/${a}/${r}?token=${e}`},Lm=({playbackId:t,tokens:{drm:e}={},customDomain:i=ei},a)=>{let r=yo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ei)?i:ei}/appcert/${a}/${r}?token=${e}`},Dm=({playbackId:t,src:e,customDomain:i})=>{if(t)return!0;if(typeof e!="string")return!1;let a=window?.location.href,r=new URL(e,a).hostname.toLocaleLowerCase();return r.includes(ei)||!!i&&r.includes(i.toLocaleLowerCase())},Rb=(t,e,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=Id,muxDataSDKOptions:o={}}=t,l=Dm(t);if(!n&&(r||l)){let{playerInitTime:d,playerSoftwareName:m,playerSoftwareVersion:p,beaconCollectionDomain:h,debug:c,disableCookies:v}=t,g={...t.metadata,video_title:((a=t?.metadata)==null?void 0:a.video_title)||void 0},_=y=>typeof y.player_error_code=="string"?!1:typeof t.errorTranslator=="function"?t.errorTranslator(y):y;s.monitor(e,{debug:c,beaconCollectionDomain:h,hlsjs:i,Hls:i?B:void 0,automaticErrorTracking:!1,errorTranslator:_,disableCookies:v,...o,data:{...r?{env_key:r}:{},player_software_name:m,player_software:m,player_software_version:p,player_init_time:d,...g}})}},Cb=(t,e,i)=>{var a,r;let n=Cm(t,e),{src:s,customDomain:o=ei}=t,l=()=>{e.ended||t.disablePseudoEnded||!Im(e,i)||(wm(e,i)?e.currentTime=e.buffered.end(e.buffered.length-1):e.dispatchEvent(new Event("ended")))},d,m,p=()=>{let h=Pd(e),c,v;h.length>0&&(c=h.start(0),v=h.end(0)),(m!==v||d!==c)&&e.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),d=c,m=v};if(ve(e,"durationchange",p),e&&n){let h=go(t);if(typeof s=="string"){if(s.endsWith(".mp4")&&s.includes(o)){let g=Nd(s),_=new URL(`https://stream.${o}/${g}/metadata.json`);xd(_.toString(),e)}let c=()=>
vendor: 8,288 bytes, lines 25-35
25{if(_l(e)!==Q.LIVE||Number.isFinite(e.duration))return;let g=setInterval(p,1e3);e.addEventListener("teardown",()=>{clearInterval(g)},{once:!0}),ve(e,"durationchange",()=>{Number.isFinite(e.duration)&&clearInterval(g)})},v=async()=>nb(s,e,h).then(c).catch(g=>{if(g instanceof Response){let _=Ys(g,te.VIDEO,t);if(_){rt(e,_);return}}});if(e.preload==="none"){let g=()=>{v(),e.removeEventListener("loadedmetadata",_)},_=()=>{v(),e.removeEventListener("play",g)};ve(e,"play",g,{once:!0}),ve(e,"loadedmetadata",_,{once:!0})}else v();(a=t.tokens)!=null&&a.drm?Ib(t,e):ve(e,"encrypted",()=>{let g=D("Attempting to play DRM-protected content without providing a DRM token."),_=new I(g,I.MEDIA_ERR_ENCRYPTED,!0);_.errorCategory=te.DRM,_.muxCode=x.ENCRYPTED_MISSING_TOKEN,rt(e,_)},{once:!0}),e.setAttribute("src",s),t.startTime&&(((r=le.get(e))!=null?r:{}).startTime=t.startTime,e.addEventListener("durationchange",Mm,{once:!0}))}else e.removeAttribute("src");e.addEventListener("error",xm),e.addEventListener("error",bl),e.addEventListener("emptied",()=>{e.querySelectorAll("track[data-removeondestroy]").forEach(c=>{c.remove()})},{once:!0}),ve(e,"pause",l),ve(e,"seeked",l),ve(e,"play",()=>{e.ended||Sm(e.currentTime,e.duration)&&(e.currentTime=e.seekable.length?e.seekable.start(0):0)})}else i&&s?(i.once(B.Events.LEVEL_LOADED,(h,c)=>{ob(c.details,e,i),p(),_l(e)===Q.LIVE&&!Number.isFinite(e.duration)&&(i.on(B.Events.LEVEL_UPDATED,p),ve(e,"durationchange",()=>{Number.isFinite(e.duration)&&i.off(B.Events.LEVELS_UPDATED,p)}))}),i.on(B.Events.ERROR,(h,c)=>{var v,g;let _=Lb(c,t);if(_.muxCode===x.NETWORK_NOT_READY){let y=(v=le.get(e))!=null?v:{},T=(g=y.retryCount)!=null?g:0;if(T<6){let E=T===0?5e3:6e4,k=new I(`Retrying in ${E/1e3} seconds...`,_.code,_.fatal);Object.assign(k,_),rt(e,k),setTimeout(()=>{y.retryCount=T+1,c.details==="manifestLoadError"&&c.url&&i.loadSource(c.url)},E);return}else{y.retryCount=0;let E=new I('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',_.code,_.fatal);Object.assign(E,_),rt(e,E);return}}rt(e,_)}),i.on(B.Events.MANIFEST_LOADED,()=>{let h=le.get(e);h&&h.error&&(h.error=null,h.retryCount=0,e.dispatchEvent(new Event("emptied")),e.dispatchEvent(new Event("loadstart")))}),e.addEventListener("error",bl),ve(e,"waiting",l),H_(t,i),B_(e,i),i.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 Mm(t){var e;let i=t.target,a=(e=le.get(i))==null?void 0:e.startTime;if(a&&I_(i.seekable,i.duration,a)){let r=i.preload==="auto";r&&(i.preload="none"),i.currentTime=a,r&&(i.preload="auto")}}async function xm(t){if(!t.isTrusted)return;t.stopImmediatePropagation();let e=t.target;if(!(e!=null&&e.error))return;let{message:i,code:a}=e.error,r=new I(i,a);if(e.src&&a===I.MEDIA_ERR_SRC_NOT_SUPPORTED&&e.readyState===HTMLMediaElement.HAVE_NOTHING){setTimeout(()=>{var n;let s=(n=km(e))!=null?n:e.error;s?.code===I.MEDIA_ERR_SRC_NOT_SUPPORTED&&rt(e,r)},500);return}if(e.src&&(a!==I.MEDIA_ERR_DECODE||a!==void 0))try{let{status:n}=await fetch(e.src);r.data={response:{code:n}}}catch{}rt(e,r)}function rt(t,e){var i;e.fatal&&(((i=le.get(t))!=null?i:{}).error=e,t.dispatchEvent(new CustomEvent("error",{detail:e})))}function bl(t){var e,i;if(!(t instanceof CustomEvent)||!(t.detail instanceof I))return;let a=t.target,r=t.detail;!r||!r.fatal||(((e=le.get(a))!=null?e:{}).error=r,(i=a.mux)==null||i.emit("error",{player_error_code:r.code,player_error_message:r.message,player_error_context:r.context}))}var Lb=(t,e)=>{var i,a,r;console.error("getErrorFromHlsErrorData()",t);let n={[B.ErrorTypes.NETWORK_ERROR]:I.MEDIA_ERR_NETWORK,[B.ErrorTypes.MEDIA_ERROR]:I.MEDIA_ERR_DECODE,[B.ErrorTypes.KEY_SYSTEM_ERROR]:I.MEDIA_ERR_ENCRYPTED},s=m=>[B.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(m.details)?I.MEDIA_ERR_NETWORK:n[m.type],o=m=>{if(m.type===B.ErrorTypes.KEY_SYSTEM_ERROR)return te.DRM;if(m.type===B.ErrorTypes.NETWORK_ERROR)return te.VIDEO},l,d=s(t);if(d===I.MEDIA_ERR_NETWORK&&t.response){let m=(i=o(t))!=null?i:te.VIDEO;l=(a=Ys(t.response,m,e,t.fatal))!=null?a:new I("",d,t.fatal)}else if(d===I.MEDIA_ERR_ENCRYPTED)if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE){let m=D("Attempting to play DRM-protected content without providing a DRM token.");l=new I(m,I.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_MISSING_TOKEN}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_ACCESS){let m=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.");l=new I(m,I.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_SESSION){let m=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content.");l=new I(m,I.MEDIA_ERR_ENCRYPTED,!0),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED){let m=D("Failed to update DRM license. This may be an issue with the player or your protected content.");l=new I(m,I.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED){let m=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate.");l=new I(m,I.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR){let m=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");l=new I(m,I.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_CDM_ERROR}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED){let m=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");l=new I(m,I.MEDIA_ERR_ENCRYPTED,!1),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}else l=new I(t.error.message,I.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_ERROR;else l=new I("",d,t.fatal);return l.context||(l.context=`${t.url?`url: ${t.url} 26`:""}${t.response&&(t.response.code||t.response.text)?`response: ${t.response.code}, ${t.response.text} 27`:""}${t.reason?`failure reason: ${t.reason} 28`:""}${t.level?`level: ${t.level} 29`:""}${t.parent?`parent stream controller: ${t.parent} 30`:""}${t.buffer?`buffer length: ${t.buffer} 31`:""}${t.error?`error: ${t.error} 32`:""}${t.event?`event: ${t.event} 33`:""}${t.err?`error message: ${(r=t.err)==null?void 0:r.message} 34`:""}`),l.data=t,l},Om=t=>{throw TypeError(t)},Ud=(t,e,i)=>e.has(t)||Om("Cannot "+i),Ce=(t,e,i)=>(Ud(t,e,"read from private field"),i?i.call(t):e.get(t)),ut=(t,e,i)=>e.has(t)?Om("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),tt=(t,e,i,a)=>(Ud(t,e,"write to private field"),e.set(t,i),i),qo=(t,e,i)=>(Ud(t,e,"access private method"),i),Db=()=>{try{return"0.27.2"}catch{}return"UNKNOWN"},Mb=Db(),xb=()=>Mb,Ob=` 35<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.3
3569 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>`,b={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",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"},Nb=Object.values(b),Ic=xb(),Rc="mux-video",St,fr,Nn,Er,Pn,$n,Un,Hn,Bn,_r,br,Wn,Pb=class extends pn{constructor(){super(),ut(this,br),ut(this,St),ut(this,fr),ut(this,Nn),ut(this,Er,{}),ut(this,Pn,{}),ut(this,$n),ut(this,Un),ut(this,Hn),ut(this,Bn),ut(this,_r,""),tt(this,Nn,Od()),this.nativeEl.addEventListener("muxmetadata",e=>{var i;let a=fb(this.nativeEl),r=(i=this.metadata)!=null?i:{};this.metadata={...a,...r},a?.["com.mux.video.branding"]==="mux-free-plan"&&(tt(this,_r,"default"),this.updateLogo())})}static get NAME(){return Rc}static get VERSION(){return Ic}static get observedAttributes(){var e;return[...Nb,...(e=pn.observedAttributes)!=null?e:[]]}static getLogoHTML(e){return!e||e==="false"?"":e==="default"?Ob:`<img part="logo" src="${e}" />`}static getTemplateHTML(e={}){var i;return` 36 ${pn.getTemplateHTML(e)} 37 <style> 38 :host { 39 position: relative; 40 } 41 slot[name="logo"] { 42 display: flex; 43 justify-content: end; 44 position: absolute; 45 top: 1rem; 46 right: 1rem; 47 opacity: 0; 48 transition: opacity 0.25s ease-in-out; 49 z-index: 1; 50 } 51 slot[name="logo"]:has([part="logo"]) { 52 opacity: 1; 53 } 54 slot[name="logo"] [part="logo"] { 55 width: 5rem; 56 pointer-events: none; 57 user-select: none; 58 } 59 </style> 60 <slot name="logo"> 61 ${this.getLogoHTML((i=e[b.LOGO])!=null?i:"")} 62 </slot> 63 `}get preferCmcd(){var e;return(e=this.getAttribute(b.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?qs.includes(e)?this.setAttribute(b.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${qs.join()}`):this.removeAttribute(b.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?+this.getAttribute(b.PLAYER_INIT_TIME):Ce(this,Nn)}set playerInitTime(e){e!=this.playerInitTime&&(e==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return(e=Ce(this,Hn))!=null?e:Rc}set playerSoftwareName(e){tt(this,Hn,e)}get playerSoftwareVersion(){var e;return(e=Ce(this,Un))!=null?e:Ic}set playerSoftwareVersion(e){tt(this,Un,e)}get _hls(){var e;return(e=Ce(this,St))==null?void 0:e.engine}get mux(){var e;return(e=this.nativeEl)==null?void 0:e.mux}get error(){var e;return(e=km(this.nativeEl))!=null?e:null}get errorTranslator(){return Ce(this,Bn)}set errorTranslator(e){tt(this,Bn,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(e==null?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return(e=this.getAttribute(b.TYPE))!=null?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(b.TYPE,e):this.removeAttribute(b.TYPE))}get preload(){let e=this.getAttribute("preload");return e===""?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return this.getAttribute(b.DEBUG)!=null}set debug(e){e!==this.debug&&(e?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG))}get disableTracking(){return this.hasAttribute(b.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(b.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(b.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(b.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(b.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(b.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(b.START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set startTime(e){e!==this.startTime&&(e==null?this.removeAttribute(b.START_TIME):this.setAttribute(b.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(b.PLAYBACK_ID)?this.getAttribute(b.PLAYBACK_ID):(e=Nd(this.src))!=null?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(b.PLAYBACK_ID,e):this.removeAttribute(b.PLAYBACK_ID))}get maxResolution(){var e;return(e=this.getAttribute(b.MAX_RESOLUTION))!=null?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(b.MAX_RESOLUTION,e):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var e;return(e=this.getAttribute(b.MIN_RESOLUTION))!=null?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(b.MIN_RESOLUTION,e):this.removeAttribute(b.MIN_RESOLUTION))}get renditionOrder(){var e;return(e=this.getAttribute(b.RENDITION_ORDER))!=null?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(b.RENDITION_ORDER,e):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(b.PROGRAM_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programStartTime(e){e==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(b.PROGRAM_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programEndTime(e){e==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(b.ASSET_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetStartTime(e){e==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(b.ASSET_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetEndTime(e){e==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return(e=this.getAttribute(b.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(b.CUSTOM_DOMAIN,e):this.removeAttribute(b.CUSTOM_DOMAIN))}get drmToken(){var e;return(e=this.getAttribute(b.DRM_TOKEN))!=null?e:void 0}
vendor: 4,004 bytes, line 63
63set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(b.DRM_TOKEN,e):this.removeAttribute(b.DRM_TOKEN))}get playbackToken(){var e,i,a,r;if(this.hasAttribute(b.PLAYBACK_TOKEN))return(e=this.getAttribute(b.PLAYBACK_TOKEN))!=null?e:void 0;if(this.hasAttribute(b.PLAYBACK_ID)){let[,n]=Cd((i=this.playbackId)!=null?i:"");return(a=new URLSearchParams(n).get("token"))!=null?a:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(b.PLAYBACK_TOKEN,e):this.removeAttribute(b.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(b.PLAYBACK_TOKEN),i=this.getAttribute(b.DRM_TOKEN);return{...Ce(this,Pn),...e!=null?{playback:e}:{},...i!=null?{drm:i}:{}}}set tokens(e){tt(this,Pn,e??{})}get ended(){return Im(this.nativeEl,this._hls)}get envKey(){var e;return(e=this.getAttribute(b.ENV_KEY))!=null?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(b.ENV_KEY,e):this.removeAttribute(b.ENV_KEY))}get beaconCollectionDomain(){var e;return(e=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return(e=this.getAttribute(b.STREAM_TYPE))!=null?e:_l(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(b.STREAM_TYPE,e):this.removeAttribute(b.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(b.TARGET_LIVE_WINDOW)?+this.getAttribute(b.TARGET_LIVE_WINDOW):Eb(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(e==null?this.removeAttribute(b.TARGET_LIVE_WINDOW):this.setAttribute(b.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,i;if(this.hasAttribute(b.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:a}=this,r=(e=this.nativeEl.seekable.end(0))!=null?e:0,n=(i=this.nativeEl.seekable.start(0))!=null?i:0;return Math.max(n,r-a)}return _b(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(b.LIVE_EDGE_OFFSET))return+this.getAttribute(b.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(e==null?this.removeAttribute(b.LIVE_EDGE_OFFSET):this.setAttribute(b.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return Pd(this.nativeEl)}async addCuePoints(e){return fm(this.nativeEl,e)}get activeCuePoint(){return Em(this.nativeEl)}get cuePoints(){return F_(this.nativeEl)}async addChapters(e){return bm(this.nativeEl,e)}get activeChapter(){return gm(this.nativeEl)}get chapters(){return V_(this.nativeEl)}getStartDate(){return Y_(this.nativeEl,this._hls)}get currentPdt(){return G_(this.nativeEl,this._hls)}get preferPlayback(){let e=this.getAttribute(b.PREFER_PLAYBACK);if(e===Ut.MSE||e===Ut.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===Ut.MSE||e===Ut.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,e):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![b.METADATA_URL].includes(e)).reduce((e,i)=>{let a=this.getAttribute(i);return a!=null&&(e[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),e},{}),...Ce(this,Er)}}set metadata(e){tt(this,Er,e??{}),this.mux&&this.mux.emit("hb",Ce(this,Er))}get _hlsConfig(){return Ce(this,$n)}set _hlsConfig(e){tt(this,$n,e)}get logo(){var e;return(e=this.getAttribute(b.LOGO))!=null?e:Ce(this,_r)}set logo(e){e?this.setAttribute(b.LOGO,e):this.removeAttribute(b.LOGO)}load(){tt(this,St,yb(this,this.nativeEl,Ce(this,St)))}unload(){Rm(this.nativeEl,Ce(this,St),this),tt(this,St,void 0)}attributeChangedCallback(e,i,a){var r,n;switch(pn.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,i,a),e){case b.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=a??void 0;break;case b.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=a??void 0;break;case"src":{let s=!!i,o=!!a;!s&&o?qo(this,br,Wn).call(this):s&&!o?this.unload():s&&o&&(this.unload(),qo(this,br,Wn).call(this));break}
63case"autoplay":if(a===i)break;(r=Ce(this,St))==null||r.setAutoplay(this.autoplay);break;case"preload":if(a===i)break;(n=Ce(this,St))==null||n.setPreload(a);break;case b.PLAYBACK_ID:this.src=El(this);break;case b.DEBUG:{let s=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=s);break}case b.METADATA_URL:a&&fetch(a).then(s=>s.json()).then(s=>this.metadata=s).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${a}!`));break;case b.STREAM_TYPE:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case b.TARGET_LIVE_WINDOW:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case b.LOGO:(a==null||a!==i)&&this.updateLogo();break}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');if(!e)return;let i=this.constructor.getLogoHTML(Ce(this,_r)||this.logo);e.innerHTML=i}connectedCallback(){var e;(e=super.connectedCallback)==null||e.call(this),this.nativeEl&&this.src&&!Ce(this,St)&&qo(this,br,Wn).call(this)}disconnectedCallback(){this.unload()}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};St=new WeakMap,fr=new WeakMap,Nn=new WeakMap,Er=new WeakMap,Pn=new WeakMap,$n=new WeakMap,Un=new WeakMap,Hn=new WeakMap,Bn=new WeakMap,_r=new WeakMap,br=new WeakSet,Wn=async function(){Ce(this,fr)||(await tt(this,fr,Promise.resolve()),tt(this,fr,null),this.load())};const Gi=new WeakMap;class Yo extends Error{}class $b extends Error{}const Ub=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"],Hb=globalThis.WeakRef?class extends Set{add(t){super.add(new WeakRef(t))}forEach(t){super.forEach(e=>{const i=e.deref();i&&t(i)})}}:Set;function Bb(t){globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?t():customElements.whenDefined("google-cast-button").then(t):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(t)}}function Wb(){return globalThis.chrome}function Fb(){const t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${t}"]`))return;const e=document.createElement("script");e.src=t,document.head.append(e)}function gi(){return globalThis.cast?.framework?.CastContext.getInstance()}function Hd(){return gi()?.getCurrentSession()}function Bd(){return Hd()?.getSessionObj().media[0]}function Kb(t){return new Promise((e,i)=>{Bd().editTracksInfo(t,e,i)})}function Vb(t){return new Promise((e,i)=>{Bd().getStatus(t,e,i)})}function Cc(t){return gi().setOptions({...Nm(),...t})}function Nm(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}function qb(t){if(!t)return;const e=/\.([a-zA-Z0-9]+)(?:\?.*)?$/,i=t.match(e);return i?i[1]:null}function Yb(t){const e=t.split(` 64`),i=[];for(let a=0;a<e.length;a++)if(e[a].trim().startsWith("#EXT-X-STREAM-INF")){const n=e[a+1]?e[a+1].trim():"";n&&!n.startsWith("#")&&i.push(n)}return i}function Gb(t){return t.split(` 65`).find(a=>!a.trim().startsWith("#")&&a.trim()!=="")}async function Qb(t){try{const i=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return Ub.some(a=>i===a)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function jb(t){try{const e=await(await fetch(t)).text();let i=e;const a=Yb(e);if(a.length>0){const s=new URL(a[0],t).toString();i=await(await fetch(s)).text()}const r=Gb(i);return qb(r)}catch(e){console.error("Error while trying to parse the manifest playlist",e);return}}const Fn=new Hb,ni=new WeakSet;let be;Bb(()=>{if(!globalThis.chrome?.cast?.isAvailable){console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable);return}be||(be=cast.framework,gi().addEventListener(be.CastContextEventType.CAST_STATE_CHANGED,t=>
65{Fn.forEach(e=>Gi.get(e).onCastStateChanged?.(t))}),gi().addEventListener(be.CastContextEventType.SESSION_STATE_CHANGED,t=>{Fn.forEach(e=>Gi.get(e).onSessionStateChanged?.(t))}),Fn.forEach(t=>Gi.get(t).init?.()))});let Lc=0;class Zb extends EventTarget{#t;#s;#i;#a;#e="disconnected";#r=!1;#o=new Set;#c=new WeakMap;constructor(e){super(),this.#t=e,Fn.add(this),Gi.set(this,{init:()=>this.#d(),onCastStateChanged:()=>this.#l(),onSessionStateChanged:()=>this.#p(),getCastPlayer:()=>this.#n}),this.#d()}get#n(){if(ni.has(this.#t))return this.#i}get state(){return this.#e}async watchAvailability(e){if(this.#t.disableRemotePlayback)throw new Yo("disableRemotePlayback attribute is present.");return this.#c.set(e,++Lc),this.#o.add(e),queueMicrotask(()=>e(this.#m())),Lc}async cancelWatchAvailability(e){if(this.#t.disableRemotePlayback)throw new Yo("disableRemotePlayback attribute is present.");e?this.#o.delete(e):this.#o.clear()}async prompt(){if(this.#t.disableRemotePlayback)throw new Yo("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new $b("The RemotePlayback API is disabled on this platform.");const e=ni.has(this.#t);ni.add(this.#t),Cc(this.#t.castOptions),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await gi().requestSession()}catch(i){if(e||ni.delete(this.#t),i==="cancel")return;throw new Error(i)}Gi.get(this.#t)?.loadOnPrompt?.()}#h(){ni.has(this.#t)&&(Object.entries(this.#a).forEach(([e,i])=>{this.#i.controller.removeEventListener(e,i)}),ni.delete(this.#t),this.#t.muted=this.#i.isMuted,this.#t.currentTime=this.#i.savedPlayerState.currentTime,this.#i.savedPlayerState.isPau
65sed===!1&&this.#t.play())}#m(){const e=gi()?.getCastState();return e&&e!=="NO_DEVICES_AVAILABLE"}#l(){const e=gi().getCastState();if(ni.has(this.#t)&&e==="CONNECTING"&&(this.#e="connecting",this.dispatchEvent(new Event("connecting"))),!this.#r&&e?.includes("CONNECT")){this.#r=!0;for(let i of this.#o)i(!0)}else if(this.#r&&(!e||e==="NO_DEVICES_AVAILABLE")){this.#r=!1;for(let i of this.#o)i(!1)}}async#p(){const{SESSION_RESUMED:e}=be.SessionState;if(gi().getSessionState()===e&&this.#t.castSrc===Bd()?.media.contentId){ni.add(this.#t),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await Vb(new chrome.cast.media.GetStatusRequest)}catch(i){console.error(i)}this.#a[be.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#a[be.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#d(){!be||this.#s||(this.#s=!0,Cc(this.#t.castOptions),this.#t.textTracks.addEventListener("change",()=>this.#u()),this.#l(),this.#i=new be.RemotePlayer,new be.RemotePlayerController(this.#i),this.#a={[be.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")))},[be.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#t.dispatchEvent(new Event("durationchange"))},[be.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[be.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[be.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#n?.isMediaLoaded&&this.#t.dispatchEvent(new Event("timeupdate"))},[be.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#t.dispatchEvent(new Event("resize"))},[be.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#t.dispatchEvent(new Event(this.paused?"pause":"play"))},[be.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#n?.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.#n?.playerState]))},[be.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#n?.isMediaLoaded&&(await Promise.resolve(),this.#v())}})}#v(){this.#u()}async#u(){if(!this.#n)return;const i=(this.#i.mediaInfo?.tracks??[]).filter(({type:p})=>p===chrome.cast.media.TrackType.TEXT),a=[...this.#t.textTracks].filter(({kind:p})=>p==="subtitles"||p==="captions"),r=i.map(({language:p,name:h,trackId:c})=>{const{mode:v}=a.find(g=>g.language===p&&g.label===h)??{};return v?{mode:v,trackId:c}:!1}).filter(Boolean),s=r.filter(({mode:p})=>p!=="showing").map(({trackId:p})=>p),o=r.find(({mode:p})=>p==="showing"),l=Hd()?.getSessionObj().media[0]?.activeTrackIds??[];let d=l;if(l.length&&(d=d.filter(p=>!s.includes(p))),o?.trackId&&(d=[...d,o.trackId]),d=[...new Set(d)],!((p,h)=>p.length===h.length&&p.every(c=>h.includes(c)))(l,d))try{const p=new chrome.cast.media.EditTracksInfoRequest(d);await Kb(p)}catch(p){console.error(p)}}}const zb=t=>class extends t{static observedAttributes=[...t.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#t={paused:!1};#s=Nm();#i;#a;get remote(){return this.#a?this.#a:Wb()?(this.disableRemotePlayback||Fb(),Gi.set(this,{loadOnPrompt:()=>this.#r()}),this.#a=new Zb(this)):super.remote}get#e(){return Gi.get(this.remote)?.getCastPlayer?.()}attributeChangedCallback(i,a,r){if(super.attributeChangedCallback(i,a,r),i==="cast-receiver"&&r){this.#s.receiverApplicationId=r;return}if(this.#e)switch(i){case"cast-stream-type":case"cast-src":this.load();break}}async#r(){this.#t.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(i){console.error(i)}}async load(){if(!this.#e)return super.load();const i=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);i.customData=this.castCustomData;const a=[...this.querySelectorAll("track")].filter(({kind:o,src:l})=>l&&(o==="subtitles"||o==="captions")),r=[];let n=0;if(a.length&&(i.tracks=a.map(o=>{const l=++n;r.length===0&&o.track.mode==="showing"&&r.push(l);const d=new chrome.cast.media.Track(l,chrome.cast.media.TrackType.TEXT);return d.trackContentId=o.src,d.trackContentType="text/vtt",d.subtype=o.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,d.name=o.label,d.language=o.srclang,d})),this.castStreamType==="live"?i.streamType=chrome.cast.media.StreamType.LIVE:i.streamType=chrome.cast.media.StreamType.BUFFERED,i.metadata=new chrome.cast.media.GenericMediaMetadata,i.metadata.title=this.title,i.metadata.images=[{url:this.poster}],Qb(this.castSrc)){const o=await jb(this.castSrc);o?.includes("m4s")||o?.includes("mp4")?(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):o?.includes("ts")&&(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}const s=new chrome.cast.media.LoadRequest(i);s.currentTime=super.currentTime??0,s.autoplay=!this.#t.paused,s.activeTrackIds=r,await Hd()?.loadMedia(s),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#e){this.#e.isPaused&&this.#e.controller?.playOrPause();return}return super.play()}pause(){if(this.#e){this.#e.isPaused||this.#e.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#s}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(i){this.castReceiver!=i&&this.setAttribute("cast-receiver",`${i}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(i){this.castSrc!=i&&this.setAttribute("cast-src",`${i}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(i){this.setAttribute("cast-content-type",`${i}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(i){this.setAttribute("cast-stream-type",`${i}`)}get castCustomData(){return this.#i}set castCustomData(i){const a=typeof i;if(!["object","undefined"].includes(a)){console.error(`castCustomData must be nullish or an object but value was of type ${a}`);return}this.#i=i}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(i){if(this.#e){(i&&!this.#e.isMuted||!i&&this.#e.isMuted)&&this.#e.controller?.muteOr
65Unmute();return}super.muted=i}get volume(){return this.#e?this.#e?.volumeLevel??1:super.volume}set volume(i){if(this.#e){this.#e.volumeLevel=+i,this.#e.controller?.setVolumeLevel();return}super.volume=i}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(i){if(this.#e){this.#e.currentTime=i,this.#e.controller?.seek();return}super.currentTime=i}};var Pm=t=>{throw TypeError(t)},$m=(t,e,i)=>e.has(t)||Pm("Cannot "+i),Xb=(t,e,i)=>($m(t,e,"read from private field"),i?i.call(t):e.get(t)),Jb=(t,e,i)=>e.has(t)?Pm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),eg=(t,e,i,a)=>($m(t,e,"write to private field"),e.set(t,i),i),Um=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment>"u"){class t extends Um{}globalThis.DocumentFragment=t}var tg=class extends Um{},ig={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(tg)}},ag={customElements:ig},rg=typeof window>"u"||typeof globalThis.customElements>"u",Go=rg?ag:globalThis,Kn,Dc=class extends zb(tf(Pb)){constructor(){super(...arguments),Jb(this,Kn)}get autoplay(){let t=this.getAttribute("autoplay");return t===null?!1:t===""?!0:t}set autoplay(t){let e=this.autoplay;t!==e&&(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=Xb(this,Kn))!=null?t:this.muxCastCustomData}set castCustomData(t){eg(this,Kn,t)}};Kn=new WeakMap;Go.customElements.get("mux-video")||(Go.customElements.define("mux-video",Dc),Go.MuxVideoElement=Dc);const R={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",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"},q={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},Hm={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_P
65LAYED:"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_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"},Bm=Object.entries(Hm),u=Bm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),ng={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},ii=Bm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...ng});Object.entries(ii).reduce((t,[e,i])=>{const a=u[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"});const sg=Object.entries(u).reduce((t,[e,i])=>{const a=ii[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),Wt={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},Na={DISABLED:"disabled",SHOWING:"showing"},Qo={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Ye={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},Zt={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},og={FULLSCREEN:"fullscreen"};function lg(t){return t?.map(ug).join(" ")}function dg(t){return t?.split(/\s+/).map(cg)}function ug(t){if(t){const{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function cg(t){if(t){const[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function hg(t){return t?.map(pg).join(" ")}function mg(t){return t?.split(/\s+/).map(vg)}function pg(t){if(t){const{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(n=>n!=null).join(":")}}function vg(t){if(t){const[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function fg(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function Wd(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Wm(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}const Fm=t=>new Promise(e=>setTimeout(e,t)),Mc=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Eg=(t,e)=>{const i=t===1?Mc[e].singular:Mc[e].plural;return`${t} ${i}`},Ur=t=>{if(!Wd(t))return"";const e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((o,l)=>o&&Eg(o,l)).filter(o=>o).join(", ")}${i?" remaining":""}`};function Ti(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;
65let a=Math.floor(t%60),r=Math.floor(t/60%60),n=Math.floor(t/3600);const s=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(n=r=a="0"),n=n>0||o>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(i?"-":"")+n+r+a}const _g={"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","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
65Error","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."};var xc;const jo={en:_g};let gl=((xc=globalThis.navigator)==null?void 0:xc.language)||"en";const bg=t=>{gl=t},gg=t=>{var e,i,a;const[r]=gl.split("-");return((e=jo[gl])==null?void 0:e[t])||((i=jo[r])==null?void 0:i[t])||((a=jo.en)==null?void 0:a[t])||t},C=(t,e={})=>gg(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);let Km=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}};class Vm extends Km{}let Oc=class extends Vm{constructor(){super(...arguments),this.role=null}};class yg{observe(){}unobserve(){}disconnect(){}}const qm={createElement:function(){return new jr.HTMLElement},createElementNS:function(){return new jr.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},jr={ResizeObserver:yg,document:qm,Node:Vm,Element:Oc,HTMLElement:class extends Oc{constructor(){super(...arguments),this.innerHTML=""}get content(){return new jr.DocumentFragment}},DocumentFragment:class extends Km{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},Ym=typeof window>"u"||typeof window.customElements>"u",Gm=Object.keys(jr).every(t=>t in globalThis),f=Ym&&!Gm?jr:globalThis,ye=Ym&&!Gm?qm:globalThis.document,Nc=new WeakMap,Fd=t=>{let e=Nc.get(t);return e||Nc.set(t,e=new Set),e},Qm=new f.ResizeObserver(t=>{for(const e of t)for(const i of Fd(e.target))i(e)});function Ka(t,e){Fd(t).add(e),Qm.observe(t)}function Va(t,e){const i=Fd(t);i.delete(e),i.size||Qm.unobserve(t)}function ze(t){const e={};for(const i of t)e[i.name]=i.value;return e}function Ue(t){var e;return(e=yl(t))!=null?e:Za(t,"media-controller")}function yl(t){var e;const{MEDIA_CONTROLLER:i}=q,a=t.getAttribute(i);if(a)return(e=To(t))==null?void 0:e.getElementById(a)}const jm=(t,e,i=".value")=>{const a=t.querySelector(i);a&&(a.textContent=e)},Tg=(t,e)=>{const i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},Zm=(t,e)=>Tg(t,e)[0],ri=(t,e)=>!t||!e?!1:t?.contains(e)?!0:ri(t,e.getRootNode().host),Za=(t,e)=>{if(!t)return null;const i=t.closest(e);return i||Za(t.getRootNode().host,e)};function Kd(t=document){var e;const i=t?.activeElement;return i?(e=Kd(i.shadowRoot))!=null?e:i:null}function To(t){var e;const i=(e=t?.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function zm(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){const n=getComputedStyle(r);if(i&&n.opacity==="0"||a&&n.visibility==="hidden"||n.display==="none")return!1;r=r.parentElement,e--}return!0}function Ag(t,e,i,a){const r=a.x-i.x,n=a.y-i.y,s=r*r+n*n;if(s===0)return 0;const o=((t-i.x)*r+(e-i.y)*n)/s;return Math.max(0,Math.min(1,o))}function Ee(t,e){const i=kg(t,a=>a===e);return i||Xm(t,e)}function kg(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let n;try{n=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(const s of n??[])if(e(s.selectorText))return s}}function Xm(t,e){var i,a;const r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],n=r?.[r.length-1];return n?.sheet?(n?.sheet.insertRule(`${e}{}`,n.sheet.cssRules.length),(a=n.sheet.cssRules)==null?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ie(t,e,i=Number.NaN){const a=t.getAttribute(e);return a!=null?+a:i}function de(t,e,i){const a=+i;
65if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}ie(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function W(t,e){return t.hasAttribute(e)}function F(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}W(t,e)!=i&&t.toggleAttribute(e,i)}function ae(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function re(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}const a=`${i}`;ae(t,e,void 0)!==a&&t.setAttribute(e,a)}var Jm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},si=(t,e,i)=>(Jm(t,e,"read from private field"),i?i.call(t):e.get(t)),Sg=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},fn=(t,e,i,a)=>(Jm(t,e,"write to private field"),e.set(t,i),i),Pe;function wg(t){return` 66 <style> 67 :host { 68 display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block)); 69 box-sizing: border-box; 70 } 71 </style> 72 `}class Ao extends f.HTMLElement{constructor(){if(super(),Sg(this,Pe,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER,u.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER&&(i&&((n=(r=si(this,Pe))==null?void 0:r.unassociateElement)==null||n.call(r,this),fn(this,Pe,null)),a&&this.isConnected&&(fn(this,Pe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=si(this,Pe))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),fn(this,Pe,Ig(this)),this.getAttribute(q.MEDIA_CONTROLLER)&&((i=(e=si(this,Pe))==null?void 0:e.associateElement)==null||i.call(e,this)),(a=si(this,Pe))==null||a.addEventListener("pointerdown",this),(r=si(this,Pe))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,i,a,r;this.getAttribute(q.MEDIA_CONTROLLER)&&((i=(e=si(this,Pe))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=si(this,Pe))==null||a.removeEventListener("pointerdown",this),(r=si(this,Pe))==null||r.removeEventListener("click",this),fn(this,Pe,null)}handleEvent(e){var i;const a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a?.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){const{clientX:n,clientY:s}=e,{left:o,top:l,width:d,height:m}=this.getBoundingClientRect(),p=n-o,h=s-l;if(p<0||h<0||p>d||h>m||d===0&&m===0)return;const c=this._pointerType||"mouse";if(this._pointerType=void 0,c===Qo.TOUCH){this.handleTap(e);return}else if(c===Qo.MOUSE||c===Qo.PEN){this.handleMouseClick(e);return}}}}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const i=this.mediaPaused?R.MEDIA_PLAY_REQUEST:R.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new f.CustomEvent(i,{composed:!0,bubbles:!0}))}}Pe=new WeakMap;Ao.shadowRootOptions={mode:"open"};Ao.getTemplateHTML=wg;function Ig(t){var e;const i=t.getAttribute(q.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):Za(t,"media-controller")}f.customElements.get("media-gesture-receiver")||f.customElements.define("media-gesture-receiver",Ao);var Pc=Ao,Vd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ze=(t,e,i)=>(Vd(t,e,"read from private field"),i?i.call(t):e.get(t)),Ge=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Li=(t,e,i,a)=>(Vd(t,e,"write to private field"),e.set(t,i),i),nt=(t,e,i)=>(Vd(t,e,"access private method"),i),Gs,ca,Zr,Ca,Vn,Tl,ep,gr,qn,Al,tp,kl,ip,zr,ko,So,qd,qa,Xr;const M={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function Rg(t){return` 73 <style> 74 75 :host([${u.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) { 76 outline: none; 77 } 78 79 :host { 80 box-sizing: border-box; 81 position: relative; 82 display: inline-block; 83 line-height: 0; 84 background-color: var(--media-background-color, #000); 85 overflow: hidden; 86 } 87 88 :host(:not([${M.AUDIO}])) [part~=layer]:not([part~=media-layer]) { 89 position: absolute; 90 top: 0; 91 left: 0; 92 bottom: 0; 93 right: 0; 94 display: flex; 95 flex-flow: column nowrap; 96 align-items: start; 97 pointer-events: none; 98 background: none; 99 } 100 101 slot[name=media] { 102 display: var(--media-slot-display, contents); 103 } 104 105 106 :host([${M.AUDIO}]) slot[name=media] { 107 display: var(--media-slot-display, none); 108 } 109 110 111 :host([${M.AUDIO}]) [part~=layer][part~=gesture-layer] { 112 height: 0; 113 display: block; 114 } 115 116 117 :host(:not([${M.AUDIO}])[${M.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]), 118 :host(:not([${M.AUDIO}])[${M.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] { 119 display: none; 120 } 121 122 123 ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) { 124 pointer-events: auto; 125 } 126 127 :host(:not([${M.AUDIO}])) *[part~=layer][part~=centered-layer] { 128 align-items: center; 129 justify-content: center; 130 } 131 132 :host(:not([${M.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]), 133 :host(:not([${M.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] { 134 align-self: stretch; 135 flex-grow: 1; 136 } 137 138 slot[name=middle-chrome] { 139 display: inline; 140 flex-grow: 1; 141 pointer-events: none; 142 background: none; 143 } 144 145 146 ::slotted([slot=media]), 147 ::slotted([slot=poster]) { 148 width: 100%; 149 height: 100%; 150 } 151 152 153 :host(:not([${M.AUDIO}])) .spacer { 154 flex-grow: 1; 155 } 156 157 158 :host(:-webkit-full-screen) { 159 160 width: 100% !important; 161 height: 100% !important; 162 } 163 164 165 ::slotted(:not([slot=media]):not([slot=poster]):not([${M.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) { 166 opacity: 1; 167 transition: var(--media-control-transition-in, opacity 0.25s); 168 } 169 170 171 :host([${M.USER_INACTIVE}]:not([${u.MEDIA_PAUSED}]):not([${u.MEDIA_IS_AIRPLAYING}
171]):not([${u.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${M.NO_AUTOHIDE}]):not([role=dialog])) { 172 opacity: 0; 173 transition: var(--media-control-transition-out, opacity 1s); 174 } 175 176 :host([${M.USER_INACTIVE}]:not([${M.NO_AUTOHIDE}]):not([${u.MEDIA_PAUSED}]):not([${u.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) ::slotted([slot=media]) { 177 cursor: none; 178 } 179 180 :host([${M.USER_INACTIVE}][${M.AUTOHIDE_OVER_CONTROLS}]:not([${M.NO_AUTOHIDE}]):not([${u.MEDIA_PAUSED}]):not([${u.MEDIA_IS_CASTING}]):not([${M.AUDIO}])) * { 181 --media-cursor: none; 182 cursor: none; 183 } 184 185 186 ::slotted(media-control-bar) { 187 align-self: stretch; 188 } 189 190 191 :host(:not([${M.AUDIO}])[${u.MEDIA_HAS_PLAYED}]) slot[name=poster] { 192 display: none; 193 } 194 195 ::slotted([role=dialog]) { 196 width: 100%; 197 height: 100%; 198 align-self: center; 199 } 200 201 ::slotted([role=menu]) { 202 align-self: end; 203 } 204 </style> 205 206 <slot name="media" part="layer media-layer"></slot> 207 <slot name="poster" part="layer poster-layer"></slot> 208 <slot name="gestures-chrome" part="layer gesture-layer"> 209 <media-gesture-receiver slot="gestures-chrome"> 210 <template shadowrootmode="${Pc.shadowRootOptions.mode}"> 211 ${Pc.getTemplateHTML({})} 212 </template> 213 </media-gesture-receiver> 214 </slot> 215 <span part="layer vertical-layer"> 216 <slot name="top-chrome" part="top chrome"></slot> 217 <slot name="middle-chrome" part="middle chrome"></slot> 218 <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot> 219 220 <slot part="bottom chrome"></slot> 221 </span> 222 <slot name="dialog" part="layer dialog-layer"></slot> 223 `}const Cg=Object.values(u),Lg="sm:384 md:576 lg:768 xl:960";function Dg(t){ap(t.target,t.contentRect.width)}function ap(t,e){var i;if(!t.isConnected)return;const a=(i=t.getAttribute(M.BREAKPOINTS))!=null?i:Lg,r=Mg(a),n=xg(r,e);let s=!1;if(Object.keys(r).forEach(o=>{if(n.includes(o)){t.hasAttribute(`breakpoint${o}`)||(t.setAttribute(`breakpoint${o}`,""),s=!0);return}t.hasAttribute(`breakpoint${o}`)&&(t.removeAttribute(`breakpoint${o}`),s=!0)}),s){const o=new CustomEvent(ii.BREAKPOINTS_CHANGE,{detail:n});t.dispatchEvent(o)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(ii.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function Mg(t){const e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function xg(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}class wo extends f.HTMLElement{constructor(){if(super(),Ge(this,Tl),Ge(this,Al),Ge(this,kl),Ge(this,zr),Ge(this,So),Ge(this,qa),Ge(this,Gs,0),Ge(this,ca,null),Ge(this,Zr,null),Ge(this,Ca,void 0),this.breakpointsComputed=!1,Ge(this,Vn,new MutationObserver(nt(this,Tl,ep).bind(this))),Ge(this,gr,!1),Ge(this,qn,i=>{Ze(this,gr)||(setTimeout(()=>{Dg(i),Li(this,gr,!1)},0),Li(this,gr,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const i=ze(this.attributes),a=this.constructor.getTemplateHTML(i);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(a):this.shadowRoot.innerHTML=a}const e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){Ze(this,ca)&&this.mediaUnsetCallback(Ze(this,ca));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[M.AUTOHIDE,M.GESTURES_DISABLED].concat(Cg).filter(e=>![u.MEDIA_RENDITION_LIST,u.MEDIA_AUDIO_TRACK_LIST,u.MEDIA_CHAPTERS_CUES,u.MEDIA_WIDTH,u.MEDIA_HEIGHT,u.MEDIA_ERROR,u.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==M.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return e?.nodeName=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Li(this,ca,e),e.localName.includes("-")&&await f.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;Ze(this,Vn).observe(this,{childList:!0,subtree:!0}),Ka(this,Ze(this,qn));const i=this.getAttribute(M.AUDIO)!=null,a=C(i?"audio player":"video player");
223this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(M.USER_INACTIVE,""),ap(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=f.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;Ze(this,Vn).disconnect(),Va(this,Ze(this,qn)),this.media&&this.mediaUnsetCallback(this.media),(e=f.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Li(this,ca,null)}handleEvent(e){switch(e.type){case"pointerdown":Li(this,Gs,e.timeStamp);break;case"pointermove":nt(this,Al,tp).call(this,e);break;case"pointerup":nt(this,kl,ip).call(this,e);break;case"mouseleave":nt(this,zr,ko).call(this);break;case"mouseup":this.removeAttribute(M.KEYBOARD_CONTROL);break;case"keyup":nt(this,qa,Xr).call(this),this.setAttribute(M.KEYBOARD_CONTROL,"");break}}set autohide(e){const i=Number(e);Li(this,Ca,isNaN(i)?0:i)}get autohide(){return(Ze(this,Ca)===void 0?2:Ze(this,Ca)).toString()}get breakpoints(){return ae(this,M.BREAKPOINTS)}set breakpoints(e){re(this,M.BREAKPOINTS,e)}get audio(){return W(this,M.AUDIO)}set audio(e){F(this,M.AUDIO,e)}get gesturesDisabled(){return W(this,M.GESTURES_DISABLED)}set gesturesDisabled(e){F(this,M.GESTURES_DISABLED,e)}get keyboardControl(){return W(this,M.KEYBOARD_CONTROL)}set keyboardControl(e){F(this,M.KEYBOARD_CONTROL,e)}get noAutohide(){return W(this,M.NO_AUTOHIDE)}set noAutohide(e){F(this,M.NO_AUTOHIDE,e)}get autohideOverControls(){return W(this,M.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){F(this,M.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return W(this,M.USER_INACTIVE)}set userInteractive(e){F(this,M.USER_INACTIVE,e)}}Gs=new WeakMap;ca=new WeakMap;Zr=new WeakMap;Ca=new WeakMap;Vn=new WeakMap;Tl=new WeakSet;ep=function(t){const e=this.media;for(const i of t){if(i.type!=="childList")continue;const a=i.removedNodes;for(const r of a){if(r.slot!="media"||i.target!=this)continue;let n=i.previousSibling&&i.previousSibling.previousElementSibling;if(!n||!e)this.mediaUnsetCallback(r);else{let s=n.slot!=="media";for(;(n=n.previousSibling)!==null;)n.slot=="media"&&(s=!1);s&&this.mediaUnsetCallback(r)}}if(e)for(const r of i.addedNodes)r===e&&this.handleMediaUpdated(e)}};gr=new WeakMap;qn=new WeakMap;Al=new WeakSet;tp=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-Ze(this,Gs)<250)return;nt(this,So,qd).call(this),clearTimeout(Ze(this,Zr));const e=this.hasAttribute(M.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&nt(this,qa,Xr).call(this)};kl=new WeakSet;ip=function(t){if(t.pointerType==="touch"){const e=!this.hasAttribute(M.USER_INACTIVE);[this,this.media].includes(t.target)&&e?nt(this,zr,ko).call(this):nt(this,qa,Xr).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e?.localName))&&nt(this,qa,Xr).call(this)};zr=new WeakSet;ko=function(){if(Ze(this,Ca)<0||this.hasAttribute(M.USER_INACTIVE))return;this.setAttribute(M.USER_INACTIVE,"");const t=new f.CustomEvent(ii.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};So=new WeakSet;qd=function(){if(!this.hasAttribute(M.USER_INACTIVE))return;this.removeAttribute(M.USER_INACTIVE);const t=new f.CustomEvent(ii.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};qa=new WeakSet;Xr=function(){nt(this,So,qd).call(this),clearTimeout(Ze(this,Zr));const t=parseInt(this.autohide);t<0||Li(this,Zr,setTimeout(()=>{nt(this,zr,ko).call(this)},t*1e3))};wo.shadowRootOptions={mode:"open"};wo.getTemplateHTML=Rg;f.customElements.get("media-container")||f.customElements.define("media-container",wo);var rp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},we=(t,e,i)=>(rp(t,e,"read from private field"),i?i.call(t):e.get(t)),ar=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},En=(t,e,i,a)=>(rp(t,e,"write to private field"),e.set(t,i),i),ha,ma,Qs,Fi,Qt,ui;class Yd{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){ar(this,Qt),ar(this,ha,void 0),ar(this,ma,void 0),ar(this,Qs,void 0),ar(this,Fi,new Set),En(this,ha,e),En(this,ma,i),En(this,Qs,new Set(a
223))}[Symbol.iterator](){return we(this,Qt,ui).values()}get length(){return we(this,Qt,ui).size}get value(){var e;return(e=[...we(this,Qt,ui)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(En(this,Fi,new Set),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...we(this,Qt,ui)][e]}values(){return we(this,Qt,ui).values()}forEach(e,i){we(this,Qt,ui).forEach(e,i)}add(...e){var i,a;e.forEach(r=>we(this,Fi).add(r)),!(this.value===""&&!((i=we(this,ha))!=null&&i.hasAttribute(`${we(this,ma)}`)))&&((a=we(this,ha))==null||a.setAttribute(`${we(this,ma)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>we(this,Fi).delete(a)),(i=we(this,ha))==null||i.setAttribute(`${we(this,ma)}`,`${this.value}`)}contains(e){return we(this,Qt,ui).has(e)}toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){return this.remove(e),this.add(i),e===i}}ha=new WeakMap;ma=new WeakMap;Qs=new WeakMap;Fi=new WeakMap;Qt=new WeakSet;ui=function(){return we(this,Fi).size?we(this,Fi):we(this,Qs)};const Og=(t="")=>t.split(/\s+/),np=(t="")=>{const[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?Wt.CAPTIONS:Wt.SUBTITLES,language:i,label:r}},Io=(t="",e={})=>Og(t).map(i=>{const a=np(i);return{...e,...a}}),sp=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?np(e):e):typeof t=="string"?Io(t):[t]:[],Sl=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,Jr=(t=[])=>Array.prototype.map.call(t,Sl).join(" "),Ng=(t,e)=>i=>i[t]===e,op=t=>{const e=Object.entries(t).map(([i,a])=>Ng(i,a));return i=>e.every(a=>a(i))},Hr=(t,e=[],i=[])=>{const a=sp(i).map(op),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=t})},Ro=(t,e=()=>!0)=>{if(!t?.textTracks)return[];const i=typeof e=="function"?e:op(e);return Array.from(t.textTracks).filter(i)},lp=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(u.MEDIA_SUBTITLES_SHOWING)},Pg=t=>{var e;const{media:i,fullscreenElement:a}=t;try{const r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){const n=(e=a[r])==null?void 0:e.call(a);if(n instanceof Promise)return n.catch(()=>{})}else i?.webkitEnterFullscreen?i.webkitEnterFullscreen():i?.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},$c="exitFullscreen"in ye?"exitFullscreen":"webkitExitFullscreen"in ye?"webkitExitFullscreen":"webkitCancelFullScreen"in ye?"webkitCancelFullScreen":void 0,$g=t=>{var e;const{documentElement:i}=t;if($c){const a=(e=i?.[$c])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},yr="fullscreenElement"in ye?"fullscreenElement":"webkitFullscreenElement"in ye?"webkitFullscreenElement":void 0,Ug=t=>{const{documentElement:e,media:i}=t,a=e?.[yr];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===og.FULLSCREEN?i:a},Hg=t=>{var e;const{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;const n=Ug(t);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let s=n.shadowRoot;if(!(yr in s))return ri(n,r);for(;s?.[yr];){if(s[yr]===r)return!0;s=(e=s[yr])==null?void 0:e.shadowRoot}}return!1},Bg="fullscreenEnabled"in ye?"fullscreenEnabled":"webkitFullscreenEnabled"in ye?"webkitFullscreenEnabled":void 0,Wg=t=>{const{documentElement:e,media:i}=t;return!!e?.[Bg]||i&&"webkitSupportsFullscreen"in i};let _n;const Gd=()=>{var t,e;return _n||(_n=(e=(t=ye)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),_n)},Fg=async(t=Gd())=>{if(!t)return!1;const e=t.volume;t.volume=e/2+.1;const i=new AbortController,a=await Promise.race([Kg(t,i.signal),Vg(t,e)]);return i.abort(),a},Kg=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),Vg=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Fm(10)}return t.volume!==e},qg=/.*Version\/.*Safari\/.*/.test(f.navigator.userAgent),dp=(t=Gd())=>f.matchMedia("(display-mode: standalone)").matches&&qg?!1:typeof t?.requestPictureInPicture=="function",up=(t=Gd())=>Wg({documentElement:ye,media:t}),Yg=up(),Gg=dp(),Qg=!!f.WebKitPlaybackTargetAvailabilityEvent,jg=!!f.chrome,js=t=>Ro(t.media,e=>[Wt.SUBTITLES,Wt.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),cp=t=>Ro(t.media,e=>e.mode===Na.SHOWING&&[Wt.SUBTITLES,Wt.CAPTIONS].includes(e.kind)),hp=(t,e)=>{const i=js(t),a=cp(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)Hr(Na.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let n=i[0];const{options:s}=t;if(!s?.noSubtitlesLangPref){const m=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),p=m?[m,...globalThis.navigator.languages]:globalThis.navigator.languages,h=i.filter(c=>p.some(v=>c.language.toLowerCase().startsWith(v.split("-")[0]))).sort((c,v)=>{const g=p.findIndex(y=>c.language.toLowerCase().startsWith(y.split("-")[0])),_=p.findIndex(y=>v.language.toLowerCase().startsWith(y.split("-")[0]));return g-_});h[0]&&(n=h[0])}const{language:o,label:l,kind:d}=n;Hr(Na.DISABLED,i,a),Hr(Na.SHOWING,i,[{language:o,label:l,kind:d}])}}},Qd=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?Zg(t,e):Object.entries(t).every(([i,a])=>i in e&&Qd(a,e[i])),Zg=(t,e)=>{const i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,n)=>Qd(r,e[n])):!0},zg=Object.values(Zt);let Zs;const Xg=Fg().then(t=>(Zs=t,Zs)),Jg=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof f.HTMLElement))return;const i=e.localName;if(!i.includes("-"))return;const a=f.customElements.get(i);a&&e instanceof a||(await f.customElements.whenDefined(i),f.customElements.upgrade(e))}))},e0=new f.DOMParser,t0=t=>t&&(e0.parseFromString(t,"text/html").body.textContent||t),Tr={mediaError:{get(t,e){const{media:i}=t;if(e?.type!=="playing")return i?.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;const{media:a}=t;if(e?.type!=="playing")return(i=a?.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;const{media:r}=t;if(e?.type!=="playing")return(a=(i=r?.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;const{media:i}=t;return(e=i?.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;const{media:i}=t;return(e=i?.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;const{media:i}=t;return(e=i?.paused)!=null?e:!0},set(t,e){var i;const{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){const{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;const{media:i}=t;return(e=i?.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;const{media:i}=t;return(e=i?.playbackRate)!=null?e:1},set(t,e){const{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;const{media:i}=t;return(e=i?.muted)!=null?e:!1},set(t,e){const{media:i,options:{noMutedPref:a}={}}=e;if(i){i.muted=t;try{const r=f.localStorage.getItem("media-chrome-pref-muted")!==null,n=i.hasAttribute("muted");if(a){r&&f.localStorage.removeItem("media-chrome-pref-muted");return}if(n&&!r)return;f.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{const r=f.localStorage.getItem("media-chrome-pref-muted")==="true";Tr.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaVolume:{get(t){var e;const{media:i}=t;return(e=i?.volume)!=null?e:1}
223,set(t,e){const{media:i,options:{noVolumePref:a}={}}=e;if(i){try{t==null?f.localStorage.removeItem("media-chrome-pref-volume"):!i.hasAttribute("muted")&&!a&&f.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noVolumePref:i}}=e;if(!i)try{const{media:a}=e;if(!a)return;const r=f.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Tr.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){const{media:e}=t;return typeof e?.volume>"u"?"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:i}=t;return(e=i?.currentTime)!=null?e:0},set(t,e){const{media:i}=e;!i||!Wd(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){const{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e?.duration)?e.duration:Number.NaN},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:i}=t;if(!((e=i?.seekable)!=null&&e.length))return;const a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;const{media:i}=t,a=(e=i?.buffered)!=null?e:[];return Array.from(a).map((r,n)=>[Number(a.start(n).toFixed(3)),Number(a.end(n).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){const{media:e,options:{defaultStreamType:i}={}}=t,a=[Zt.LIVE,Zt.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;const{streamType:r}=e;if(zg.includes(r))return r===Zt.UNKNOWN?a:r;const n=e.duration;return n===1/0?Zt.LIVE:Number.isFinite(n)?Zt.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){const{media:e}=t;if(!e)return Number.NaN;const{targetLiveWindow:i}=e,a=Tr.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===Zt.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){const{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Tr.mediaStreamType.get(t)===Zt.LIVE))return!1;const r=e.seekable;if(!r)return!0;if(!r.length)return!1;const n=r.end(r.length-1)-i;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return js(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return cp(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;const{media:r,options:n}=e;if(!r)return;const s=o=>{var l;!n.defaultSubtitles||o&&![Wt.CAPTIONS,Wt.SUBTITLES].includes((l=o?.track)==null?void 0:l.kind)||hp(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var o,l;r.removeEventListener("loadstart",s),(o=r.textTracks)==null||o.removeEventListener("addtrack",s),(l=r.textTracks)==null||l.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;const{media:i}=t;if(!i)return[];const[a]=Ro(i,{kind:Wt.CHAPTERS});return Array.from((e=a?.cues)!=null?e:[]).map(({text:r,startTime:n,endTime:s})=>({text:t0(r),startTime:n,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;if(!a)return;const r=a.querySelector('track[kind="chapters"][default][src]'),n=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r?.addEventListener("load",t),n?.addEventListener("load",t),()=>{r?.removeEventListener("load",t),n?.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;const{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;
223if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?ri(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let n=r.pictureInPictureElement.shadowRoot;for(;n?.pictureInPictureElement;){if(n.pictureInPictureElement===a)return!0;n=(i=n.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){const{media:i}=e;if(i)if(t){if(!ye.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}const a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){const n=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),n()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),n()},1e3)}else throw r}else throw r})}else ye.pictureInPictureElement&&ye.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;const{media:i}=t;return[...(e=i?.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;const{media:r}=t;return(a=(i=r?.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){const{media:i}=e;if(!i?.videoRenditions){console.warn("MediaController: Rendition selection not supported by this media.");return}const a=t,r=Array.prototype.findIndex.call(i.videoRenditions,n=>n.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;const{media:i}=t;return[...(e=i?.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;const{media:a}=t;return(i=[...(e=a?.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){const{media:i}=e;if(!i?.audioTracks){console.warn("MediaChrome: Audio track selection not supported by this media.");return}const a=t;for(const r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return Hg(t)},set(t,e,i){var a;t?(Pg(e),i.detail&&((a=e.media)==null||a.focus())):$g(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;const{media:i}=t;return!i?.remote||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;const{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){const{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&f.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){const{media:e}=t;if(!Yg||!up(e))return Ye.UNSUPPORTED}},mediaPipUnavailable:{get(t){const{media:e}=t;if(!Gg||!dp(e))return Ye.UNSUPPORTED;if(e?.disablePictureInPicture)return Ye.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){const{media:e}=t;if(Zs===!1||e?.volume==null)return Ye.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{Zs==null&&Xg.then(e=>t(e?void 0:Ye.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;const{media:a}=t;if(!jg||!((i=a?.remote)!=null&&i.state))return Ye.UNSUPPORTED;if(!(e==null||e==="available"))return Ye.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!Qg)return Ye.UNSUPPORTED;if(e?.availability==="not-available")return Ye.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;const{media:i}=t;if(!i?.videoRenditions)return Ye.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;const{media:a}=t;if(!a?.audioTracks)return Ye.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){const{options:{mediaLang:e}={}}=t;return e??"en"}}},i0={[R.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,n;const{media:s}=e,o=i??void 0;let l,d;if(s&&o!=null){const[c]=Ro(s,{kind:Wt.METADATA,label:"thumbnails"}),v=Array.prototype.find.call((a=c?.cues)!=null?a:[],(g,_,y)=>_===0?g.endTime>o:_===y.length-1?g.startTime<=o:g.startTime<=o&&g.endTime>o);if(v){const g=/'^(?:[a-z]+:)?\/\//i.test(v.text)||(r=s?.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,_=new URL(v.text,g);d=new URLSearchParams(_.hash).get("#xywh").split(",").map(T=>+T),l=_.href}}const m=t.mediaDuration.get(e);
223let h=(n=t.mediaChaptersCues.get(e).find((c,v,g)=>v===g.length-1&&m===c.endTime?c.startTime<=o&&c.endTime>=o:c.startTime<=o&&c.endTime>o))==null?void 0:n.text;return i!=null&&h==null&&(h=""),{mediaPreviewTime:o,mediaPreviewImage:l,mediaPreviewCoords:d,mediaPreviewChapter:h}},[R.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[R.MEDIA_PLAY_REQUEST](t,e){var i,a,r,n;const s="mediaPaused",l=t.mediaStreamType.get(e)===Zt.LIVE,d=!((i=e.options)!=null&&i.noAutoSeekToLive),m=t.mediaTargetLiveWindow.get(e)>0;if(l&&d&&!m){const p=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(p){const h=(n=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?n:0,c=p-h;t.mediaCurrentTime.set(c,e)}}t[s].set(!1,e)},[R.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){const a="mediaPlaybackRate",r=i;t[a].set(r,e)},[R.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[R.MEDIA_UNMUTE_REQUEST](t,e){const i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[R.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){const a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[R.MEDIA_SEEK_REQUEST](t,e,{detail:i}){const a="mediaCurrentTime",r=i;t[a].set(r,e)},[R.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;const n="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;const o=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,l=s-o;t[n].set(l,e)},[R.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;const{options:r}=e,n=js(e),s=sp(i),o=(a=s[0])==null?void 0:a.language;o&&!r.noSubtitlesLangPref&&f.localStorage.setItem("media-chrome-pref-subtitles-lang",o),Hr(Na.SHOWING,n,s)},[R.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){const a=js(e),r=i??[];Hr(Na.DISABLED,a,r)},[R.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){hp(e,i)},[R.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){const a="mediaRenditionSelected",r=i;t[a].set(r,e)},[R.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){const a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[R.MEDIA_ENTER_PIP_REQUEST](t,e){const i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[R.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[R.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e,i){const a="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[a].set(!0,e,i)},[R.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[R.MEDIA_ENTER_CAST_REQUEST](t,e){const i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].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)}},a0=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Tr,requestMap:r=i0,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{const o=[],l={options:{...n}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const m=g=>{g!=null&&(Qd(g,d)||(d=Object.freeze({...d,...g}),o.forEach(_=>_(d))))},p=()=>{const g=Object.entries(a).reduce((_,[y,{get:T}])=>(_[y]=T(l),_),{});m(g)},h={};let c;const v=async(g,_)=>{var y,T,E,k,L,O,H,Y,X,K,P,De,Be,We,he,Oe;const gt=!!c;if(c={...l,...c??{},...g},gt)return;await Jg(...Object.values(g));const Ne=o.length>0&&_===0&&s,lt=l.media!==c.media,Fe=((y=l.media)==null?void 0:y.textTracks)!==((T=c.media)==null?void 0:T.textTracks),Ae=((E=l.media)==null?void 0:E.videoRenditions)!==((k=c.media)==null?void 0:k.videoRenditions),Ke=((L=l.media)==null?void 0:L.audioTracks)!==((O=c.media)==null?void 0:O.audioTracks),Xe=((H=l.media)==null?void 0:H.remote)!==((Y=c.media)==null?void 0:Y.remote),ia=l.documentElement!==c.documentElement,mn=!!l.media&&(lt||Ne),Yu=!!((X=l.media)!=null&&X.textTracks)&&(Fe||Ne),Gu=!!((K=l.media)!=null&&K.videoRenditions)&&(Ae||Ne),Qu=!!((P=l.media)!=null&&P.audioTracks)&&(Ke||Ne),ju=!!((De=l.media)!=null&&De.remote)&&(Xe||Ne),Zu=!!l.documentElement&&(ia||Ne),zu=mn||Yu||Gu||Qu||ju||Zu,aa=o.length===0&&_===1&&s,Xu=!!c.media&&(lt||aa),Ju=!!((Be=c.media)!=null&&Be.textTracks)&&(Fe||aa),ec=!!((We=c.media)!=null&&We.videoRenditions)&&(Ae||aa),tc=!!((he=c.media)!=null&&he.audioTracks)&&(Ke||aa),ic=!!((Oe=c.media)!=null&&Oe.remote)&&(Xe||aa),ac=!!c.documentElement&&(ia||aa),rc=Xu||Ju||ec||tc||ic||ac;
223if(!(zu||rc)){Object.entries(c).forEach(([J,er])=>{l[J]=er}),p(),c=void 0;return}Object.entries(a).forEach(([J,{get:er,mediaEvents:Gv=[],textTracksEvents:Qv=[],videoRenditionsEvents:jv=[],audioTracksEvents:Zv=[],remoteEvents:zv=[],rootEvents:Xv=[],stateOwnersUpdateHandlers:Jv=[]}])=>{h[J]||(h[J]={});const Ve=ue=>{const qe=er(l,ue);m({[J]:qe})};let ke;ke=h[J].mediaEvents,Gv.forEach(ue=>{ke&&mn&&(l.media.removeEventListener(ue,ke),h[J].mediaEvents=void 0),Xu&&(c.media.addEventListener(ue,Ve),h[J].mediaEvents=Ve)}),ke=h[J].textTracksEvents,Qv.forEach(ue=>{var qe,dt;ke&&Yu&&((qe=l.media.textTracks)==null||qe.removeEventListener(ue,ke),h[J].textTracksEvents=void 0),Ju&&((dt=c.media.textTracks)==null||dt.addEventListener(ue,Ve),h[J].textTracksEvents=Ve)}),ke=h[J].videoRenditionsEvents,jv.forEach(ue=>{var qe,dt;ke&&Gu&&((qe=l.media.videoRenditions)==null||qe.removeEventListener(ue,ke),h[J].videoRenditionsEvents=void 0),ec&&((dt=c.media.videoRenditions)==null||dt.addEventListener(ue,Ve),h[J].videoRenditionsEvents=Ve)}),ke=h[J].audioTracksEvents,Zv.forEach(ue=>{var qe,dt;ke&&Qu&&((qe=l.media.audioTracks)==null||qe.removeEventListener(ue,ke),h[J].audioTracksEvents=void 0),tc&&((dt=c.media.audioTracks)==null||dt.addEventListener(ue,Ve),h[J].audioTracksEvents=Ve)}),ke=h[J].remoteEvents,zv.forEach(ue=>{var qe,dt;ke&&ju&&((qe=l.media.remote)==null||qe.removeEventListener(ue,ke),h[J].remoteEvents=void 0),ic&&((dt=c.media.remote)==null||dt.addEventListener(ue,Ve),h[J].remoteEvents=Ve)}),ke=h[J].rootEvents,Xv.forEach(ue=>{ke&&Zu&&(l.documentElement.removeEventListener(ue,ke),h[J].rootEvents=void 0),ac&&(c.documentElement.addEventListener(ue,Ve),h[J].rootEvents=Ve)});const nc=h[J].stateOwnersUpdateHandlers;Jv.forEach(ue=>{nc&&zu&&nc(),rc&&(h[J].stateOwnersUpdateHandlers=ue(Ve,c))})}),Object.entries(c).forEach(([J,er])=>{l[J]=er}),p(),c=void 0};return v({media:t,fullscreenElement:e,documentElement:i,options:n}),{dispatch(g){const{type:_,detail:y}=g;if(r[_]&&d.mediaErrorCode==null){m(r[_](a,l,g));return}_==="mediaelementchangerequest"?v({media:y}):_==="fullscreenelementchangerequest"?v({fullscreenElement:y}):_==="documentelementchangerequest"?v({documentElement:y}):_==="optionschangerequest"&&(Object.entries(y??{}).forEach(([T,E])=>{l.options[T]=E}),p())},getState(){return d},subscribe(g){return v({},o.length+1),o.push(g),g(d),()=>{const _=o.indexOf(g);_>=0&&(v({},o.length-1),o.splice(_,1))}}}};var jd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},$=(t,e,i)=>(jd(t,e,"read from private field"),i?i.call(t):e.get(t)),qt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},oi=(t,e,i,a)=>(jd(t,e,"write to private field"),e.set(t,i),i),_i=(t,e,i)=>(jd(t,e,"access private method"),i),Ki,Ar,G,kr,wt,Yn,Gn,wl,Ya,en,Qn,Il;const mp=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c"],Uc=10,Hc=.025,S={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",SEEK_TO_LIVE_OFFSET:"seektoliveoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys",NO_VOLUME_PREF:"novolumepref",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_DEFAULT_STORE:"nodefaultstore",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",LANG:"lang"};class pp extends wo{constructor(){super(),qt(this,Gn),qt(this,Ya),qt(this,Qn),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,qt(this,Ki,new Yd(this,S.HOTKEYS)),qt(this,Ar,void 0),qt(this,G,void 0),qt(this,kr,void 0),qt(this,wt,void 0),qt(this,Yn,i=>{var a;(a=$(this,G))==null||a.dispatch(i)}),this.associateElement(this);let e={};oi(this,kr,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);const n=a.toLowerCase(),s=new f.CustomEvent(sg[n],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i}),this.hasAttribute(S.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(S.NO_HOTKEYS,S.HOTKEYS,S.DEFAULT_STREAM_TYPE,S.DEFAULT_SUBTITLES,S.DEFAULT_DURATION,S.NO_MUTED_PREF,S.NO_VOLUME_PREF,S.LANG)}get mediaStore(){return $(this,G)}set mediaStore(e){var i,a;if($(this,G)&&((i=$(this,wt))==null||i.call(this),oi(this,wt,void 0)),oi(this,G,e),!$(this,G)&&!this.hasAttribute(S.NO_DEFAULT_STORE)){_i(this,Gn,wl).call(this);return}oi(this,wt,(a=$(this,G))==null?void 0:a.subscribe($(this,kr)))}get fullscreenElement(){var e;return(e=$(this,Ar))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(S.FULLSCREEN_ELEMENT)&&this.removeAttribute(S.FULLSCREEN_ELEMENT),oi(this,Ar,e),(i=$(this,G))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return W(this,S.DEFAULT_SUBTITLES)}set defaultSubtitles(e){F(this,S.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return ae(this,S.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){re(this,S.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return ie(this,S.DEFAULT_DURATION)}set defaultDuration(e){de(this,S.DEFAULT_DURATION,e)}get noHotkeys(){return W(this,S.NO_HOTKEYS)}set noHotkeys(e){F(this,S.NO_HOTKEYS,e)}get keysUsed(){return ae(this,S.KEYS_USED)}set keysUsed(e){re(this,S.KEYS_USED,e)}
223get liveEdgeOffset(){return ie(this,S.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){de(this,S.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return W(this,S.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){F(this,S.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return W(this,S.NO_VOLUME_PREF)}set noVolumePref(e){F(this,S.NO_VOLUME_PREF,e)}get noMutedPref(){return W(this,S.NO_MUTED_PREF)}set noMutedPref(e){F(this,S.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return W(this,S.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){F(this,S.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return W(this,S.NO_DEFAULT_STORE)}set noDefaultStore(e){F(this,S.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,n,s,o,l,d,m,p,h,c,v;if(super.attributeChangedCallback(e,i,a),e===S.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(S.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===S.HOTKEYS)$(this,Ki).value=a;else if(e===S.DEFAULT_SUBTITLES&&a!==i)(r=$(this,G))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(S.DEFAULT_SUBTITLES)}});else if(e===S.DEFAULT_STREAM_TYPE)(s=$(this,G))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(n=this.getAttribute(S.DEFAULT_STREAM_TYPE))!=null?n:void 0}});else if(e===S.LIVE_EDGE_OFFSET)(o=$(this,G))==null||o.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(S.LIVE_EDGE_OFFSET)?+this.getAttribute(S.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(S.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(S.LIVE_EDGE_OFFSET)}});else if(e===S.SEEK_TO_LIVE_OFFSET)(l=$(this,G))==null||l.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(S.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(S.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===S.NO_AUTO_SEEK_TO_LIVE)(d=$(this,G))==null||d.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(S.NO_AUTO_SEEK_TO_LIVE)}});else if(e===S.FULLSCREEN_ELEMENT){const g=a?(m=this.getRootNode())==null?void 0:m.getElementById(a):void 0;oi(this,Ar,g),(p=$(this,G))==null||p.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===S.LANG&&a!==i?(bg(a),(h=$(this,G))==null||h.dispatch({type:"optionschangerequest",detail:{mediaLang:a}})):e===S.NO_VOLUME_PREF&&a!==i?(c=$(this,G))==null||c.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(S.NO_VOLUME_PREF)}}):e===S.NO_MUTED_PREF&&a!==i&&((v=$(this,G))==null||v.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(S.NO_MUTED_PREF)}}))}connectedCallback(){var e,i;!$(this,G)&&!this.hasAttribute(S.NO_DEFAULT_STORE)&&_i(this,Gn,wl).call(this),(e=$(this,G))==null||e.dispatch({type:"documentelementchangerequest",detail:ye}),super.connectedCallback(),$(this,G)&&!$(this,wt)&&oi(this,wt,(i=$(this,G))==null?void 0:i.subscribe($(this,kr))),this.hasAttribute(S.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,i,a,r;(e=super.disconnectedCallback)==null||e.call(this),$(this,G)&&((i=$(this,G))==null||i.dispatch({type:"documentelementchangerequest",detail:void 0}),(a=$(this,G))==null||a.dispatch({type:R.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),$(this,wt)&&((r=$(this,wt))==null||r.call(this),oi(this,wt,void 0))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=$(this,G))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=$(this,G))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){Fc(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(i.has(e))return;const a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=d0(e,a,r);Object.values(R).forEach(s=>{e.addEventListener(s,$(this,Yn))}),i.set(e,n)}unassociateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(!i.has(e))return;
223i.get(e)(),i.delete(e),Object.values(R).forEach(r=>{e.removeEventListener(r,$(this,Yn))})}registerMediaStateReceiver(e){if(!e)return;const i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),$(this,G)&&Object.entries($(this,G).getState()).forEach(([r,n])=>{Fc([e],r,n)}))}unregisterMediaStateReceiver(e){const i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",_i(this,Qn,Il))}disableHotkeys(){this.removeEventListener("keydown",_i(this,Qn,Il)),this.removeEventListener("keyup",_i(this,Ya,en))}get hotkeys(){return ae(this,S.HOTKEYS)}set hotkeys(e){re(this,S.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,n,s,o,l;const d=e.target;if(((r=(a=(i=d.getAttribute(S.KEYS_USED))==null?void 0:i.split(" "))!=null?a:d?.keysUsed)!=null?r:[]).map(v=>v==="Space"?" ":v).filter(Boolean).includes(e.key))return;let p,h,c;if(!$(this,Ki).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&$(this,Ki).contains("nospace")))switch(e.key){case" ":case"k":p=$(this,G).getState().mediaPaused?R.MEDIA_PLAY_REQUEST:R.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new f.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"m":p=this.mediaStore.getState().mediaVolumeLevel==="off"?R.MEDIA_UNMUTE_REQUEST:R.MEDIA_MUTE_REQUEST,this.dispatchEvent(new f.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"f":p=this.mediaStore.getState().mediaIsFullscreen?R.MEDIA_EXIT_FULLSCREEN_REQUEST:R.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new f.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new f.CustomEvent(R.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{const v=this.hasAttribute(S.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(S.KEYBOARD_BACKWARD_SEEK_OFFSET):Uc;h=Math.max(((n=this.mediaStore.getState().mediaCurrentTime)!=null?n:0)-v,0),c=new f.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}case"ArrowRight":{const v=this.hasAttribute(S.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(S.KEYBOARD_FORWARD_SEEK_OFFSET):Uc;h=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+v,0),c=new f.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}case"ArrowUp":{const v=this.hasAttribute(S.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(S.KEYBOARD_UP_VOLUME_STEP):Hc;h=Math.min(((o=this.mediaStore.getState().mediaVolume)!=null?o:1)+v,1),c=new f.CustomEvent(R.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}case"ArrowDown":{const v=this.hasAttribute(S.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(S.KEYBOARD_DOWN_VOLUME_STEP):Hc;h=Math.max(((l=this.mediaStore.getState().mediaVolume)!=null?l:1)-v,0),c=new f.CustomEvent(R.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}}}}Ki=new WeakMap;Ar=new WeakMap;G=new WeakMap;kr=new WeakMap;wt=new WeakMap;Yn=new WeakMap;Gn=new WeakSet;wl=function(){var t;this.mediaStore=a0({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(S.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(S.DEFAULT_DURATION)?+this.getAttribute(S.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(S.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(S.LIVE_EDGE_OFFSET)?+this.getAttribute(S.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(S.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(S.SEEK_TO_LIVE_OFFSET):this.hasAttribute(S.LIVE_EDGE_OFFSET)?+this.getAttribute(S.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(S.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(S.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(S.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(S.NO_SUBTITLES_LANG_PREF)}})};Ya=new WeakSet;en=function(t){const{key:e}=t;if(!mp.includes(e)){this.removeEventListener("keyup",_i(this,Ya,en));return}this.keyboardShortcutHandler(t)};Qn=new WeakSet;Il=function(t){const{metaKey:e,altKey:i,key:a}=t;if(e||i||!mp.includes(a)){this.removeEventListener("keyup",_i(this,Ya,en));return}const r=t.target,n=r instanceof HTMLElement&&(r.tagName.toLowerCase()==="media-volume-range"||r.tagName.toLowerCase()==="media-time-range");[" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(a)&&!($(this,Ki).contains(`no${a.toLowerCase()}
223`)||a===" "&&$(this,Ki).contains("nospace"))&&!n&&t.preventDefault(),this.addEventListener("keyup",_i(this,Ya,en),{once:!0})};const r0=Object.values(u),n0=Object.values(Hm),vp=t=>{var e,i,a,r;let{observedAttributes:n}=t.constructor;!n&&((e=t.nodeName)!=null&&e.includes("-"))&&(f.customElements.upgrade(t),{observedAttributes:n}=t.constructor);const s=(r=(a=(i=t?.getAttribute)==null?void 0:i.call(t,q.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(o=>r0.includes(o)):[]},s0=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&f.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof f.customElements.get(t.nodeName.toLowerCase()))&&f.customElements.upgrade(t),n0.some(a=>a in t)},Rl=t=>s0(t)||!!vp(t).length,Bc=t=>{var e;return(e=t?.join)==null?void 0:e.call(t,":")},Wc={[u.MEDIA_SUBTITLES_LIST]:Jr,[u.MEDIA_SUBTITLES_SHOWING]:Jr,[u.MEDIA_SEEKABLE]:Bc,[u.MEDIA_BUFFERED]:t=>t?.map(Bc).join(" "),[u.MEDIA_PREVIEW_COORDS]:t=>t?.join(" "),[u.MEDIA_RENDITION_LIST]:lg,[u.MEDIA_AUDIO_TRACK_LIST]:hg},o0=async(t,e,i)=>{var a,r;if(t.isConnected||await Fm(0),typeof i=="boolean"||i==null)return F(t,e,i);if(typeof i=="number")return de(t,e,i);if(typeof i=="string")return re(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);const n=(r=(a=Wc[e])==null?void 0:a.call(Wc,i))!=null?r:i;return t.setAttribute(e,n)},l0=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},Di=(t,e)=>{if(l0(t))return;const i=(r,n)=>{var s,o;Rl(r)&&n(r);const{children:l=[]}=r??{},d=(o=(s=r?.shadowRoot)==null?void 0:s.children)!=null?o:[];[...l,...d].forEach(p=>Di(p,n))},a=t?.nodeName.toLowerCase();if(a.includes("-")&&!Rl(t)){f.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},Fc=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}const r=vp(a),n=e.toLowerCase();r.includes(n)&&o0(a,n,i)})},d0=(t,e,i)=>{Di(t,e);const a=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;e(h)},r=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;i(h)};t.addEventListener(R.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(R.UNREGISTER_MEDIA_STATE_RECEIVER,r);const n=m=>{m.forEach(p=>{const{addedNodes:h=[],removedNodes:c=[],type:v,target:g,attributeName:_}=p;v==="childList"?(Array.prototype.forEach.call(h,y=>Di(y,e)),Array.prototype.forEach.call(c,y=>Di(y,i))):v==="attributes"&&_===q.MEDIA_CHROME_ATTRIBUTES&&(Rl(g)?e(g):i(g))})};let s=[];const o=m=>{const p=m.target;p.name!=="media"&&(s.forEach(h=>Di(h,i)),s=[...p.assignedElements({flatten:!0})],s.forEach(h=>Di(h,e)))};t.addEventListener("slotchange",o);const l=new MutationObserver(n);return l.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{Di(t,i),t.removeEventListener("slotchange",o),l.disconnect(),t.removeEventListener(R.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(R.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};f.customElements.get("media-controller")||f.customElements.define("media-controller",pp);var u0=pp;const ra={PLACEMENT:"placement",BOUNDS:"bounds"};function c0(t){return` 224 <style> 225 :host { 226 --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7))); 227 --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color)); 228 --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2); 229 --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px); 230 --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color)); 231 position: relative; 232 pointer-events: none; 233 display: var(--media-tooltip-display, inline-flex); 234 justify-content: center; 235 align-items: center; 236 box-sizing: border-box; 237 z-index: var(--media-tooltip-z-index, 1); 238 background: var(--_tooltip-background); 239 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 240 font: var(--media-font, 241 var(--media-font-weight, 400) 242 var(--media-font-size, 13px) / 243 var(--media-text-content-height, var(--media-control-height, 18px)) 244 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 245 padding: var(--media-tooltip-padding, .35em .7em); 246 border: var(--media-tooltip-border, none); 247 border-radius: var(--media-tooltip-border-radius, 5px); 248 filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2))); 249 white-space: var(--media-tooltip-white-space, nowrap); 250 } 251 252 :host([hidden]) { 253 display: none; 254 } 255 256 img, svg { 257 display: inline-block; 258 } 259 260 #arrow { 261 position: absolute; 262 width: 0px; 263 height: 0px; 264 border-style: solid; 265 display: var(--media-tooltip-arrow-display, block); 266 } 267 268 :host(:not([placement])), 269 :host([placement="top"]) { 270 position: absolute; 271 bottom: calc(100% + var(--media-tooltip-distance, 12px)); 272 left: 50%; 273 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
273); 274 } 275 :host(:not([placement])) #arrow, 276 :host([placement="top"]) #arrow { 277 top: 100%; 278 left: 50%; 279 border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width); 280 border-color: var(--_tooltip-arrow-background) transparent transparent transparent; 281 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 282 } 283 284 :host([placement="right"]) { 285 position: absolute; 286 left: calc(100% + var(--media-tooltip-distance, 12px)); 287 top: 50%; 288 transform: translate(0, -50%); 289 } 290 :host([placement="right"]) #arrow { 291 top: 50%; 292 right: 100%; 293 border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0; 294 border-color: transparent var(--_tooltip-arrow-background) transparent transparent; 295 transform: translate(0, -50%); 296 } 297 298 :host([placement="bottom"]) { 299 position: absolute; 300 top: calc(100% + var(--media-tooltip-distance, 12px)); 301 left: 50%; 302 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0); 303 } 304 :host([placement="bottom"]) #arrow { 305 bottom: 100%; 306 left: 50%; 307 border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width); 308 border-color: transparent transparent var(--_tooltip-arrow-background) transparent; 309 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 310 } 311 312 :host([placement="left"]) { 313 position: absolute; 314 right: calc(100% + var(--media-tooltip-distance, 12px)); 315 top: 50%; 316 transform: translate(0, -50%); 317 } 318 :host([placement="left"]) #arrow { 319 top: 50%; 320 left: 100%; 321 border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height); 322 border-color: transparent transparent transparent var(--_tooltip-arrow-background); 323 transform: translate(0, -50%); 324 } 325 326 :host([placement="none"]) #arrow { 327 display: none; 328 } 329 </style> 330 <slot></slot> 331 <div id="arrow"></div> 332 `}class Co extends f.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!zm(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}const a=getComputedStyle(this),r=(e=Za(this,"#"+this.bounds))!=null?e:Ue(this);if(!r)return;const{x:n,width:s}=r.getBoundingClientRect(),{x:o,width:l}=this.getBoundingClientRect(),d=o+l,m=n+s,p=a.getPropertyValue("--media-tooltip-offset-x"),h=p?parseFloat(p.replace("px","")):0,c=a.getPropertyValue("--media-tooltip-container-margin"),v=c?parseFloat(c.replace("px","")):0,g=o-n+h-v,_=d-m+h+v;if(g<0){this.style.setProperty("--media-tooltip-offset-x",`${g}px`);return}if(_>0){this.style.setProperty("--media-tooltip-offset-x",`${_}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(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[ra.PLACEMENT,ra.BOUNDS]}get placement(){return ae(this,ra.PLACEMENT)}set placement(e){re(this,ra.PLACEMENT,e)}get bounds(){return ae(this,ra.BOUNDS)}set bounds(e){re(this,ra.BOUNDS,e)}}Co.shadowRootOptions={mode:"open"};Co.getTemplateHTML=c0;f.customElements.get("media-tooltip")||f.customElements.define("media-tooltip",Co);var Kc=Co,Zd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},pe=(t,e,i)=>(Zd(t,e,"read from private field"),i?i.call(t):e.get(t)),na=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},bn=(t,e,i,a)=>(Zd(t,e,"write to private field"),e.set(t,i),i),h0=(t,e,i)=>(Zd(t,e,"access private method"),i),It,La,bi,pa,jn,Cl,fp;const li={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function m0(t,e={}){return` 333 <style> 334 :host { 335 position: relative; 336 font: var(--media-font, 337 var(--media-font-weight, bold) 338 var(--media-font-size, 14px) / 339 var(--media-text-content-height, var(--media-control-height, 24px)) 340 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 341 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 342 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 343 padding: var(--media-button-padding, var(--media-control-padding, 10px)); 344 justify-content: var(--media-button-justify-content, center); 345 display: inline-flex; 346 align-items: center; 347 vertical-align: middle; 348 box-sizing: border-box; 349 transition: background .15s linear; 350 pointer-events: auto; 351 cursor: var(--media-cursor, pointer); 352 -webkit-tap-highlight-color: transparent; 353 } 354 355 356 :host(:focus-visible) {
357 box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 358 outline: 0; 359 } 360 361 :host(:where(:focus)) { 362 box-shadow: none; 363 outline: 0; 364 } 365 366 :host(:hover) { 367 background: var(--media-control-hover-background, rgba(50 50 70 / .7)); 368 } 369 370 svg, img, ::slotted(svg), ::slotted(img) { 371 width: var(--media-button-icon-width); 372 height: var(--media-button-icon-height, var(--media-control-height, 24px)); 373 transform: var(--media-button-icon-transform); 374 transition: var(--media-button-icon-transition); 375 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 376 vertical-align: middle; 377 max-width: 100%; 378 max-height: 100%; 379 min-width: 100%; 380 } 381 382 media-tooltip { 383 384 max-width: 0; 385 overflow-x: clip; 386 opacity: 0; 387 transition: opacity .3s, max-width 0s 9s; 388 } 389 390 :host(:hover) media-tooltip, 391 :host(:focus-visible) media-tooltip { 392 max-width: 100vw; 393 opacity: 1; 394 transition: opacity .3s; 395 } 396 397 :host([notooltip]) slot[name="tooltip"] { 398 display: none; 399 } 400 </style> 401 402 ${this.getSlotTemplateHTML(t,e)} 403 404 <slot name="tooltip"> 405 <media-tooltip part="tooltip" aria-hidden="true"> 406 <template shadowrootmode="${Kc.shadowRootOptions.mode}"> 407 ${Kc.getTemplateHTML({})} 408 </template> 409 <slot name="tooltip-content"> 410 ${this.getTooltipContentHTML(t)} 411 </slot> 412 </media-tooltip> 413 </slot> 414 `}function p0(t,e){return` 415 <slot></slot> 416 `}function v0(){return""}class Le extends f.HTMLElement{constructor(){if(super(),na(this,Cl),na(this,It,void 0),this.preventClick=!1,this.tooltipEl=null,na(this,La,e=>{this.preventClick||this.handleClick(e),setTimeout(pe(this,bi),0)}),na(this,bi,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),na(this,pa,e=>{const{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",pe(this,pa));return}this.preventClick||this.handleClick(e)}),na(this,jn,e=>{const{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",pe(this,pa));return}this.addEventListener("keyup",pe(this,pa),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",li.TOOLTIP_PLACEMENT,q.MEDIA_CONTROLLER,u.MEDIA_LANG]}enable(){this.addEventListener("click",pe(this,La)),this.addEventListener("keydown",pe(this,jn)),this.tabIndex=0}disable(){this.removeEventListener("click",pe(this,La)),this.removeEventListener("keydown",pe(this,jn)),this.removeEventListener("keyup",pe(this,pa)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER?(i&&((n=(r=pe(this,It))==null?void 0:r.unassociateElement)==null||n.call(r,this),bn(this,It,null)),a&&this.isConnected&&(bn(this,It,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=pe(this,It))==null?void 0:o.associateElement)==null||l.call(o,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===li.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===u.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),pe(this,bi).call(this)}connectedCallback(){var e,i,a;const{style:r}=Ee(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const n=this.getAttribute(q.MEDIA_CONTROLLER);n&&(bn(this,It,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=pe(this,It))==null?void 0:i.associateElement)==null||a.call(i,this)),f.customElements.whenDefined("media-tooltip").then(()=>h0(this,Cl,fp).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=pe(this,It))==null?void 0:e.unassociateElement)==null||i.call(e,this),bn(this,It,null),this.removeEventListener("mouseenter",pe(this,bi)),this.removeEventListener("focus",pe(this,bi)),this.removeEventListener("click",pe(this,La))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ae(this,li.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){re(this,li.TOOLTIP_PLACEMENT,e)}get mediaController(){return ae(this,q.MEDIA_CONTROLLER)}set mediaController(e){re(this,q.MEDIA_CONTROLLER,e)}get disabled(){return W(this,li.DISABLED)}set disabled(e){F(this,li.DISABLED,e)}get noTooltip(){return W(this,li.NO_TOOLTIP)}set noTooltip(e){F(this,li.NO_TOOLTIP,e)}handleClick(e){}}It=new WeakMap;La=new WeakMap;
416bi=new WeakMap;pa=new WeakMap;jn=new WeakMap;Cl=new WeakSet;fp=function(){this.addEventListener("mouseenter",pe(this,bi)),this.addEventListener("focus",pe(this,bi)),this.addEventListener("click",pe(this,La));const t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};Le.shadowRootOptions={mode:"open"};Le.getTemplateHTML=m0;Le.getSlotTemplateHTML=p0;Le.getTooltipContentHTML=v0;f.customElements.get("media-chrome-button")||f.customElements.define("media-chrome-button",Le);const Vc=`<svg aria-hidden="true" viewBox="0 0 26 24"> 417 <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"/> 418</svg> 419`;function f0(t){return` 420 <style> 421 :host([${u.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) { 422 display: none !important; 423 } 424 425 426 :host(:not([${u.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) { 427 display: none !important; 428 } 429 430 :host([${u.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter], 431 :host(:not([${u.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] { 432 display: none; 433 } 434 </style> 435 436 <slot name="icon"> 437 <slot name="enter">${Vc}</slot> 438 <slot name="exit">${Vc}</slot> 439 </slot> 440 `}function E0(){return` 441 <slot name="tooltip-enter">${C("start airplay")}</slot> 442 <slot name="tooltip-exit">${C("stop airplay")}</slot> 443 `}const qc=t=>{const e=t.mediaIsAirplaying?C("stop airplay"):C("start airplay");t.setAttribute("aria-label",e)};class zd extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_AIRPLAYING,u.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),qc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_AIRPLAYING&&qc(this)}get mediaIsAirplaying(){return W(this,u.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){F(this,u.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return ae(this,u.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){re(this,u.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const e=new f.CustomEvent(R.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}zd.getSlotTemplateHTML=f0;zd.getTooltipContentHTML=E0;f.customElements.get("media-airplay-button")||f.customElements.define("media-airplay-button",zd);const _0=`<svg aria-hidden="true" viewBox="0 0 26 24"> 444 <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"/> 445</svg>`,b0=`<svg aria-hidden="true" viewBox="0 0 26 24"> 446 <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.8
4461 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"/> 447</svg>`;function g0(t){return` 448 <style> 449 :host([aria-checked="true"]) slot[name=off] { 450 display: none !important; 451 } 452 453 454 :host(:not([aria-checked="true"])) slot[name=on] { 455 display: none !important; 456 } 457 458 :host([aria-checked="true"]) slot[name=tooltip-enable], 459 :host(:not([aria-checked="true"])) slot[name=tooltip-disable] { 460 display: none; 461 } 462 </style> 463 464 <slot name="icon"> 465 <slot name="on">${_0}</slot> 466 <slot name="off">${b0}</slot> 467 </slot> 468 `}function y0(){return` 469 <slot name="tooltip-enable">${C("Enable captions")}</slot> 470 <slot name="tooltip-disable">${C("Disable captions")}</slot> 471 `}const Yc=t=>{t.setAttribute("aria-checked",lp(t).toString())};class Xd extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_SUBTITLES_LIST,u.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",C("closed captions")),Yc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_SUBTITLES_SHOWING&&Yc(this)}get mediaSubtitlesList(){return Gc(this,u.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Qc(this,u.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Gc(this,u.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Qc(this,u.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new f.CustomEvent(R.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}Xd.getSlotTemplateHTML=g0;Xd.getTooltipContentHTML=y0;const Gc=(t,e)=>{const i=t.getAttribute(e);return i?Io(i):[]},Qc=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=Jr(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-button")||f.customElements.define("media-captions-button",Xd);const T0='<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>',A0='<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>';function k0(t){return` 472 <style> 473 :host([${u.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) { 474 display: none !important; 475 } 476 477 478 :host(:not([${u.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) { 479 display: none !important; 480 } 481 482 :host([${u.MEDIA_IS_CASTING}]) slot[name=tooltip-enter], 483 :host(:not([${u.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] { 484 display: none; 485 } 486 </style> 487 488 <slot name="icon"> 489 <slot name="enter">${T0}</slot> 490 <slot name="exit">${A0}</slot> 491 </slot> 492 `}function S0(){return` 493 <slot name="tooltip-enter">${C("Start casting")}</slot> 494 <slot name="tooltip-exit">${C("Stop casting")}</slot> 495 `}const jc=t=>{const e=t.mediaIsCasting?C("stop casting"):C("start casting");t.setAttribute("aria-label",e)};class Jd extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_CASTING,u.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),jc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_CASTING&&jc(this)}get mediaIsCasting(){return W(this,u.MEDIA_IS_CASTING)}set mediaIsCasting(e){F(this,u.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ae(this,u.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){re(this,u.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?R.MEDIA_EXIT_CAST_REQUEST:R.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}Jd.getSlotTemplateHTML=k0;Jd.getTooltipContentHTML=S0;f.customElements.get("media-cast-button")||f.customElements.define("media-cast-button",Jd);var eu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Qi=(t,e,i)=>(eu(t,e,"read from private field"),e.get(t)),Yt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},tu=(t,e,i,a)=>(eu(t,e,"write to private field"),e.set(t,i),i),Ii=(t,e,i)=>(eu(t,e,"access private method"),i),zs,tn,Ji,Zn,Ll,Dl,Ep,Ml,_p,xl,bp,Ol,gp,Nl,yp;function w0(t){return` 496 <style> 497 :host { 498 font: var(--media-font, 499 var(--media-font-weight, normal) 500 var(--media-font-size, 14px) / 501 var(--media-text-content-height, var(--media-control-height, 24px)) 502 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 503 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 504 display: var(--media-dialog-display, inline-flex); 505 justify-content: center; 506 align-items: center; 507 508 transition-behavior: allow-discrete; 509 visibility: hidden; 510 opacity: 0; 511 transform: translateY(2px) scale(.99); 512 pointer-events: none; 513 } 514 515 :host([open]) { 516 transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out; 517 visibility: visible; 518 opacity: 1; 519 transform: translateY(0) scale(1); 520 pointer-events: auto; 521 } 522 523 #content { 524 display: flex; 525 position: relative; 526 box-sizing: border-box; 527 width: min(320px, 100%); 528 word-wrap: break-word; 529 max-height: 100%; 530 overflow: auto; 531 text-align: center; 532 line-height: 1.4; 533 } 534 </style>
535 ${this.getSlotTemplateHTML(t)} 536 `}function I0(t){return` 537 <slot id="content"></slot> 538 `}const rr={OPEN:"open",ANCHOR:"anchor"};class hn extends f.HTMLElement{constructor(){super(),Yt(this,Zn),Yt(this,Dl),Yt(this,Ml),Yt(this,xl),Yt(this,Ol),Yt(this,Nl),Yt(this,zs,!1),Yt(this,tn,null),Yt(this,Ji,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[rr.OPEN,rr.ANCHOR]}get open(){return W(this,rr.OPEN)}set open(e){F(this,rr.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":Ii(this,xl,bp).call(this,e);break;case"focusout":Ii(this,Ol,gp).call(this,e);break;case"keydown":Ii(this,Nl,yp).call(this,e);break}}connectedCallback(){Ii(this,Zn,Ll).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,i,a){Ii(this,Zn,Ll).call(this),e===rr.OPEN&&a!==i&&(this.open?Ii(this,Dl,Ep).call(this):Ii(this,Ml,_p).call(this))}focus(){tu(this,tn,Kd());const e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;const a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a?.focus()}get keysUsed(){return["Escape","Tab"]}}zs=new WeakMap;tn=new WeakMap;Ji=new WeakMap;Zn=new WeakSet;Ll=function(){if(!Qi(this,zs)&&(tu(this,zs,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);const t=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{const{style:e}=Ee(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};Dl=new WeakSet;Ep=function(){var t;(t=Qi(this,Ji))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Ml=new WeakSet;_p=function(){var t;(t=Qi(this,Ji))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};xl=new WeakSet;bp=function(t){tu(this,Ji,t.relatedTarget),ri(this,t.relatedTarget)||(this.open=!this.open)};Ol=new WeakSet;gp=function(t){var e;ri(this,t.relatedTarget)||((e=Qi(this,tn))==null||e.focus(),Qi(this,Ji)&&Qi(this,Ji)!==t.relatedTarget&&this.open&&(this.open=!1))};Nl=new WeakSet;yp=function(t){var e,i,a,r,n;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?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((n=Qi(this,tn))==null||n.focus(),this.open=!1))};hn.shadowRootOptions={mode:"open"};hn.getTemplateHTML=w0;hn.getSlotTemplateHTML=I0;f.customElements.get("media-chrome-dialog")||f.customElements.define("media-chrome-dialog",hn);var iu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},se=(t,e,i)=>(iu(t,e,"read from private field"),i?i.call(t):e.get(t)),Re=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ci=(t,e,i,a)=>(iu(t,e,"write to private field"),e.set(t,i),i),pt=(t,e,i)=>(iu(t,e,"access private method"),i),Rt,Lo,zn,Xn,vt,Xs,Jn,es,ts,au,Tp,is,Pl,as,$l,Js,ru,Ul,Ap,Hl,kp,Bl,Sp,Wl,wp;function R0(t){return` 539 <style> 540 :host { 541 --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 542 --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px)); 543 544 box-shadow: var(--_focus-visible-box-shadow, none); 545 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 546 height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding)); 547 display: inline-flex; 548 align-items: center; 549 550 vertical-align: middle; 551 box-sizing: border-box; 552 position: relative; 553 width: 100px; 554 transition: background .15s linear; 555 cursor: var(--media-cursor, pointer); 556 pointer-events: auto; 557 touch-action: none; 558 } 559 560 561 input[type=range]:focus { 562 outline: 0; 563 } 564 input[type=range]:focus::-webkit-slider-runnable-track { 565 outline: 0; 566 } 567 568 :host(:hover) { 569 background: var(--media-control-hover-background, rgb(50 50 70 / .7)); 570 } 571 572 #leftgap { 573 padding-left: var(--media-range-padding-left, var(--_media-range-padding)); 574 } 575 576 #rightgap { 577 padding-right: var(--media-range-padding-right, var(--_media-range-padding)); 578 } 579 580 #startpoint, 581 #endpoint { 582 position: absolute; 583 } 584 585 #endpoint { 586 right: 0; 587 } 588 589 #container { 590 591 width: var(--media-range-track-width, 100%); 592 transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px)); 593 position: relative; 594 height: 100%; 595 display: flex; 596 align-items: center; 597 min-width: 40px; 598 } 599 600 #range { 601 602 display: var(--media-time-range-hover-display, block); 603 bottom: var(--media-time-range-hover-bottom, -7px); 604 height: var(--media-time-range-hover-height, max(100% + 7px, 25px)); 605 width: 100%; 606 position: absolute; 607 cursor: var(--media-cursor, pointer); 608 609 -webkit-appearance: none; 610 -webkit-tap-highlight-color: transparent; 611 background: transparent; 612 margin: 0; 613 z-index: 1; 614 } 615 616 @media (hover: hover) { 617 #range { 618 bottom: var(--media-time-range-hover-bottom, -5px); 619 height: var(--media-time-range-hover-height, max(100% + 5px, 20px)); 620 } 621 } 622 623 624 625 #range::-webkit-slider-thumb { 626 -webkit-appearance: none; 627 background: transparent; 628 width: .1px; 629 height: .1px; 630 } 631 632 633 #range::-moz-range-thumb { 634 background: transparent; 635 border: transparent; 636 width: .1px; 637 height: .1px; 638 } 639 640 #appearance { 641 height: var(--media-range-track-height, 4px); 642 display: flex; 643 flex-direction: column; 644 justify-content: center; 645 width: 100%; 646 position: absolute; 647 648 will-change: transform; 649 } 650 651 #track { 652 background: var(--media-range-track-background, rgb(255 255 255 / .2)); 653 border-radius: var(--media-range-track-border-radius, 1px); 654 border: var(--media-range-track-border, none); 655 outline: var(--media-range-track-outline); 656 outline-offset: var(--media-range-track-outline-offset); 657 backdrop-filter: var(--media-range-track-backdrop-filter); 658 -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
659 box-shadow: var(--media-range-track-box-shadow, none); 660 position: absolute; 661 width: 100%; 662 height: 100%; 663 overflow: hidden; 664 } 665 666 #progress, 667 #pointer { 668 position: absolute; 669 height: 100%; 670 will-change: width; 671 } 672 673 #progress { 674 background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238))); 675 transition: var(--media-range-track-transition); 676 } 677 678 #pointer { 679 background: var(--media-range-track-pointer-background); 680 border-right: var(--media-range-track-pointer-border-right); 681 transition: visibility .25s, opacity .25s; 682 visibility: hidden; 683 opacity: 0; 684 } 685 686 @media (hover: hover) { 687 :host(:hover) #pointer { 688 transition: visibility .5s, opacity .5s; 689 visibility: visible; 690 opacity: 1; 691 } 692 } 693 694 #thumb, 695 ::slotted([slot=thumb]) { 696 width: var(--media-range-thumb-width, 10px); 697 height: var(--media-range-thumb-height, 10px); 698 transition: var(--media-range-thumb-transition); 699 transform: var(--media-range-thumb-transform, none); 700 opacity: var(--media-range-thumb-opacity, 1); 701 translate: -50%; 702 position: absolute; 703 left: 0; 704 cursor: var(--media-cursor, pointer); 705 } 706 707 #thumb { 708 border-radius: var(--media-range-thumb-border-radius, 10px); 709 background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238))); 710 box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent); 711 border: var(--media-range-thumb-border, none); 712 } 713 714 :host([disabled]) #thumb { 715 background-color: #777; 716 } 717 718 .segments #appearance { 719 height: var(--media-range-segment-hover-height, 7px); 720 } 721 722 #track { 723 clip-path: url(#segments-clipping); 724 } 725 726 #segments { 727 --segments-gap: var(--media-range-segments-gap, 2px); 728 position: absolute; 729 width: 100%; 730 height: 100%; 731 } 732 733 #segments-clipping { 734 transform: translateX(calc(var(--segments-gap) / 2)); 735 } 736 737 #segments-clipping:empty { 738 display: none; 739 } 740 741 #segments-clipping rect { 742 height: var(--media-range-track-height, 4px); 743 y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2); 744 transition: var(--media-range-segment-transition, transform .1s ease-in-out); 745 transform: var(--media-range-segment-transform, scaleY(1)); 746 transform-origin: center; 747 } 748 </style> 749 <div id="leftgap"></div> 750 <div id="container"> 751 <div id="startpoint"></div> 752 <div id="endpoint"></div> 753 <div id="appearance"> 754 <div id="track" part="track"> 755 <div id="pointer"></div> 756 <div id="progress" part="progress"></div> 757 </div> 758 <slot name="thumb"> 759 <div id="thumb" part="thumb"></div> 760 </slot> 761 <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg> 762 </div>
763 <input id="range" type="range" min="0" max="1" step="any" value="0"> 764 </div> 765 <div id="rightgap"></div> 766 `}class za extends f.HTMLElement{constructor(){if(super(),Re(this,au),Re(this,is),Re(this,as),Re(this,Js),Re(this,Ul),Re(this,Hl),Re(this,Bl),Re(this,Wl),Re(this,Rt,void 0),Re(this,Lo,void 0),Re(this,zn,void 0),Re(this,Xn,void 0),Re(this,vt,{}),Re(this,Xs,[]),Re(this,Jn,()=>{if(this.range.matches(":focus-visible")){const{style:e}=Ee(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),Re(this,es,()=>{const{style:e}=Ee(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),Re(this,ts,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),ci(this,zn,this.shadowRoot.querySelector("#startpoint")),ci(this,Xn,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",q.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER?(i&&((n=(r=se(this,Rt))==null?void 0:r.unassociateElement)==null||n.call(r,this),ci(this,Rt,null)),a&&this.isConnected&&(ci(this,Rt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=se(this,Rt))==null?void 0:o.associateElement)==null||l.call(o,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),pt(this,is,Pl).call(this)):(this.range.setAttribute(e,a),pt(this,as,$l).call(this)))}connectedCallback(){var e,i,a;const{style:r}=Ee(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),se(this,vt).pointer=Ee(this.shadowRoot,"#pointer"),se(this,vt).progress=Ee(this.shadowRoot,"#progress"),se(this,vt).thumb=Ee(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),se(this,vt).activeSegment=Ee(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const n=this.getAttribute(q.MEDIA_CONTROLLER);n&&(ci(this,Rt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=se(this,Rt))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",se(this,Jn)),this.shadowRoot.addEventListener("focusout",se(this,es)),pt(this,is,Pl).call(this),Ka(this.container,se(this,ts))}disconnectedCallback(){var e,i;pt(this,as,$l).call(this),(i=(e=se(this,Rt))==null?void 0:e.unassociateElement)==null||i.call(e,this),ci(this,Rt,null),this.shadowRoot.removeEventListener("focusin",se(this,Jn)),this.shadowRoot.removeEventListener("focusout",se(this,es)),Va(this.container,se(this,ts))}updatePointerBar(e){var i;(i=se(this,vt).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;const a=this.range.valueAsNumber*100;(e=se(this,vt).progress)==null||e.style.setProperty("width",`${a}%`),(i=se(this,vt).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){const i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!e?.length),!e?.length)return;const a=[...new Set([+this.range.min,...e.flatMap(n=>[n.start,n.end]),+this.range.max])];ci(this,Xs,[...a]);const r=a.pop();for(const[n,s]of a.entries()){const[o,l]=[n===0,n===a.length-1],d=o?"calc(var(--segments-gap) / -1)":`${s*100}%`,p=`calc(${((l?r:a[n+1])-s)*100}%${o||l?"":" - var(--segments-gap)"})`,h=ye.createElementNS("http://www.w3.org/2000/svg","rect"),c=Ee(this.shadowRoot,`#segments-clipping rect:nth-child(${n+1})`);c.style.setProperty("x",d),c.style.setProperty("width",p),i.append(h)}}getPointerRatio(e){return Ag(e.clientX,e.clientY,se(this,zn).getBoundingClientRect(),se(this,Xn).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":pt(this,Wl,wp).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":pt(this,Ul,Ap).call(this,e);break;case"pointerdown":pt(this,Js,ru).call(this,e);break;case"pointerup":pt(this,Hl,kp).call(this);break;case"pointerleave":pt(this,Bl,Sp).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}Rt=new WeakMap;Lo=new WeakMap;zn=new WeakMap;Xn=new WeakMap;vt=new WeakMap;Xs=new WeakMap;Jn=new WeakMap;es=new WeakMap;ts=new WeakMap;au=new WeakSet;Tp=function(t){const e=se(this,vt).activeSegment;if(!e)return;const i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${se(this,Xs).findIndex((n,s,o)=>{const l=o[s+1];return l!=null&&i>=n&&i<=l})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};is=new WeakSet;Pl=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};as=new WeakSet;$l=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=f.window)==null||t.removeEventListener("pointerup",this),(e=f.window)==null||e.removeEventListener("pointermove",this)};Js=new WeakSet;ru=function(t){var e;ci(this,Lo,t.composedPath().includes(this.range)),(e=f.window)==null||e.addEventListener("pointerup",this)};Ul=new WeakSet;Ap=function(t){var e;t.pointerType!=="mouse"&&pt(this,Js,ru).call(this,t),this.addEventListener("pointerleave",this),(e=f.window)==null||e.addEventListener("pointermove",this)};Hl=new WeakSet;kp=function(){var t;(t=f.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};Bl=new WeakSet;Sp=function(){var t,e;this.removeEventListener("pointerleave",this),(t=f.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=se(this,vt).activeSegment)==null||e.style.removeProperty("transform")};
766Wl=new WeakSet;wp=function(t){t.pointerType==="pen"&&t.buttons===0||(this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),pt(this,au,Tp).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!se(this,Lo))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))};za.shadowRootOptions={mode:"open"};za.getTemplateHTML=R0;f.customElements.get("media-chrome-range")||f.customElements.define("media-chrome-range",za);var Ip=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},gn=(t,e,i)=>(Ip(t,e,"read from private field"),i?i.call(t):e.get(t)),C0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},yn=(t,e,i,a)=>(Ip(t,e,"write to private field"),e.set(t,i),i),Ct;function L0(t){return` 767 <style> 768 :host { 769 770 box-sizing: border-box; 771 display: var(--media-control-display, var(--media-control-bar-display, inline-flex)); 772 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 773 --media-loading-indicator-icon-height: 44px; 774 } 775 776 ::slotted(media-time-range), 777 ::slotted(media-volume-range) { 778 min-height: 100%; 779 } 780 781 ::slotted(media-time-range), 782 ::slotted(media-clip-selector) { 783 flex-grow: 1; 784 } 785 786 ::slotted([role="menu"]) { 787 position: absolute; 788 } 789 </style> 790 791 <slot></slot> 792 `}class nu extends f.HTMLElement{constructor(){if(super(),C0(this,Ct,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER&&(i&&((n=(r=gn(this,Ct))==null?void 0:r.unassociateElement)==null||n.call(r,this),yn(this,Ct,null)),a&&this.isConnected&&(yn(this,Ct,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=gn(this,Ct))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(q.MEDIA_CONTROLLER);r&&(yn(this,Ct,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=gn(this,Ct))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=gn(this,Ct))==null?void 0:e.unassociateElement)==null||i.call(e,this),yn(this,Ct,null)}}Ct=new WeakMap;nu.shadowRootOptions={mode:"open"};nu.getTemplateHTML=L0;f.customElements.get("media-control-bar")||f.customElements.define("media-control-bar",nu);var Rp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Tn=(t,e,i)=>(Rp(t,e,"read from private field"),i?i.call(t):e.get(t)),D0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},An=(t,e,i,a)=>(Rp(t,e,"write to private field"),e.set(t,i),i),Lt;function M0(t,e={}){return` 793 <style> 794 :host { 795 font: var(--media-font, 796 var(--media-font-weight, normal) 797 var(--media-font-size, 14px) / 798 var(--media-text-content-height, var(--media-control-height, 24px)) 799 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 800 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 801 background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)))); 802 padding: var(--media-control-padding, 10px); 803 display: inline-flex; 804 justify-content: center; 805 align-items: center; 806 vertical-align: middle; 807 box-sizing: border-box; 808 text-align: center; 809 pointer-events: auto; 810 } 811 812 813 :host(:focus-visible) { 814 box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9); 815 outline: 0; 816 } 817 818 819 :host(:where(:focus)) { 820 box-shadow: none; 821 outline: 0; 822 } 823 </style> 824 825 ${this.getSlotTemplateHTML(t,e)} 826 `}function x0(t,e){return` 827 <slot></slot> 828 `}class ki extends f.HTMLElement{constructor(){if(super(),D0(this,Lt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===q.MEDIA_CONTROLLER&&(i&&((n=(r=Tn(this,Lt))==null?void 0:r.unassociateElement)==null||n.call(r,this),An(this,Lt,null)),a&&this.isConnected&&(An(this,Lt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Tn(this,Lt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const{style:r}=Ee(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const n=this.getAttribute(q.MEDIA_CONTROLLER);n&&(An(this,Lt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=Tn(this,Lt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Tn(this,Lt))==null?void 0:e.unassociateElement)==null||i.call(e,this),An(this,Lt,null)}}Lt=new WeakMap;ki.shadowRootOptions={mode:"open"};ki.getTemplateHTML=M0;ki.getSlotTemplateHTML=x0;f.customElements.get("media-text-display")||f.customElements.define("media-text-display",ki);var Cp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Zc=(t,e,i)=>(Cp(t,e,"read from private field"),i?i.call(t):e.get(t)),O0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},N0=(t,e,i,a)=>(Cp(t,e,"write to private field"),e.set(t,i),i),Sr;function P0(t,e){return` 829 <slot>${Ti(e.mediaDuration)}</slot> 830 `}class Lp extends ki{constructor(){var e;super(),O0(this,Sr,void 0),N0(this,Sr,this.shadowRoot.querySelector("slot")),Zc(this,Sr).textContent=Ti((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===u.MEDIA_DURATION&&(Zc(this,Sr).textContent=Ti(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return ie(this,u.MEDIA_DURATION)}set mediaDuration(e){de(this,u.MEDIA_DURATION,e)}}Sr=new WeakMap;Lp.getSlotTemplateHTML=P0;f.customElements.get("media-duration-display")||f.customElements.define("media-duration-display",Lp);
830const $0={2:C("Network Error"),3:C("Decode Error"),4:C("Source Not Supported"),5:C("Encryption Error")},U0={2:C("A network error caused the media download to fail."),3:C("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:C("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:C("The media is encrypted and there are no keys to decrypt it.")},Dp=t=>{var e,i;return t.code===1?null:{title:(e=$0[t.code])!=null?e:`Error ${t.code}`,message:(i=U0[t.code])!=null?i:t.message}};var Mp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},H0=(t,e,i)=>(Mp(t,e,"read from private field"),i?i.call(t):e.get(t)),B0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},W0=(t,e,i,a)=>(Mp(t,e,"write to private field"),e.set(t,i),i),rs;function F0(t){return` 831 <style> 832 :host { 833 background: rgb(20 20 30 / .8); 834 } 835 836 #content { 837 display: block; 838 padding: 1.2em 1.5em; 839 } 840 841 h3, 842 p { 843 margin-block: 0 .3em; 844 } 845 </style> 846 <slot name="error-${t.mediaerrorcode}" id="content"> 847 ${xp({code:+t.mediaerrorcode,message:t.mediaerrormessage})} 848 </slot> 849 `}function K0(t){return t.code&&Dp(t)!==null}function xp(t){var e;const{title:i,message:a}=(e=Dp(t))!=null?e:{};let r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}const zc=[u.MEDIA_ERROR_CODE,u.MEDIA_ERROR_MESSAGE];class Do extends hn{constructor(){super(...arguments),B0(this,rs,null)}static get observedAttributes(){return[...super.observedAttributes,...zc]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!zc.includes(e))return;const n=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=K0(n),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(n))}get mediaError(){return H0(this,rs)}set mediaError(e){W0(this,rs,e)}get mediaErrorCode(){return ie(this,"mediaerrorcode")}set mediaErrorCode(e){de(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ae(this,"mediaerrormessage")}set mediaErrorMessage(e){re(this,"mediaerrormessage",e)}}rs=new WeakMap;Do.getSlotTemplateHTML=F0;Do.formatErrorMessage=xp;f.customElements.get("media-error-dialog")||f.customElements.define("media-error-dialog",Do);var Op=Do,Np=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},V0=(t,e,i)=>(Np(t,e,"read from private field"),e.get(t)),q0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Y0=(t,e,i,a)=>(Np(t,e,"write to private field"),e.set(t,i),i),ns;const G0=`<svg aria-hidden="true" viewBox="0 0 26 24"> 850 <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/> 851</svg>`,Q0=`<svg aria-hidden="true" viewBox="0 0 26 24"> 852 <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/> 853</svg>`;function j0(t){return` 854 <style> 855 :host([${u.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) { 856 display: none !important; 857 } 858 859 860 :host(:not([${u.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) { 861 display: none !important; 862 } 863 864 :host([${u.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter], 865 :host(:not([${u.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] { 866 display: none; 867 } 868 </style> 869 870 <slot name="icon"> 871 <slot name="enter">${G0}</slot> 872 <slot name="exit">${Q0}</slot> 873 </slot> 874 `}function Z0(){return` 875 <slot name="tooltip-enter">${C("Enter fullscreen mode")}</slot> 876 <slot name="tooltip-exit">${C("Exit fullscreen mode")}</slot> 877 `}const Xc=t=>{const e=t.mediaIsFullscreen?C("exit fullscreen mode"):C("enter fullscreen mode");t.setAttribute("aria-label",e)};class su extends Le{constructor(){super(...arguments),q0(this,ns,null)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_FULLSCREEN,u.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Xc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_FULLSCREEN&&Xc(this)}get mediaFullscreenUnavailable(){return ae(this,u.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){re(this,u.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return W(this,u.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){F(this,u.MEDIA_IS_FULLSCREEN,e)}handleClick(e){Y0(this,ns,e);const i=V0(this,ns)instanceof PointerEvent,a=this.mediaIsFullscreen?new f.CustomEvent(R.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new f.CustomEvent(R.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}}ns=new WeakMap;su.getSlotTemplateHTML=j0;
877su.getTooltipContentHTML=Z0;f.customElements.get("media-fullscreen-button")||f.customElements.define("media-fullscreen-button",su);const{MEDIA_TIME_IS_LIVE:ss,MEDIA_PAUSED:Br}=u,{MEDIA_SEEK_TO_LIVE_REQUEST:z0,MEDIA_PLAY_REQUEST:X0}=R,J0='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>';function e1(t){return` 878 <style> 879 :host { --media-tooltip-display: none; } 880 881 slot[name=indicator] > *, 882 :host ::slotted([slot=indicator]) { 883 884 min-width: auto; 885 fill: var(--media-live-button-icon-color, rgb(140, 140, 140)); 886 color: var(--media-live-button-icon-color, rgb(140, 140, 140)); 887 } 888 889 :host([${ss}]:not([${Br}])) slot[name=indicator] > *, 890 :host([${ss}]:not([${Br}])) ::slotted([slot=indicator]) { 891 fill: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 892 color: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 893 } 894 895 :host([${ss}]:not([${Br}])) { 896 cursor: var(--media-cursor, not-allowed); 897 } 898 899 slot[name=text]{ 900 text-transform: uppercase; 901 } 902 903 </style> 904 905 <slot name="indicator">${J0}</slot> 906 907 <slot name="spacer"> </slot><slot name="text">${C("live")}</slot> 908 `}const Jc=t=>{var e;const i=t.mediaPaused||!t.mediaTimeIsLive,a=C(i?"seek to live":"playing live");t.setAttribute("aria-label",a);const r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=C("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")};class Pp extends Le{static get observedAttributes(){return[...super.observedAttributes,ss,Br]}connectedCallback(){super.connectedCallback(),Jc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),Jc(this)}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return W(this,u.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){F(this,u.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new f.CustomEvent(z0,{composed:!0,bubbles:!0})),this.hasAttribute(Br)&&this.dispatchEvent(new f.CustomEvent(X0,{composed:!0,bubbles:!0})))}}Pp.getSlotTemplateHTML=e1;f.customElements.get("media-live-button")||f.customElements.define("media-live-button",Pp);var $p=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},nr=(t,e,i)=>($p(t,e,"read from private field"),i?i.call(t):e.get(t)),eh=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},sr=(t,e,i,a)=>($p(t,e,"write to private field"),e.set(t,i),i),Dt,os;const kn={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},Up=500,t1=` 909<svg aria-hidden="true" viewBox="0 0 100 100"> 910 <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"> 911 <animateTransform 912 attributeName="transform" 913 attributeType="XML" 914 type="rotate" 915 dur="1s" 916 from="0 50 50" 917 to="360 50 50" 918 repeatCount="indefinite" /> 919 </path> 920</svg> 921`;function i1(t){return` 922 <style> 923 :host { 924 display: var(--media-control-display, var(--media-loading-indicator-display, inline-block)); 925 vertical-align: middle; 926 box-sizing: border-box; 927 --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${Up}ms); 928 } 929 930 #status { 931 color: rgba(0,0,0,0); 932 width: 0px; 933 height: 0px; 934 } 935 936 :host slot[name=icon] > *, 937 :host ::slotted([slot=icon]) { 938 opacity: var(--media-loading-indicator-opacity, 0); 939 transition: opacity 0.15s; 940 } 941 942 :host([${u.MEDIA_LOADING}]:not([${u.MEDIA_PAUSED}])) slot[name=icon] > *, 943 :host([${u.MEDIA_LOADING}]:not([${u.MEDIA_PAUSED}])) ::slotted([slot=icon]) { 944 opacity: var(--media-loading-indicator-opacity, 1); 945 transition: opacity 0.15s var(--_loading-indicator-delay); 946 } 947 948 :host #status { 949 visibility: var(--media-loading-indicator-opacity, hidden); 950 transition: visibility 0.15s; 951 } 952 953 :host([${u.MEDIA_LOADING}]:not([${u.MEDIA_PAUSED}])) #status { 954 visibility: var(--media-loading-indicator-opacity, visible); 955 transition: visibility 0.15s var(--_loading-indicator-delay); 956 } 957 958 svg, img, ::slotted(svg), ::slotted(img) { 959 width: var(--media-loading-indicator-icon-width); 960 height: var(--media-loading-indicator-icon-height, 100px); 961 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 962 vertical-align: middle; 963 } 964 </style> 965 966 <slot name="icon">${t1}</slot>
967 <div id="status" role="status" aria-live="polite">${C("media loading")}</div> 968 `}class ou extends f.HTMLElement{constructor(){if(super(),eh(this,Dt,void 0),eh(this,os,Up),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER,u.MEDIA_PAUSED,u.MEDIA_LOADING,kn.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===kn.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===q.MEDIA_CONTROLLER&&(i&&((n=(r=nr(this,Dt))==null?void 0:r.unassociateElement)==null||n.call(r,this),sr(this,Dt,null)),a&&this.isConnected&&(sr(this,Dt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=nr(this,Dt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(q.MEDIA_CONTROLLER);r&&(sr(this,Dt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=nr(this,Dt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=nr(this,Dt))==null?void 0:e.unassociateElement)==null||i.call(e,this),sr(this,Dt,null)}get loadingDelay(){return nr(this,os)}set loadingDelay(e){sr(this,os,e);const{style:i}=Ee(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,u.MEDIA_LOADING)}set mediaLoading(e){F(this,u.MEDIA_LOADING,e)}get mediaController(){return ae(this,q.MEDIA_CONTROLLER)}set mediaController(e){re(this,q.MEDIA_CONTROLLER,e)}get noAutohide(){return W(this,kn.NO_AUTOHIDE)}set noAutohide(e){F(this,kn.NO_AUTOHIDE,e)}}Dt=new WeakMap;os=new WeakMap;ou.shadowRootOptions={mode:"open"};ou.getTemplateHTML=i1;f.customElements.get("media-loading-indicator")||f.customElements.define("media-loading-indicator",ou);const a1=`<svg aria-hidden="true" viewBox="0 0 24 24"> 969 <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"/> 970</svg>`,th=`<svg aria-hidden="true" viewBox="0 0 24 24"> 971 <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"/> 972</svg>`,r1=`<svg aria-hidden="true" viewBox="0 0 24 24"> 973 <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"/> 974</svg>`;function n1(t){return` 975 <style> 976 :host(:not([${u.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]), 977 :host([${u.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) { 978 display: none !important; 979 } 980 981 :host([${u.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) { 982 display: none !important; 983 } 984 985 :host([${u.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) { 986 display: none !important; 987 } 988 989 :host([${u.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) { 990 display: none !important; 991 } 992 993 :host(:not([${u.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute], 994 :host([${u.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] { 995 display: none; 996 } 997 </style> 998 999 <slot name="icon"> 1000 <slot name="off">${a1}</slot> 1001 <slot name="low">${th}</slot> 1002 <slot name="medium">${th}</slot> 1003 <slot name="high">${r1}</slot> 1004 </slot> 1005 `}function s1(){return` 1006 <slot name="tooltip-mute">${C("Mute")}</slot> 1007 <slot name="tooltip-unmute">${C("Unmute")}</slot> 1008 `}const ih=t=>{const e=t.mediaVolumeLevel==="off",i=C(e?"unmute":"mute");t.setAttribute("aria-label",i)};class lu extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),ih(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_VOLUME_LEVEL&&ih(this)}get mediaVolumeLevel(){return ae(this,u.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){re(this,u.MEDIA_VOLUME_LEVEL,e)}handleClick(){const e=this.mediaVolumeLevel==="off"?R.MEDIA_UNMUTE_REQUEST:R.MEDIA_MUTE_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}lu.getSlotTemplateHTML=n1;lu.getTooltipContentHTML=s1;f.customElements.get("media-mute-button")||f.customElements.define("media-mute-button",lu);const ah=`<svg aria-hidden="true" viewBox="0 0 28 24"> 1009 <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"/> 1010</svg>`;function o1(t){return` 1011 <style> 1012 :host([${u.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) { 1013 display: none !important; 1014 } 1015 1016 :host(:not([${u.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) { 1017 display: none !important; 1018 } 1019 1020 :host([${u.MEDIA_IS_PIP}]) slot[name=tooltip-enter], 1021 :host(:not([${u.MEDIA_IS_PIP}])) slot[name=tooltip-exit] { 1022 display: none; 1023 } 1024 </style> 1025 1026 <slot name="icon"> 1027 <slot name="enter">${ah}</slot> 1028 <slot name="exit">${ah}</slot> 1029 </slot> 1030 `}function l1(){return` 1031 <slot name="tooltip-enter">${C("Enter picture in picture mode")}</slot> 1032 <slot name="tooltip-exit">${C("Exit picture in picture mode")}</slot> 1033 `}const rh=t=>{const e=t.mediaIsPip?C("exit picture in picture mode"):C("enter picture in picture mode");t.setAttribute("aria-label",e)};class du extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_IS_PIP,u.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),rh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_IS_PIP&&rh(this)}get mediaPipUnavailable(){return ae(this,u.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){re(this,u.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return W(this,u.MEDIA_IS_PIP)}set mediaIsPip(e){F(this,u.MEDIA_IS_PIP,e)}handleClick(){const e=this.mediaIsPip?R.MEDIA_EXIT_PIP_REQUEST:R.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}du.getSlotTemplateHTML=o1;du.getTooltipContentHTML=l1;f.customElements.get("media-pip-button")||f.customElements.define("media-pip-button",du);var d1=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)}
1033,sa=(t,e,i)=>(d1(t,e,"read from private field"),i?i.call(t):e.get(t)),u1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},hi;const Zo={RATES:"rates"},Hp=[1,1.2,1.5,1.7,2],Da=1;function c1(t){return` 1034 <style> 1035 :host { 1036 min-width: 5ch; 1037 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1038 } 1039 </style> 1040 <slot name="icon">${t.mediaplaybackrate||Da}x</slot> 1041 `}function h1(){return C("Playback rate")}class uu extends Le{constructor(){var e;super(),u1(this,hi,new Yd(this,Zo.RATES,{defaultValue:Hp})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Da}x`}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PLAYBACK_RATE,Zo.RATES]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===Zo.RATES&&(sa(this,hi).value=a),e===u.MEDIA_PLAYBACK_RATE){const r=a?+a:Number.NaN,n=Number.isNaN(r)?Da:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",C("Playback rate {playbackRate}",{playbackRate:n}))}}get rates(){return sa(this,hi)}set rates(e){e?Array.isArray(e)?sa(this,hi).value=e.join(" "):typeof e=="string"&&(sa(this,hi).value=e):sa(this,hi).value=""}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,Da)}set mediaPlaybackRate(e){de(this,u.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,i;const a=Array.from(sa(this,hi).values(),s=>+s).sort((s,o)=>s-o),r=(i=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?i:Da,n=new f.CustomEvent(R.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}}hi=new WeakMap;uu.getSlotTemplateHTML=c1;uu.getTooltipContentHTML=h1;f.customElements.get("media-playback-rate-button")||f.customElements.define("media-playback-rate-button",uu);const m1=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1042 <path d="m6 21 15-9L6 3v18Z"/> 1043</svg>`,p1=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1044 <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/> 1045</svg>`;function v1(t){return` 1046 <style> 1047 :host([${u.MEDIA_PAUSED}]) slot[name=pause], 1048 :host(:not([${u.MEDIA_PAUSED}])) slot[name=play] { 1049 display: none !important; 1050 } 1051 1052 :host([${u.MEDIA_PAUSED}]) slot[name=tooltip-pause], 1053 :host(:not([${u.MEDIA_PAUSED}])) slot[name=tooltip-play] { 1054 display: none; 1055 } 1056 </style> 1057 1058 <slot name="icon"> 1059 <slot name="play">${m1}</slot> 1060 <slot name="pause">${p1}</slot> 1061 </slot> 1062 `}function f1(){return` 1063 <slot name="tooltip-play">${C("Play")}</slot> 1064 <slot name="tooltip-pause">${C("Pause")}</slot> 1065 `}const nh=t=>{const e=t.mediaPaused?C("play"):C("pause");t.setAttribute("aria-label",e)};class cu extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PAUSED,u.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),nh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===u.MEDIA_PAUSED||e===u.MEDIA_LANG)&&nh(this)}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}handleClick(){const e=this.mediaPaused?R.MEDIA_PLAY_REQUEST:R.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}cu.getSlotTemplateHTML=v1;cu.getTooltipContentHTML=f1;f.customElements.get("media-play-button")||f.customElements.define("media-play-button",cu);const yt={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};function E1(t){return` 1066 <style> 1067 :host { 1068 pointer-events: none; 1069 display: var(--media-poster-image-display, inline-block); 1070 box-sizing: border-box; 1071 } 1072 1073 img { 1074 max-width: 100%; 1075 max-height: 100%; 1076 min-width: 100%; 1077 min-height: 100%; 1078 background-repeat: no-repeat; 1079 background-position: var(--media-poster-image-background-position, var(--media-object-position, center)); 1080 background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain)); 1081 object-fit: var(--media-object-fit, contain); 1082 object-position: var(--media-object-position, center); 1083 } 1084 </style> 1085 1086 <img part="poster img" aria-hidden="true" id="image"/> 1087 `}const _1=t=>{t.style.removeProperty("background-image")},b1=(t,e)=>{t.style["background-image"]=`url('${e}')`};class hu extends f.HTMLElement{static get observedAttributes(){return[yt.PLACEHOLDER_SRC,yt.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===yt.SRC&&(a==null?this.image.removeAttribute(yt.SRC):this.image.setAttribute(yt.SRC,a)),e===yt.PLACEHOLDER_SRC&&(a==null?_1(this.image):b1(this.image,a))}get placeholderSrc(){return ae(this,yt.PLACEHOLDER_SRC)}set placeholderSrc(e){re(this,yt.SRC,e)}get src(){return ae(this,yt.SRC)}set src(e){re(this,yt.SRC,e)}}hu.shadowRootOptions={mode:"open"};hu.getTemplateHTML=E1;f.customElements.get("media-poster-image")||f.customElements.define("media-poster-image",hu);
1087var Bp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},g1=(t,e,i)=>(Bp(t,e,"read from private field"),i?i.call(t):e.get(t)),y1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},T1=(t,e,i,a)=>(Bp(t,e,"write to private field"),e.set(t,i),i),ls;class A1 extends ki{constructor(){super(),y1(this,ls,void 0),T1(this,ls,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PREVIEW_CHAPTER,u.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===u.MEDIA_PREVIEW_CHAPTER||e===u.MEDIA_LANG)&&a!==i&&a!=null)if(g1(this,ls).textContent=a,a!==""){const r=C("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return ae(this,u.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){re(this,u.MEDIA_PREVIEW_CHAPTER,e)}}ls=new WeakMap;f.customElements.get("media-preview-chapter-display")||f.customElements.define("media-preview-chapter-display",A1);var Wp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Sn=(t,e,i)=>(Wp(t,e,"read from private field"),i?i.call(t):e.get(t)),k1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},wn=(t,e,i,a)=>(Wp(t,e,"write to private field"),e.set(t,i),i),Mt;function S1(t){return` 1088 <style> 1089 :host { 1090 box-sizing: border-box; 1091 display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block)); 1092 overflow: hidden; 1093 } 1094 1095 img { 1096 display: none; 1097 position: relative; 1098 } 1099 </style> 1100 <img crossorigin loading="eager" decoding="async"> 1101 `}class Mo extends f.HTMLElement{constructor(){if(super(),k1(this,Mt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[q.MEDIA_CONTROLLER,u.MEDIA_PREVIEW_IMAGE,u.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;const r=this.getAttribute(q.MEDIA_CONTROLLER);r&&(wn(this,Mt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Sn(this,Mt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Sn(this,Mt))==null?void 0:e.unassociateElement)==null||i.call(e,this),wn(this,Mt,null)}attributeChangedCallback(e,i,a){var r,n,s,o,l;[u.MEDIA_PREVIEW_IMAGE,u.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===q.MEDIA_CONTROLLER&&(i&&((n=(r=Sn(this,Mt))==null?void 0:r.unassociateElement)==null||n.call(r,this),wn(this,Mt,null)),a&&this.isConnected&&(wn(this,Mt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Sn(this,Mt))==null?void 0:o.associateElement)==null||l.call(o,this)))}get mediaPreviewImage(){return ae(this,u.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,u.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(u.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(u.MEDIA_PREVIEW_COORDS);return}this.setAttribute(u.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){const e=this.mediaPreviewCoords,i=this.mediaPreviewImage;if(!(e&&i))return;const[a,r,n,s]=e,o=i.split("#")[0],l=getComputedStyle(this),{maxWidth:d,maxHeight:m,minWidth:p,minHeight:h}=l,c=Math.min(parseInt(d)/n,parseInt(m)/s),v=Math.max(parseInt(p)/n,parseInt(h)/s),g=c<1,_=g?c:v>1?v:1,{style:y}=Ee(this.shadowRoot,":host"),T=Ee(this.shadowRoot,"img").style,E=this.shadowRoot.querySelector("img"),k=g?"min":"max";y.setProperty(`${k}-width`,"initial","important"),y.setProperty(`${k}-height`,"initial","important"),y.width=`${n*_}px`,y.height=`${s*_}px`;const L=()=>{T.width=`${this.imgWidth*_}px`,T.height=`${this.imgHeight*_}px`,T.display="block"};E.src!==o&&(E.onload=()=>{this.imgWidth=E.naturalWidth,this.imgHeight=E.naturalHeight,L()},E.src=o,L()),L(),T.transform=`translate(-${a*_}px, -${r*_}px)`}}Mt=new WeakMap;Mo.shadowRootOptions={mode:"open"};Mo.getTemplateHTML=S1;
1101f.customElements.get("media-preview-thumbnail")||f.customElements.define("media-preview-thumbnail",Mo);var sh=Mo,Fp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oh=(t,e,i)=>(Fp(t,e,"read from private field"),i?i.call(t):e.get(t)),w1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},I1=(t,e,i,a)=>(Fp(t,e,"write to private field"),e.set(t,i),i),wr;class R1 extends ki{constructor(){super(),w1(this,wr,void 0),I1(this,wr,this.shadowRoot.querySelector("slot")),oh(this,wr).textContent=Ti(0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_PREVIEW_TIME&&a!=null&&(oh(this,wr).textContent=Ti(parseFloat(a)))}get mediaPreviewTime(){return ie(this,u.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){de(this,u.MEDIA_PREVIEW_TIME,e)}}wr=new WeakMap;f.customElements.get("media-preview-time-display")||f.customElements.define("media-preview-time-display",R1);const oa={SEEK_OFFSET:"seekoffset"},zo=30,C1=t=>` 1102 <svg aria-hidden="true" viewBox="0 0 20 24"> 1103 <defs> 1104 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1105 </defs> 1106 <text class="text value" transform="translate(2.18 19.87)">${t}</text> 1107 <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"/> 1108 </svg>`;function L1(t,e){return` 1109 <slot name="icon">${C1(e.seekOffset)}</slot> 1110 `}function D1(){return C("Seek backward")}const M1=0;class mu extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_CURRENT_TIME,oa.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=ie(this,oa.SEEK_OFFSET,zo)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===oa.SEEK_OFFSET&&(this.seekOffset=ie(this,oa.SEEK_OFFSET,zo))}get seekOffset(){return ie(this,oa.SEEK_OFFSET,zo)}set seekOffset(e){de(this,oa.SEEK_OFFSET,e),this.setAttribute("aria-label",C("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),jm(Zm(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME,M1)}set mediaCurrentTime(e){de(this,u.MEDIA_CURRENT_TIME,e)}handleClick(){const e=Math.max(this.mediaCurrentTime-this.seekOffset,0),i=new f.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}mu.getSlotTemplateHTML=L1;mu.getTooltipContentHTML=D1;f.customElements.get("media-seek-backward-button")||f.customElements.define("media-seek-backward-button",mu);const la={SEEK_OFFSET:"seekoffset"},Xo=30,x1=t=>` 1111 <svg aria-hidden="true" viewBox="0 0 20 24"> 1112 <defs> 1113 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1114 </defs> 1115 <text class="text value" transform="translate(8.9 19.87)">${t}</text> 1116 <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"/> 1117 </svg>`;function O1(t,e){return` 1118 <slot name="icon">${x1(e.seekOffset)}</slot> 1119 `}function N1(){return C("Seek forward")}const P1=0;class pu extends Le{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_CURRENT_TIME,la.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=ie(this,la.SEEK_OFFSET,Xo)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===la.SEEK_OFFSET&&(this.seekOffset=ie(this,la.SEEK_OFFSET,Xo))}get seekOffset(){return ie(this,la.SEEK_OFFSET,Xo)}set seekOffset(e){de(this,la.SEEK_OFFSET,e),this.setAttribute("aria-label",C("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),jm(Zm(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME,P1)}set mediaCurrentTime(e){de(this,u.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,i=new f.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}pu.getSlotTemplateHTML=O1;pu.getTooltipContentHTML=N1;f.customElements.get("media-seek-forward-button")||f.customElements.define("media-seek-forward-button",pu);var Kp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Jo=(t,e,i)=>(Kp(t,e,"read from private field"),i?i.call(t):e.get(t)),$1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},U1=(t,e,i,a)=>(Kp(t,e,"write to private field"),e.set(t,i),i),va;const Mi={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},lh=[...Object.values(Mi),u.MEDIA_CURRENT_TIME,u.MEDIA_DURATION,u.MEDIA_SEEKABLE],dh=["Enter"," "],H1=" / ",Fl=(t,{timesSep:e=H1}={})=>{var i,a;const r=(i=t.mediaCurrentTime)!=null?i:0,[,n]=(a=t.mediaSeekable)!=null?a:[];let s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(n)&&(s=n);const o=t.remaining?Ti(0-(s-r)):Ti(r);return t.showDuration?`${o}${e}${Ti(s)}`:o},B1="video not loaded, unknown time.",W1=t=>{var e;
1119const i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[];let r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-valuetext",B1);return}const n=t.remaining?Ur(0-(r-i)):Ur(i);if(!t.showDuration){t.setAttribute("aria-valuetext",n);return}const s=Ur(r),o=`${n} of ${s}`;t.setAttribute("aria-valuetext",o)};function F1(t,e){return` 1120 <slot>${Fl(e)}</slot> 1121 `}class Vp extends ki{constructor(){super(),$1(this,va,void 0),U1(this,va,this.shadowRoot.querySelector("slot")),Jo(this,va).innerHTML=`${Fl(this)}`}static get observedAttributes(){return[...super.observedAttributes,...lh,"disabled"]}connectedCallback(){const{style:e}=Ee(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",C("playback time"));const i=a=>{const{key:r}=a;if(!dh.includes(r)){this.removeEventListener("keyup",i);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{const{metaKey:r,altKey:n,key:s}=a;if(r||n||!dh.includes(s)){this.removeEventListener("keyup",i);return}this.addEventListener("keyup",i)}),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,i,a){lh.includes(e)?this.update():e==="disabled"&&a!==i&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,i,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return W(this,Mi.REMAINING)}set remaining(e){F(this,Mi.REMAINING,e)}get showDuration(){return W(this,Mi.SHOW_DURATION)}set showDuration(e){F(this,Mi.SHOW_DURATION,e)}get noToggle(){return W(this,Mi.NO_TOGGLE)}set noToggle(e){F(this,Mi.NO_TOGGLE,e)}get mediaDuration(){return ie(this,u.MEDIA_DURATION)}set mediaDuration(e){de(this,u.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){de(this,u.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(u.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(u.MEDIA_SEEKABLE);return}this.setAttribute(u.MEDIA_SEEKABLE,e.join(":"))}update(){const e=Fl(this);W1(this),e!==Jo(this,va).innerHTML&&(Jo(this,va).innerHTML=e)}}va=new WeakMap;Vp.getSlotTemplateHTML=F1;f.customElements.get("media-time-display")||f.customElements.define("media-time-display",Vp);var qp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Se=(t,e,i)=>(qp(t,e,"read from private field"),e.get(t)),Tt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Qe=(t,e,i,a)=>(qp(t,e,"write to private field"),e.set(t,i),i),K1=(t,e,i,a)=>({set _(r){Qe(t,e,r)},get _(){return Se(t,e)}}),fa,ds,Ea,Ir,us,cs,hs,_a,xi,ms;class V1{constructor(e,i,a){Tt(this,fa,void 0),Tt(this,ds,void 0),Tt(this,Ea,void 0),Tt(this,Ir,void 0),Tt(this,us,void 0),Tt(this,cs,void 0),Tt(this,hs,void 0),Tt(this,_a,void 0),Tt(this,xi,0),Tt(this,ms,(r=performance.now())=>{Qe(this,xi,requestAnimationFrame(Se(this,ms))),Qe(this,Ir,performance.now()-Se(this,Ea));const n=1e3/this.fps;if(Se(this,Ir)>n){Qe(this,Ea,r-Se(this,Ir)%n);const s=1e3/((r-Se(this,ds))/++K1(this,us)._),o=(r-Se(this,cs))/1e3/this.duration;let l=Se(this,hs)+o*this.playbackRate;l-Se(this,fa).valueAsNumber>0?Qe(this,_a,this.playbackRate/this.duration/s):(Qe(this,_a,.995*Se(this,_a)),l=Se(this,fa).valueAsNumber+Se(this,_a)),this.callback(l)}}),Qe(this,fa,e),this.callback=i,this.fps=a}start(){Se(this,xi)===0&&(Qe(this,Ea,performance.now()),Qe(this,ds,Se(this,Ea)),Qe(this,us,0),Se(this,ms).call(this))}stop(){Se(this,xi)!==0&&(cancelAnimationFrame(Se(this,xi)),Qe(this,xi,0))}update({start:e,duration:i,playbackRate:a}){const r=e-Se(this,fa).valueAsNumber,n=Math.abs(i-this.duration);(r>0||r<-.03||n>=.5)&&this.callback(e),Qe(this,hs,e),Qe(this,cs,performance.now()),this.duration=i,this.playbackRate=a}}fa=new WeakMap;ds=new WeakMap;Ea=new WeakMap;
1121Ir=new WeakMap;us=new WeakMap;cs=new WeakMap;hs=new WeakMap;_a=new WeakMap;xi=new WeakMap;ms=new WeakMap;var vu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ce=(t,e,i)=>(vu(t,e,"read from private field"),i?i.call(t):e.get(t)),_e=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},et=(t,e,i,a)=>(vu(t,e,"write to private field"),e.set(t,i),i),xe=(t,e,i)=>(vu(t,e,"access private method"),i),ba,ji,eo,Wr,to,ps,an,rn,ga,ya,Ta,Rr,fu,Yp,Kl,io,Eu,ao,_u,ro,bu,Vl,Gp,nn,no,ql,Qp;const q1="video not loaded, unknown time.",Y1=t=>{const e=t.range,i=Ur(+jp(t)),a=Ur(+t.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:q1;e.setAttribute("aria-valuetext",r)};function G1(t){return` 1122 ${za.getTemplateHTML(t)} 1123 <style> 1124 :host { 1125 --media-box-border-radius: 4px; 1126 --media-box-padding-left: 10px; 1127 --media-box-padding-right: 10px; 1128 --media-preview-border-radius: var(--media-box-border-radius); 1129 --media-box-arrow-offset: var(--media-box-border-radius); 1130 --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 1131 --_preview-background: var(--media-preview-background, var(--_control-background)); 1132 1133 1134 contain: layout; 1135 } 1136 1137 #buffered { 1138 background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4)); 1139 position: absolute; 1140 height: 100%; 1141 will-change: width; 1142 } 1143 1144 #preview-rail, 1145 #current-rail { 1146 width: 100%; 1147 position: absolute; 1148 left: 0; 1149 bottom: 100%; 1150 pointer-events: none; 1151 will-change: transform; 1152 } 1153 1154 [part~="box"] { 1155 width: min-content; 1156 1157 position: absolute; 1158 bottom: 100%; 1159 flex-direction: column; 1160 align-items: center; 1161 transform: translateX(-50%); 1162 } 1163 1164 [part~="current-box"] { 1165 display: var(--media-current-box-display, var(--media-box-display, flex)); 1166 margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px)); 1167 visibility: hidden; 1168 } 1169 1170 [part~="preview-box"] { 1171 display: var(--media-preview-box-display, var(--media-box-display, flex)); 1172 margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px)); 1173 transition-property: var(--media-preview-transition-property, visibility, opacity); 1174 transition-duration: var(--media-preview-transition-duration-out, .25s); 1175 transition-delay: var(--media-preview-transition-delay-out, 0s); 1176 visibility: hidden; 1177 opacity: 0; 1178 } 1179 1180 :host(:is([${u.MEDIA_PREVIEW_IMAGE}], [${u.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] { 1181 transition-duration: var(--media-preview-transition-duration-in, .5s); 1182 transition-delay: var(--media-preview-transition-delay-in, .25s); 1183 visibility: visible; 1184 opacity: 1; 1185 } 1186 1187 @media (hover: hover) { 1188 :host(:is([${u.MEDIA_PREVIEW_IMAGE}], [${u.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] { 1189 transition-duration: var(--media-preview-transition-duration-in, .5s); 1190 transition-delay: var(--media-preview-transition-delay-in, .25s); 1191 visibility: visible; 1192 opacity: 1; 1193 } 1194 } 1195 1196 media-preview-thumbnail, 1197 ::slotted(media-preview-thumbnail) { 1198 visibility: hidden; 1199 1200 transition: visibility 0s .25s; 1201 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1202 background: var(--media-preview-thumbnail-background, var(--_preview-background)); 1203 box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2)); 1204 max-width: var(--media-preview-thumbnail-max-width, 180px); 1205 max-height: var(--media-preview-thumbnail-max-height, 160px); 1206 min-width: var(--media-preview-thumbnail-min-width, 120px); 1207 min-height: var(--media-preview-thumbnail-min-height, 80px);
1208 border: var(--media-preview-thumbnail-border); 1209 border-radius: var(--media-preview-thumbnail-border-radius, 1210 var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0); 1211 } 1212 1213 :host([${u.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail, 1214 :host([${u.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) { 1215 transition-delay: var(--media-preview-transition-delay-in, .25s); 1216 visibility: visible; 1217 } 1218 1219 @media (hover: hover) { 1220 :host([${u.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail, 1221 :host([${u.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) { 1222 transition-delay: var(--media-preview-transition-delay-in, .25s); 1223 visibility: visible; 1224 } 1225 1226 :host([${u.MEDIA_PREVIEW_TIME}]:hover) { 1227 --media-time-range-hover-display: block; 1228 } 1229 } 1230 1231 media-preview-chapter-display, 1232 ::slotted(media-preview-chapter-display) { 1233 font-size: var(--media-font-size, 13px); 1234 line-height: 17px; 1235 min-width: 0; 1236 visibility: hidden; 1237 1238 transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s; 1239 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1240 background: var(--media-preview-chapter-background, var(--_preview-background)); 1241 border-radius: var(--media-preview-chapter-border-radius, 1242 var(--media-preview-border-radius) var(--media-preview-border-radius) 1243 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1244 padding: var(--media-preview-chapter-padding, 3.5px 9px); 1245 margin: var(--media-preview-chapter-margin, 0 0 5px); 1246 text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1247 } 1248 1249 :host([${u.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display, 1250 :host([${u.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) { 1251 transition-delay: var(--media-preview-transition-delay-in, .25s); 1252 border-radius: var(--media-preview-chapter-border-radius, 0); 1253 padding: var(--media-preview-chapter-padding, 3.5px 9px 0); 1254 margin: var(--media-preview-chapter-margin, 0); 1255 min-width: 100%; 1256 } 1257 1258 media-preview-chapter-display[${u.MEDIA_PREVIEW_CHAPTER}], 1259 ::slotted(media-preview-chapter-display[${u.MEDIA_PREVIEW_CHAPTER}]) { 1260 visibility: visible; 1261 } 1262 1263 media-preview-chapter-display:not([aria-valuetext]), 1264 ::slotted(media-preview-chapter-display:not([aria-valuetext])) { 1265 display: none; 1266 } 1267 1268 media-preview-time-display, 1269 ::slotted(media-preview-time-display), 1270 media-time-display, 1271 ::slotted(media-time-display) { 1272 font-size: var(--media-font-size, 13px); 1273 line-height: 17px; 1274 min-width: 0; 1275 1276 transition: min-width 0s, border-radius 0s; 1277 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1278 background: var(--media-preview-time-background, var(--_preview-background)); 1279 border-radius: var(--media-preview-time-border-radius, 1280 var(--media-preview-border-radius) var(--media-preview-border-radius) 1281 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1282 padding: var(--media-preview-time-padding, 3.5px 9px); 1283 margin: var(--media-preview-time-margin, 0); 1284 text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1285 transform: translateX(min( 1286 max(calc(50% - var(--_box-width) / 2), 1287 calc(var(--_box-shift, 0))), 1288 calc(var(--_box-width) / 2 - 50%) 1289 )); 1290 } 1291 1292 :host([${u.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display, 1293 :host([${u.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) { 1294 transition-delay: var(--media-preview-transition-delay-in, .25s); 1295 border-radius: var(--media-preview-time-border-radius, 1296 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1297 min-width: 100%; 1298 } 1299 1300 :host([${u.MEDIA_PREVIEW_TIME}]:hover) { 1301 --media-time-range-hover-display: block; 1302 } 1303 1304 [part~="arrow"], 1305 ::slotted([part~="arrow"]) { 1306 display: var(--media-box-arrow-display, inline-block); 1307 transform: translateX(min( 1308 max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)), 1309 calc(var(--_box-shift, 0))), 1310 calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset)) 1311 )); 1312 1313 border-color: transparent; 1314 border-top-color: var(--media-box-arrow-background, var(--_control-background)); 1315 border-width: var(--media-box-arrow-border-width, 1316 var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0); 1317 border-style: solid; 1318 justify-content: center; 1319 height: 0; 1320 } 1321 </style> 1322 <div id="preview-rail"> 1323 <slot name="preview" part="box preview-box">
1324 <media-preview-thumbnail> 1325 <template shadowrootmode="${sh.shadowRootOptions.mode}"> 1326 ${sh.getTemplateHTML({})} 1327 </template> 1328 </media-preview-thumbnail> 1329 <media-preview-chapter-display></media-preview-chapter-display> 1330 <media-preview-time-display></media-preview-time-display> 1331 <slot name="preview-arrow"><div part="arrow"></div></slot> 1332 </slot> 1333 </div> 1334 <div id="current-rail"> 1335 <slot name="current" part="box current-box"> 1336 1337 </slot> 1338 </div> 1339 `}const In=(t,e=t.mediaCurrentTime)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;const r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},jp=(t,e=t.range.valueAsNumber)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i};class gu extends za{constructor(){super(),_e(this,Ta),_e(this,fu),_e(this,io),_e(this,ao),_e(this,ro),_e(this,Vl),_e(this,nn),_e(this,ql),_e(this,ba,void 0),_e(this,ji,void 0),_e(this,eo,void 0),_e(this,Wr,void 0),_e(this,to,void 0),_e(this,ps,void 0),_e(this,an,void 0),_e(this,rn,void 0),_e(this,ga,void 0),_e(this,ya,void 0),_e(this,Kl,a=>{this.dragging||(Wd(a)&&(this.range.valueAsNumber=a),ce(this,ya)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),et(this,eo,this.shadowRoot.querySelectorAll('[part~="box"]')),et(this,to,this.shadowRoot.querySelector('[part~="preview-box"]')),et(this,ps,this.shadowRoot.querySelector('[part~="current-box"]'));const i=getComputedStyle(this);et(this,an,parseInt(i.getPropertyValue("--media-box-padding-left"))),et(this,rn,parseInt(i.getPropertyValue("--media-box-padding-right"))),et(this,ji,new V1(this.range,ce(this,Kl),60))}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PAUSED,u.MEDIA_DURATION,u.MEDIA_SEEKABLE,u.MEDIA_CURRENT_TIME,u.MEDIA_PREVIEW_IMAGE,u.MEDIA_PREVIEW_TIME,u.MEDIA_PREVIEW_CHAPTER,u.MEDIA_BUFFERED,u.MEDIA_PLAYBACK_RATE,u.MEDIA_LOADING,u.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",C("seek")),xe(this,Ta,Rr).call(this),et(this,ba,this.getRootNode()),(e=ce(this,ba))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),xe(this,Ta,Rr).call(this),(e=ce(this,ba))==null||e.removeEventListener("transitionstart",this),et(this,ba,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===u.MEDIA_CURRENT_TIME||e===u.MEDIA_PAUSED||e===u.MEDIA_ENDED||e===u.MEDIA_LOADING||e===u.MEDIA_DURATION||e===u.MEDIA_SEEKABLE?(ce(this,ji).update({start:In(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),xe(this,Ta,Rr).call(this),Y1(this)):e===u.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===u.MEDIA_DURATION||e===u.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=ce(this,ga),this.updateBar()))}get mediaChaptersCues(){return ce(this,ga)}set mediaChaptersCues(e){var i;et(this,ga,e),this.updateSegments((i=ce(this,ga))==null?void 0:i.map(a=>({start:In(this,a.startTime),end:In(this,a.endTime)})))}get mediaPaused(){return W(this,u.MEDIA_PAUSED)}set mediaPaused(e){F(this,u.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,u.MEDIA_LOADING)}set mediaLoading(e){F(this,u.MEDIA_LOADING,e)}get mediaDuration(){return ie(this,u.MEDIA_DURATION)}set mediaDuration(e){de(this,u.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,u.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){de(this,u.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){de(this,u.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(u.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(u.MEDIA_BUFFERED);return}const i=e.map(a=>a.join(":")).join(" ");this.setAttribute(u.MEDIA_BUFFERED,i)}get mediaSeekable(){const e=this.getAttribute(u.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(u.MEDIA_SEEKABLE);return}this.setAttribute(u.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;const[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;const[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return ae(this,u.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,u.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return ie(this,u.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){de(this,u.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return W(this,u.MEDIA_ENDED)}set mediaEnded(e){F(this,u.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{const n=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([o,l])=>o<=n&&n<=l))!=null?e:[];a=In(this,s)}const{style:r}=Ee(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const i=Ee(this.shadowRoot,"#current-rail"),a=Ee(this.shadowRoot,'[part~="current-box"]'),r=xe(this,io,Eu).call(this,ce(this,ps)),n=xe(this,ao,_u).call(this,r,this.range.valueAsNumber),s=xe(this,ro,bu).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${n}
1339)`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":xe(this,ql,Qp).call(this);break;case"pointermove":xe(this,Vl,Gp).call(this,e);break;case"pointerup":ce(this,ya)&&et(this,ya,!1);break;case"pointerdown":et(this,ya,!0);break;case"pointerleave":xe(this,nn,no).call(this,null);break;case"transitionstart":ri(e.target,this)&&setTimeout(()=>xe(this,Ta,Rr).call(this),0);break}}}ba=new WeakMap;ji=new WeakMap;eo=new WeakMap;Wr=new WeakMap;to=new WeakMap;ps=new WeakMap;an=new WeakMap;rn=new WeakMap;ga=new WeakMap;ya=new WeakMap;Ta=new WeakSet;Rr=function(){xe(this,fu,Yp).call(this)?ce(this,ji).start():ce(this,ji).stop()};fu=new WeakSet;Yp=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&zm(this)};Kl=new WeakMap;io=new WeakSet;Eu=function(t){var e;const a=((e=this.getAttribute("bounds")?Za(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),n=t.offsetWidth,s=-(r.left-a.left-n/2),o=a.right-r.left-n/2;return{box:{width:n,min:s,max:o},bounds:a,range:r}};ao=new WeakSet;_u=function(t,e){let i=`${e*100}%`;const{width:a,min:r,max:n}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(n)){const o=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${o})`}return i};ro=new WeakSet;bu=function(t,e){const{width:i,min:a,max:r}=t.box,n=e*t.range.width;if(n<a+ce(this,an)){const s=t.range.left-t.bounds.left-ce(this,an);return`${n-i/2+s}px`}if(n>r-ce(this,rn)){const s=t.bounds.right-t.range.right-ce(this,rn);return`${n+i/2-s-t.range.width}px`}return 0};Vl=new WeakSet;Gp=function(t){const e=[...ce(this,eo)].some(m=>t.composedPath().includes(m));if(!this.dragging&&(e||!t.composedPath().includes(this))){xe(this,nn,no).call(this,null);return}const i=this.mediaSeekableEnd;if(!i)return;const a=Ee(this.shadowRoot,"#preview-rail"),r=Ee(this.shadowRoot,'[part~="preview-box"]'),n=xe(this,io,Eu).call(this,ce(this,to));let s=(t.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));const o=xe(this,ao,_u).call(this,n,s),l=xe(this,ro,bu).call(this,n,s);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${n.box.width}px`);const d=Math.round(ce(this,Wr))-Math.round(s*i);Math.abs(d)<1&&s>.01&&s<.99||(et(this,Wr,s*i),xe(this,nn,no).call(this,ce(this,Wr)))};nn=new WeakSet;no=function(t){this.dispatchEvent(new f.CustomEvent(R.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};ql=new WeakSet;Qp=function(){ce(this,ji).stop();const t=jp(this);this.dispatchEvent(new f.CustomEvent(R.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};gu.shadowRootOptions={mode:"open"};gu.getTemplateHTML=G1;f.customElements.get("media-time-range")||f.customElements.define("media-time-range",gu);const Q1=1,j1=t=>t.mediaMuted?0:t.mediaVolume,Z1=t=>`${Math.round(t*100)}%`;class z1 extends za{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_VOLUME,u.MEDIA_MUTED,u.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{const e=this.range.value,i=new f.CustomEvent(R.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",C("volume"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===u.MEDIA_VOLUME||e===u.MEDIA_MUTED)&&(this.range.valueAsNumber=j1(this),this.range.setAttribute("aria-valuetext",Z1(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return ie(this,u.MEDIA_VOLUME,Q1)}set mediaVolume(e){de(this,u.MEDIA_VOLUME,e)}get mediaMuted(){return W(this,u.MEDIA_MUTED)}set mediaMuted(e){F(this,u.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ae(this,u.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){re(this,u.MEDIA_VOLUME_UNAVAILABLE,e)}}f.customElements.get("media-volume-range")||f.customElements.define("media-volume-range",z1);
1339var Zp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},U=(t,e,i)=>(Zp(t,e,"read from private field"),i?i.call(t):e.get(t)),Pt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Xt=(t,e,i,a)=>(Zp(t,e,"write to private field"),e.set(t,i),i),Aa,vs,Oi,Cr,mi,pi,vi,Ni,ka,fs,mt;const uh=1,ch=0,X1=1,J1={processCallback(t,e,i){if(i){for(const[a,r]of e)if(a in i){const n=i[a];typeof n=="boolean"&&r instanceof bt&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof bt?r.element[r.attributeName]=n:r.value=n}}}};class xo extends f.DocumentFragment{constructor(e,i,a=J1){var r;super(),Pt(this,Aa,void 0),Pt(this,vs,void 0),this.append(e.content.cloneNode(!0)),Xt(this,Aa,zp(this)),Xt(this,vs,a),(r=a.createCallback)==null||r.call(a,this,U(this,Aa),i),a.processCallback(this,U(this,Aa),i)}update(e){U(this,vs).processCallback(this,U(this,Aa),e)}}Aa=new WeakMap;vs=new WeakMap;const zp=(t,e=[])=>{let i,a;for(const r of t.attributes||[])if(r.value.includes("{{")){const n=new ty;for([i,a]of mh(r.value))if(!i)n.append(a);else{const s=new bt(t,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(const r of t.childNodes)if(r.nodeType===uh&&!(r instanceof HTMLTemplateElement))zp(r,e);else{const n=r.data;if(r.nodeType===uh||n.includes("{{")){const s=[];if(n)for([i,a]of mh(n))if(!i)s.push(new Text(a));else{const o=new Xa(t);s.push(o),e.push([a,o])}else if(r instanceof HTMLTemplateElement){const o=new ev(t,r);s.push(o),e.push([o.expression,o])}r.replaceWith(...s.flatMap(o=>o.replacementNodes||[o]))}}return e},hh={},mh=t=>{let e="",i=0,a=hh[t],r=0,n;if(a)return a;for(a=[];n=t[r];r++)n==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([ch,e]),e="",r++):n==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([X1,e.trim()]),e="",r++):e+=n||"";return e&&a.push([ch,(i>0?"{{":"")+e]),hh[t]=a},ey=11;class Xp{get value(){return""}set value(e){}toString(){return this.value}}const Jp=new WeakMap;class ty{constructor(){Pt(this,Oi,[])}[Symbol.iterator](){return U(this,Oi).values()}get length(){return U(this,Oi).length}item(e){return U(this,Oi)[e]}append(...e){for(const i of e)i instanceof bt&&Jp.set(i,this),U(this,Oi).push(i)}toString(){return U(this,Oi).join("")}}Oi=new WeakMap;class bt extends Xp{constructor(e,i,a){super(),Pt(this,Ni),Pt(this,Cr,""),Pt(this,mi,void 0),Pt(this,pi,void 0),Pt(this,vi,void 0),Xt(this,mi,e),Xt(this,pi,i),Xt(this,vi,a)}get attributeName(){return U(this,pi)}get attributeNamespace(){return U(this,vi)}get element(){return U(this,mi)}get value(){return U(this,Cr)}set value(e){U(this,Cr)!==e&&(Xt(this,Cr,e),!U(this,Ni,ka)||U(this,Ni,ka).length===1?e==null?U(this,mi).removeAttributeNS(U(this,vi),U(this,pi)):U(this,mi).setAttributeNS(U(this,vi),U(this,pi),e):U(this,mi).setAttributeNS(U(this,vi),U(this,pi),U(this,Ni,ka).toString()))}get booleanValue(){return U(this,mi).hasAttributeNS(U(this,vi),U(this,pi))}set booleanValue(e){if(!U(this,Ni,ka)||U(this,Ni,ka).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}}Cr=new WeakMap;mi=new WeakMap;pi=new WeakMap;vi=new WeakMap;Ni=new WeakSet;ka=function(){return Jp.get(this)};class Xa extends Xp{constructor(e,i){super(),Pt(this,fs,void 0),Pt(this,mt,void 0),Xt(this,fs,e),Xt(this,mt,i?[...i]:[new Text])}get replacementNodes(){return U(this,mt)}get parentNode(){return U(this,fs)}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 i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===ey?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),Xt(this,mt,iy(U(this,mt)[0].parentNode,U(this,mt),i,this.nextSibling))}}fs=new WeakMap;mt=new WeakMap;class ev extends Xa{constructor(e,i){const a=i.getAttribute("directive")||i.getAttribute("type");let r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}}function iy(t,e,i,a=null){let r=0,n,s,o,l=i.length,d=e.length;for(;r<l&&r<d&&e[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==e[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)t.insertBefore(i[r++],a);if(r==l)for(;r<d;)t.removeChild(e[r++]);else{for(n=e[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(t.replaceChild(o,n),n=s):t.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,t.removeChild(n),n=s}return i}const ph={string:t=>String(t)};class tv{constructor(e){this.template=e,this.state=void 0}}const Vi=new WeakMap,qi=new WeakMap,Yl={partial:(t,e)=>{e[t.expression]=new tv(t.template)},if:(t,e)=>{var i;if(iv(t.expression,e))if(Vi.get(t)!==t.template){Vi.set(t,t.template);const a=new xo(t.template,e,yu);t.replace(a),qi.set(t,a)}else(i=qi.get(t))==null||i.update(e);
1339else t.replace(""),Vi.delete(t),qi.delete(t)}},ay=Object.keys(Yl),yu={processCallback(t,e,i){var a,r;if(i)for(const[n,s]of e){if(s instanceof ev){if(!s.directive){const l=ay.find(d=>s.template.hasAttribute(d));l&&(s.directive=l,s.expression=s.template.getAttribute(l))}(a=Yl[s.directive])==null||a.call(Yl,s,i);continue}let o=iv(n,i);if(o instanceof tv){Vi.get(s)!==o.template?(Vi.set(s,o.template),o=new xo(o.template,o.state,yu),s.value=o,qi.set(s,o)):(r=qi.get(s))==null||r.update(o.state);continue}o?(s instanceof bt&&s.attributeName.startsWith("aria-")&&(o=String(o)),s instanceof bt?typeof o=="boolean"?s.booleanValue=o:typeof o=="function"?s.element[s.attributeName]=o:s.value=o:(s.value=o,Vi.delete(s),qi.delete(s))):s instanceof bt?s.value=void 0:(s.value=void 0,Vi.delete(s),qi.delete(s))}}},vh={"!":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 i;return(i=ph[e])==null?void 0:i.call(ph,t)}};function ry(t){return ny(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function iv(t,e={}){var i,a,r,n,s,o,l;const d=ry(t);if(d.length===0||d.some(({type:m})=>!m))return or(t);if(((i=d[0])==null?void 0:i.token)===">"){const m=e[(a=d[1])==null?void 0:a.token];if(!m)return or(t);const p={...e};m.state=p;const h=d.slice(2);for(let c=0;c<h.length;c+=3){const v=(r=h[c])==null?void 0:r.token,g=(n=h[c+1])==null?void 0:n.token,_=(s=h[c+2])==null?void 0:s.token;v&&g==="="&&(p[v]=lr(_,e))}return m}if(d.length===1)return Rn(d[0])?lr(d[0].token,e):or(t);if(d.length===2){const m=(o=d[0])==null?void 0:o.token,p=vh[m];if(!p||!Rn(d[1]))return or(t);const h=lr(d[1].token,e);return p(h)}if(d.length===3){const m=(l=d[1])==null?void 0:l.token,p=vh[m];if(!p||!Rn(d[0])||!Rn(d[2]))return or(t);const h=lr(d[0].token,e);if(m==="|")return p(h,d[2].token);const c=lr(d[2].token,e);return p(h,c)}}function or(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function Rn({type:t}){return["number","boolean","string","param"].includes(t)}function lr(t,e){const i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):Wm(t)?parseFloat(t):e[t]}function ny(t,e){let i,a,r;const n=[];for(;t;){r=null,i=t.length;for(const s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&n.push({token:t.substr(0,i),type:void 0}),r&&n.push(r),t=t.substr(i+(r?r.token.length:0))}return n}var Tu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Gl=(t,e,i)=>(Tu(t,e,"read from private field"),i?i.call(t):e.get(t)),dr=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Yi=(t,e,i,a)=>(Tu(t,e,"write to private field"),e.set(t,i),i),el=(t,e,i)=>(Tu(t,e,"access private method"),i),Pa,Es,$a,Ql,av,_s,jl;const tl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},rv=ye.createElement("template");rv.innerHTML=` 1340 <style> 1341 :host { 1342 display: inline-block; 1343 line-height: 0; 1344 } 1345 1346 media-controller { 1347 width: 100%; 1348 height: 100%; 1349 } 1350 1351 media-captions-button:not([mediasubtitleslist]), 1352 media-captions-menu:not([mediasubtitleslist]), 1353 media-captions-menu-button:not([mediasubtitleslist]), 1354 media-audio-track-menu[mediaaudiotrackunavailable], 1355 media-audio-track-menu-button[mediaaudiotrackunavailable], 1356 media-rendition-menu[mediarenditionunavailable], 1357 media-rendition-menu-button[mediarenditionunavailable], 1358 media-volume-range[mediavolumeunavailable], 1359 media-airplay-button[mediaairplayunavailable], 1360 media-fullscreen-button[mediafullscreenunavailable], 1361 media-cast-button[mediacastunavailable], 1362 media-pip-button[mediapipunavailable] { 1363 display: none; 1364 } 1365 </style> 1366`;class Oo extends f.HTMLElement{constructor(){super(),dr(this,Ql),dr(this,_s),dr(this,Pa,void 0),dr(this,Es,void 0),dr(this,$a,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(i=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||i.some(r=>{const n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(tl[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(ii.BREAKPOINTS_COMPUTED,this.render),el(this,Ql,av).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=Gl(this,Pa))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(Yi(this,Pa,e),Yi(this,$a,null),this.createRenderer())}get props(){var e,i,a;const r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>tl[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(const s of r){const o=(a=tl[s.name])!=null?a:fg(s.name);let{value:l}=s;l!=null?(Wm(l)&&(l=parseFloat(l)),n[o]=l===""?!0:l):n[o]=!1}return n}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&el(this,_s,jl).call(this)}connectedCallback(){el(this,_s,jl).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==Gl(this,Es)&&(Yi(this,Es,this.template),this.renderer=new xo(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(rv.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}}Pa=new WeakMap;Es=new WeakMap;$a=new WeakMap;Ql=new WeakSet;av=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}};_s=new WeakSet;jl=function(){var t;const e=this.getAttribute("template");if(!e||e===Gl(this,$a))return;const i=this.getRootNode(),a=(t=i?.getElementById)==null?void 0:t.call(i,e);if(a){Yi(this,$a,e),Yi(this,Pa,a),this.createRenderer();return}sy(e)&&(Yi(this,$a,e),oy(e).then(r=>{const n=ye.createElement("template");n.innerHTML=r,Yi(this,Pa,n),this.createRenderer()}).catch(console.error))};Oo.observedAttributes=["template"];Oo.processor=yu;function sy(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;const e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function oy(t){const e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}f.customElements.get("media-theme")||f.customElements.define("media-theme",Oo);function ly({anchor:t,floating:e,placement:i}){const a=dy({anchor:t,floating:e}),{x:r,y:n}=cy(a,i);return{x:r,y:n}}function dy({anchor:t,floating:e}){return{anchor:uy(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function uy(t,e){var i;const a=t.getBoundingClientRect(),r=(i=e?.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function cy({anchor:t,floating:e},i){const a=hy(i)==="x"?"y":"x",r=a==="y"?"height":"width",n=nv(i),s=t.x+t.width/2-e.width/2,o=t.y+t.height/2-e.height/2,l=t[r]/2-e[r]/2;let d;
1366switch(n){case"top":d={x:s,y:t.y-e.height};break;case"bottom":d={x:s,y:t.y+t.height};break;case"right":d={x:t.x+t.width,y:o};break;case"left":d={x:t.x-e.width,y:o};break;default:d={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":d[a]-=l;break;case"end":d[a]+=l;break}return d}function nv(t){return t.split("-")[0]}function hy(t){return["top","bottom"].includes(nv(t))?"y":"x"}class Au extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}}class my extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}}var ku=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},V=(t,e,i)=>(ku(t,e,"read from private field"),i?i.call(t):e.get(t)),Z=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},xt=(t,e,i,a)=>(ku(t,e,"write to private field"),e.set(t,i),i),z=(t,e,i)=>(ku(t,e,"access private method"),i),Ot,Zi,Ai,bs,gs,zi,sn,Zl,sv,so,Su,oo,ys,zl,Xl,ov,Jl,lv,ed,dv,Ua,Ha,Ba,on,lo,wu,td,uv,Iu,cv,id,hv,Ru,mv,ad,pv,rd,vv,Fr,uo,nd,fv,Kr,co,Ts,sd;function Ga({type:t,text:e,value:i,checked:a}){const r=ye.createElement("media-chrome-menu-item");r.type=t,r.part.add("menu-item"),r.part.add(t),r.value=i,r.checked=a;const n=ye.createElement("span");return n.textContent=e,r.append(n),r}function Xi(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if(i?.nodeName=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;const a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function py(t){return` 1367 <style> 1368 :host { 1369 font: var(--media-font, 1370 var(--media-font-weight, normal) 1371 var(--media-font-size, 14px) / 1372 var(--media-text-content-height, var(--media-control-height, 24px)) 1373 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 1374 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 1375 --_menu-bg: rgb(20 20 30 / .8); 1376 background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg)))); 1377 border-radius: var(--media-menu-border-radius); 1378 border: var(--media-menu-border, none); 1379 display: var(--media-menu-display, inline-flex) !important; 1380 1381 transition: var(--media-menu-transition-in, 1382 visibility 0s, 1383 opacity .2s ease-out, 1384 transform .15s ease-out, 1385 left .2s ease-in-out, 1386 min-width .2s ease-in-out, 1387 min-height .2s ease-in-out 1388 ) !important; 1389 1390 visibility: var(--media-menu-visibility, visible); 1391 opacity: var(--media-menu-opacity, 1); 1392 max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px)); 1393 transform: var(--media-menu-transform-in, translateY(0) scale(1)); 1394 flex-direction: column; 1395 1396 min-height: 0; 1397 position: relative; 1398 bottom: var(--_menu-bottom); 1399 box-sizing: border-box; 1400 } 1401 1402 @-moz-document url-prefix() { 1403 :host{ 1404 --_menu-bg: rgb(20 20 30); 1405 } 1406 } 1407 1408 :host([hidden]) { 1409 transition: var(--media-menu-transition-out, 1410 visibility .15s ease-in, 1411 opacity .15s ease-in, 1412 transform .15s ease-in 1413 ) !important; 1414 visibility: var(--media-menu-hidden-visibility, hidden); 1415 opacity: var(--media-menu-hidden-opacity, 0); 1416 max-height: var(--media-menu-hidden-max-height, 1417 var(--media-menu-max-height, var(--_menu-max-height, 300px))); 1418 transform: var(--media-menu-transform-out, translateY(2px) scale(.99)); 1419 pointer-events: none; 1420 } 1421 1422 :host([slot="submenu"]) { 1423 background: none; 1424 width: 100%; 1425 min-height: 100%; 1426 position: absolute; 1427 bottom: 0; 1428 right: -100%; 1429 } 1430 1431 #container { 1432 display: flex; 1433 flex-direction: column; 1434 min-height: 0; 1435 transition: transform .2s ease-out; 1436 transform: translate(0, 0); 1437 } 1438 1439 #container.has-expanded { 1440 transition: transform .2s ease-in; 1441 transform: translate(-100%, 0); 1442 } 1443 1444 button { 1445 background: none; 1446 color: inherit; 1447 border: none; 1448 padding: 0; 1449 font: inherit; 1450 outline: inherit; 1451 display: inline-flex; 1452 align-items: center; 1453 } 1454 1455 slot[name="header"][hidden] { 1456 display: none; 1457 } 1458 1459 slot[name="header"] > *, 1460 slot[name="header"]::slotted(*) { 1461 padding: .4em .7em; 1462 border-bottom: 1px solid rgb(255 255 255 / .25); 1463 cursor: var(--media-cursor, default); 1464 } 1465 1466 slot[name="header"] > button[part~="back"], 1467 slot[name="header"]::slotted(button[part~="back"]) { 1468 cursor: var(--media-cursor, pointer); 1469 } 1470 1471 svg[part~="back"] { 1472 height: var(--media-menu-icon-height, var(--media-control-height, 24px)); 1473 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1474 display: block; 1475 margin-right: .5ch; 1476 } 1477 1478 slot:not([name]) { 1479 gap: var(--media-menu-gap); 1480 flex-direction: var(--media-menu-flex-direction, column); 1481 overflow: var(--media-menu-overflow, hidden auto); 1482 display: flex; 1483 min-height: 0; 1484 } 1485 1486 :host([role="menu"]) slot:not([name]) { 1487 padding-block: .4em; 1488 } 1489 1490 slot:not([name])::slotted([role="menu"]) { 1491 background: none; 1492 } 1493 1494 media-chrome-menu-item > span { 1495 margin-right: .5ch; 1496 max-width: var(--media-menu-item-max-width); 1497 text-overflow: ellipsis; 1498 overflow: hidden; 1499 } 1500 </style> 1501 <style id="layout-row" media="width:0"> 1502 1503 slot[name="header"] > *, 1504 slot[name="header"]::slotted(*) { 1505 padding: .4em .5em; 1506 } 1507 1508 slot:not([name]) { 1509 gap: var(--media-menu-gap, .25em); 1510 flex-direction: var(--media-menu-flex-direction, row); 1511 padding-inline: .5em; 1512 } 1513 1514 media-chrome-menu-item { 1515 padding: .3em .5em; 1516 } 1517 1518 media-chrome-menu-item[aria-checked="true"] { 1519 background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2)); 1520 } 1521 1522 1523 media-chrome-menu-item::part(checked-indicator) { 1524 display: var(--media-menu-item-checked-indicator-display, none); 1525 } 1526 </style> 1527 <div id="container" part="container"> 1528 <slot name="header" hidden> 1529 <button part="back button" aria-label="Back to previous menu"> 1530 <slot name="back-icon"> 1531 <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator"> 1532 <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"/> 1533 </svg> 1534 </slot> 1535 <slot name="title"></slot> 1536 </button> 1537 </slot> 1538 <slot></slot> 1539 </div> 1540 <slot name="checked-indicator" hidden></slot> 1541 `}const Ri={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class ot extends f.HTMLElement{constructor(){if(super(),Z(this,Zl),Z(this,so),Z(this,ys),Z(this,Xl),Z(this,Jl),Z(this,ed),Z(this,Ba),Z(this,lo),Z(this,td),Z(this,Iu),Z(this,id),Z(this,Ru),Z(this,ad),Z(this,rd),Z(this,Fr),Z(this,nd),Z(this,Kr),Z(this,Ts),Z(this,Ot,null),Z(this,Zi,null),Z(this,Ai,null),Z(this,bs,new Set),Z(this,gs,void 0),Z(this,zi,!1),Z(this,sn,null),Z(this,oo,()=>{const e=V(this,bs),i=new Set(this.items);for(const a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(const a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));xt(this,bs,i)}),Z(this,Ua,()=>{z(this,Ba,on).call(this),z(this,lo,wu).call(this,!1)}),Z(this,Ha,()=>{z(this,Ba,on).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(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),xt(this,gs,new MutationObserver(V(this,oo))),V(this,gs).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[Ri.DISABLED,Ri.HIDDEN,Ri.STYLE,Ri.ANCHOR,q.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){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,Zl,sv).call(this,e);break;case"invoke":z(this,Xl,ov).call(this,e);break;case"click":z(this,td,uv).call(this,e);break;case"toggle":z(this,id,hv).call(this,e);break;case"focusout":z(this,ad,pv).call(this,e);break;case"keydown":z(this,rd,vv).call(this,e);break}}connectedCallback(){var e,i;xt(this,sn,Xm(this.shadowRoot,":host")),z(this,ys,zl).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),xt(this,Ot,yl(this)),(i=(e=V(this,Ot))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(Ka(ln(this),V(this,Ua)),Ka(this,V(this,Ha)
1541)),z(this,so,Su).call(this)}disconnectedCallback(){var e,i;Va(ln(this),V(this,Ua)),Va(this,V(this,Ha)),this.disable(),(i=(e=V(this,Ot))==null?void 0:e.unassociateElement)==null||i.call(e,this),xt(this,Ot,null)}attributeChangedCallback(e,i,a){var r,n,s,o;e===Ri.HIDDEN&&a!==i?(V(this,zi)||xt(this,zi,!0),this.hidden?z(this,ed,dv).call(this):z(this,Jl,lv).call(this),this.dispatchEvent(new my({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===q.MEDIA_CONTROLLER?(i&&((n=(r=V(this,Ot))==null?void 0:r.unassociateElement)==null||n.call(r,this),xt(this,Ot,null)),a&&this.isConnected&&(xt(this,Ot,yl(this)),(o=(s=V(this,Ot))==null?void 0:s.associateElement)==null||o.call(s,this))):e===Ri.DISABLED&&a!==i?a==null?this.enable():this.disable():e===Ri.STYLE&&a!==i&&z(this,ys,zl).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=To(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(vy)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){const i=this.items.find(a=>a.value===e);i&&z(this,Ts,sd).call(this,i)}focus(){if(xt(this,Zi,Kd()),this.items.length){z(this,Kr,co).call(this,this.items[0]),this.items[0].focus();return}const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e?.focus()}handleSelect(e){var i;const a=z(this,Fr,uo).call(this,e);a&&(z(this,Ts,sd).call(this,a,a.type==="checkbox"),V(this,Ai)&&!this.hidden&&((i=V(this,Zi))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;const{key:r}=e,n=this.items,s=(a=(i=z(this,Fr,uo).call(this,e))!=null?i:z(this,nd,fv).call(this))!=null?a:n[0],o=n.indexOf(s);let l=Math.max(0,o);r==="ArrowDown"?l++:r==="ArrowUp"?l--:e.key==="Home"?l=0:e.key==="End"&&(l=n.length-1),l<0&&(l=n.length-1),l>n.length-1&&(l=0),z(this,Kr,co).call(this,n[l]),n[l].focus()}}Ot=new WeakMap;Zi=new WeakMap;Ai=new WeakMap;bs=new WeakMap;gs=new WeakMap;zi=new WeakMap;sn=new WeakMap;Zl=new WeakSet;sv=function(t){const e=t.target;for(const i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&z(this,so,Su).call(this),e.name||V(this,oo).call(this)};so=new WeakSet;Su=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};oo=new WeakMap;ys=new WeakSet;zl=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};Xl=new WeakSet;ov=function(t){xt(this,Ai,t.relatedTarget),ri(this,t.relatedTarget)||(this.hidden=!this.hidden)};Jl=new WeakSet;lv=function(){var t;(t=V(this,Ai))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Ka(ln(this),V(this,Ua)),Ka(this,V(this,Ha))};ed=new WeakSet;dv=function(){var t;(t=V(this,Ai))==null||t.setAttribute("aria-expanded","false"),Va(ln(this),V(this,Ua)),Va(this,V(this,Ha))};Ua=new WeakMap;Ha=new WeakMap;Ba=new WeakSet;on=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;const{x:e,y:i}=ly({anchor:this.anchorElement,floating:this,placement:"top-start"});t??(t=this.offsetWidth);const r=ln(this).getBoundingClientRect(),n=r.width-e-t,s=r.height-i-this.offsetHeight,{style:o}=V(this,sn);o.setProperty("position","absolute"),o.setProperty("right",`${Math.max(0,n)}px`),o.setProperty("--_menu-bottom",`${s}px`);const l=getComputedStyle(this),m=o.getPropertyValue("--_menu-bottom")===l.bottom?s:parseFloat(l.bottom),p=r.height-m-parseFloat(l.marginBottom);this.style.setProperty("--_menu-max-height",`${p}px`)};lo=new WeakSet;wu=function(t){const e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e?.querySelector('[role="menu"]'),{style:a}=V(this,sn);if(t||a.setProperty("--media-menu-transition-in","none"),i){const r=i.offsetHeight,n=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${n}px`),this.style.setProperty("min-height",`${r}px`),z(this,Ba,on).call(this,n)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),z(this,Ba,on).call(this);a.removeProperty("--media-menu-transition-in")};td=new WeakSet;uv=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(V(this,Iu,cv))){(e=V(this,Zi))==null||e.focus(),this.hidden=!0;return}const i=z(this,Fr,uo).call(this,t);!i||i.hasAttribute("disabled")||(z(this,Kr,co).call(this,i),this.handleSelect(t))};Iu=new WeakSet;cv=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};id=new WeakSet;hv=function(t){if(t.target===this)return;z(this,Ru,mv).call(this);const e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new Au({relatedTarget:i}));for(const i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);z(this,lo,wu).call(this,!0)};Ru=new WeakSet;mv=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};ad=new WeakSet;pv=function(t){var e;
vendor: 5,567 bytes, lines 1541-1655
1541ri(this,t.relatedTarget)||(V(this,zi)&&((e=V(this,Zi))==null||e.focus()),V(this,Ai)&&V(this,Ai)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};rd=new WeakSet;vv=function(t){var e,i,a,r,n;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(V(this,zi)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((n=V(this,Zi))==null||n.focus(),V(this,zi)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};Fr=new WeakSet;uo=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};nd=new WeakSet;fv=function(){return this.items.find(t=>t.tabIndex===0)};Kr=new WeakSet;co=function(t){for(const e of this.items)e.tabIndex=e===t?0:-1};Ts=new WeakSet;sd=function(t,e){const i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};ot.shadowRootOptions={mode:"open"};ot.getTemplateHTML=py;function vy(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t?.role)}function ln(t){var e;return(e=t.getAttribute("bounds")?Za(t,`#${t.getAttribute("bounds")}`):Ue(t)||t.parentElement)!=null?e:t}f.customElements.get("media-chrome-menu")||f.customElements.define("media-chrome-menu",ot);var Cu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ht=(t,e,i)=>(Cu(t,e,"read from private field"),i?i.call(t):e.get(t)),Gt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},il=(t,e,i,a)=>(Cu(t,e,"write to private field"),e.set(t,i),i),_t=(t,e,i)=>(Cu(t,e,"access private method"),i),As,Vr,od,Ev,ho,Lu,Du,_v,Bt,Qa,dn,ld,bv,ks,dd;function fy(t){return` 1542 <style> 1543 :host { 1544 transition: var(--media-menu-item-transition, 1545 background .15s linear, 1546 opacity .2s ease-in-out 1547 ); 1548 outline: var(--media-menu-item-outline, 0); 1549 outline-offset: var(--media-menu-item-outline-offset, -1px); 1550 cursor: var(--media-cursor, pointer); 1551 display: flex; 1552 align-items: center; 1553 align-self: stretch; 1554 justify-self: stretch; 1555 white-space: nowrap; 1556 white-space-collapse: collapse; 1557 text-wrap: nowrap; 1558 padding: .4em .8em .4em 1em; 1559 } 1560 1561 :host(:focus-visible) { 1562 box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 1563 outline: var(--media-menu-item-hover-outline, 0); 1564 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1565 } 1566 1567 :host(:hover) { 1568 cursor: var(--media-cursor, pointer); 1569 background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5)); 1570 outline: var(--media-menu-item-hover-outline); 1571 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1572 } 1573 1574 :host([aria-checked="true"]) { 1575 background: var(--media-menu-item-checked-background); 1576 } 1577 1578 :host([hidden]) { 1579 display: none; 1580 } 1581 1582 :host([disabled]) { 1583 pointer-events: none; 1584 color: rgba(255, 255, 255, .3); 1585 } 1586 1587 slot:not([name]) { 1588 width: 100%; 1589 } 1590 1591 slot:not([name="submenu"]) { 1592 display: inline-flex; 1593 align-items: center; 1594 transition: inherit; 1595 opacity: var(--media-menu-item-opacity, 1); 1596 } 1597 1598 slot[name="description"] { 1599 justify-content: end; 1600 } 1601 1602 slot[name="description"] > span { 1603 display: inline-block; 1604 margin-inline: 1em .2em; 1605 max-width: var(--media-menu-item-description-max-width, 100px); 1606 text-overflow: ellipsis; 1607 overflow: hidden; 1608 font-size: .8em; 1609 font-weight: 400; 1610 text-align: right; 1611 position: relative; 1612 top: .04em; 1613 } 1614 1615 slot[name="checked-indicator"] { 1616 display: none; 1617 } 1618 1619 :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] { 1620 display: var(--media-menu-item-checked-indicator-display, inline-block); 1621 } 1622 1623 1624 svg, img, ::slotted(svg), ::slotted(img) { 1625 height: var(--media-menu-item-icon-height, var(--media-control-height, 24px)); 1626 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1627 display: block; 1628 } 1629 1630 1631 [part~="indicator"], 1632 ::slotted([part~="indicator"]) { 1633 fill: var(--media-menu-item-indicator-fill, 1634 var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)))); 1635 height: var(--media-menu-item-indicator-height, 1.25em); 1636 margin-right: .5ch; 1637 } 1638 1639 [part~="checked-indicator"] { 1640 visibility: hidden; 1641 } 1642 1643 :host([aria-checked="true"]) [part~="checked-indicator"] { 1644 visibility: visible; 1645 } 1646 </style> 1647 <slot name="checked-indicator"> 1648 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 1649 <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"/> 1650 </svg> 1651 </slot> 1652 <slot name="prefix"></slot> 1653 <slot></slot> 1654 <slot name="description"></slot> 1655 <slot name="suffix">
1656 ${this.getSuffixSlotInnerHTML(t)} 1657 </slot> 1658 <slot name="submenu"></slot> 1659 `}function Ey(t){return""}const Je={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class Si extends f.HTMLElement{constructor(){if(super(),Gt(this,od),Gt(this,ho),Gt(this,Du),Gt(this,Qa),Gt(this,ld),Gt(this,ks),Gt(this,As,!1),Gt(this,Vr,void 0),Gt(this,Bt,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],n=(i=r?.dataset.description)!=null?i:r?.text,s=ye.createElement("span");s.textContent=n??"",a.replaceChildren(s)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=ze(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[Je.TYPE,Je.DISABLED,Je.CHECKED,Je.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),ur(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":_t(this,od,Ev).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":_t(this,ld,bv).call(this,e);break;case"keyup":_t(this,Qa,dn).call(this,e);break}}attributeChangedCallback(e,i,a){e===Je.CHECKED&&ur(this)&&!Ht(this,As)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===Je.TYPE&&a!==i?this.role="menuitem"+a:e===Je.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Je.DISABLED)||this.enable(),this.role="menuitem"+this.type,il(this,Vr,ud(this,this.parentNode)),_t(this,ks,dd).call(this),this.submenuElement&&_t(this,ho,Lu).call(this)}disconnectedCallback(){this.disable(),_t(this,ks,dd).call(this),il(this,Vr,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=To(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(Je.TYPE))!=null?e:""}set type(e){this.setAttribute(Je.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(Je.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Je.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(ur(this))return this.getAttribute("aria-checked")==="true"}set checked(e){ur(this)&&(il(this,As,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){ur(this)||this.invokeTargetElement&&ri(this,e.target)&&this.invokeTargetElement.dispatchEvent(new Au({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}As=new WeakMap;Vr=new WeakMap;od=new WeakSet;Ev=function(t){const e=t.target;if(!e?.name)for(const a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?_t(this,ho,Lu).call(this):_t(this,Du,_v).call(this))};ho=new WeakSet;Lu=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Ht(this,Bt)),this.submenuElement.addEventListener("addmenuitem",Ht(this,Bt)),this.submenuElement.addEventListener("removemenuitem",Ht(this,Bt)),Ht(this,Bt).call(this)};Du=new WeakSet;_v=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Ht(this,Bt)),this.submenuElement.removeEventListener("addmenuitem",Ht(this,Bt)),this.submenuElement.removeEventListener("removemenuitem",Ht(this,Bt)),Ht(this,Bt).call(this)};Bt=new WeakMap;Qa=new WeakSet;dn=function(t){const{key:e}=t;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",_t(this,Qa,dn));return}this.handleClick(t)};ld=new WeakSet;bv=function(t){const{metaKey:e,altKey:i,key:a}=t;if(e||i||!this.keysUsed.includes(a)){this.removeEventListener("keyup",_t(this,Qa,dn));return}this.addEventListener("keyup",_t(this,Qa,dn),{once:!0})};ks=new WeakSet;dd=function(){var t;const e=(t=Ht(this,Vr))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);
1659for(const a of e)a.setAttribute("aria-checked","false");i?.setAttribute("aria-checked","true")};Si.shadowRootOptions={mode:"open"};Si.getTemplateHTML=fy;Si.getSuffixSlotInnerHTML=Ey;function ur(t){return t.type==="radio"||t.type==="checkbox"}function ud(t,e){if(!t)return null;const{host:i}=t.getRootNode();return!e&&i?ud(t,i):e?.items?e:ud(e,e?.parentNode)}f.customElements.get("media-chrome-menu-item")||f.customElements.define("media-chrome-menu-item",Si);function _y(t){return` 1660 ${ot.getTemplateHTML(t)} 1661 <style> 1662 :host { 1663 --_menu-bg: rgb(20 20 30 / .8); 1664 background: var(--media-settings-menu-background, 1665 var(--media-menu-background, 1666 var(--media-control-background, 1667 var(--media-secondary-color, var(--_menu-bg))))); 1668 min-width: var(--media-settings-menu-min-width, 170px); 1669 border-radius: 2px 2px 0 0; 1670 overflow: hidden; 1671 } 1672 1673 @-moz-document url-prefix() { 1674 :host{ 1675 --_menu-bg: rgb(20 20 30); 1676 } 1677 } 1678 1679 :host([role="menu"]) { 1680 1681 justify-content: end; 1682 } 1683 1684 slot:not([name]) { 1685 justify-content: var(--media-settings-menu-justify-content); 1686 flex-direction: var(--media-settings-menu-flex-direction, column); 1687 overflow: visible; 1688 } 1689 1690 #container.has-expanded { 1691 --media-settings-menu-item-opacity: 0; 1692 } 1693 </style> 1694 `}class gv extends ot{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ue(this).querySelector("media-settings-menu-button")}}gv.getTemplateHTML=_y;f.customElements.get("media-settings-menu")||f.customElements.define("media-settings-menu",gv);function by(t){return` 1695 ${Si.getTemplateHTML.call(this,t)} 1696 <style> 1697 slot:not([name="submenu"]) { 1698 opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity)); 1699 } 1700 1701 :host([aria-expanded="true"]:hover) { 1702 background: transparent; 1703 } 1704 </style> 1705 `}function gy(t){return` 1706 <svg aria-hidden="true" viewBox="0 0 20 24"> 1707 <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"/> 1708 </svg> 1709 `}class No extends Si{}No.shadowRootOptions={mode:"open"};No.getTemplateHTML=by;No.getSuffixSlotInnerHTML=gy;f.customElements.get("media-settings-menu-item")||f.customElements.define("media-settings-menu-item",No);class Ja extends Le{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=To(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new Au({relatedTarget:this}))}}f.customElements.get("media-chrome-menu-button")||f.customElements.define("media-chrome-menu-button",Ja);function yy(){return` 1710 <style> 1711 :host([aria-expanded="true"]) slot[name=tooltip] { 1712 display: none; 1713 } 1714 </style> 1715 <slot name="icon"> 1716 <svg aria-hidden="true" viewBox="0 0 24 24"> 1717 <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"/> 1718 </svg> 1719 </slot> 1720 `}function Ty(){return C("Settings")}class Mu extends Ja{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",C("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Ue(this).querySelector("media-settings-menu")}}Mu.getSlotTemplateHTML=yy;Mu.getTooltipContentHTML=Ty;f.customElements.get("media-settings-menu-button")||f.customElements.define("media-settings-menu-button",Mu);var xu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},yv=(t,e,i)=>(xu(t,e,"read from private field"),i?i.call(t):e.get(t)),Cn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)}
1720,cd=(t,e,i,a)=>(xu(t,e,"write to private field"),e.set(t,i),i),Ln=(t,e,i)=>(xu(t,e,"access private method"),i),Lr,mo,Ss,hd,ws,md;class Ay extends ot{constructor(){super(...arguments),Cn(this,Ss),Cn(this,ws),Cn(this,Lr,[]),Cn(this,mo,void 0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_AUDIO_TRACK_LIST,u.MEDIA_AUDIO_TRACK_ENABLED,u.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===u.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(cd(this,Lr,mg(a??"")),Ln(this,Ss,hd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ln(this,ws,md))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ln(this,ws,md))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Ue(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return yv(this,Lr)}set mediaAudioTrackList(e){cd(this,Lr,e),Ln(this,Ss,hd).call(this)}get mediaAudioTrackEnabled(){var e;return(e=ae(this,u.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,u.MEDIA_AUDIO_TRACK_ENABLED,e)}}Lr=new WeakMap;mo=new WeakMap;Ss=new WeakSet;hd=function(){if(yv(this,mo)===JSON.stringify(this.mediaAudioTrackList))return;cd(this,mo,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort((e,i)=>e.id.localeCompare(i.id,void 0,{numeric:!0}));for(const e of t){const i=this.formatMenuItemText(e.label,e),a=Ga({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(Xi(this,"checked-indicator")),this.defaultSlot.append(a)}};ws=new WeakSet;md=function(){if(this.value==null)return;const t=new f.CustomEvent(R.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-audio-track-menu")||f.customElements.define("media-audio-track-menu",Ay);const ky=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1721 <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/> 1722 <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"/> 1723</svg>`;function Sy(){return` 1724 <style> 1725 :host([aria-expanded="true"]) slot[name=tooltip] { 1726 display: none; 1727 } 1728 </style> 1729 <slot name="icon">${ky}</slot> 1730 `}function wy(){return C("Audio")}const fh=t=>{const e=C("Audio");t.setAttribute("aria-label",e)};class Ou extends Ja{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_AUDIO_TRACK_ENABLED,u.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),fh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_LANG&&fh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Ue(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=ae(this,u.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,u.MEDIA_AUDIO_TRACK_ENABLED,e)}}Ou.getSlotTemplateHTML=Sy;Ou.getTooltipContentHTML=wy;f.customElements.get("media-audio-track-menu-button")||f.customElements.define("media-audio-track-menu-button",Ou);var Nu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Iy=(t,e,i)=>(Nu(t,e,"read from private field"),e.get(t)),al=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ry=(t,e,i,a)=>(Nu(t,e,"write to private field"),e.set(t,i),i),rl=(t,e,i)=>(Nu(t,e,"access private method"),i),po,pd,Tv,Is,vd;const Cy=` 1731 <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator"> 1732 <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
17320 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"/> 1733 </svg>`;function Ly(t){return` 1734 ${ot.getTemplateHTML(t)} 1735 <slot name="captions-indicator" hidden>${Cy}</slot> 1736 `}class Av extends ot{constructor(){super(...arguments),al(this,pd),al(this,Is),al(this,po,void 0)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_SUBTITLES_LIST,u.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_SUBTITLES_LIST&&i!==a?rl(this,pd,Tv).call(this):e===u.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",rl(this,Is,vd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",rl(this,Is,vd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ue(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return Eh(this,u.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){_h(this,u.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Eh(this,u.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){_h(this,u.MEDIA_SUBTITLES_SHOWING,e)}}po=new WeakMap;pd=new WeakSet;Tv=function(){var t;if(Iy(this,po)===JSON.stringify(this.mediaSubtitlesList))return;Ry(this,po,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const e=!this.value,i=Ga({type:"radio",text:this.formatMenuItemText(C("Off")),value:"off",checked:e});i.prepend(Xi(this,"checked-indicator")),this.defaultSlot.append(i);const a=this.mediaSubtitlesList;for(const r of a){const n=Ga({type:"radio",text:this.formatMenuItemText(r.label,r),value:Sl(r),checked:this.value==Sl(r)});n.prepend(Xi(this,"checked-indicator")),((t=r.kind)!=null?t:"subs")==="captions"&&n.append(Xi(this,"captions-indicator")),this.defaultSlot.append(n)}};Is=new WeakSet;vd=function(){const t=this.mediaSubtitlesShowing,e=this.getAttribute(u.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t?.length&&i&&this.dispatchEvent(new f.CustomEvent(R.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;const a=new f.CustomEvent(R.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};Av.getTemplateHTML=Ly;const Eh=(t,e)=>{const i=t.getAttribute(e);return i?Io(i):[]},_h=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=Jr(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu")||f.customElements.define("media-captions-menu",Av);const Dy=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1737 <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"/> 1738</svg>`,My=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1739 <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.8
17391 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"/> 1740</svg>`;function xy(){return` 1741 <style> 1742 :host([data-captions-enabled="true"]) slot[name=off] { 1743 display: none !important; 1744 } 1745 1746 1747 :host(:not([data-captions-enabled="true"])) slot[name=on] { 1748 display: none !important; 1749 } 1750 1751 :host([aria-expanded="true"]) slot[name=tooltip] { 1752 display: none; 1753 } 1754 </style> 1755 1756 <slot name="icon"> 1757 <slot name="on">${Dy}</slot> 1758 <slot name="off">${My}</slot> 1759 </slot> 1760 `}function Oy(){return C("Captions")}const bh=t=>{t.setAttribute("data-captions-enabled",lp(t).toString())},gh=t=>{t.setAttribute("aria-label",C("closed captions"))};class Pu extends Ja{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_SUBTITLES_LIST,u.MEDIA_SUBTITLES_SHOWING,u.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),gh(this),bh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_SUBTITLES_SHOWING?bh(this):e===u.MEDIA_LANG&&gh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Ue(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return yh(this,u.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Th(this,u.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return yh(this,u.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Th(this,u.MEDIA_SUBTITLES_SHOWING,e)}}Pu.getSlotTemplateHTML=xy;Pu.getTooltipContentHTML=Oy;const yh=(t,e)=>{const i=t.getAttribute(e);return i?Io(i):[]},Th=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=Jr(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu-button")||f.customElements.define("media-captions-menu-button",Pu);var kv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Sa=(t,e,i)=>(kv(t,e,"read from private field"),i?i.call(t):e.get(t)),nl=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},cr=(t,e,i)=>(kv(t,e,"access private method"),i),Ei,Dr,Rs,Cs,fd;const sl={RATES:"rates"};class Ny extends ot{constructor(){super(),nl(this,Dr),nl(this,Cs),nl(this,Ei,new Yd(this,sl.RATES,{defaultValue:Hp})),cr(this,Dr,Rs).call(this)}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PLAYBACK_RATE,sl.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_PLAYBACK_RATE&&i!=a?this.value=a:e===sl.RATES&&i!=a&&(Sa(this,Ei).value=a,cr(this,Dr,Rs).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",cr(this,Cs,fd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",cr(this,Cs,fd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ue(this).querySelector("media-playback-rate-menu-button")}get rates(){return Sa(this,Ei)}set rates(e){e?Array.isArray(e)?Sa(this,Ei).value=e.join(" "):typeof e=="string"&&(Sa(this,Ei).value=e):Sa(this,Ei).value="",cr(this,Dr,Rs).call(this)}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,Da)}set mediaPlaybackRate(e){de(this,u.MEDIA_PLAYBACK_RATE,e)}}Ei=new WeakMap;Dr=new WeakSet;Rs=function(){this.defaultSlot.textContent="";for(const t of Sa(this,Ei)){const e=Ga({type:"radio",text:this.formatMenuItemText(`${t}x`,t),value:t,checked:this.mediaPlaybackRate===Number(t)});
1760e.prepend(Xi(this,"checked-indicator")),this.defaultSlot.append(e)}};Cs=new WeakSet;fd=function(){if(!this.value)return;const t=new f.CustomEvent(R.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-playback-rate-menu")||f.customElements.define("media-playback-rate-menu",Ny);const Ls=1;function Py(t){return` 1761 <style> 1762 :host { 1763 min-width: 5ch; 1764 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1765 } 1766 1767 :host([aria-expanded="true"]) slot[name=tooltip] { 1768 display: none; 1769 } 1770 </style> 1771 <slot name="icon">${t.mediaplaybackrate||Ls}x</slot> 1772 `}function $y(){return C("Playback rate")}class $u extends Ja{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Ls}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===u.MEDIA_PLAYBACK_RATE){const r=a?+a:Number.NaN,n=Number.isNaN(r)?Ls:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",C("Playback rate {playbackRate}",{playbackRate:n}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Ue(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return ie(this,u.MEDIA_PLAYBACK_RATE,Ls)}set mediaPlaybackRate(e){de(this,u.MEDIA_PLAYBACK_RATE,e)}}$u.getSlotTemplateHTML=Py;$u.getTooltipContentHTML=$y;f.customElements.get("media-playback-rate-menu-button")||f.customElements.define("media-playback-rate-menu-button",$u);var Uu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Mr=(t,e,i)=>(Uu(t,e,"read from private field"),i?i.call(t):e.get(t)),Dn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ah=(t,e,i,a)=>(Uu(t,e,"write to private field"),e.set(t,i),i),da=(t,e,i)=>(Uu(t,e,"access private method"),i),xr,Ma,wa,Or,Ds,Ed;class Uy extends ot{constructor(){super(...arguments),Dn(this,wa),Dn(this,Ds),Dn(this,xr,[]),Dn(this,Ma,{})}static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_RENDITION_LIST,u.MEDIA_RENDITION_SELECTED,u.MEDIA_RENDITION_UNAVAILABLE,u.MEDIA_HEIGHT]}static formatMenuItemText(e,i){return super.formatMenuItemText(e,i)}static formatRendition(e,{showBitrate:i=!1}={}){const a=`${Math.min(e.width,e.height)}p`;if(i&&e.bitrate){const r=e.bitrate/1e6,n=`${r.toFixed(r<1?1:0)} Mbps`;return`${a} (${n})`}return this.formatMenuItemText(a,e)}static compareRendition(e,i){var a,r;return i.height===e.height?((a=i.bitrate)!=null?a:0)-((r=e.bitrate)!=null?r:0):i.height-e.height}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===u.MEDIA_RENDITION_SELECTED&&i!==a?(this.value=a??"auto",da(this,wa,Or).call(this)):e===u.MEDIA_RENDITION_LIST&&i!==a?(Ah(this,xr,dg(a)),da(this,wa,Or).call(this)):e===u.MEDIA_HEIGHT&&i!==a&&da(this,wa,Or).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",da(this,Ds,Ed))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",da(this,Ds,Ed))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Ue(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Mr(this,xr)}set mediaRenditionList(e){Ah(this,xr,e),da(this,wa,Or).call(this)}get mediaRenditionSelected(){return ae(this,u.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,u.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,u.MEDIA_HEIGHT)}set mediaHeight(e){de(this,u.MEDIA_HEIGHT,e)}compareRendition(e,i){return this.constructor.compareRendition(e,i)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}formatRendition(e,i){return this.constructor.formatRendition(e,i)}showRenditionBitrate(e){return this.mediaRenditionList.some(i=>i!==e&&i.height===e.height&&i.bitrate!==e.bitrate)}}xr=new WeakMap;Ma=new WeakMap;wa=new WeakSet;Or=function(){if(Mr(this,Ma).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Mr(this,Ma).mediaHeight===this.mediaHeight)return;Mr(this,Ma).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Mr(this,Ma).mediaHeight=this.mediaHeight;const t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),e=t.find(s=>
1772s.id===this.mediaRenditionSelected);for(const s of t)s.selected=s===e;this.defaultSlot.textContent="";const i=!this.mediaRenditionSelected;for(const s of t){const o=this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),l=Ga({type:"radio",text:o,value:`${s.id}`,checked:s.selected&&!i});l.prepend(Xi(this,"checked-indicator")),this.defaultSlot.append(l)}const a=e&&this.showRenditionBitrate(e),r=i?e?this.formatMenuItemText(`${C("Auto")} • ${this.formatRendition(e,{showBitrate:a})}`,e):this.formatMenuItemText(`${C("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(C("Auto")),n=Ga({type:"radio",text:r,value:"auto",checked:i});n.dataset.description=r,n.prepend(Xi(this,"checked-indicator")),this.defaultSlot.append(n)};Ds=new WeakSet;Ed=function(){if(this.value==null)return;const t=new f.CustomEvent(R.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-rendition-menu")||f.customElements.define("media-rendition-menu",Uy);const Hy=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1773 <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" /> 1774</svg>`;function By(){return` 1775 <style> 1776 :host([aria-expanded="true"]) slot[name=tooltip] { 1777 display: none; 1778 } 1779 </style> 1780 <slot name="icon">${Hy}</slot> 1781 `}function Wy(){return C("Quality")}class Hu extends Ja{static get observedAttributes(){return[...super.observedAttributes,u.MEDIA_RENDITION_SELECTED,u.MEDIA_RENDITION_UNAVAILABLE,u.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",C("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Ue(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ae(this,u.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,u.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,u.MEDIA_HEIGHT)}set mediaHeight(e){de(this,u.MEDIA_HEIGHT,e)}}Hu.getSlotTemplateHTML=By;Hu.getTooltipContentHTML=Wy;f.customElements.get("media-rendition-menu-button")||f.customElements.define("media-rendition-menu-button",Hu);var Bu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Nt=(t,e,i)=>(Bu(t,e,"read from private field"),i?i.call(t):e.get(t)),At=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Sv=(t,e,i,a)=>(Bu(t,e,"write to private field"),e.set(t,i),i),it=(t,e,i)=>(Bu(t,e,"access private method"),i),ja,un,Po,Bi,xa,Wu,wv,Ms,_d,xs,bd,Iv,vo,fo,Os;function Fy(t){return` 1782 ${ot.getTemplateHTML(t)} 1783 <style> 1784 :host { 1785 --_menu-bg: rgb(20 20 30 / .8); 1786 background: var(--media-settings-menu-background, 1787 var(--media-menu-background, 1788 var(--media-control-background, 1789 var(--media-secondary-color, var(--_menu-bg))))); 1790 min-width: var(--media-settings-menu-min-width, 170px); 1791 border-radius: 2px; 1792 overflow: hidden; 1793 } 1794 </style> 1795 `}class Rv extends ot{constructor(){super(),At(this,un),At(this,Bi),At(this,Wu),At(this,Ms),At(this,bd),At(this,ja,!1),At(this,xs,e=>{const i=e.target,a=i?.nodeName==="VIDEO",r=it(this,Ms,_d).call(this,i);(a||r)&&(Nt(this,ja)?it(this,Bi,xa).call(this):it(this,bd,Iv).call(this,e))}),At(this,vo,e=>{const i=e.target,a=this.contains(i),r=e.button===2,n=i?.nodeName==="VIDEO",s=it(this,Ms,_d).call(this,i);a||r&&(n||s)||it(this,Bi,xa).call(this)}),At(this,fo,e=>{e.key==="Escape"&&it(this,Bi,xa).call(this)}),At(this,Os,e=>{var i,a;const r=e.target;if((i=r.matches)!=null&&i.call(r,'button[invoke="copy"]')){const n=(a=r.closest("media-context-menu-item"))==null?void 0:a.querySelector('input[slot="copy"]');n&&navigator.clipboard.writeText(n.value)}it(this,Bi,xa).call(this)}),this.setAttribute("noautohide",""),it(this,un,Po).call(this)}connectedCallback(){super.connectedCallback(),Ue(this).addEventListener("contextmenu",Nt(this,xs)),this.addEventListener("click",Nt(this,Os))}disconnectedCallback(){super.disconnectedCallback(),Ue(this).removeEventListener("contextmenu",Nt(this,xs)),this.removeEventListener("click",Nt(this,Os)),document.removeEventListener("mousedown",Nt(this,vo)),document.removeEventListener("keydown",Nt(this,fo))}}ja=new WeakMap;un=new WeakSet;Po=function(){this.hidden=!Nt(this,ja)};Bi=new WeakSet;xa=function(){Sv(this,ja,!1),it(this,un,Po).call(this)};Wu=new WeakSet;wv=function(){document.querySelectorAll("media-context-menu").forEach(e
vendor: 4,717 bytes, lines 1795-1808
1795=>{var i;e!==this&&it(i=e,Bi,xa).call(i)})};Ms=new WeakSet;_d=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};xs=new WeakMap;bd=new WeakSet;Iv=function(t){t.preventDefault(),it(this,Wu,wv).call(this),Sv(this,ja,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,it(this,un,Po).call(this),document.addEventListener("mousedown",Nt(this,vo),{once:!0}),document.addEventListener("keydown",Nt(this,fo),{once:!0})};vo=new WeakMap;fo=new WeakMap;Os=new WeakMap;Rv.getTemplateHTML=Fy;f.customElements.get("media-context-menu")||f.customElements.define("media-context-menu",Rv);function Ky(t){return` 1796 ${Si.getTemplateHTML.call(this,t)} 1797 <style> 1798 ::slotted(*) { 1799 color: var(--media-text-color, white); 1800 text-decoration: none; 1801 border: none; 1802 background: none; 1803 cursor: pointer; 1804 padding: 0; 1805 min-height: var(--media-control-height, 24px); 1806 } 1807 </style> 1808 `}class Fu extends Si{}Fu.shadowRootOptions={mode:"open"};Fu.getTemplateHTML=Ky;f.customElements.get("media-context-menu-item")||f.customElements.define("media-context-menu-item",Fu);var Cv=t=>{throw TypeError(t)},Ku=(t,e,i)=>e.has(t)||Cv("Cannot "+i),j=(t,e,i)=>(Ku(t,e,"read from private field"),i?i.call(t):e.get(t)),ft=(t,e,i)=>e.has(t)?Cv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),Ft=(t,e,i,a)=>(Ku(t,e,"write to private field"),e.set(t,i),i),fe=(t,e,i)=>(Ku(t,e,"access private method"),i),$o=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends $o{}globalThis.DocumentFragment=t}var Vu=class extends $o{},Vy=class extends $o{},qy={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(Vu)}},Ns,Yy=class{constructor(e,i={}){ft(this,Ns),Ft(this,Ns,i?.detail)}get detail(){return j(this,Ns)}initCustomEvent(){}};Ns=new WeakMap;function Gy(t,e){return new Vu}var Lv={document:{createElement:Gy},DocumentFragment,customElements:qy,CustomEvent:Yy,EventTarget:$o,HTMLElement:Vu,HTMLVideoElement:Vy},Dv=typeof window>"u"||typeof globalThis.customElements>"u",$t=Dv?Lv:globalThis,Eo=Dv?Lv.document:globalThis.document;function Qy(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${gd(i)}: ${a}; `)}),e?e.trim():void 0}function gd(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Mv(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function je(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function xv(t){let e=jy(t).toString();return e?"?"+e:""}function jy(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var Ov=(t,e)=>!t||!e?!1:t.contains(e)?!0:Ov(t,e.getRootNode().host),Nv="mux.com",Zy=()=>{try{return"3.8.0"}catch{}return"UNKNOWN"},zy=Zy(),Pv=()=>zy,Xy=(t,{token:e,customDomain:i=Nv,thumbnailTime:a,programTime:r}={})=>{var n;let s=e==null?a:void 0,{aud:o}=(n=Oa(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${i}/${t}/thumbnail.webp${xv({token:e,time:s,program_time:r})}`},Jy=(t,{token:e,customDomain:i=Nv,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=(n=Oa(e))!=null?n:{};if(!(e&&s!=="s"))return`https://image.${i}/${t}/storyboard.vtt${xv({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},qu=t=>{if(t){if([Q.LIVE,Q.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Q.LIVE}},eT={crossorigin:"crossOrigin",playsinline:"playsInline"};function tT(t){var e;return(e=eT[t])!=null?e:Mv(t)}var Ia,Ra,$e,iT=class{constructor(e,i){ft(this,Ia),ft(this,Ra),ft(this,$e,[]),Ft(this,Ia,e),Ft(this,Ra,i)}[Symbol.iterator](){return j(this,$e).values()}get length(){return j(this,$e).length}get value(){var e;return(e=j(this,$e).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(Ft(this,$e,[]),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return j(this,$e)[e]}values(){return j(this,$e).values()}keys(){return j(this,$e).keys()}forEach(e){j(this,$e).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||j(this,$e).push(r)}),!(this.value===""&&!((i=j(this,Ia))!=null&&i.hasAttribute(`${j(this,Ra)}`)))&&((a=j(this,Ia))==null||a.setAttribute(`${j(this,Ra)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{j(this,$e).splice(j(this,$e).indexOf(a),1)}),(i=j(this,Ia))==null||i.setAttribute(`${j(this,Ra)}`,`${this.value}`)}contains(e){return j(this,$e).includes(e)}
vendor: 8,532 bytes, lines 1808-1896
1808toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};Ia=new WeakMap,Ra=new WeakMap,$e=new WeakMap;var $v=`[mux-player ${Pv()}]`;function zt(...t){console.warn($v,...t)}function at(...t){console.error($v,...t)}function Uv(t){var e;let i=(e=t.message)!=null?e:"";t.context&&(i+=` ${t.context}`),t.file&&(i+=` ${D("Read more: ")} 1809https://github.com/muxinc/elements/blob/main/errors/${t.file}`),zt(i)}var Me={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Pi={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},kh=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}}),aT=Object.values(Me).filter(t=>Me.PLAYSINLINE!==t),rT=Object.values(Pi),nT=[...aT,...rT],sT=class extends $t.HTMLElement{static get observedAttributes(){return nT}constructor(){super()}attributeChangedCallback(t,e,i){var a,r;switch(t){case Pi.MUTED:{this.media&&(this.media.muted=i!=null,this.media.defaultMuted=i!=null);return}case Pi.VOLUME:{let n=(a=je(i))!=null?a:1;this.media&&(this.media.volume=n);return}case Pi.PLAYBACKRATE:{let n=(r=je(i))!=null?r:1;this.media&&(this.media.playbackRate=n,this.media.defaultPlaybackRate=n);return}}}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:!0}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:!1}get buffered(){var t,e;return(e=(t=this.media)==null?void 0:t.buffered)!=null?e:kh}get seekable(){var t,e;return(e=(t=this.media)==null?void 0:t.seekable)!=null?e:kh}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=je(this.getAttribute(Pi.PLAYBACKRATE)))!=null?t:1}set defaultPlaybackRate(t){t!=null?this.setAttribute(Pi.PLAYBACKRATE,`${t}`):this.removeAttribute(Pi.PLAYBACKRATE)}get crossOrigin(){return hr(this,Me.CROSSORIGIN)}set crossOrigin(t){this.setAttribute(Me.CROSSORIGIN,`${t}`)}get autoplay(){return hr(this,Me.AUTOPLAY)!=null}set autoplay(t){t?this.setAttribute(Me.AUTOPLAY,typeof t=="string"?t:""):this.removeAttribute(Me.AUTOPLAY)}get loop(){return hr(this,Me.LOOP)!=null}set loop(t){t?this.setAttribute(Me.LOOP,""):this.removeAttribute(Me.LOOP)}get muted(){var t,e;return(e=(t=this.media)==null?void 0:t.muted)!=null?e:!1}set muted(t){this.media&&(this.media.muted=!!t)}get defaultMuted(){return hr(this,Me.MUTED)!=null}set defaultMuted(t){t?this.setAttribute(Me.MUTED,""):this.removeAttribute(Me.MUTED)}get playsInline(){return hr(this,Me.PLAYSINLINE)!=null}set playsInline(t){at("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(Me.PRELOAD,t):this.removeAttribute(Me.PRELOAD)}};function hr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Sh=sT,oT=`:host { 1810 --media-control-display: var(--controls); 1811 --media-loading-indicator-display: var(--loading-indicator); 1812 --media-dialog-display: var(--dialog); 1813 --media-play-button-display: var(--play-button); 1814 --media-live-button-display: var(--live-button); 1815 --media-seek-backward-button-display: var(--seek-backward-button); 1816 --media-seek-forward-button-display: var(--seek-forward-button); 1817 --media-mute-button-display: var(--mute-button); 1818 --media-captions-button-display: var(--captions-button); 1819 --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display)); 1820 --media-rendition-menu-button-display: var(--rendition-menu-button); 1821 --media-audio-track-menu-button-display: var(--audio-track-menu-button); 1822 --media-airplay-button-display: var(--airplay-button); 1823 --media-pip-button-display: var(--pip-button); 1824 --media-fullscreen-button-display: var(--fullscreen-button); 1825 --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display)); 1826 --media-playback-rate-button-display: var(--playback-rate-button); 1827 --media-playback-rate-menu-button-display: var(--playback-rate-menu-button); 1828 --media-volume-range-display: var(--volume-range); 1829 --media-time-range-display: var(--time-range); 1830 --media-time-display-display: var(--time-display); 1831 --media-duration-display-display: var(--duration-display); 1832 --media-title-display-display: var(--title-display); 1833 1834 display: inline-block; 1835 line-height: 0; 1836 width: 100%; 1837} 1838 1839a { 1840 color: #fff; 1841 font-size: 0.9em; 1842 text-decoration: underline; 1843} 1844 1845media-theme { 1846 display: inline-block; 1847 line-height: 0; 1848 width: 100%; 1849 height: 100%; 1850 direction: ltr; 1851} 1852 1853media-poster-image { 1854 display: inline-block; 1855 line-height: 0; 1856 width: 100%; 1857 height: 100%; 1858} 1859 1860media-poster-image:not([src]):not([placeholdersrc]) { 1861 display: none; 1862} 1863 1864::part(top), 1865[part~='top'] { 1866 --media-control-display: var(--controls, var(--top-controls)); 1867 --media-play-button-display: var(--play-button, var(--top-play-button)); 1868 --media-live-button-display: var(--live-button, var(--top-live-button)); 1869 --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button)); 1870 --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button)); 1871 --media-mute-button-display: var(--mute-button, var(--top-mute-button)); 1872 --media-captions-button-display: var(--captions-button, var(--top-captions-button)); 1873 --media-captions-menu-button-display: var( 1874 --captions-menu-button, 1875 var(--media-captions-button-display, var(--top-captions-menu-button)) 1876 ); 1877 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button)); 1878 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button)); 1879 --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button)); 1880 --media-pip-button-display: var(--pip-button, var(--top-pip-button)); 1881 --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button)); 1882 --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display))); 1883 --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button)); 1884 --media-playback-rate-menu-button-display: var( 1885 --captions-menu-button, 1886 var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button)) 1887 ); 1888 --media-volume-range-display: var(--volume-range, var(--top-volume-range)); 1889 --media-time-range-display: var(--time-range, var(--top-time-range)); 1890 --media-time-display-display: var(--time-display, var(--top-time-display)); 1891 --media-duration-display-display: var(--duration-display, var(--top-duration-display)); 1892 --media-title-display-display: var(--title-display, var(--top-title-display)); 1893} 1894 1895::part(center), 1896[part~='center'] {
1897 --media-control-display: var(--controls, var(--center-controls)); 1898 --media-play-button-display: var(--play-button, var(--center-play-button)); 1899 --media-live-button-display: var(--live-button, var(--center-live-button)); 1900 --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button)); 1901 --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button)); 1902 --media-mute-button-display: var(--mute-button, var(--center-mute-button)); 1903 --media-captions-button-display: var(--captions-button, var(--center-captions-button)); 1904 --media-captions-menu-button-display: var( 1905 --captions-menu-button, 1906 var(--media-captions-button-display, var(--center-captions-menu-button)) 1907 ); 1908 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button)); 1909 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button)); 1910 --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button)); 1911 --media-pip-button-display: var(--pip-button, var(--center-pip-button)); 1912 --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button)); 1913 --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display))); 1914 --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button)); 1915 --media-playback-rate-menu-button-display: var( 1916 --playback-rate-menu-button, 1917 var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button)) 1918 ); 1919 --media-volume-range-display: var(--volume-range, var(--center-volume-range)); 1920 --media-time-range-display: var(--time-range, var(--center-time-range)); 1921 --media-time-display-display: var(--time-display, var(--center-time-display)); 1922 --media-duration-display-display: var(--duration-display, var(--center-duration-display)); 1923} 1924 1925::part(bottom), 1926[part~='bottom'] { 1927 --media-control-display: var(--controls, var(--bottom-controls)); 1928 --media-play-button-display: var(--play-button, var(--bottom-play-button)); 1929 --media-live-button-display: var(--live-button, var(--bottom-live-button)); 1930 --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button)); 1931 --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button)); 1932 --media-mute-button-display: var(--mute-button, var(--bottom-mute-button)); 1933 --media-captions-button-display: var(--captions-button, var(--bottom-captions-button)); 1934 --media-captions-menu-button-display: var( 1935 --captions-menu-button, 1936 var(--media-captions-button-display, var(--bottom-captions-menu-button)) 1937 ); 1938 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button)); 1939 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button)); 1940 --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button)); 1941 --media-pip-button-display: var(--pip-button, var(--bottom-pip-button)); 1942 --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button)); 1943 --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display))); 1944 --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button)); 1945 --media-playback-rate-menu-button-display: var( 1946 --playback-rate-menu-button, 1947 var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button)) 1948 ); 1949 --media-volume-range-display: var(--volume-range, var(--bottom-volume-range)); 1950 --media-time-range-display: var(--time-range, var(--bottom-time-range)); 1951 --media-time-display-display: var(--time-display, var(--bottom-time-display)); 1952 --media-duration-display-display: var(--duration-display, var(--bottom-duration-display)); 1953 --media-title-display-display: var(--title-display, var(--bottom-title-display)); 1954} 1955 1956:host([no-tooltips]) { 1957 --media-tooltip-display: none; 1958} 1959`,mr=new WeakMap,lT=class Hv{constructor(e,i){this.element=e,this.type=i,this.element.addEventListener(this.type,this);let a=mr.get(this.element);a&&a.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 i=mr.get(this.element);
vendor: 4,286 bytes, lines 1959-1984
1959i&&i.delete(this.type)}}static for(e){mr.has(e.element)||mr.set(e.element,new Map);let i=e.attributeName.slice(2),a=mr.get(e.element);return a&&a.has(i)?a.get(i):new Hv(e.element,i)}};function dT(t,e){return t instanceof bt&&t.attributeName.startsWith("on")?(lT.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function uT(t,e){return e instanceof Bv&&t instanceof Xa?(e.renderInto(t),!0):!1}function cT(t,e){return e instanceof DocumentFragment&&t instanceof Xa?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function hT(t,e){if(t instanceof bt){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function mT(t,e){if(t instanceof bt&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function pT(t,e){if(typeof e=="boolean"&&t instanceof bt){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function vT(t,e){return e===!1&&t instanceof Xa?(t.replace(""),!0):!1}function fT(t,e){mT(t,e)||pT(t,e)||dT(t,e)||vT(t,e)||uT(t,e)||cT(t,e)||hT(t,e)}var ol=new Map,wh=new WeakMap,Ih=new WeakMap,Bv=class{constructor(e,i,a){this.strings=e,this.values=i,this.processor=a,this.stringsKey=this.strings.join("�")}get template(){if(ol.has(this.stringsKey))return ol.get(this.stringsKey);{let e=Eo.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<i?`{{ ${n} }}`:""),""),ol.set(this.stringsKey,e),e}}renderInto(e){var i;let a=this.template;if(wh.get(e)!==a){wh.set(e,a);let n=new xo(a,this.values,this.processor);Ih.set(e,n),e instanceof Xa?e.replace(...n.children):e.appendChild(n);return}let r=Ih.get(e);(i=r?.update)==null||i.call(r,this.values)}},ET={processCallback(t,e,i){var a;if(i){for(let[r,n]of e)if(r in i){let s=(a=i[r])!=null?a:"";fT(n,s)}}}};function Ps(t,...e){return new Bv(t,e,ET)}function _T(t,e){t.renderInto(e)}var bT=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},gT=t=>Ps` 1960 <style> 1961 ${bT(t)} 1962 ${oT} 1963 </style> 1964 ${kT(t)} 1965`,yT=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return qu(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},TT={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",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",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"},AT=Object.values(TT).join(", "),kT=t=>{var e,i,a,r,n,s,o,l,d,m,p,h,c,v,g,_,y,T,E,k,L,O,H,Y,X,K,P,De,Be,We,he,Oe,gt,Ne,lt,Fe,Ae;return Ps` 1966 <media-theme 1967 template="${t.themeTemplate||!1}" 1968 defaultstreamtype="${(e=t.defaultStreamType)!=null?e:!1}" 1969 hotkeys="${yT(t)||!1}" 1970 nohotkeys="${t.noHotKeys||!t.hasSrc||!1}" 1971 noautoseektolive="${!!((i=t.streamType)!=null&&i.includes(Q.LIVE))&&t.targetLiveWindow!==0}" 1972 novolumepref="${t.novolumepref||!1}" 1973 nomutedpref="${t.nomutedpref||!1}" 1974 disabled="${!t.hasSrc||t.isDialogOpen}" 1975 audio="${(a=t.audio)!=null?a:!1}" 1976 style="${(r=Qy({"--media-primary-color":t.primaryColor,"--media-secondary-color":t.secondaryColor,"--media-accent-color":t.accentColor}))!=null?r:!1}" 1977 defaultsubtitles="${!t.defaultHiddenCaptions}" 1978 forwardseekoffset="${(n=t.forwardSeekOffset)!=null?n:!1}" 1979 backwardseekoffset="${(s=t.backwardSeekOffset)!=null?s:!1}" 1980 playbackrates="${(o=t.playbackRates)!=null?o:!1}" 1981 defaultshowremainingtime="${(l=t.defaultShowRemainingTime)!=null?l:!1}" 1982 defaultduration="${(d=t.defaultDuration)!=null?d:!1}" 1983 hideduration="${(m=t.hideDuration)!=null?m:!1}" 1984 title="${(p=t.title)!=null?p:!1}
1984" 1985 videotitle="${(h=t.videoTitle)!=null?h:!1}" 1986 proudlydisplaymuxbadge="${(c=t.proudlyDisplayMuxBadge)!=null?c:!1}" 1987 exportparts="${AT}" 1988 onclose="${t.onCloseErrorDialog}" 1989 onfocusin="${t.onFocusInErrorDialog}" 1990 > 1991 <mux-video 1992 slot="media" 1993 inert="${(v=t.noHotKeys)!=null?v:!1}" 1994 target-live-window="${(g=t.targetLiveWindow)!=null?g:!1}" 1995 stream-type="${(_=qu(t.streamType))!=null?_:!1}" 1996 crossorigin="${(y=t.crossOrigin)!=null?y:""}" 1997 playsinline 1998 autoplay="${(T=t.autoplay)!=null?T:!1}" 1999 muted="${(E=t.muted)!=null?E:!1}" 2000 loop="${(k=t.loop)!=null?k:!1}" 2001 preload="${(L=t.preload)!=null?L:!1}" 2002 debug="${(O=t.debug)!=null?O:!1}" 2003 prefer-cmcd="${(H=t.preferCmcd)!=null?H:!1}" 2004 disable-tracking="${(Y=t.disableTracking)!=null?Y:!1}" 2005 disable-cookies="${(X=t.disableCookies)!=null?X:!1}" 2006 prefer-playback="${(K=t.preferPlayback)!=null?K:!1}" 2007 start-time="${t.startTime!=null?t.startTime:!1}" 2008 beacon-collection-domain="${(P=t.beaconCollectionDomain)!=null?P:!1}" 2009 player-init-time="${(De=t.playerInitTime)!=null?De:!1}" 2010 player-software-name="${(Be=t.playerSoftwareName)!=null?Be:!1}" 2011 player-software-version="${(We=t.playerSoftwareVersion)!=null?We:!1}" 2012 env-key="${(he=t.envKey)!=null?he:!1}" 2013 custom-domain="${(Oe=t.customDomain)!=null?Oe:!1}" 2014 src="${t.src?t.src:t.playbackId?El(t):!1}" 2015 cast-src="${t.src?t.src:t.playbackId?El(t):!1}" 2016 cast-receiver="${(gt=t.castReceiver)!=null?gt:!1}" 2017 drm-token="${(lt=(Ne=t.tokens)==null?void 0:Ne.drm)!=null?lt:!1}" 2018 exportparts="video" 2019 disable-pseudo-ended="${(Fe=t.disablePseudoEnded)!=null?Fe:!1}" 2020 > 2021 ${t.storyboard?Ps`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:Ps``} 2022 <slot></slot> 2023 </mux-video> 2024 <slot name="poster" slot="poster"> 2025 <media-poster-image 2026 part="poster" 2027 exportparts="poster, img" 2028 src="${t.poster?t.poster:!1}" 2029 placeholdersrc="${(Ae=t.placeholder)!=null?Ae:!1}" 2030 ></media-poster-image> 2031 </slot> 2032 </media-theme> 2033`},Wv=t=>t.charAt(0).toUpperCase()+t.slice(1),ST=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Wv((i=t.errorCategory)!=null?i:"video"),n=bo((a=t.errorCategory)!=null?a:te.VIDEO);if(t.muxCode===x.NETWORK_OFFLINE)return D("Your device appears to be offline",e);if(t.muxCode===x.NETWORK_TOKEN_EXPIRED)return D("{category} URL has expired",e).format({category:r});if([x.NETWORK_TOKEN_SUB_MISMATCH,x.NETWORK_TOKEN_AUD_MISMATCH,x.NETWORK_TOKEN_AUD_MISSING,x.NETWORK_TOKEN_MALFORMED].includes(t.muxCode))return D("{category} URL is formatted incorrectly",e).format({category:r});if(t.muxCode===x.NETWORK_TOKEN_MISSING)return D("Invalid {categoryName} URL",e).format({categoryName:n});if(t.muxCode===x.NETWORK_NOT_FOUND)return D("{category} does not exist",e).format({category:r});if(t.muxCode===x.NETWORK_NOT_READY){let s=t.streamType==="live"?"Live stream":"Video";return D("{mediaType} is not currently available",e).format({mediaType:s})}}if(t.code){if(t.code===I.MEDIA_ERR_NETWORK)return D("Network Error",e);if(t.code===I.MEDIA_ERR_DECODE)return D("Media Error",e);if(t.code===I.MEDIA_ERR_SRC_NOT_SUPPORTED)return D("Source Not Supported",e)}return D("Error",e)},wT=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Wv((i=t.errorCategory)!=null?i:"video"),n=bo((a=t.errorCategory)!=null?a:te.VIDEO);return t.muxCode===x.NETWORK_OFFLINE?D("Check your internet connection and try reloading this video.",e):t.muxCode===x.NETWORK_TOKEN_EXPIRED?D("The video’s secured {tokenNamePrefix}-token has expired.",e).format({tokenNamePrefix:n}):t.muxCode===x.NETWORK_TOKEN_SUB_MISMATCH?D("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",e).format({tokenNamePrefix:n}):t.muxCode===x.NETWORK_TOKEN_MALFORMED?D("{category} URL is formatted incorrectly",e).format({category:r}):[x.NETWORK_TOKEN_AUD_MISMATCH,x.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode)?D("The {tokenNamePrefix}-token is formatted with incorrect information.",e).format({tokenNamePrefix:n}):[x.NETWORK_TOKEN_MISSING,x.NETWORK_INVALID_URL].includes(t.muxCode)?D("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",e).format({tokenNamePrefix:n}):t.muxCode===x.NETWORK_NOT_FOUND?"":t.message}return t.code&&(t.code===I.MEDIA_ERR_NETWORK||t.code===I.MEDIA_ERR_DECODE||(t.code,I.MEDIA_ERR_SRC_NOT_SUPPORTED)),t.message}
vendor: 921 bytes, line 2033
2033,IT=(t,e=!1)=>{let i=ST(t,e).toString(),a=wT(t,e).toString();return{title:i,message:a}},RT=t=>{if(t.muxCode){if(t.muxCode===x.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(t.muxCode===x.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([x.NETWORK_TOKEN_AUD_MISMATCH,x.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode))return"403-incorrect-aud-value.md";if(t.muxCode===x.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(t.muxCode===x.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(t.muxCode===x.NETWORK_NOT_FOUND)return"404-not-found.md";if(t.muxCode===x.NETWORK_NOT_READY)return"412-not-playable.md"}if(t.code){if(t.code===I.MEDIA_ERR_NETWORK)return"";if(t.code===I.MEDIA_ERR_DECODE)return"media-decode-error.md";if(t.code===I.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""},Rh=(t,e)=>{let i=RT(t);return{message:t.message,context:t.context,file:i}},CT
vendor: 8,830 bytes, lines 2033-2333
2033=`<template id="media-theme-gerwig"> 2034 <style> 2035 @keyframes pre-play-hide { 2036 0% { 2037 transform: scale(1); 2038 opacity: 1; 2039 } 2040 2041 30% { 2042 transform: scale(0.7); 2043 } 2044 2045 100% { 2046 transform: scale(1.5); 2047 opacity: 0; 2048 } 2049 } 2050 2051 :host { 2052 --_primary-color: var(--media-primary-color, #fff); 2053 --_secondary-color: var(--media-secondary-color, transparent); 2054 --_accent-color: var(--media-accent-color, #fa50b5); 2055 --_text-color: var(--media-text-color, #000); 2056 2057 --media-icon-color: var(--_primary-color); 2058 --media-control-background: var(--_secondary-color); 2059 --media-control-hover-background: var(--_accent-color); 2060 --media-time-buffered-color: rgba(255, 255, 255, 0.4); 2061 --media-preview-time-text-shadow: none; 2062 --media-control-height: 14px; 2063 --media-control-padding: 6px; 2064 --media-tooltip-container-margin: 6px; 2065 --media-tooltip-distance: 18px; 2066 2067 color: var(--_primary-color); 2068 display: inline-block; 2069 width: 100%; 2070 height: 100%; 2071 } 2072 2073 :host([audio]) { 2074 --_secondary-color: var(--media-secondary-color, black); 2075 --media-preview-time-text-shadow: none; 2076 } 2077 2078 :host([audio]) ::slotted([slot='media']) { 2079 height: 0px; 2080 } 2081 2082 :host([audio]) media-loading-indicator { 2083 display: none; 2084 } 2085 2086 :host([audio]) media-controller { 2087 background: transparent; 2088 } 2089 2090 :host([audio]) media-controller::part(vertical-layer) { 2091 background: transparent; 2092 } 2093 2094 :host([audio]) media-control-bar { 2095 width: 100%; 2096 background-color: var(--media-control-background); 2097 } 2098 2099 /* 2100 * 0.433s is the transition duration for VTT Regions. 2101 * Borrowed here, so the captions don't move too fast. 2102 */ 2103 media-controller { 2104 --media-webkit-text-track-transform: translateY(0) scale(0.98); 2105 --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s; 2106 } 2107 media-controller:is([mediapaused], :not([userinactive])) { 2108 --media-webkit-text-track-transform: translateY(-50px) scale(0.98); 2109 --media-webkit-text-track-transition: transform 0.15s ease; 2110 } 2111 2112 /* 2113 * CSS specific to iOS devices. 2114 * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757 2115 */ 2116 @supports (-webkit-touch-callout: none) { 2117 /* Disable subtitle adjusting for iOS Safari */ 2118 media-controller[mediaisfullscreen] { 2119 --media-webkit-text-track-transform: unset; 2120 --media-webkit-text-track-transition: unset; 2121 } 2122 } 2123 2124 media-time-range { 2125 --media-box-padding-left: 6px; 2126 --media-box-padding-right: 6px; 2127 --media-range-bar-color: var(--_accent-color); 2128 --media-time-range-buffered-color: var(--_primary-color); 2129 --media-range-track-color: transparent; 2130 --media-range-track-background: rgba(255, 255, 255, 0.4); 2131 --media-range-thumb-background: radial-gradient( 2132 circle, 2133 #000 0%, 2134 #000 25%, 2135 var(--_accent-color) 25%, 2136 var(--_accent-color) 2137 ); 2138 --media-range-thumb-width: 12px; 2139 --media-range-thumb-height: 12px; 2140 --media-range-thumb-transform: scale(0); 2141 --media-range-thumb-transition: transform 0.3s; 2142 --media-range-thumb-opacity: 1; 2143 --media-preview-background: var(--_primary-color); 2144 --media-box-arrow-background: var(--_primary-color); 2145 --media-preview-thumbnail-border: 5px solid var(--_primary-color); 2146 --media-preview-border-radius: 5px; 2147 --media-text-color: var(--_text-color); 2148 --media-control-hover-background: transparent; 2149 --media-preview-chapter-text-shadow: none; 2150 color: var(--_accent-color); 2151 padding: 0 6px; 2152 } 2153 2154 :host([audio]) media-time-range { 2155 --media-preview-time-padding: 1.5px 6px; 2156 --media-preview-box-margin: 0 0 -5px; 2157 } 2158 2159 media-time-range:hover { 2160 --media-range-thumb-transform: scale(1); 2161 } 2162 2163 media-preview-thumbnail { 2164 border-bottom-width: 0; 2165 } 2166 2167 [part~='menu'] { 2168 border-radius: 2px; 2169 border: 1px solid rgba(0, 0, 0, 0.1); 2170 bottom: 50px; 2171 padding: 2.5px 10px; 2172 } 2173 2174 [part~='menu']::part(indicator) { 2175 fill: var(--_accent-color); 2176 } 2177 2178 [part~='menu']::part(menu-item) { 2179 box-sizing: border-box; 2180 display: flex; 2181 align-items: center; 2182 padding: 6px 10px; 2183 min-height: 34px; 2184 } 2185 2186 [part~='menu']::part(checked) { 2187 font-weight: 700; 2188 } 2189 2190 media-captions-menu, 2191 media-rendition-menu, 2192 media-audio-track-menu, 2193 media-playback-rate-menu { 2194 position: absolute; /* ensure they don't take up space in DOM on load */ 2195 --media-menu-background: var(--_primary-color); 2196 --media-menu-item-checked-background: transparent; 2197 --media-text-color: var(--_text-color); 2198 --media-menu-item-hover-background: transparent; 2199 --media-menu-item-hover-outline: var(--_accent-color) solid 1px; 2200 } 2201 2202 media-rendition-menu { 2203 min-width: 140px; 2204 } 2205 2206 /* The icon is a circle so make it 16px high instead of 14px for more balance. */ 2207 media-audio-track-menu-button { 2208 --media-control-padding: 5px; 2209 --media-control-height: 16px; 2210 } 2211 2212 media-playback-rate-menu-button { 2213 --media-control-padding: 6px 3px; 2214 min-width: 4.4ch; 2215 } 2216 2217 media-playback-rate-menu { 2218 --media-menu-flex-direction: row; 2219 --media-menu-item-checked-background: var(--_accent-color); 2220 --media-menu-item-checked-indicator-display: none; 2221 margin-right: 6px; 2222 padding: 0; 2223 --media-menu-gap: 0.25em; 2224 } 2225 2226 media-playback-rate-menu[part~='menu']::part(menu-item) { 2227 padding: 6px 6px 6px 8px; 2228 } 2229 2230 media-playback-rate-menu[part~='menu']::part(checked) { 2231 color: #fff; 2232 } 2233 2234 :host(:not([audio])) media-time-range { 2235 /* Adding px is required here for calc() */ 2236 --media-range-padding: 0px; 2237 background: transparent; 2238 z-index: 10; 2239 height: 10px; 2240 bottom: -3px; 2241 width: 100%; 2242 } 2243 2244 media-control-bar :is([role='button'], [role='switch'], button) { 2245 line-height: 0; 2246 } 2247 2248 media-control-bar :is([part*='button'], [part*='range'], [part*='display']) { 2249 border-radius: 3px; 2250 } 2251 2252 .spacer { 2253 flex-grow: 1; 2254 background-color: var(--media-control-background, rgba(20, 20, 30, 0.7)); 2255 } 2256 2257 media-control-bar[slot~='top-chrome'] { 2258 min-height: 42px; 2259 pointer-events: none; 2260 } 2261 2262 media-control-bar { 2263 --gradient-steps: 2264 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%, 2265 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%, 2266 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%, 2267 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%; 2268 } 2269 2270 :host([title]) media-control-bar[slot='top-chrome']::before, 2271 :host([videotitle]) media-control-bar[slot='top-chrome']::before { 2272 content: ''; 2273 position: absolute; 2274 width: 100%; 2275 padding-bottom: min(100px, 25%); 2276 background: linear-gradient(to top, var(--gradient-steps)); 2277 opacity: 0.8; 2278 pointer-events: none; 2279 } 2280 2281 :host(:not([audio])) media-control-bar[part~='bottom']::before { 2282 content: ''; 2283 position: absolute; 2284 width: 100%; 2285 bottom: 0; 2286 left: 0; 2287 padding-bottom: min(100px, 25%); 2288 background: linear-gradient(to bottom, var(--gradient-steps)); 2289 opacity: 0.8; 2290 z-index: 1; 2291 pointer-events: none; 2292 } 2293 2294 media-control-bar[part~='bottom'] > * { 2295 z-index: 20; 2296 } 2297 2298 media-control-bar[part~='bottom'] { 2299 padding: 6px 6px; 2300 } 2301 2302 media-control-bar[slot~='top-chrome'] > * { 2303 --media-control-background: transparent; 2304 --media-control-hover-background: transparent; 2305 position: relative; 2306 } 2307 2308 media-controller::part(vertical-layer) { 2309 transition: background-color 1s; 2310 } 2311 2312 media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) { 2313 background-color: var(--controls-backdrop-color, var(--controls, transparent)); 2314 transition: background-color 0.25s; 2315 } 2316 2317 .center-controls { 2318 --media-button-icon-width: 100%; 2319 --media-button-icon-height: auto; 2320 --media-tooltip-display: none; 2321 pointer-events: none; 2322 width: 100%; 2323 display: flex; 2324 flex-flow: row; 2325 align-items: center; 2326 justify-content: center; 2327 paint-order: stroke; 2328 stroke: rgba(102, 102, 102, 1); 2329 stroke-width: 0.3px; 2330 text-shadow: 2331 0 0 2px rgb(0 0 0 / 0.25), 2332 0 0 6px rgb(0 0 0 / 0.25); 2333
2333} 2334 2335 .center-controls media-play-button { 2336 --media-control-background: transparent; 2337 --media-control-hover-background: transparent; 2338 --media-control-padding: 0; 2339 width: 40px; 2340 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25))
vendor: 27,322 bytes, lines 2340-2926
2340; 2341 } 2342 2343 [breakpointsm] .center-controls media-play-button { 2344 width: 90px; 2345 height: 90px; 2346 border-radius: 50%; 2347 transition: background 0.4s; 2348 padding: 24px; 2349 --media-control-background: #000; 2350 --media-control-hover-background: var(--_accent-color); 2351 } 2352 2353 .center-controls media-seek-backward-button, 2354 .center-controls media-seek-forward-button { 2355 --media-control-background: transparent; 2356 --media-control-hover-background: transparent; 2357 padding: 0; 2358 margin: 0 20px; 2359 width: max(33px, min(8%, 40px)); 2360 text-shadow: 2361 0 0 2px rgb(0 0 0 / 0.25), 2362 0 0 6px rgb(0 0 0 / 0.25); 2363 } 2364 2365 [breakpointsm]:not([audio]) .center-controls.pre-playback { 2366 display: grid; 2367 align-items: initial; 2368 justify-content: initial; 2369 height: 100%; 2370 overflow: hidden; 2371 } 2372 2373 [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button { 2374 place-self: var(--_pre-playback-place, center); 2375 grid-area: 1 / 1; 2376 margin: 16px; 2377 } 2378 2379 /* Show and hide controls or pre-playback state */ 2380 2381 [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio]) 2382 .center-controls.pre-playback 2383 media-play-button { 2384 /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */ 2385 animation: 0.3s linear pre-play-hide; 2386 opacity: 0; 2387 pointer-events: none; 2388 } 2389 2390 .autoplay-unmute { 2391 --media-control-hover-background: transparent; 2392 width: 100%; 2393 display: flex; 2394 align-items: center; 2395 justify-content: center; 2396 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25)); 2397 } 2398 2399 .autoplay-unmute-btn { 2400 --media-control-height: 16px; 2401 border-radius: 8px; 2402 background: #000; 2403 color: var(--_primary-color); 2404 display: flex; 2405 align-items: center; 2406 padding: 8px 16px; 2407 font-size: 18px; 2408 font-weight: 500; 2409 cursor: pointer; 2410 } 2411 2412 .autoplay-unmute-btn:hover { 2413 background: var(--_accent-color); 2414 } 2415 2416 [breakpointsm] .autoplay-unmute-btn { 2417 --media-control-height: 30px; 2418 padding: 14px 24px; 2419 font-size: 26px; 2420 } 2421 2422 .autoplay-unmute-btn svg { 2423 margin: 0 6px 0 0; 2424 } 2425 2426 [breakpointsm] .autoplay-unmute-btn svg { 2427 margin: 0 10px 0 0; 2428 } 2429 2430 media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) { 2431 display: none; 2432 } 2433 2434 media-error-dialog:not([mediaerrorcode]) { 2435 opacity: 0; 2436 } 2437 2438 media-loading-indicator { 2439 --media-loading-icon-width: 100%; 2440 --media-button-icon-height: auto; 2441 display: var(--media-control-display, var(--media-loading-indicator-display, flex)); 2442 pointer-events: none; 2443 position: absolute; 2444 width: min(15%, 150px); 2445 flex-flow: row; 2446 align-items: center; 2447 justify-content: center; 2448 } 2449 2450 /* Intentionally don't target the div for transition but the children 2451 of the div. Prevents messing with media-chrome's autohide feature. */ 2452 media-loading-indicator + div * { 2453 transition: opacity 0.15s; 2454 opacity: 1; 2455 } 2456 2457 media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * { 2458 opacity: 0; 2459 transition-delay: 400ms; 2460 } 2461 2462 media-volume-range { 2463 width: min(100%, 100px); 2464 --media-range-padding-left: 10px; 2465 --media-range-padding-right: 10px; 2466 --media-range-thumb-width: 12px; 2467 --media-range-thumb-height: 12px; 2468 --media-range-thumb-background: radial-gradient( 2469 circle, 2470 #000 0%, 2471 #000 25%, 2472 var(--_primary-color) 25%, 2473 var(--_primary-color) 2474 ); 2475 --media-control-hover-background: none; 2476 } 2477 2478 media-time-display { 2479 white-space: nowrap; 2480 } 2481 2482 /* Generic style for explicitly disabled controls */ 2483 media-control-bar[part~='bottom'] [disabled], 2484 media-control-bar[part~='bottom'] [aria-disabled='true'] { 2485 opacity: 60%; 2486 cursor: not-allowed; 2487 } 2488 2489 media-text-display { 2490 --media-font-size: 16px; 2491 --media-control-padding: 14px; 2492 font-weight: 500; 2493 } 2494 2495 media-play-button.animated *:is(g, path) { 2496 transition: all 0.3s; 2497 } 2498 2499 media-play-button.animated[mediapaused] .pause-icon-pt1 { 2500 opacity: 0; 2501 } 2502 2503 media-play-button.animated[mediapaused] .pause-icon-pt2 { 2504 transform-origin: center center; 2505 transform: scaleY(0); 2506 } 2507 2508 media-play-button.animated[mediapaused] .play-icon { 2509 clip-path: inset(0 0 0 0); 2510 } 2511 2512 media-play-button.animated:not([mediapaused]) .play-icon { 2513 clip-path: inset(0 0 0 100%); 2514 } 2515 2516 media-seek-forward-button, 2517 media-seek-backward-button { 2518 --media-font-weight: 400; 2519 } 2520 2521 .mute-icon { 2522 display: inline-block; 2523 } 2524 2525 .mute-icon :is(path, g) { 2526 transition: opacity 0.5s; 2527 } 2528 2529 .muted { 2530 opacity: 0; 2531 } 2532 2533 media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high), 2534 media-mute-button[mediavolumelevel='medium'] :is(.volume-high) { 2535 opacity: 0; 2536 } 2537 2538 media-mute-button[mediavolumelevel='off'] .unmuted { 2539 opacity: 0; 2540 } 2541 2542 media-mute-button[mediavolumelevel='off'] .muted { 2543 opacity: 1; 2544 } 2545 2546 /** 2547 * Our defaults for these buttons are to hide them at small sizes 2548 * users can override this with CSS 2549 */ 2550 media-controller:not([breakpointsm]):not([audio]) { 2551 --bottom-play-button: none; 2552 --bottom-seek-backward-button: none; 2553 --bottom-seek-forward-button: none; 2554 --bottom-time-display: none; 2555 --bottom-playback-rate-menu-button: none; 2556 --bottom-pip-button: none; 2557 } 2558 2559 [part='mux-badge'] { 2560 position: absolute; 2561 bottom: 10px; 2562 right: 10px; 2563 z-index: 2; 2564 opacity: 0.6; 2565 transition: 2566 opacity 0.2s ease-in-out, 2567 bottom 0.2s ease-in-out; 2568 } 2569 2570 [part='mux-badge']:hover { 2571 opacity: 1; 2572 } 2573 2574 [part='mux-badge'] a { 2575 font-size: 14px; 2576 font-family: var(--_font-family); 2577 color: var(--_primary-color); 2578 text-decoration: none; 2579 display: flex; 2580 align-items: center; 2581 gap: 5px; 2582 } 2583 2584 [part='mux-badge'] .mux-badge-text { 2585 transition: opacity 0.5s ease-in-out; 2586 opacity: 0; 2587 } 2588 2589 [part='mux-badge'] .mux-badge-logo { 2590 width: 40px; 2591 height: auto; 2592 display: inline-block; 2593 } 2594 2595 [part='mux-badge'] .mux-badge-logo svg { 2596 width: 100%; 2597 height: 100%; 2598 fill: white; 2599 } 2600 2601 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'], 2602 media-controller:not([userinactive]) [part='mux-badge'], 2603 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 2604 transition: bottom 0.1s ease-in-out; 2605 } 2606 2607 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 2608 transition: bottom 0.2s ease-in-out 0.62s; 2609 } 2610 2611 media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text, 2612 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text { 2613 opacity: 1; 2614 } 2615 2616 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text { 2617 opacity: 0; 2618 } 2619 2620 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 2621 bottom: 10px; 2622 } 2623 2624 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] { 2625 bottom: 10px; 2626 } 2627 2628 media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'], 2629 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 2630 bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2); 2631 } 2632 </style> 2633 2634 <template partial="TitleDisplay"> 2635 <template if="videotitle"> 2636 <template if="videotitle != true"> 2637 <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display> 2638 </template> 2639 </template> 2640 <template if="!videotitle"> 2641 <template if="title"> 2642 <media-text-display part="top title display" class="title-display">{{title}}</media-text-display> 2643 </template> 2644 </template> 2645 </template> 2646 2647 <template partial="PlayButton"> 2648 <media-play-button 2649 part="{{section ?? 'bottom'}} play button" 2650 disabled="{{disabled}}" 2651 aria-disabled="{{disabled}}" 2652 class="animated" 2653 > 2654 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon"> 2655 <g class="play-icon"> 2656 <path 2657 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" 2658 /> 2659 </g> 2660 <g class="pause-icon"> 2661 <path 2662 class="pause-icon-pt1" 2663 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" 2664 /> 2665 <path 2666 class="pause-icon-pt2" 2667 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" 2668 /> 2669 </g> 2670 </svg> 2671 </media-play-button> 2672 </template> 2673 2674 <template partial="PrePlayButton"> 2675 <media-play-button 2676 part="{{section ?? 'center'}} play button pre-play" 2677 disabled="{{disabled}}" 2678 aria-disabled="{{disabled}}" 2679 > 2680 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)"> 2681 <path 2682 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" 2683 /> 2684 </svg> 2685 </media-play-button> 2686 </template> 2687 2688 <template partial="SeekBackwardButton"> 2689 <media-seek-backward-button 2690 seekoffset="{{backwardseekoffset}}" 2691 part="{{section ?? 'bottom'}} seek-backward button" 2692 disabled="{{disabled}}" 2693 aria-disabled="{{disabled}}" 2694 > 2695 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 2696 <path 2697 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" 2698 /> 2699 <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 2700 {{backwardseekoffset}} 2701 </text> 2702 </svg> 2703 </media-seek-backward-button> 2704 </template> 2705 2706 <template partial="SeekForwardButton"> 2707 <media-seek-forward-button 2708 seekoffset="{{forwardseekoffset}}" 2709 part="{{section ?? 'bottom'}} seek-forward button" 2710 disabled="{{disabled}}" 2711 aria-disabled="{{disabled}}" 2712 > 2713 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 2714 <g> 2715 <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 2716 {{forwardseekoffset}} 2717 </text> 2718 <path 2719 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" 2720 /> 2721 </g> 2722 </svg> 2723 </media-seek-forward-button> 2724 </template> 2725 2726 <template partial="MuteButton"> 2727 <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2728 <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true"> 2729 <g class="unmuted"> 2730 <path 2731 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" 2732 /> 2733 <path 2734 class="volume-low" 2735 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" 2736 /> 2737 <path 2738 class="volume-medium" 2739 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" 2740 /> 2741 <path 2742 class="volume-high" 2743 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" 2744 /> 2745 </g> 2746 <g class="muted"> 2747 <path 2748 fill-rule="evenodd" 2749 clip-rule="evenodd" 2750 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" 2751 /> 2752 <path 2753 fill-rule="evenodd" 2754 clip-rule="evenodd" 2755 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" 2756 /> 2757 </g> 2758 </svg> 2759 </media-mute-button> 2760 </template> 2761 2762 <template partial="PipButton"> 2763 <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2764 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 2765 <path 2766 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" 2767 /> 2768 <path 2769 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" 2770 /> 2771 </svg> 2772 </media-pip-button> 2773 </template> 2774 2775 <template partial="CaptionsMenu"> 2776 <media-captions-menu-button part="bottom captions button"> 2777 <svg aria-hidden="true" viewBox="0 0 18 14" slot="on"> 2778 <path 2779 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" 2780 /> 2781 </svg> 2782 <svg aria-hidden="true" viewBox="0 0 18 14" slot="off"> 2783 <path 2784 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" 2785 /> 2786 <path 2787 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" 2788 /> 2789 <path 2790 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" 2791 /> 2792 </svg> 2793 </media-captions-menu-button> 2794 <media-captions-menu 2795 hidden 2796 anchor="auto" 2797 part="bottom captions menu" 2798 disabled="{{disabled}}" 2799 aria-disabled="{{disabled}}" 2800 exportparts="menu-item" 2801 > 2802 <div slot="checked-indicator"> 2803 <style> 2804 .indicator { 2805 position: relative; 2806 top: 1px; 2807 width: 0.9em; 2808 height: auto; 2809 fill: var(--_accent-color); 2810 margin-right: 5px; 2811 } 2812 2813 [aria-checked='false'] .indicator { 2814 display: none; 2815 } 2816 </style> 2817 <svg viewBox="0 0 14 18" class="indicator"> 2818 <path 2819 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" 2820 fill-rule="evenodd" 2821 /> 2822 </svg></div 2823 ></media-captions-menu> 2824 </template> 2825 2826 <template partial="AirplayButton"> 2827 <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2828 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 2829 <path 2830 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" 2831 /> 2832 <path 2833 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" 2834 /> 2835 </svg> 2836 </media-airplay-button> 2837 </template> 2838 2839 <template partial="FullscreenButton"> 2840 <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2841 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 2842 <path 2843 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" 2844 /> 2845 <path 2846 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" 2847 /> 2848 <path 2849 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" 2850 /> 2851 <path 2852 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" 2853 /> 2854 </svg> 2855 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 2856 <path 2857 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" 2858 /> 2859 <path 2860 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" 2861 /> 2862 <path 2863 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" 2864 /> 2865 <path 2866 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" 2867 /> 2868 </svg> 2869 </media-fullscreen-button> 2870 </template> 2871 2872 <template partial="CastButton"> 2873 <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2874 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 2875 <path 2876 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" 2877 /> 2878 </svg> 2879 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 2880 <path 2881 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" 2882 /> 2883 <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" /> 2884 </svg> 2885 </media-cast-button> 2886 </template> 2887 2888 <template partial="LiveButton"> 2889 <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2890 <span slot="text">Live</span> 2891 </media-live-button> 2892 </template> 2893 2894 <template partial="PlaybackRateMenu"> 2895 <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button> 2896 <media-playback-rate-menu 2897 hidden 2898 anchor="auto" 2899 rates="{{playbackrates}}" 2900 exportparts="menu-item" 2901 part="bottom playback-rate menu" 2902 disabled="{{disabled}}" 2903 aria-disabled="{{disabled}}" 2904 ></media-playback-rate-menu> 2905 </template> 2906 2907 <template partial="VolumeRange"> 2908 <media-volume-range 2909 part="bottom volume range" 2910 disabled="{{disabled}}" 2911 aria-disabled="{{disabled}}" 2912 ></media-volume-range> 2913 </template> 2914 2915 <template partial="TimeDisplay"> 2916 <media-time-display 2917 remaining="{{defaultshowremainingtime}}" 2918 showduration="{{!hideduration}}" 2919 part="bottom time display" 2920 disabled="{{disabled}}" 2921 aria-disabled="{{disabled}}" 2922 ></media-time-display> 2923 </template> 2924 2925 <template partial="TimeRange"> 2926 <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}"
2926> 2927 <media-preview-thumbnail slot="preview"></media-preview-thumbnail> 2928 <media-preview-chapter-display slot="preview"></media-preview-chapter-display> 2929 <media-preview-time-display slot="preview"></media-preview-time-display> 2930 <div slot="preview" part="arrow"></div> 2931 </media-time-range> 2932 </template> 2933 2934 <template partial="AudioTrackMenu"> 2935 <media-audio-track-menu-button part="bottom audio-track button"> 2936 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16"> 2937 <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" /> 2938 <path 2939 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" 2940 /> 2941 </svg> 2942 </media-audio-track-menu-button> 2943 <media-audio-track-menu 2944 hidden 2945 anchor="auto" 2946 part="bottom audio-track menu" 2947 disabled="{{disabled}}" 2948 aria-disabled="{{disabled}}" 2949 exportparts="menu-item" 2950 > 2951 <div slot="checked-indicator"> 2952 <style> 2953 .indicator { 2954 position: relative; 2955 top: 1px; 2956 width: 0.9em; 2957 height: auto; 2958 fill: var(--_accent-color); 2959 margin-right: 5px; 2960 } 2961 2962 [aria-checked='false'] .indicator { 2963 display: none; 2964 } 2965 </style> 2966 <svg viewBox="0 0 14 18" class="indicator"> 2967 <path 2968 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" 2969 fill-rule="evenodd" 2970 /> 2971 </svg> 2972 </div> 2973 </media-audio-track-menu> 2974 </template> 2975 2976 <template partial="RenditionMenu"> 2977 <media-rendition-menu-button part="bottom rendition button"> 2978 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14"> 2979 <path 2980 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" 2981 /> 2982 </svg> 2983 </media-rendition-menu-button> 2984 <media-rendition-menu 2985 hidden 2986 anchor="auto" 2987 part="bottom rendition menu" 2988 disabled="{{disabled}}" 2989 aria-disabled="{{disabled}}" 2990 > 2991 <div slot="checked-indicator"> 2992 <style> 2993 .indicator { 2994 position: relative; 2995 top: 1px; 2996 width: 0.9em; 2997 height: auto; 2998 fill: var(--_accent-color); 2999 margin-right: 5px; 3000 } 3001 3002 [aria-checked='false'] .indicator { 3003 opacity: 0; 3004 } 3005 </style> 3006 <svg viewBox="0 0 14 18" class="indicator"> 3007 <path 3008 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" 3009 fill-rule="evenodd" 3010 /> 3011 </svg> 3012 </div> 3013 </media-rendition-menu> 3014 </template> 3015 3016 <template partial="MuxBadge"> 3017 <div part="mux-badge"> 3018 <a href="https://www.mux.com/player" target="_blank"> 3019 <span class="mux-badge-text">Powered by</span> 3020 <div class="mux-badge-logo"> 3021 <svg
3022 viewBox="0 0 1600 500" 3023 style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2" 3024 > 3025 <g> 3026 <path 3027 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" 3028 style="fill-rule: nonzero" 3029 ></path> 3030 <path 3031 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" 3032 style="fill-rule: nonzero" 3033 ></path> 3034 <path 3035 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" 3036 style="fill-rule: nonzero" 3037 ></path> 3038 </g> 3039 </svg> 3040 </div> 3041 </a> 3042 </div> 3043 </template> 3044 3045 <media-controller 3046 part="controller" 3047 defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}" 3048 breakpoints="sm:470" 3049 gesturesdisabled="{{disabled}}" 3050 hotkeys="{{hotkeys}}" 3051 nohotkeys="{{nohotkeys}}" 3052 novolumepref="{{novolumepref}}" 3053 audio="{{audio}}" 3054 noautoseektolive="{{noautoseektolive}}" 3055 defaultsubtitles="{{defaultsubtitles}}" 3056 defaultduration="{{defaultduration ?? false}}" 3057 keyboardforwardseekoffset="{{forwardseekoffset}}" 3058 keyboardbackwardseekoffset="{{backwardseekoffset}}" 3059 exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer" 3060 style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}" 3061 > 3062 <slot name="media" slot="media"></slot> 3063 <slot name="poster" slot="poster"></slot> 3064 3065 <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator> 3066 3067 <template if="!audio"> 3068 <media-error-dialog slot="dialog" noautohide></media-error-dialog> 3069 <!-- Pre-playback UI --> 3070 <!-- same for both on-demand and live --> 3071 <div slot="centered-chrome" class="center-controls pre-playback"> 3072 <template if="!breakpointsm">{{>PlayButton section="center"}}</template> 3073 <template if="breakpointsm">{{>PrePlayButton section="center"}}</template> 3074 </div> 3075 3076 <!-- Mux Badge --> 3077 <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template> 3078 3079 <!-- Autoplay centered unmute button --> 3080 <!-- 3081 todo: figure out how show this with available state variables 3082 needs to show when: 3083 - autoplay is enabled 3084 - playback has been successful 3085 - audio is muted 3086 - in place / instead of the pre-plaback play button 3087 - not to show again after user has interacted with this button 3088 - OR user has interacted with the mute button in the control bar 3089 --> 3090 <!-- 3091 There should be a >MuteButton to the left of the "Unmute" text, but a templating bug 3092 makes it appear even if commented out in the markup, add it back when code is un-commented 3093 --> 3094 <!-- <div slot="centered-chrome" class="autoplay-unmute"> 3095 <div role="button" class="autoplay-unmute-btn">Unmute</div> 3096 </div> --> 3097 3098 <template if="streamtype == 'on-demand'"> 3099 <template if="breakpointsm"> 3100 <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar> 3101 </template> 3102 {{>TimeRange}} 3103 <media-control-bar part="control-bar bottom"> 3104 {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}} 3105 {{>VolumeRange}} 3106 <div class="spacer"></div> 3107 {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} 3108 {{>CastButton}} {{>PipButton}} {{>FullscreenButton}} 3109 </media-control-bar> 3110 </template> 3111 3112 <template if="streamtype == 'live'"> 3113 <media-control-bar part="control-bar top" slot="top-chrome"> 3114 {{>LiveButton}} 3115 <template if="breakpointsm"> {{>TitleDisplay}} </template> 3116 </media-control-bar> 3117 <template if="targetlivewindow > 0">{{>TimeRange}}</template> 3118 <media-control-bar part="control-bar bottom"> 3119 {{>PlayButton}} 3120 <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template> 3121 {{>MuteButton}} {{>VolumeRange}} 3122 <div class="spacer"></div> 3123 {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} 3124 {{>FullscreenButton}} 3125 </media-control-bar> 3126 </template> 3127 </template> 3128 3129 <template if="audio"> 3130 <template if="streamtype == 'on-demand'"> 3131 <template if="title"> 3132 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 3133 </template> 3134 <media-control-bar part="control-bar bottom"> 3135 {{>PlayButton}} 3136 <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 3137 {{>MuteButton}} 3138 <template if="breakpointsm">{{>VolumeRange}}</template> 3139 {{>TimeDisplay}} {{>TimeRange}} 3140 <template if="breakpointsm">{{>PlaybackRateMenu}}</template> 3141 {{>AirplayButton}} {{>CastButton}} 3142 </media-control-bar> 3143 </template> 3144 3145 <template if="streamtype == 'live'"> 3146 <template if="title"> 3147 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 3148 </template> 3149 <media-control-bar part="control-bar bottom"> 3150 {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}} 3151 <template if="breakpointsm"> 3152 {{>VolumeRange}} 3153 <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 3154 </template> 3155 <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template> 3156 <template if="!targetlivewindow"><div class="spacer"></div></template> 3157 {{>AirplayButton}} {{>CastButton}} 3158 </media-control-bar> 3159 </template> 3160 </template> 3161 3162 <slot></slot> 3163 </media-controller> 3164</template> 3165`,yd=Eo.createElement("template");"innerHTML"in yd&&(yd.innerHTML=CT);var Ch,Lh,Fv=class extends Oo{};Fv.template=(Lh=(Ch=yd.content)==null?void 0:Ch.children)==null?void 0:Lh[0];$t.customElements.get("media-theme-gerwig")||$t.customElements.define("media-theme-gerwig",Fv);var LT="gerwig",jt={SRC:"src",POSTER:"poster"},A={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",P
vendor: 4,663 bytes, lines 3165-3177
3165LAYBACK_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"},Td=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"];function DT(t,e){var i,a;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src||!!t.currentSrc,poster:t.poster,storyboard:t.storyboard,storyboardSrc:t.getAttribute(A.STORYBOARD_SRC),fullscreenElement:t.getAttribute(A.FULLSCREEN_ELEMENT),placeholder:t.getAttribute("placeholder"),themeTemplate:xT(t),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(A.NOHOTKEYS),hotKeys:t.getAttribute(A.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,preferCmcd:t.preferCmcd,debug:t.debug,disableTracking:t.disableTracking,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,maxResolution:t.maxResolution,minResolution:t.minResolution,programStartTime:t.programStartTime,programEndTime:t.programEndTime,assetStartTime:t.assetStartTime,assetEndTime:t.assetEndTime,renditionOrder:t.renditionOrder,metadata:t.metadata,playerInitTime:t.playerInitTime,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferPlayback:t.preferPlayback,audio:t.audio,defaultStreamType:t.defaultStreamType,targetLiveWindow:t.getAttribute(b.TARGET_LIVE_WINDOW),streamType:qu(t.getAttribute(b.STREAM_TYPE)),primaryColor:t.getAttribute(A.PRIMARY_COLOR),secondaryColor:t.getAttribute(A.SECONDARY_COLOR),accentColor:t.getAttribute(A.ACCENT_COLOR),forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultDuration:t.defaultDuration,defaultShowRemainingTime:t.defaultShowRemainingTime,hideDuration:OT(t),playbackRates:t.getAttribute(A.PLAYBACK_RATES),customDomain:(i=t.getAttribute(b.CUSTOM_DOMAIN))!=null?i:void 0,title:t.getAttribute(A.TITLE),videoTitle:(a=t.getAttribute(A.VIDEO_TITLE))!=null?a:t.getAttribute(A.TITLE),novolumepref:t.hasAttribute(A.NO_VOLUME_PREF),nomutedpref:t.hasAttribute(A.NO_MUTED_PREF),proudlyDisplayMuxBadge:t.hasAttribute(A.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:t.castReceiver,disablePseudoEnded:t.hasAttribute(A.DISABLE_PSEUDO_ENDED),...e,extraSourceParams:t.extraSourceParams}}var MT=Op.formatErrorMessage;Op.formatErrorMessage=t=>{var e,i;if(t instanceof I){let a=IT(t,!1);return` 3166 ${a!=null&&a.title?`<h3>${a.title}</h3>`:""} 3167 ${a!=null&&a.message||a!=null&&a.linkUrl?`<p> 3168 ${a?.message} 3169 ${a!=null&&a.linkUrl?`<a 3170 href="${a.linkUrl}" 3171 target="_blank" 3172 rel="external noopener" 3173 aria-label="${(e=a.linkText)!=null?e:""} ${D("(opens in a new window)")}" 3174 >${(i=a.linkText)!=null?i:a.linkUrl}</a 3175 >`:""} 3176 </p>`:""} 3177 `}return MT(t)};function xT(t){var e,i;let a=t.theme;if(a){let r=(i=(e=t.getRootNode())==null?void 0:e.getElementById)==null?void 0:i.call(e,a);if(r&&r instanceof HTMLTemplateElement)return r;a.startsWith("media-theme-")||(a=`media-theme-${a}`);let n=$t.customElements.get(a);if(n!=null&&n.template)return n.template}}function OT(t){var e;let i=(e=t.mediaController)==null?void 0:e.querySelector("media-time-display");return i&&getComputedStyle(i).getPropertyValue("--media-duration-display-display").trim()==="none"}function Dh(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")
vendor: 4,456 bytes, line 3177
3177]=r),i},e)}var NT=Object.values(b),PT=Object.values(jt),$T=Object.values(A),Mh=Pv(),xh="mux-player",Oh={isDialogOpen:!1},UT={redundant_streams:!0},$s,Us,Hs,$i,Bs,Wa,oe,fi,Kv,Ad,Ui,Nh,Ph,$h,Uh,HT=class extends Sh{constructor(){super(),ft(this,oe),ft(this,$s),ft(this,Us,!1),ft(this,Hs,{}),ft(this,$i,!0),ft(this,Bs,new iT(this,"hotkeys")),ft(this,Wa,{...Oh,onCloseErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&fe(this,oe,Ad).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&(Ov(this,Eo.activeElement)||t.preventDefault())}}),Ft(this,$s,Od()),this.attachShadow({mode:"open"}),fe(this,oe,Kv).call(this),this.isConnected&&fe(this,oe,fi).call(this)}static get NAME(){return xh}static get VERSION(){return Mh}static get observedAttributes(){var t;return[...(t=Sh.observedAttributes)!=null?t:[],...PT,...NT,...$T]}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=Dh(this))}attributeChangedCallback(t,e,i){switch(fe(this,oe,fi).call(this),super.attributeChangedCallback(t,e,i),t){case A.HOTKEYS:j(this,Bs).value=i;break;case A.THUMBNAIL_TIME:{i!=null&&this.tokens.thumbnail&&zt(D("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case A.THUMBNAIL_TOKEN:{if(i){let a=Oa(i);if(a){let{aud:r}=a,n=$r.THUMBNAIL;r!==n&&zt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"thumbnail"}))}}break}case A.STORYBOARD_TOKEN:{if(i){let a=Oa(i);if(a){let{aud:r}=a,n=$r.STORYBOARD;r!==n&&zt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"storyboard"}))}}break}case A.DRM_TOKEN:{if(i){let a=Oa(i);if(a){let{aud:r}=a,n=$r.DRM;r!==n&&zt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"drm"}))}}break}case b.PLAYBACK_ID:{i!=null&&i.includes("?token")&&at(D("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break}case b.STREAM_TYPE:{i&&![Q.LIVE,Q.ON_DEMAND,Q.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?Number.POSITIVE_INFINITY:0:Uv({file:"invalid-stream-type.md",message:D("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===Q.LIVE?this.getAttribute(A.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break}case A.FULLSCREEN_ELEMENT:{if(i!=null||i!==e){let a=Eo.getElementById(i),r=a?.querySelector("mux-player");this.mediaController&&a&&r&&(this.mediaController.fullscreenElement=a)}break}}[b.PLAYBACK_ID,jt.SRC,A.PLAYBACK_TOKEN].includes(t)&&e!==i&&Ft(this,Wa,{...j(this,Wa),...Oh}),fe(this,oe,Ui).call(this,{[tT(t)]:i})}async requestFullscreen(t){var e;if(!(!this.mediaController||this.mediaController.hasAttribute(u.MEDIA_IS_FULLSCREEN)))return(e=this.mediaController)==null||e.dispatchEvent(new $t.CustomEvent(R.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((i,a)=>{var r;(r=this.mediaController)==null||r.addEventListener(ii.MEDIA_IS_FULLSCREEN,()=>i(),{once:!0})})}async exitFullscreen(){var t;if(!(!this.mediaController||!this.mediaController.hasAttribute(u.MEDIA_IS_FULLSCREEN)))return(t=this.mediaController)==null||t.dispatchEvent(new $t.CustomEvent(R.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,i)=>{var a;(a=this.mediaController)==null||a.addEventListener(ii.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var t;return(t=this.getAttribute(b.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?qs.includes(t)?this.setAttribute(b.PREFER_CMCD,t):zt(`Invalid value for preferCmcd. Must be one of ${qs.join()}`):this.removeAttribute(b.PREFER_CMCD))}get hasPlayed(){var t,e;return(e=(t=this.mediaController)==null?void 0:t.hasAttribute(u.MEDIA_HAS_P
vendor: 10,296 bytes, line 3177
3177LAYED))!=null?e:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(u.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(A.THEME))!=null?t:LT}set theme(t){this.setAttribute(A.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let e={};for(let i of t.getAttributeNames()){if(Td.includes(i))continue;let a=t.getAttribute(i);e[Mv(i)]=a===""?!0:a}return e}set themeProps(t){var e,i;fe(this,oe,fi).call(this);let a={...this.themeProps,...t};for(let r in a){if(Td.includes(r))continue;let n=t?.[r];typeof n=="boolean"||n==null?(e=this.mediaTheme)==null||e.toggleAttribute(gd(r),!!n):(i=this.mediaTheme)==null||i.setAttribute(gd(r),n)}}get playbackId(){var t;return(t=this.getAttribute(b.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(b.PLAYBACK_ID,t):this.removeAttribute(b.PLAYBACK_ID)}get src(){var t,e;return this.playbackId?(t=Ci(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:i}=this;if(i.playback&&!i.thumbnail){zt("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return Xy(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(t=this.thumbnailTime)!=null?t:this.startTime,programTime:this.programStartTime,token:i.thumbnail})}set poster(t){t||t===""?this.setAttribute(jt.POSTER,t):this.removeAttribute(jt.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(A.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(A.STORYBOARD_SRC,t):this.removeAttribute(A.STORYBOARD_SRC)}get storyboard(){let{tokens:t}=this;if(this.storyboardSrc&&!t.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[Q.LIVE,Q.UNKNOWN].includes(this.streamType)||t.playback&&!t.storyboard))return Jy(this.playbackId,{customDomain:this.customDomain,token:t.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(A.AUDIO)}set audio(t){if(!t){this.removeAttribute(A.AUDIO);return}this.setAttribute(A.AUDIO,"")}get hotkeys(){return j(this,Bs)}get nohotkeys(){return this.hasAttribute(A.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(A.NOHOTKEYS);return}this.setAttribute(A.NOHOTKEYS,"")}get thumbnailTime(){return je(this.getAttribute(A.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(A.THUMBNAIL_TIME,`${t}`)}get videoTitle(){var t,e;return(e=(t=this.getAttribute(A.VIDEO_TITLE))!=null?t:this.getAttribute(A.TITLE))!=null?e:""}set videoTitle(t){t!==this.videoTitle&&(t?this.setAttribute(A.VIDEO_TITLE,t):this.removeAttribute(A.VIDEO_TITLE))}get placeholder(){var t;return(t=Ci(this,A.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(A.PLACEHOLDER,`${t}`)}get primaryColor(){var t,e;let i=this.getAttribute(A.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=$t.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_primary-color"))==null?void 0:e.trim(),i))return i}set primaryColor(t){this.setAttribute(A.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var t,e;let i=this.getAttribute(A.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=$t.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_secondary-color"))==null?void 0:e.trim(),i))return i}set secondaryColor(t){this.setAttribute(A.SECONDARY_COLOR,`${t}`)}get accentColor(){var t,e;let i=this.getAttribute(A.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=$t.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_accent-color"))==null?void 0:e.trim(),i))return i}set accentColor(t){this.setAttribute(A.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(A.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(A.PLAYBACK_RATES))return this.getAttribute(A.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,e)=>t-e)}set playbackRates(t){if(!t){this.removeAttribute(A.PLAYBACK_RATES);return}this.setAttribute(A.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=je(this.getAttribute(A.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(A.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=je(this.getAttribute(A.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(A.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(A.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return je(this.getAttribute(A.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(A.DEFAULT_DURATION):this.setAttribute(A.DEFAULT_DURATION,`${t}`)}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?je(this.getAttribute(b.PLAYER_INIT_TIME)):j(this,$s)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+t}`))}get playerSoftwareName(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_NAME))!=null?t:xh}get playerSoftwareVersion(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_VERSION))!=null?t:Mh}get beaconCollectionDomain(){var t;return(t=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(b.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(b.MAX_RESOLUTION,t):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(b.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(b.MIN_RESOLUTION,t):this.removeAttribute(b.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(b.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(b.RENDITION_ORDER,t):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){return je(this.getAttribute(b.PROGRAM_START_TIME))}set programStartTime(t){t==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${t}`)}get programEndTime(){return je(this.getAttribute(b.PROGRAM_END_TIME))}set programEndTime(t){t==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){return je(this.getAttribute(b.ASSET_START_TIME))}set assetStartTime(t){t==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${t}`)}get assetEndTime(){return je(this.getAttribute(b.ASSET_END_TIME))}set assetEndTime(t){t==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${t}`)}get extraSourceParams(){return this.hasAttribute(A.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(A.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[e,i])=>(t[e]=i,t),{}):UT}set extraSourceParams(t){t==null?this.removeAttribute(A.EXTRA_SOURCE_PARAMS):this.setAttribute(A.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(b.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(b.CUSTOM_DOMAIN,t):this.removeAttribute(b.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Ci(this,b.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(b.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(A.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(A.NO_VOLUME_PREF,""):this.removeAttribute(A.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(A.NO_MUTED_PREF)}set noMutedPref(t){t?this.setAttribute(A.NO_MUTED_PREF,""):this.removeAttribute(A.NO_MUTED_PREF)}get debug(){return Ci(this,b.DEBUG)!=null}set debug(t){t?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG)}get disableTracking(){return Ci(this,b.DISABLE_TRACKING)!=null}set disableTracking(t){this.toggleAttribute(b.DISABLE_TRACKING,!!t)}get disableCookies(){return Ci(this,b.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES)}get streamType(){var t,e,i;return(i=(e=this.getAttribute(b.STREAM_TYPE))!=null?e:(t=this.media)==null?void 0:t.streamType)!=null?i:Q.UNKNOWN}set streamType(t){this.setAttribute(b.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,e,i;return(i=(e=this.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?e:(t=this.mediaController)==null?void 0:t.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?i:Q.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(A.DEFAULT_STREAM_TYPE,t):this.removeAttribute(A.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,e;return this.hasAttribute(A.TARGET_LIVE_WINDOW)?+this.getAttribute(A.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(A.TARGET_LIVE_WINDOW):this.setAttribute(A.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return je(Ci(this,b.START_TIME))}set startTime(t){this.setAttribute(b.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(b.PREFER_PLAYBACK);if(t===Ut.MSE||t===Ut.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===Ut.MSE||t===Ut.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,t):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(fe(this,oe,fi).call(this),!this.media){at("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Dh(this),...t}}
vendor: 4,881 bytes, line 3177
3177get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(fe(this,oe,fi).call(this),!this.media){at("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=t}async addCuePoints(t){var e;if(fe(this,oe,fi).call(this),!this.media){at("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(e=this.media)==null?void 0:e.addCuePoints(t)}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,oe,fi).call(this),!this.media){at("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(e=this.media)==null?void 0:e.addChapters(t)}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(A.PLAYBACK_TOKEN),e=this.getAttribute(A.DRM_TOKEN),i=this.getAttribute(A.THUMBNAIL_TOKEN),a=this.getAttribute(A.STORYBOARD_TOKEN);return{...j(this,Hs),...t!=null?{playback:t}:{},...e!=null?{drm:e}:{},...i!=null?{thumbnail:i}:{},...a!=null?{storyboard:a}:{}}}set tokens(t){Ft(this,Hs,t??{})}get playbackToken(){var t;return(t=this.getAttribute(A.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(A.PLAYBACK_TOKEN,`${t}`)}get drmToken(){var t;return(t=this.getAttribute(A.DRM_TOKEN))!=null?t:void 0}set drmToken(t){this.setAttribute(A.DRM_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(A.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(A.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(A.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(A.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,e,i,a){var r;let n=(r=this.media)==null?void 0:r.nativeEl;if(n)return Ld(n,t,e,i,a)}removeTextTrack(t){var e;let i=(e=this.media)==null?void 0:e.nativeEl;if(i)return W_(i,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}get castReceiver(){var t;return(t=this.getAttribute(A.CAST_RECEIVER))!=null?t:void 0}set castReceiver(t){t!==this.castReceiver&&(t?this.setAttribute(A.CAST_RECEIVER,t):this.removeAttribute(A.CAST_RECEIVER))}get castCustomData(){var t;return(t=this.media)==null?void 0:t.castCustomData}set castCustomData(t){if(!this.media){at("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=t}get noTooltips(){return this.hasAttribute(A.NO_TOOLTIPS)}set noTooltips(t){if(!t){this.removeAttribute(A.NO_TOOLTIPS);return}this.setAttribute(A.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(t){t?this.setAttribute(A.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}};$s=new WeakMap,Us=new WeakMap,Hs=new WeakMap,$i=new WeakMap,Bs=new WeakMap,Wa=new WeakMap,oe=new WeakSet,fi=function(){var t,e,i,a;if(!j(this,Us)){Ft(this,Us,!0),fe(this,oe,Ui).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof $t.HTMLElement))throw""}catch{at("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{at("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof u0))throw""}catch{at("<media-controller> failed to upgrade!")}fe(this,oe,Nh).call(this),fe(this,oe,Ph).call(this),fe(this,oe,$h).call(this),Ft(this,$i,(e=(t=this.mediaController)==null?void 0:t.hasAttribute(M.USER_INACTIVE))!=null?e:!0),fe(this,oe,Uh).call(this),(i=this.media)==null||i.addEventListener("streamtypechange",()=>fe(this,oe,Ui).call(this)),(a=this.media)==null||a.addEventListener("loadstart",()=>fe(this,oe,Ui).call(this))}},Kv=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{}},Ad=function(t){Object.assign(j(this,Wa),t),fe(this,oe,Ui).call(this)},Ui=function(t={}){_T(gT(DT(this,{...j(this,Wa),...t})),this.shadowRoot)},Nh=function(){let t=e=>{var i,a;if(!(e!=null&&e.startsWith("theme-")))return;let r=e.replace(/^theme-/,"");if(Td.includes(r))return;let n=this.getAttribute(e);n!=null?(i=this.mediaTheme)==null||i.setAttribute(r,n):(a=this.mediaTheme)==null||a.removeAttribute(r)};new MutationObserver(e=>{for(let{attributeName:i}of e)t(i)}).observe(this,{attributes:!0}
3177),this.getAttributeNames().forEach(t)},Ph=function(){let t=e=>{var i;let a=(i=this.media)==null?void 0:i.error;if(!(a instanceof I)){let{message:n,code:s}=a??{};a=new I(n,s)}if(!(a!=null&&a.fatal)){zt(a),a.data&&zt(`${a.name} data:`,a.data);return}let r=Rh(a);r.message&&Uv(r),at(a),a.data&&at(`${a.name} data:`,a.data),fe(this,oe,Ad).call(this,{isDialogOpen:!0})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(e={})=>{var i,a,r;if(!(((i=this.media)==null?void 0:i.error)instanceof I))return e;let n=Rh((a=this.media)==null?void 0:a.error);return{player_error_code:(r=this.media)==null?void 0:r.error.code,player_error_message:n.message?String(n.message):e.player_error_message,player_error_context:n.context?String(n.context):e.player_error_context}})},$h=function(){var t,e,i,a;let r=()=>fe(this,oe,Ui).call(this);(e=(t=this.media)==null?void 0:t.textTracks)==null||e.addEventListener("addtrack",r),(a=(i=this.media)==null?void 0:i.textTracks)==null||a.addEventListener("removetrack",r)},Uh=function(){var t,e;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===Q.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(l,d,m=!1)=>{r()||Array.from(l&&l.activeCues||[]).forEach(p=>{if(!(!p.snapToLines||p.line<-5||p.line>=0&&p.line<10))if(!d||this.paused){let h=p.text.split(` 3178`).length,c=-3;this.streamType===Q.LIVE&&(c=-2);let v=c-h;if(p.line===v&&!m)return;a.has(p)||a.set(p,p.line),p.line=v}else setTimeout(()=>{p.line=a.get(p)||"auto"},500)})},s=()=>{var l,d;n(i,(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!1)},o=()=>{var l,d;let m=Array.from(((d=(l=this.mediaController)==null?void 0:l.media)==null?void 0:d.textTracks)||[]).filter(p=>["subtitles","captions"].includes(p.kind)&&p.mode==="showing")[0];m!==i&&i?.removeEventListener("cuechange",s),i=m,i?.addEventListener("cuechange",s),n(i,j(this,$i))};o(),(t=this.textTracks)==null||t.addEventListener("change",o),(e=this.textTracks)==null||e.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var l,d;let m=(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!0;j(this,$i)!==m&&(Ft(this,$i,m),n(i,j(this,$i)))})};function Ci(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Hh=HT,Vv=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends Vv{}globalThis.DocumentFragment=t}var BT=class extends Vv{},WT={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(BT)}},FT={customElements:WT},KT=typeof window>"u"||typeof globalThis.customElements>"u",ll=KT?FT:globalThis;ll.customElements.get("mux-player")||(ll.customElements.define("mux-player",Hh),ll.MuxPlayerElement=Hh);var qv=parseInt(qr.version)>=19,Bh={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},VT=t=>t==null,qT=(t,e)=>VT(e)?!1:t in e,YT=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),GT=(t,e)=>{if(!(!qv&&typeof e=="boolean"&&!e)){if(qT(t,Bh))return Bh[t];if(typeof e<"u")return/[A-Z]/.test(t)?YT(t):t}},QT=(t,e)=>!qv&&typeof t=="boolean"?"":t,jT=(t={})=>{let{ref:e,...i}=t;return Object.entries(i).reduce((a,[r,n])=>{let s=GT(r,n);if(!s)return a;let o=QT(n);return a[s]=o,a},{})};function Wh(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function ZT(...t){return e=>{let i=!1,a=t.map(r=>{let n=Wh(r,e);return!i&&typeof n=="function"&&(i=!0),n});if(i)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():Wh(t[r],null)}}}}function zT(...t){return Yr.useCallback(ZT(...t),t)}var XT=Object.prototype.hasOwnProperty,JT=(t,e)=>{if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.some((r,n)=>e[n]===r);let i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(let r=0;r<i.length;r++)if(!XT.call(e,i[r])||!Object.is(t[i[r]],e[i[r]]))return!1;return!0},Yv=(t,e,i)=>!JT(e,t[i]),eA=(t,e,i)=>{t[i]=e},tA=(t,e,i,a=eA,r=Yv)=>Yr.useEffect(()=>{let n=i?.current;n&&r(n,e,t)&&a(n,e,t)},[i?.current,e]),kt=tA,iA=()=>{try{return"3.8.0"}catch{}return"UNKNOWN"},aA=iA(),rA=()=>aA,ne=(t,e,i)=>Yr.useEffect(()=>{let a=e?.current;if(!a||!i)return;let r=t,n=i;return a.addEventListener(r,n),()=>{a.removeEventListener(r,n)}},[e?.current,i,t]),nA=qr.forwardRef(({children:t,...e},i)=>qr.createElement("mux-player",{suppressHydrationWarning:!0,...jT(e),ref:i}
3178,t)),sA=(t,e)=>{let{onAbort:i,onCanPlay:a,onCanPlayThrough:r,onEmptied:n,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:m,onVolumeChange:p,onRateChange:h,onResize:c,onWaiting:v,onPlay:g,onPlaying:_,onTimeUpdate:y,onPause:T,onSeeking:E,onSeeked:k,onStalled:L,onSuspend:O,onEnded:H,onError:Y,onCuePointChange:X,onChapterChange:K,metadata:P,tokens:De,paused:Be,playbackId:We,playbackRates:he,currentTime:Oe,themeProps:gt,extraSourceParams:Ne,castCustomData:lt,_hlsConfig:Fe,...Ae}=e;return kt("tokens",De,t),kt("playbackId",We,t),kt("playbackRates",he,t),kt("metadata",P,t),kt("extraSourceParams",Ne,t),kt("_hlsConfig",Fe,t),kt("themeProps",gt,t),kt("castCustomData",lt,t),kt("paused",Be,t,(Ke,Xe)=>{Xe!=null&&(Xe?Ke.pause():Ke.play())},(Ke,Xe,ia)=>Ke.hasAttribute("autoplay")&&!Ke.hasPlayed?!1:Yv(Ke,Xe,ia)),kt("currentTime",Oe,t,(Ke,Xe)=>{Xe!=null&&(Ke.currentTime=Xe)}),ne("abort",t,i),ne("canplay",t,a),ne("canplaythrough",t,r),ne("emptied",t,n),ne("loadstart",t,s),ne("loadeddata",t,o),ne("loadedmetadata",t,l),ne("progress",t,d),ne("durationchange",t,m),ne("volumechange",t,p),ne("ratechange",t,h),ne("resize",t,c),ne("waiting",t,v),ne("play",t,g),ne("playing",t,_),ne("timeupdate",t,y),ne("pause",t,T),ne("seeking",t,E),ne("seeked",t,k),ne("stalled",t,L),ne("suspend",t,O),ne("ended",t,H),ne("error",t,Y),ne("cuepointchange",t,X),ne("chapterchange",t,K),[Ae]},oA=rA(),lA="mux-player-react",dA=qr.forwardRef((t,e)=>{var i;let a=Yr.useRef(null),r=zT(a,e),[n]=sA(a,t),[s]=Yr.useState((i=t.playerInitTime)!=null?i:Od());return qr.createElement(nA,{ref:r,defaultHiddenCaptions:t.defaultHiddenCaptions,playerSoftwareName:lA,playerSoftwareVersion:oA,playerInitTime:s,...n})}),DA=dA;export{pA as MaxResolution,I as MediaError,vA as MinResolution,fA as RenditionOrder,DA as default,Od as generatePlayerInitTime,lA as playerSoftwareName,oA as playerSoftwareVersion}; 3179//# sourceMappingURL=index-D0IsyRmy.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.