PageSourceSearch

https://eduwo.ch/_next/static/chunks/reactPlayerMux.d74242d2f1843551.js

js eduwo.ch collected 2026-10-02 04:12:49 UTC 502,768 bytes, 3,282 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2723],{11997:(e,t,i)=>{let a,r,n;i.r(t),i.d(t,{MaxResolution:()=>tG,MediaError:()=>tB,MinResolution:()=>tj,RenditionOrder:()=>tQ,default:()=>vb,generatePlayerInitTime:()=>iY,playerSoftwareName:()=>vE,playerSoftwareVersion:()=>vv});var s=i(97867),o=Object.create,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,c=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,m=function(e,t){return function(){return e&&(t=e(e=0)),t}},p=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},E=function(e,t,i,a){if(t&&"object"==typeof t||"function"==typeof t)for(var r,n=u(t),s=0,o=n.length;s<o;s++)r=n[s],h.call(e,r)||r===i||l(e,r,{get:(function(e){return t[e]}).bind(null,r),enumerable:!(a=d(t,r))||a.enumerable});return e},b=function(e,t,i){return i=null!=e?o(c(e)):{},E(!t&&e&&e.__esModule?i:l(i,"default",{value:e,enumerable:!0}),e)},g=p(function(e,t){t.exports="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}});function f(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):f(e,t)}var _=m(function(){_()});function y(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var T=m(function(){}),A=p(function(e,t){var i=Array.prototype.slice;t.exports=function(e,t){for(("length"in e)||(e=[e]),e=i.call(e);e.length;){var a=e.shift(),r=t(a);if(r)return r;a.childNodes&&a.childNodes.length&&(e=i.call(a.childNodes).concat(e))}}}),k=p(function(e,t){function i(e,t){if(!f(this,i))return new i(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}_(),t.exports=i,i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),w=p(function(e,t){function i(e,t){if(!f(this,i))return new i(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}_(),t.exports=i,i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(e,t,i){var a=this.data,r=a.substring(0,e),n=a.substring(e+t,a.length);this.data=r+i+n,this.length=this.data.length}}),S=p(function(e,t){t.exports=function(e){var t=this,i=e.type;e.target||(e.target=t),t.listeners||(t.listeners={});var a=t.listeners[i];if(a)return a.forEach(function(i){e.currentTarget=t,"function"==typeof i?i(e):i.handleEvent(e)});t.parentNode&&t.parentNode.dispatchEvent(e)}}),I=p(function(e,t){t.exports=function(e,t){this.listeners||(this.listeners={}),this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}}),R=p(function(e,t){t.exports=function(e,t){if(this.listeners&&this.listeners[e]){var i=this.listeners[e],a=i.indexOf(t);-1!==a&&i.splice(a,1)}}}),D=p(function(e,t){T(),t.exports=function e(t){switch(t.nodeType){case 3:return r(t.data);case 8:return"\x3c!--"+t.data+"--\x3e";default:var n,s,o;return s=[],o=(n=t).tagName,"http://www.w3.org/1999/xhtml"===n.namespaceURI&&(o=o.toLowerCase()),s.push("<"+o+function(e){var t=[];for(var i in e)(function(e,t){var i=y(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===i||"boolean"===i||"number"===i)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t})(e,i)&&t.push({name:i,value:e[i]});for(var r in e._attributes)for(var n in e._attributes[r]){var s=e._attributes[r][n],o=(s.prefix?s.prefix+":":"")+n;t.push({name:o,value:s.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?a(t):""}(n)+function(e){var t=e.dataset,i=[];for(var r in t)i.push({name:"data-"+r,value:t[r]});return i.length?a(i):""}(n)),i.indexOf(o)>-1?s.push(" />"):(s.push(">"),n.childNodes.length?s.push.apply(s,n.childNodes.map(e)):n.textContent||n.innerText?s.push(r(n.textContent||n.innerText)):n.innerHTML&&s.push(n.innerHTML),s.push("</"+o+">")),s.join("")}};var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function a(e){var t=[];return e.forEach(function(e){var i=e.name,a=e.value;"style"===i&&(a=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach(function(i){var a=e[i];i=i.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),t+=i+":"+a+";"}),t}(a)),t.push(i+'="'+r(a).replace(/"/g,"&quot;")+'"')}),t.length?" "+t.join(" "):""}function r(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}),C=p(function(e,t){_();var i=A(),a=S(),r=I(),n=R(),s=D(),o="http://www.w3.org/1999/xhtml";function l(e,t,i){if(!f(this,l))return new l(e);var a=void 0===i?o:i||null;this.tagName=a===o?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=a,this._attributes={}
1,"INPUT"===this.tagName&&(this.type="text")}t.exports=l,l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},l.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[i]=e,e.parentNode=this,t},l.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},l.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=null==t?-1:this.childNodes.indexOf(t);return i>-1?this.childNodes.splice(i,0,e):this.childNodes.push(e),e.parentNode=this,e},l.prototype.setAttributeNS=function(e,t,i){var a=null,r=t,n=t.indexOf(":");(n>-1&&(a=t.substr(0,n),r=t.substr(n+1)),"INPUT"===this.tagName&&"type"===t)?this.type=i:(this._attributes[e]||(this._attributes[e]={}))[r]={value:i,prefix:a}},l.prototype.getAttributeNS=function(e,t){var i=this._attributes[e],a=i&&i[t]&&i[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof a?null:a},l.prototype.removeAttributeNS=function(e,t){var i=this._attributes[e];i&&delete i[t]},l.prototype.hasAttributeNS=function(e,t){var i=this._attributes[e];return!!i&&t in i},l.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},l.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},l.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},l.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},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(e){var t=e.split(" "),a=[];return i(this,function(e){if(1===e.nodeType){var i=(e.className||"").split(" ");t.every(function(e){return -1!==i.indexOf(e)})&&a.push(e)}}),a},l.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return i(this.childNodes,function(i){1===i.nodeType&&("*"===e||i.tagName.toLowerCase()===e)&&t.push(i)}),t},l.prototype.contains=function(e){return i(this,function(t){return e===t})||!1}}),L=p(function(e,t){_();var i=C();function a(e){if(!f(this,a))return new a;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}t.exports=a,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(e){return String(e)}).join("")}}),M=p(function(e,t){function i(e){}t.exports=i,i.prototype.initEvent=function(e,t,i){this.type=e,this.bubbles=t,this.cancelable=i},i.prototype.preventDefault=function(){}}),O=p(function(e,t){_();var i=A(),a=k(),r=w(),n=C(),s=L(),o=M(),l=S(),d=I(),u=R();function c(){if(!f(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}t.exports=c;var h=c.prototype;h.createTextNode=function(e){return new r(e,this)},h.createElementNS=function(e,t){return new n(t,this,null===e?null:String(e))},h.createElement=function(e){return new n(e,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(e){return new o(e)},h.createComment=function(e){return new a(e,this)},h.getElementById=function(e){return e=String(e),i(this.childNodes,function(t){if(String(t.id)===e)return t})||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=u,h.addEventListener=d,h.dispatchEvent=l}),x=p(function(e,t){t.exports=new(O())}),N=p(function(e,t){var i,a="undefined"!=typeof global?global:"undefined"!=typeof window?window:{},r=x();"undefined"!=typeof document?i=document:(i=a["__GLOBAL_DOCUMENT_CACHE@4"])||(i=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exp
1orts=i});function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function U(e,t){if(e){if("string"==typeof e)return P(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return P(e,t)}}function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a,r,n=[],s=!0,o=!1;try{for(i=i.call(e);!(s=(a=i.next()).done)&&(n.push(a.value),!(t&&n.length===t));s=!0);}catch(e){o=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(o)throw r}}return n}}(e,t)||U(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H=b(g()),W=b(g()),V=b(g()),F={now:function(){var e=V.default.performance,t=e&&e.timing,i=t&&t.navigationStart;return Math.round("number"==typeof i&&"function"==typeof e.now?i+e.now():Date.now())}},$=function(){if("function"==typeof(null==(e=W.default.crypto)?void 0:e.getRandomValues)){i=new Uint8Array(32),W.default.crypto.getRandomValues(i);for(var e,t,i,a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=16*Math.random()|0}var n=0;t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t="x"===e?i[n]:3&i[n]|8;return n++,t.toString(16)});var s=F.now(),o=null==s?void 0:s.toString(16).substring(3);return o?t.substring(0,28)+o:t},K=function(){return("000000"+(0x81bf1000*Math.random()|0).toString(36)).slice(-6)},q=function(e){var t;if(e&&void 0!==e.nodeName)return e.muxId||(e.muxId=K()),e.muxId;try{t=document.querySelector(e)}catch(e){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},Y=function(e){e&&void 0!==e.nodeName?e=q(t=e):t=document.querySelector(e);var t,i=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,i]};function G(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||U(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var j={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},Q=function(e){var t,i,a,r,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,o=e?[console,e]:[console],l=(t=console.trace).bind.apply(t,G(o)),d=(i=console.info).bind.apply(i,G(o)),u=(a=console.debug).bind.apply(a,G(o)),c=(r=console.warn).bind.apply(r,G(o)),h=(n=console.error).bind.apply(n,G(o)),m=s;return{trace:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>j.TRACE))return l.apply(void 0,G(t))},debug:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>j.DEBUG))return u.apply(void 0,G(t))},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>j.INFO))return d.apply(void 0,G(t))},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>j.WARN))return c.apply(void 0,G(t))},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>j.ERROR))return h.apply(void 0,G(t))},get level(){return m},set level(v){v!==this.level&&(m=null!=v?v:s)}}}("[mux]"),Z=b(g());function z(){return"1"===(Z.default.doNotTrack||Z.default.navigator&&Z.default.navigator.doNotTrack)}function X(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(e,t){if(!f(e,t))throw TypeError("Cannot call a class as a function")}function ee(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function et(e,t,i){return t&&ee(e.prototype,t),i&&ee(e,i),e}function ei(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}
1function ea(e){return(ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function er(e,t,i){return(er="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ea(e)););return e}(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(i||e):r.value}})(e,t,i||e)}function en(e,t){return(en=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}_(),T();var es=function(e){return eo(e)[0]},eo=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,i=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return i&&(t=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,t]},el=b(g()),ed={exists:function(){var e=el.default.performance;return void 0!==(e&&e.timing)},domContentLoadedEventEnd:function(){var e=el.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},navigationStart:function(){var e=el.default.performance,t=e&&e.timing;return t&&t.navigationStart}};function eu(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}function ec(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},a=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),a.forEach(function(t){ei(e,t,i[t])})}return e}function eh(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);i.push.apply(i,a)}return i})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}var em=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],ep=["x-cdn","content-type"].concat(em);function ev(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var i=e.split(": "),a=i.shift();a&&(ep.indexOf(a.toLowerCase())>=0||0===a.toLowerCase().indexOf("x-litix-"))&&(t[a]=i.join(": "))}}),t}function eE(e){if(e){var t=em.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var eb=function(e){var t={};for(var i in e){var a=e[i];-1!==a["DATA-ID"].search("io.litix.data.")&&(t[a["DATA-ID"].replace("io.litix.data.","")]=a.VALUE)}return t},eg=function(e){if(!e)return{};var t=ed.navigationStart(),i=e.loading,a=i?i.start:e.trequest,r=i?i.first:e.tfirst,n=i?i.end:e.tload;return{bytesLoaded:e.total,requestStart:Math.round(t+a),responseStart:Math.round(t+r),responseEnd:Math.round(t+n)}},ef=function(e){if(!(!e||"function"!=typeof e.getAllResponseHeaders))return ev(e.getAllResponseHeaders())},e_=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var a=arguments.length>4?arguments[4]:void 0,r=e.log,n=e.utils.secondsToMs,s=function(e){var t,i=parseInt(a.version);return 1===i&&null!==e.programDateTime&&(t=e.programDateTime),0===i&&null!==e.pdt&&(t=e.pdt),t};if(!ed.exists())return void r.warn("performance timing not supported. Not tracking HLS.js.");var o=function(i,a){return e.emit(t,i,a)},l=function(e,t){var i=t.levels,a=t.audioTracks,r=t.url,n=t.stats,s=t.networkDetails,l=t.sessionData,d={},u={};i.forEach(function(e,t){d[t]={width:e.width,height:e.height,bitrate:e.bitrate,attrs:e.attrs}}),a.forEach(function(e,t){u[t]={name:e.name,language:e.lang,bitrate:e.bitrate}});var c=eg(n),h=c.bytesLoaded,m=c.requestStart,p=c.responseStart,E=c.responseEnd;o("requestcompleted",eh(ec({},eb(l)),{request_event_type:e,request_bytes_loaded:h,request_start:m,request_response_start:p,request_response_end:E,request_type:"manifest",request_hostname:es(r),request_response_headers:ef(s),request_rendition_lists:{media:d,audio:u,video:{}}}))};i.on(a.Events.MANIFEST_LOADED,l);var d=function(e,t){var i=t.details,a=t.level,r=t.networkDetails,l=eg(t.stats),d=l.bytesLoaded,u=l.requestStart,c=l.responseStart,h=l.responseEnd,m=i.fragments[i.fragments.length-1],p=s(m)+n(m.duration);o("requestcompleted",{request_event_type:e,request_bytes_loaded:d,request_start:u,request_response_start:c,request_response_end:h,request_current_level:a,request_type:"manifest",request_hostname:es(i.url),request_response_headers:ef(r),video_holdback:i.holdBack&&n(i.holdBack),video_part_holdback:i.partHoldBack&&n(i.partHoldBack),video_part_target_duration:i.partTarget&&n(i.partTarget),video_target_duration:i.targetduration&&n(i.targetduration),video_source_is_live:i.live,player_manifest_newest_program_time:isNaN(p)?void 0:p})};i.on(a.Events.LEVEL_LOADED,d);var u=function(e,t){var i=t.details,a=t.networkDetails,r=eg(t.stats);o("requestcompleted",{request_event_type:e,request_bytes_loaded:r.bytesLoaded,request_start:r.requestStart,request_response_start:r.responseStart,request_response_end:r.responseEnd,request_type:"manifest",request_hostname:es(i.url),request_response_headers:ef(a)})};i.on(a.Events.AUDIO_TRACK_LOADED,u);var c=function(e,t){var a=t.stats,r=t.networkDetails,n=t.frag,s=eg(a=a||n.stats),l=s.bytesLoaded,d=s.requestStart,u=s.responseStart,c=s.responseEnd,h=r?ef(r):void 0,m={request_event_type:e,request_bytes_loaded:l,request_start:d,request_response_start:u,request_response_end:c,request_hostname:r?es(r.responseURL):void 0,request_id:h?eE(h):void 0,request_response_headers:h,request_media_duration:n.duration,request_url:null==r?void 0:r.responseURL};"main"===n.type?(m.request_type="media",m.request_current_level=n.level,m.request_video_width=(i.levels[n.level]||{}).width,m.request_video_height=(i.levels[n.level]||{}).height,m.request_labeled_bitrate=(i.levels[n.level]||{}).bitrate):m.request_type=n.type,o("requestcompleted",m)};i.on(a.Events.FRAG_LOADED,c);var h=function(e,t){var i=t.frag,a=i.start;o("fragmentchange",{currentFragmentPDT:s(i),currentFragmentStart:n(a)})};i.on(a.Events.FRAG_CHANGED,h);var m=function(e,t){var i,r=t.type,n=t.details,s=t.response,l=t.fatal,d=t.frag,u=t.networkDetails,c=(null==d?void 0:d.url)||t.url||"",h=u?ef(u):void 0;(n===a.ErrorDetails.MANIFEST_LOAD_ERROR||n===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||n===a.ErrorDetails.FRAG_LOAD_ERROR||n===a.ErrorDetails.FRAG_LOAD_TIMEOUT||n===a.ErrorDetails.LEVEL_LOAD_ERROR||n===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||n===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||n===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||n===a.ErrorDetails.SUBTITLE_LOAD_ERROR||n===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||n===a.ErrorDetails.KEY_LOAD_ERROR||n===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:n,request_url:c,request_hostname:es(c),request_id:h?eE(h):void 0,request_type:n===a.ErrorDetails.FRAG_LOAD_ERROR||n===a.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":n===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||n===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":n===a.ErrorDetails.SUBTITLE_LOAD_ERROR||n===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":n===a.ErrorDetails.KEY_LOAD_ERROR||n===a.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:null==s?void 0:s.code,request_error_text:null==s?void 0:s.text}),l&&o("error",{player_error_code:r,player_error_message:n,player_error_context:"".concat(c?"url: ".concat(c,"\n"):"")+"".concat(s&&(s.code||s.text)?"response: ".concat(s.code,", ").concat(s.text,"\n"):"")+"".concat(t.reason?"failure reason: ".concat(t.reason,"\n"):"")+"".concat(t.level?"level: ".concat(t.level,"\n"):"")+"".concat(t.parent?"parent stream controller: ".concat(t.parent,"\n"):"")+"".concat(t.buffer?"buffer length: ".concat(t.buffer,"\n"):"")+"".concat(t.error?"error: ".concat(t.error,"\n"):"")+"".concat(t.event?"event: ".concat(t.event,"\n"):"")+"".concat(t.err?"error message: ".concat(null==(i=t.err)?void 0:i.message,"\n"):"")})};i.on(a.Events.ERROR,m);var p=function(e,t){var i=t.frag,a=i&&i._url||"";o("requestcanceled",{request_event_type:e,request_url:a,request_type:"media",request_hostname:es(a)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,p);var E=function(e,t){var a=t.level,n=i.levels[a];if(n&&n.attrs&&n.attrs.BANDWIDTH){var s,l=n.attrs.BANDWIDTH,d=parseFloat(n.attrs["FRAME-RATE"]);isNaN(d)||(s=d),l?o("renditionchange",{video_source_fps:s,video_source_bitrate:l,video_source_width:n.width,video_source_height:n.height,video_source_rendition_name:n.name,video_source_codec:null==n?void 0:n.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(a.Events.LEVEL_SWITCHED,E),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,u),i.off(a.Events.FRAG_LOADED,c),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,m),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,p),i.off(a.Events.LEVEL_SWITCHED,E),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},ey=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eT=function(e,t){if(!e||!e.requestEndDate)return{};var i,a=es(e.url),r=e.url,n=e.bytesLoaded,s=new Date(e.requestStartDate).getTime(),o=new Date(e.firstByteDate).getTime(),l=new Date(e.requestEndDate).getTime(),d=isNaN(e.duration)?0:e.duration,u="function"==typeof t.getMetricsFor?t.getMetricsFor(e.mediaType).HttpList:t.getDashMetrics().getHttpRequests(e.mediaType);u.length>0&&(i=ev(u[u.length-1]._responseHeaders||""));var c=i?eE(i):void 0;return{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:n,requestResponseHeaders:i,requestMediaDuration:d,requestHostname:a,requestUrl:r,requestId:c}},eA=function(e,t){var i=t.getQualityFor(e),a=t.getCurrentTrackFor(e).bitrateList;return a?{currentLevel:i,renditionWidth:a[i].width||null,renditionHeight:a[i].height||null,renditionBitrate:a[i].bandwidth}:{}},ek=function(e){var t;return null==(t=e.match(/.*codecs\*?="(.*)"/))?void 0:t[1]},ew=function(e){try{var t,i;return null==(i=e.getVersion)||null==(t=i.call(e))?void 0:t.split(".").map(function(e){return parseInt(e)})[0]}catch(e){return!1}},eS=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var a=e.log;if(!i||!i.on)return void a.warn("Invalid dash.js player reference. Monitoring blocked.");var r=ew(i),n=function(i,a){return e.emit(t,i,a)},s=function(e){var t=e.type,i=(e.data||{}).url;n("requestcompleted",{request_event_type:t,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:es(i),request_url:i})};i.on("manifestLoaded",s);var o={},l=function(e){if("function"!=typeof e.getRequests)return null;var t=e.getRequests({state:"executed"});return 0===t.length?null:t[t.length-1]},d=function(e){var t=e.type,a=e.chunk,r=e.request,s=(a||{}).mediaInfo||{},l=s.type,d=s.bitrateList,u={};
1(d=d||[]).forEach(function(e,t){u[t]={},u[t].width=e.width,u[t].height=e.height,u[t].bitrate=e.bandwidth,u[t].attrs={}}),"video"===l?o.video=u:"audio"===l?o.audio=u:o.media=u;var c=eT(r,i),h=c.requestStart,m=c.requestResponseStart,p=c.requestResponseEnd,E=c.requestResponseHeaders,b=c.requestMediaDuration,g=c.requestHostname,f=c.requestUrl;n("requestcompleted",{request_event_type:t,request_start:h,request_response_start:m,request_response_end:p,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:E,request_hostname:g,request_id:c.requestId,request_url:f,request_media_duration:b,request_rendition_lists:o})};r>=4?i.on("initFragmentLoaded",d):i.on("initFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,a=e.chunk;d({type:t,request:l(i),chunk:a})});var u=function(e){var t=e.type,a=e.chunk,r=e.request,s=a||{},o=s.mediaInfo,l=s.start,d=(o||{}).type,u=eT(r,i),c=u.requestStart,h=u.requestResponseStart,m=u.requestResponseEnd,p=u.requestBytesLoaded,E=u.requestResponseHeaders,b=u.requestMediaDuration,g=u.requestHostname,f=u.requestUrl,_=u.requestId,y=eA(d,i),T=y.currentLevel,A=y.renditionWidth,k=y.renditionHeight;n("requestcompleted",{request_event_type:t,request_start:c,request_response_start:h,request_response_end:m,request_bytes_loaded:p,request_type:d,request_response_headers:E,request_hostname:g,request_id:_,request_url:f,request_media_start_time:l,request_media_duration:b,request_current_level:T,request_labeled_bitrate:y.renditionBitrate,request_video_width:A,request_video_height:k})};r>=4?i.on("mediaFragmentLoaded",u):i.on("mediaFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,a=e.chunk;u({type:t,request:l(i),chunk:a})});var c={video:void 0,audio:void 0,totalBitrate:void 0},h=function(){if(c.video&&"number"==typeof c.video.bitrate){if(!(c.video.width&&c.video.height))return void a.warn("have bitrate info for video but missing width/height");var e=c.video.bitrate;if(c.audio&&"number"==typeof c.audio.bitrate&&(e+=c.audio.bitrate),e!==c.totalBitrate)return c.totalBitrate=e,{video_source_bitrate:e,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:ek(c.video.codec)}}},m=function(e,t,r){if("number"!=typeof e.newQuality)return void a.warn("missing evt.newQuality in qualityChangeRendered event",e);var s=e.mediaType;if("audio"===s||"video"===s){var o=i.getBitrateInfoListFor(s).find(function(t){return t.qualityIndex===e.newQuality});if(!(o&&"number"==typeof o.bitrate))return void a.warn("missing bitrate info for ".concat(s));c[s]=eh(ec({},o),{codec:i.getCurrentTrackFor(s).codec});var l=h();l&&n("renditionchange",l)}};i.on("qualityChangeRendered",m);var p=function(e){var t=e.request,i=e.mediaType;n("requestcanceled",{request_event_type:(t=t||{}).type+"_"+t.action,request_url:t.url,request_type:i,request_hostname:es(t.url)})};i.on("fragmentLoadingAbandoned",p);var E=function(e){var t,i,a=e.error,r=(null==a||null==(t=a.data)?void 0:t.request)||{},s=(null==a||null==(i=a.data)?void 0:i.response)||{};(null==a?void 0:a.code)===27&&n("requestfailed",{request_error:r.type+"_"+r.action,request_url:r.url,request_hostname:es(r.url),request_type:r.mediaType,request_error_code:s.status,request_error_text:s.statusText});var o="".concat(null!=r&&r.url?"url: ".concat(r.url,"\n"):"")+"".concat(null!=s&&s.status||null!=s&&s.statusText?"response: ".concat(null==s?void 0:s.status,", ").concat(null==s?void 0:s.statusText,"\n"):"");n("error",{player_error_code:null==a?void 0:a.code,player_error_message:null==a?void 0:a.message,player_error_context:o})};i.on("error",E),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",d),i.off("mediaFragmentLoaded",u),i.off("qualityChangeRendered",m),i.off("error",E),i.off("fragmentLoadingAbandoned",p),delete i._stopMuxMonitor}},eI=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eR=0,eD=function(){function e(){J(this,e),ei(this,"_listeners",void 0)}return et(e,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++eR,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var i=this._listeners&&this._listeners[e];
1i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})}},{key:"one",value:function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++eR;var r=function(){a.off(e,r),t.apply(i||this,arguments)};r._eventEmitterGuid=t._eventEmitterGuid,this.on(e,r)}},{key:"emit",value:function(e,t){var i=this;if(this._listeners){t=t||{};var a=this._listeners["before*"]||[],r=this._listeners[e]||[],n=this._listeners["after"+e]||[],s=function(t,a){(t=t.slice()).forEach(function(t){t.call(i,{type:e},a)})};s(a,t),s(r,t),s(n,t)}}}]),e}(),eC=b(g()),eL=function(){function e(t){var i=this;J(this,e),ei(this,"_playbackHeartbeatInterval",void 0),ei(this,"_playheadShouldBeProgressing",void 0),ei(this,"pm",void 0),this.pm=t,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,t.on("playing",function(){i._playheadShouldBeProgressing=!0}),t.on("play",this._startPlaybackHeartbeatInterval.bind(this)),t.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),t.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),t.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("seeked",function(){t.data.player_is_paused?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),t.on("timeupdate",function(){null!==i._playbackHeartbeatInterval&&t.emit("playbackheartbeat")}),t.on("devicesleep",function(e,a){null!==i._playbackHeartbeatInterval&&(eC.default.clearInterval(i._playbackHeartbeatInterval),t.emit("playbackheartbeatend",{viewer_time:a.viewer_time}),i._playbackHeartbeatInterval=null)})}return et(e,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=eC.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(eC.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),eM=function e(t){var i=this;J(this,e),ei(this,"viewErrored",void 0),t.on("viewinit",function(){i.viewErrored=!1}),t.on("error",function(e,a){try{var r=t.errorTranslator({player_error_code:a.player_error_code,player_error_message:a.player_error_message,player_error_context:a.player_error_context,player_error_severity:a.player_error_severity,player_error_business_exception:a.player_error_business_exception});r&&(t.data.player_error_code=r.player_error_code||a.player_error_code,t.data.player_error_message=r.player_error_message||a.player_error_message,t.data.player_error_context=r.player_error_context||a.player_error_context,t.data.player_error_severity=r.player_error_severity||a.player_error_severity,t.data.player_error_business_exception=r.player_error_business_exception||a.player_error_business_exception,i.viewErrored=!0)}catch(e){t.mux.log.warn("Exception in error translator callback.",e),i.viewErrored=!0}}),t.on("aftererror",function(){var e,i,a,r,n;null==(e=t.data)||delete e.player_error_code,null==(i=t.data)||delete i.player_error_message,null==(a=t.data)||delete a.player_error_context,null==(r=t.data)||delete r.player_error_severity,null==(n=t.data)||delete n.player_error_business_exception})},eO=function(){function e(t){J(this,e),ei(this,"_watchTimeTrackerLastCheckedTime",void 0),ei(this,"pm",void 0),this.pm=t,this._watchTimeTrackerLastCheckedTime=null,t.on("playbackheartbeat",this._updateWatchTime.bind(this)),t.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return et(e,[{key:"_updateWatchTime",value:function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),eu(this.pm.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=i}},{key:"_clearWatchTimeState",value:function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null}}]),e}(),ex=function(){function e(t){var i=this;J(this,e),ei(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),ei(this,"_lastTime",void 0),ei(this,"_isAdPlaying",void 0),ei(this,"_callbackUpdatePlaybackTime",void 0),ei(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=F.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null;var a=this._startPlaybackTimeTracking.bind(this);t.on("playing",a),t.on("adplaying",a),t.on("seeked",a);var r=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",r),t.on("seeking",r),t.on("adplaying",function(){i._isAdPlaying=!0}),t.on("adended",function(){i._isAdPlaying=!1}),t.on("adpause",function(){i._isAdPlaying=!1}),t.on("adbreakstart",function(){i._isAdPlaying=!1}),t.on("adbreakend",function(){i._isAdPlaying=!1}),t.on("adplay",function(){i._isAdPlaying=!1}),t.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=F.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return et(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,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,t=F.now(),i=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?i=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(i=t-this._lastTime),i>0&&i<=1e3&&eu(this.pm.data,"view_content_playback_time",i),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),eN=function(){function e(t){J(this,e),ei(this,"pm",void 0),this.pm=t;var i=this._updatePlayheadTime.bind(this);t.on("playbackheartbeat",i),t.on("playbackheartbeatend",i),t.on("timeupdate",i),t.on("destroy",function(){t.off("timeupdate",i)})}return et(e,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=void 0===this.pm.data.view_max_playhead_position?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,t){var i=this,a=function(){i.pm.currentFragmentPDT&&i.pm.currentFragmentStart&&(i.pm.data.player_program_time=i.pm.currentFragmentPDT+i.pm.data.player_playhead_time-i.pm.currentFragmentStart)};if(t&&t.player_playhead_time)this.pm.data.player_playhead_time=t.player_playhead_time,a(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var r=this.pm.getPlayheadTime();void 0!==r&&(this.pm.data.player_playhead_time=r,a(),this._updateMaxPlayheadPosition())}}}]),e}(),eP=function e(t){if(J(this,e),!t.disableRebufferTracking){var i,a=function(e,t){r(t),i=void 0},r=function(e){if(i){var a=e.viewer_time-i;eu(t.data,"view_rebuffer_duration",a),i=e.viewer_time,t.data.view_rebuffer_duration>3e5&&(t.emit("viewend"),t.send("viewend"),t.mux.log.warn("Ending view after rebuffering for longer than ".concat(3e5,"ms, future events will be ignored unless a programchange or videochange occurs.")))}t.data.view_watch_time>=0&&t.data.view_rebuffer_count>0&&(t.data.view_rebuffer_frequency=t.data.view_rebuffer_count/t.data.view_watch_time,t.data.view_rebuffer_percentage=t.data.view_rebuffer_duration/t.data.view_watch_time)};t.on("playbackheartbeat",function(e,t){return r(t)}),t.on("rebufferstart",function(e,r){i||(eu(t.data,"view_rebuffer_count",1),i=r.viewer_time,t.one("rebufferend",a))}),t.on("viewinit",function(){i=void 0,t.off("rebufferend",a)})}},eU=function(){function e(t){var i=this;J(this,e),ei(this,"_lastCheckedTime",void 0),ei(this,"_lastPlayheadTime",void 0),ei(this,"_lastPlayheadTimeUpdatedTime",void 0),ei(this,"_rebuffering",void 0),ei(this,"pm",void 0),this.pm=t,t.disableRebufferTracking||t.disablePlayheadRebufferTracking||(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,t.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),t.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),t.on("seeking",function(){i._cleanupRebufferTracker(null,{viewer_time:F.now()})}))}return et(e,[{key:"_checkIfRebuffering",value:function(e,t){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return void this._prepareRebufferTrackerState(t.viewer_time);if(this._lastPlayheadTime!==this.pm.data.player_playhead_time)return void this._cleanupRebufferTracker(e,t,!0);var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.sustainedRebufferThreshold&&i>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=t.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,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:t.viewer_time});else{if(null===this._lastCheckedTime)return;var a=this.pm.data.player_playhead_time-this._lastPlayheadTime,r=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.minimumRebufferDuration&&a>0&&r-a>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-a}))}i?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()}}]),e}(),eB=function(){function e(t){var i=this;J(this,e),ei(this,"NAVIGATION_START",void 0),ei(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){var e=t.data,a=e.view_id;if(!e.view_program_changed){var r=function(e,r){var n=r.viewer_time;"playing"===e.type&&void 0===t.data.view_time_to_first_frame?i.calculateTimeToFirstFrame(n||F.now(),a):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||i._inPrerollPosition())&&i.calculateTimeToFirstFrame(n||F.now(),a)};t.one("playing",r),t.one("adplaying",r),t.one("viewend",function(){t.off("playing",r),t.off("adplaying",r)})}})}return et(e,[{key:"_inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===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.NAVIGATION_START&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.NAVIGATION_START))}}]),e}(),eH=function e(t){var i=this;J(this,e),ei(this,"_lastPlayerHeight",void 0),ei(this,"_lastPlayerWidth",void 0),ei(this,"_lastPlayheadPosition",void 0),ei(this,"_lastSourceHeight",void 0),ei(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){i._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend"].forEach(function(e){t.on(e,function(){if(i._lastPlayheadPosition>=0&&t.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var e=t.data.player_playhead_time-i._lastPlayheadPosition;if(e<0){i._lastPlayheadPosition=-1;return}var a=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),r=Math.max(0,a-1),n=Math.max(0,1-a);t.data.view_max_upscale_percentage=Math.max(t.data.view_max_upscale_percentage||0,r),t.data.view_max_downscale_percentage=Math.max(t.data.view_max_downscale_percentage||0,n),eu(t.data,"view_total_content_playback_time",e),eu(t.data,"view_total_upscaling",r*e),eu(t.data,"view_total_downscaling",n*e)}i._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange"].forEach(function(e){t.on(e,function(){i._lastPlayheadPosition=t.data.player_playhead_time,i._lastPlayerWidth=t.data.player_width,i._lastPlayerHeight=t.data.player_height,i._lastSourceWidth=t.data.video_source_width,i._lastSourceHeight=t.data.video_source_height})})},eW=function e(t){var i=this;J(this,e),ei(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var e=F.now(),r=(t.data.viewer_time||e)-(a||e);eu(t.data,"view_seek_duration",r),t.data.view_max_seek_time=Math.max(t.data.view_max_seek_time||0,r),i.isSeeking=!1,a=-1};t.on("seeking",function(e,n){if(Object.assign(t.data,n),i.isSeeking&&n.viewer_time-a<=2e3){a=n.viewer_time;return}i.isSeeking&&r(),i.isSeeking=!0,a=n.viewer_time,eu(t.data,"view_seek_count",1),t.send("seeking")}),t.on("seeked",function(){r()}),t.on("viewend",function(){i.isSeeking&&(r(),t.send("seeked")),i.isSeeking=!1,a=-1})},eV=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},eF=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],e$=function(){function e(t){var i=this;J(this,e),ei(this,"_adHasPlayed",void 0),ei(this,"_adRequests",void 0),ei(this,"_adResponses",void 0),ei(this,"_currentAdRequestNumber",void 0),ei(this,"_currentAdResponseNumber",void 0),ei(this,"_prerollPlayTime",void 0),ei(this,"_wouldBeNewAdPlay",void 0),ei(this,"isAdBreak",void 0),ei(this,"pm",void 0),this.pm=t,t.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}),eF.forEach(function(e){return t.on(e,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};t.on("adbreakstart",function(){i.isAdBreak=!0}),t.on("play",a),t.on("playing",a),t.on("viewend",a),t.on("adrequest",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},a),eV(i._adRequests,a),eu(t.data,"view_ad_request_count"),i.inPrerollPosition()&&(t.data.view_preroll_requested=!0,i._adHasPlayed||eu(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},a),eV(i._adResponses,a);var r=i.findAdRequest(a.ad_request_id);r&&eu(t.data,"view_ad_request_time",Math.max(0,a.viewer_time-r.viewer_time))}),t.on("adplay",function(e,a){i._adHasPlayed=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,eu(t.data,"view_ad_played_count")),i.inPrerollPosition()&&
1!t.data.view_preroll_played&&(t.data.view_preroll_played=!0,i._adRequests.length>0&&(t.data.view_preroll_request_time=Math.max(0,a.viewer_time-i._adRequests[0].viewer_time)),t.data.view_start&&(t.data.view_startup_preroll_request_time=Math.max(0,a.viewer_time-t.data.view_start)),i._prerollPlayTime=a.viewer_time)}),t.on("adplaying",function(e,a){i.inPrerollPosition()&&void 0===t.data.view_preroll_load_time&&void 0!==i._prerollPlayTime&&(t.data.view_preroll_load_time=a.viewer_time-i._prerollPlayTime,t.data.view_startup_preroll_load_time=a.viewer_time-i._prerollPlayTime)}),t.on("adclicked",function(e,a){i._wouldBeNewAdPlay||eu(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,a){i._wouldBeNewAdPlay||eu(t.data,"view_ad_skipped_count")}),t.on("adended",function(){i._wouldBeNewAdPlay=!0}),t.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return et(e,[{key:"inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var t=0;t<this._adRequests.length;t++)if(this._adRequests[t].ad_request_id===e)return this._adRequests[t]}},{key:"_updateAdData",value:function(e,t){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&t.ad_tag_url){var i=B(eo(t.ad_tag_url),2),a=i[0],r=i[1];this.pm.data.view_preroll_ad_tag_domain=r,this.pm.data.view_preroll_ad_tag_hostname=a}if(!this.pm.data.view_preroll_ad_asset_hostname&&t.ad_asset_url){var n=B(eo(t.ad_asset_url),2),s=n[0],o=n[1];this.pm.data.view_preroll_ad_asset_domain=o,this.pm.data.view_preroll_ad_asset_hostname=s}}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id}}]),e}(),eK=b(g()),eq=function e(t){J(this,e);var i,a,r=function(){t.disableRebufferTracking||(eu(t.data,"view_waiting_rebuffer_count",1),i=F.now(),a=eK.default.setInterval(function(){if(i){var e=F.now();eu(t.data,"view_waiting_rebuffer_duration",e-i),i=e}},250))},n=function(){t.disableRebufferTracking||i&&(eu(t.data,"view_waiting_rebuffer_duration",F.now()-i),i=!1,eK.default.clearInterval(a))},s=!1,o=function(){s=!0},l=function(){s=!1,n()};t.on("waiting",function(){s&&r()}),t.on("playing",function(){n(),o()}),t.on("pause",l),t.on("seeking",l)},eY=function e(t){var i=this;J(this,e),ei(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=F.now(),t.on("before*",r)},r=function(e){var a=F.now(),r=i.lastWallClockTime;i.lastWallClockTime=a,a-r>3e4&&(t.emit("devicesleep",{viewer_time:r}),Object.assign(t.data,{viewer_time:r}),t.send("devicesleep"),t.emit("devicewake",{viewer_time:a}),Object.assign(t.data,{viewer_time:a}),t.send("devicewake"))};t.one("playbackheartbeat",a),t.on("playbackheartbeatend",function(){t.off("before*",r),t.one("playbackheartbeat",a)})},eG=b(g()),ej=function(){var e=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var a in i)t[a]=i[a]}return t};return function t(i){function a(t,r,n){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(n=e({path:"/"},a.defaults,n)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*n.expires),n.expires=o}try{s=JSON.stringify(r),/^[\{\[]/.test(s)&&(r=s)}catch(e){}return r=i.write?i.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=t+"="+r+(n.expires?"; expires="+n.expires.toUTCString():"")+(n.path?"; path="+n.path:"")+(n.domain?"; domain="+n.domain:"")+(n.secure?"; secure":"")}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<l.length;u++){var c=l[u].split("="),h=c.slice(1).join("=");'"'===h.charAt(0)&&(h=h.slice(1,-1));try{var m=c[0].replace(d,decodeURIComponent);if(h=i.read?i.read(h,m):i(h,m)||h.replace(d,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===m){s=h;break}t||(s[m]=h)}catch(e){}}return s}}return a.set=a,a.get=function(e){return a.call(a,e)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(t,i){a(t,"",e(i,{expires:-1}))},a.withConverter=t,a}(function(){})}(),eQ="muxData",eZ=function(){var e;try{e=(ej.get(eQ)||"").split("&").reduce(function(e,t){var i=B(t.split("="),2),a=i[0],r=i[1],n=+r;return e[a]=r&&n==r?n:r,e},{})}catch(t){e={}}return e},ez=function(e){try{ej.set(eQ,Object.entries(e).map(function(e){var t=B(e,2),i=t[0],a=t[1];return"".concat(i,"=").concat(a)}).join("&"),{expires:365})}catch(e){}},eX=function(){var e=eZ();return e.mux_viewer_id=e.mux_viewer_id||$(),e.msn=e.msn||Math.random(),ez(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},eJ=function(){var e=eZ(),t=F.now();return e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=$(),e.sst=t),e.sex=t+15e5,ez(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},e0=b(g()),e1=function(){var e;switch(e2()){case"cellular":e="cellular";break;case"ethernet":e="wired";break;case"wifi":e="wifi";break;case void 0:break;default:e="other"}return e},e2=function(){var e=e0.default.navigator,t=e&&(e.connection||e.mozConnection||e.webkitConnection);return t&&t.type};e1.getConnectionFromAPI=e2;var e3=e5({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"}),e4=e5({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",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cx:"c
1onnection",cz:"context",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",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",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function e5(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function e9(e){var t={},i={};return Object.keys(e).forEach(function(a){var r=!1;if(e.hasOwnProperty(a)&&void 0!==e[a]){var n=a.split("_"),s=n[0],o=e3[s];o||(Q.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(e){"url"===e&&(r=!0),e4[e]?o+=e4[e]:Number.isInteger(Number(e))?o+=e:(Q.info("Data key word `"+e+"` not expected in "+a),o+="_"+e+"_")}),r?i[o]=e[a]:t[o]=e[a]}}),Object.assign(t,i)}var e8=b(g()),e6=b(N()),e7={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},te=["hb","requestcompleted","requestfailed","requestcanceled"],tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=e||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},e7,t)};tt.prototype.queueEvent=function(e,t){var i=Object.assign({},t);return(this._eventQueue.length<=this._options.maxQueueLength||"eventrateexceeded"===e)&&(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},tt.prototype.flushEvents=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&1===this._eventQueue.length)return void this._eventQueue.pop();this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending()},tt.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),e8.default.clearTimeout(this._sendTimeout)},tt.prototype._clearBeaconQueue=function(){var e=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,t=this._eventQueue.slice(e);e>0&&Object.assign(t[t.length-1],e9({mux_view_message:"event queue truncated"}));var i=this._createPayload(t);tr(this._beaconUrl,i,!0,function(){})},tt.prototype._sendBeaconQueue=function(){var e=this;if(this._postInFlight){this._resendAfterPost=!0;return}var t=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(t),a=F.now();tr(this._beaconUrl,i,!1,function(i,r){r?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,Q.info("Error sending beacon: "+r)):e._failureCount=0,e._roundTripTime=F.now()-a,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})},tt.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var e=Math.pow(2,this._failureCount-1);return(1+(e*=Math.random()))*this._options.baseTimeBetweenBeacons},tt.prototype._startBeaconSending=function(){var e=this;e8.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=e8.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},tt.prototype._createPayload=function(e){var t=this,i={transmission_timestamp:Math.round(F.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){n=(a=JSON.stringify({metadata:i,events:r||e})).length/1024},o=function(){return n<=t._options.maxPayloadKBSize};return s(),o()||(Q.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=e.filter(function(e){return -1===te.indexOf(e.e)}),s()),o()||(Q.info("Payload size still too big ("+n+" kb). Cropping fields.."),r.forEach(function(e){for(var t in e){var i=e[t];"string"==typeof i&&i.length>51200&&(e[t]=i.substring(0,51200))}}),s()),a};var ti,ta="function"==typeof e6.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},tr=function(e,t,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))return void a();if(e8.default.fetch)return void e8.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:ta(t)}).then(function(e){return a(null,e.ok?null:"Error")}).catch(function(e){return a(null,e)});if(e8.default.XMLHttpRequest){var r=new e8.default.XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState)return a(null,200!==r.status?"error":void 0)},r.open("POST",e),r.setRequestHeader("Content-Type","text/plain"),r.send(t);return}a()},tn=["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"],ts=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],to=["ad_id","ad_creative_id","ad_universal_id"],tl=["viewstart","error","ended","viewend"],td=function(){function e(t,i){var a,r,n,s,o,l,d,u,c,h,m,p,E,b,g,f,_,y,T,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};J(this,e),ei(this,"mux",void 0),ei(this,"envKey",void 0),ei(this,"options",void 0),ei(this,"eventQueue",void 0),ei(this,"sampleRate",void 0),ei(this,"disableCookies",void 0),ei(this,"respectDoNotTrack",void 0),ei(this,"previousBeaconData",void 0),ei(this,"lastEventTime",void 0),ei(this,"rateLimited",void 0),ei(this,"pageLevelData",void 0),ei(this,"viewerData",void 0),this.mux=t,this.envKey=i,this.options=A,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new tt((a=this.envKey,n=(r=this.options).beaconCollectionDomain,s=r.beaconDomain,n?"https://"+n:(a=a||"inferred").match(/^[a-z0-9]+$/)?"https://"+a+"."+(s||"litix.io"):"https://img.litix.io/a.gif")),this.sampleRate=null!=(_=this.options.sampleRate)?_:1,this.disableCookies=null!=(y=this.options.disableCookies)&&y,this.respectDoNotTrack=null!=(T=this.options.respectDoNotTrack)&&T,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null==(o=this.options.platform)?void 0:o.name,viewer_application_version:null==(l=this.options.platform)?void 0:l.version,viewer_application_engine:null==(d=this.options.platform)?void 0:d.layout,viewer_device_name:null==(u=this.options.platform)?void 0:u.product,viewer_device_category:"",viewer_device_manufacturer:null==(c=this.options.platform)?void 0:c.manufacturer,viewer_os_family:null==(m=this.options.platform)||null==(h=m.os)?void 0:h.family,viewer_os_architecture:null==(E=this.options.platform)||null==(p=E.os)?void 0:p.architecture,viewer_os_version:null==(g=this.options.platform)||null==(b=g.os)?void 0:b.version,viewer_connection_type:e1(),page_url:null===eG.default||void 0===eG.default||null==(f=eG.default.location)?void 0:f.href},this.viewerData=this.disableCookies?{}:eX()}return et(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&z())return Q.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return Q.error("A data object was expected in send() but was not provided");var i=this.disableCookies?{}:eJ(),a=eh(ec({},this.pageLevelData,t,i,this.viewerData),{event:e,env_key:this.envKey});
1a.user_id&&(a.viewer_user_id=a.user_id,delete a.user_id);var r,n=(null!=(r=a.mux_sample_number)?r:0)>=this.sampleRate,s=e9(this._deduplicateBeaconData(e,a));if(this.lastEventTime=this.mux.utils.now(),n)return Q.info("Not sending event due to sample rate restriction",e,a,s);if(this.envKey||Q.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,a,s),!this.rateLimited){if(Q.info("Sending event",e,a,s),this.rateLimited=!this.eventQueue.queueEvent(e,s),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else if(this.mux.WINDOW_HIDDEN&&"hb"===e?this.eventQueue.flushEvents(!0):tl.indexOf(e)>=0&&this.eventQueue.flushEvents(),this.rateLimited)return a.event="eventrateexceeded",s=e9(a),this.eventQueue.queueEvent(a.event,s),Q.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,t){var i=this,a={},r=t.view_id;if("-1"===r||"viewstart"===e||"viewend"===e||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)a=ec({},t),r&&(this.previousBeaconData=a),r&&"viewend"===e&&(this.previousBeaconData=null);else{var n=0===e.indexOf("request");Object.entries(t).forEach(function(t){var r=B(t,2),s=r[0],o=r[1];i.previousBeaconData&&(o!==i.previousBeaconData[s]||tn.indexOf(s)>-1||i.objectHasChanged(n,s,o,i.previousBeaconData[s])||i.eventRequiresKey(e,s))&&(a[s]=o,i.previousBeaconData[s]=o)})}return a}},{key:"objectHasChanged",value:function(e,t,i,a){return!!e&&0===t.indexOf("request_")&&("request_response_headers"===t||"object"!=typeof i||"object"!=typeof a||Object.keys(i||{}).length!==Object.keys(a||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||to.includes(t)&&ts.includes(e))}}]),e}(),tu=function e(t){J(this,e);var i=0,a=0,r=0,n=0,s=0,o=0,l=0;t.on("requestcompleted",function(e,o){var l,d,u=o.request_start,c=o.request_response_start,h=o.request_response_end,m=o.request_bytes_loaded;if(n++,c?(l=c-(null!=u?u:0),d=(null!=h?h:0)-c):d=(null!=h?h:0)-(null!=u?u:0),d>0&&m&&m>0){var p=m/d*8e3;s++,a+=m,r+=d,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,p),t.data.view_average_request_throughput=a/r*8e3,t.data.view_request_count=n,l>0&&(i+=l,t.data.view_max_request_latency=Math.max(t.data.view_max_request_latency||0,l),t.data.view_average_request_latency=i/s)}}),t.on("requestfailed",function(e,i){n++,o++,t.data.view_request_count=n,t.data.view_request_failed_count=o}),t.on("requestcanceled",function(e,i){n++,l++,t.data.view_request_count=n,t.data.view_request_canceled_count=l})},tc=function e(t){var i=this;J(this,e),ei(this,"_lastEventTime",void 0),t.on("before*",function(e,a){var r=a.viewer_time,n=F.now(),s=i._lastEventTime;if(i._lastEventTime=n,s&&n-s>36e5){var o=Object.keys(t.data).reduce(function(e,i){return 0===i.indexOf("video_")?Object.assign(e,ei({},i,t.data[i])):e},{});t.mux.log.info("Received event after at least an hour inactivity, creating a new view");var l=t.playbackHeartbeat._playheadShouldBeProgressing;t._resetView(Object.assign({viewer_time:r},o)),t.playbackHeartbeat._playheadShouldBeProgressing=l,t.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==e.type&&"adbreakstart"!==e.type&&(t.emit("play",{viewer_time:r}),"playing"!==e.type&&t.emit("playing",{viewer_time:r}))}})},th=["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"],tm=new Set(["requestcompleted","requestfailed","requestcanceled"]),tp=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),e&&en(a,e);var t,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=ea(a);return e=t?Reflect.construct(i,arguments,ea(this).constructor):i.apply(this,arguments),e&&("object"===y(e)||"function"==typeof e)?e:X(this)});function a(e,t,r){J(this,a),ei(X(n=i.call(this)),"DOM_CONTENT_LOADED_EVENT_END",void 0),ei(X(n),"NAVIGATION_START",void 0),ei(X(n),"_destroyed",void 0),ei(X(n),"_heartBeatTimeout",void 0),ei(X(n),"adTracker",void 0),ei(X(n),"dashjs",void 0),ei(X(n),"data",void 0),ei(X(n),"disablePlayheadRebufferTracking",void 0),ei(X(n),"disableRebufferTracking",void 0),ei(X(n),"errorTracker",void 0),ei(X(n),"errorTranslator",void 0),ei(X(n),"emitTranslator",void 0),ei(X(n),"getAdData",void 0),ei(X(n),"getPlayheadTime",void 0),ei(X(n),"getStateData",void 0),ei(X(n),"stateDataTranslator",void 0),ei(X(n),"hlsjs",void 0),ei(X(n),"id",void 0),ei(X(n),"longResumeTracker",void 0),ei(X(n),"minimumRebufferDuration",void 0),ei(X(n),"mux",void 0),ei(X(n),"playbackEventDispatcher",void 0),ei(X(n),"playbackHeartbeat",void 0),ei(X(n),"playbackHeartbeatTime",void 0),ei(X(n),"playheadTime",void 0),ei(X(n),"seekingTracker",void 0),ei(X(n),"sustainedRebufferThreshold",void 0),ei(X(n),"watchTimeTracker",void 0),ei(X(n),"currentFragmentPDT",void 0),ei(X(n),"currentFragmentStart",void 0),n.DOM_CONTENT_LOADED_EVENT_END=ed.domContentLoadedEventEnd(),n.NAVIGATION_START=ed.navigationStart(),n.mux=e,n.id=t,null!=r&&r.beaconDomain&&n.mux.log.warn("The `beaconDomain` setting has been deprecated 
1in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(r=Object.assign({debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(e){return e},emitTranslator:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t},stateDataTranslator:function(e){return e}},r)).data=r.data||{},r.data.property_key&&(r.data.env_key=r.data.property_key,delete r.data.property_key),Q.level=r.debug?j.DEBUG:j.WARN,n.getPlayheadTime=r.getPlayheadTime,n.getStateData=r.getStateData||function(){return{}},n.getAdData=r.getAdData||function(){},n.minimumRebufferDuration=r.minimumRebufferDuration,n.sustainedRebufferThreshold=r.sustainedRebufferThreshold,n.playbackHeartbeatTime=r.playbackHeartbeatTime,n.disableRebufferTracking=r.disableRebufferTracking,n.disableRebufferTracking&&n.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."),n.disablePlayheadRebufferTracking=r.disablePlayheadRebufferTracking,n.errorTranslator=r.errorTranslator,n.emitTranslator=r.emitTranslator,n.stateDataTranslator=r.stateDataTranslator,n.playbackEventDispatcher=new td(e,r.data.env_key,r),n.data={player_instance_id:$(),mux_sample_rate:r.sampleRate,beacon_domain:r.beaconCollectionDomain||r.beaconDomain},n.data.view_sequence_number=1,n.data.player_sequence_number=1;var n,s=(function(){void 0===this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"))}).bind(X(n));if(n.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,t),this._initializeViewData(),this.one("play",s),this.one("adbreakstart",s)}),n.on("videochange",function(e,t){this._resetView(t)}),n.on("programchange",function(e,t){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(t,{view_program_changed:!0})),s(),this.emit("play"),this.emit("playing")}),n.on("fragmentchange",function(e,t){this.currentFragmentPDT=t.currentFragmentPDT,this.currentFragmentStart=t.currentFragmentStart}),n.on("destroy",n.destroy),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var o=function(){var e=void 0!==n.data.view_start;n.mux.WINDOW_HIDDEN="hidden"===document.visibilityState,e&&n.mux.WINDOW_HIDDEN&&(n.data.player_is_paused||n.emit("hb"))};window.addEventListener("visibilitychange",o,!1);var l=function(e){e.persisted||n.destroy()};window.addEventListener("pagehide",l,!1),n.on("destroy",function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",l)})}return n.on("playerready",function(e,t){Object.assign(this.data,t)}),th.forEach(function(e){n.on(e,function(t,i){0!==e.indexOf("ad")&&this._updateStateData(),Object.assign(this.data,i),this._sanitizeData()}),n.on("after"+e,function(){("error"!==e||this.errorTracker.viewErrored)&&this.send(e)})}),n.on("viewend",function(e,t){Object.assign(n.data,t)}),n.one("playerready",function(e){var t=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),n.longResumeTracker=new tc(X(n)),n.errorTracker=new eM(X(n)),new eY(X(n)),n.seekingTracker=new eW(X(n)),n.playheadTime=new eN(X(n)),n.playbackHeartbeat=new eL(X(n)),new eH(X(n)),n.watchTimeTracker=new eO(X(n)),new ex(X(n)),n.adTracker=new e$(X(n)),new eU(X(n)),new eP(X(n)),new eB(X(n)),new eq(X(n)),new tu(X(n)),r.hlsjs&&n.addHLSJS(r),r.dashjs&&n.addDashJS(r),n.emit("viewinit",r.data),n}return et(a,[{key:"emit",value:function(e,t){var i,r=Object.assign({viewer_time:this.mux.utils.now()},t),n=[e,r];if(this.emitTranslator)try{n=this.emitTranslator(e,r)}catch(e){this.mux.log.warn("Exception in emit translator callback.",e)}null!=n&&n.length&&(i=er(ea(a.prototype),"emit",this)).call.apply(i,[this].concat(G(n)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,void 0!==this.data.view_start&&(this.emit
1("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(e){if(this.data.view_id){var t=Object.assign({},this.data);if(void 0===t.video_source_is_live&&(t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1)),t.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach(function(e){t[e]=void 0}),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=B(eo(t.video_source_url),2),a=i[0];t.video_source_domain=i[1],t.video_source_hostname=a}delete t.ad_request_id,this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,tm.has(e)||this._restartHeartBeat(),"viewend"===e&&delete this.data.view_id}}},{key:"_resetView",value:function(e){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",e)}},{key:"_updateStateData",value:function(){var e=this.getStateData();if("function"==typeof this.stateDataTranslator)try{e=this.stateDataTranslator(e)}catch(e){this.mux.log.warn("Exception in stateDataTranslator translator callback.",e)}Object.assign(this.data,e),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var e=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i}),["player_source_url","video_source_url"].forEach(function(t){if(e.data[t]){var i=e.data[t].toLowerCase();(0===i.indexOf("data:")||0===i.indexOf("blob:"))&&(e.data[t]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("video_")&&delete e.data[t]})}},{key:"_resetViewData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),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 e=this,t=this.data.view_id=$(),i=function(){t===e.data.view_id&&eu(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()}},{key:"_restartHeartBeat",value:function(){var e=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)}},{key:"addHLSJS",value:function(e){return e.hlsjs?this.hlsjs?void this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):void(this.hlsjs=e.hlsjs,e_(this.mux,this.id,e.hlsjs,{},e.Hls||window.Hls)):void this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(ey(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(e){return e.dashjs?this.dashjs?void this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):void(this.dashjs=e.dashjs,eS(this.mux,this.id,e.dashjs)):void this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(eI(this.dashjs),this.dashjs=void 0)}}]),a}(eD),tv=b(N()),tE=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],tb={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},tg=b(g());tg.default&&tg.default.WeakMap&&(ti=new WeakMap);var tf={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:"#
1EXT-X-SESSION-DATA"},t_=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};t_.prototype.process=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.processLine(this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t_.prototype.processLine=function(e){var t=e.indexOf(":"),i=tI(e,t),a=i[0],r=2===i.length?tA(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 tf.TARGET_DURATION:if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break;case tf.PART_INF:ty(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case tf.SERVER_CONTROL:ty(this.manifest,i),this.setHoldBack();break;case tf.INF:0===r?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break;case tf.PROGRAM_DATE_TIME:var n=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=n),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=n;break;case tf.VERSION:ty(this.manifest,i);break;case tf.SESSION_DATA:var s=eb(tR(i[1]));Object.assign(this.manifest.sessionData,s)}},t_.prototype.setHoldBack=function(){var e=this.manifest,t=e.serverControl,i=e.targetDuration,a=e.partTargetDuration;if(t){var r="holdBack",n="partHoldBack",s=i&&3*i,o=a&&2*a;i&&!t.hasOwnProperty(r)&&(t[r]=s),s&&t[r]<s&&(t[r]=s),a&&!t.hasOwnProperty(n)&&(t[n]=3*a),a&&t[n]<o&&(t[n]=o)}};var ty=function(e,t){var i,a=tT(t[0].replace("#EXT-X-",""));tS(t[1])?(i={},i=Object.assign(tw(t[1]),i)):i=tA(t[1]),e[a]=i},tT=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},tA=function(e){if("yes"===e.toLowerCase()||"no"===e.toLowerCase())return"yes"===e.toLowerCase();var t=-1!==e.indexOf(":")?e:parseFloat(e);return isNaN(t)?e:t},tk=function(e){var t={},i=e.split("=");return i.length>1&&(t[tT(i[0])]=tA(i[1])),t},tw=function(e){for(var t=e.split(","),i={},a=0;t.length>a;a++)i=Object.assign(tk(t[a]),i);return i},tS=function(e){return e.indexOf("=")>-1},tI=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},tR=function(e){var t={};if(e){var i=e.search(",");return[e.slice(0,i),e.slice(i+1)].forEach(function(e,i){for(var a=e.replace(/['"]+/g,"").split("="),r=0;r<a.length;r++)"DATA-ID"===a[r]&&(t["DATA-ID"]=a[1-r]),"VALUE"===a[r]&&(t.VALUE=a[1-r])}),{data:t}}},tD={safeCall:function(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){Q.info("safeCall error",e)}return r},safeIncrement:eu,getComputedStyle:function(e,t){var i;return e&&t&&tg.default&&"function"==typeof tg.default.getComputedStyle?(ti&&ti.has(e)&&(i=ti.get(e)),i||(i=tg.default.getComputedStyle(e,null),ti&&ti.set(e,i)),i.getPropertyValue(t)):""},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:ev,cdnHeadersToRequestId:eE,extractHostnameAndDomain:eo,extractHostname:es,manifestParser:t_,generateShortID:K,generateUUID:$,now:F.now,findMediaElement:Y},tC={},tL=function(e){var t=arguments;"string"==typeof e?tL.hasOwnProperty(e)?H.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),tL[e].apply(null,t)},0):Q.warn("`"+e+"` is an unknown task"):"function"==typeof e?H.default.setTimeout(function(){e(tL)},0):Q.warn("`"+e+"` is invalid.")},tM={loaded:F.now(),NAME:"mux-embed",VERSION:"5.9.0",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,i){var a=B(Y(t),3),r=a[0],n=a[1],s=a[2],o=e.log,l=e.utils.getComputedStyle,d=e.utils.secondsToMs;if(!r)return o.error("No element was found with the `"+n+"` query selector.");if("video"!==s&&"audio"!==s)return o.error("The element of `"+n+"` was not a media element.");r.mux&&(r.mux.destroy(),delete r.mux,o.warn("Already monitoring this video element, replacing existing event listeners")),(i=Object.assign({automaticErrorTracking:!0},i,{getPlayheadTime:function(){return d(r.currentTime)},getStateData:function(){var e,t,i=(null==(e=this.getPlayheadTime)?void 0:e.call(this))||d(r.currentTime),a=this.hlsjs&&this.hlsjs.url,n=this.dashjs&&"function"==typeof this.dashjs.getSource&&this.dashjs.getSource(),s={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:tv.default&&!!(tv.default.fullscreenElement||tv.default.webkitFullscreenElement||tv.default.mozFullScreenElement||tv.default.msFullscreenElement),video_poster_url:r.poster,video_source_url:a||n||r.currentSrc,video_source_duration:d(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:null==r||null==(t=r.getVideoPlaybackQuality)?void 0:t.call(r).droppedVideoFrames};if(r.getStartDate&&i>0){var o=r.getStartDate();if(o&&"function"==typeof o.getTime&&o.getTime()){var u=o.getTime();s.player_program_time=u+i,r.seekable.length>0&&(s.player_live_edge_program_time=u+r.seekable.end(r.seekable.length-1))}}return s}})).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:e.VERSION},i.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(t,i){e.emit(n,t,i)},r.mux.updateData=function(e){r.mux.emit("hb",e)};var u=function(){o.error("The monitor for this video element has already been destroyed.")};
1r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(e){r.removeEventListener(e,r.mux.listeners[e],!1)}),delete r.mux.listeners,r.mux.destroy=u,r.mux.swapElement=u,r.mux.emit=u,r.mux.addHLSJS=u,r.mux.addDashJS=u,r.mux.removeHLSJS=u,r.mux.removeDashJS=u,r.mux.updateData=u,r.mux.setEmitTranslator=u,r.mux.setStateDataTranslator=u,r.mux.setGetPlayheadTime=u,r.mux.deleted=!0,e.emit(n,"destroy")},r.mux.swapElement=function(t){var i=B(Y(t),3),a=i[0],n=i[1],s=i[2];return a?"video"!==s&&"audio"!==s?e.log.error("The element of `"+n+"` was not a media element."):void(a.muxId=r.muxId,delete r.muxId,a.mux=a.mux||{},a.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(a.mux.listeners).forEach(function(e){r.removeEventListener(e,a.mux.listeners[e],!1),a.addEventListener(e,a.mux.listeners[e],!1)}),a.mux.swapElement=r.mux.swapElement,a.mux.destroy=r.mux.destroy,delete r.mux,r=a):e.log.error("No element was found with the `"+n+"` query selector.")},r.mux.addHLSJS=function(t){e.addHLSJS(n,t)},r.mux.addDashJS=function(t){e.addDashJS(n,t)},r.mux.removeHLSJS=function(){e.removeHLSJS(n)},r.mux.removeDashJS=function(){e.removeDashJS(n)},r.mux.setEmitTranslator=function(t){e.setEmitTranslator(n,t)},r.mux.setStateDataTranslator=function(t){e.setStateDataTranslator(n,t)},r.mux.setGetPlayheadTime=function(t){t||(t=i.getPlayheadTime),e.setGetPlayheadTime(n,t)},e.init(n,i),e.emit(n,"playerready"),r.paused||(e.emit(n,"play"),r.readyState>2&&e.emit(n,"playing")),r.mux.listeners={},tE.forEach(function(t){("error"!==t||i.automaticErrorTracking)&&(r.mux.listeners[t]=function(){var i={};if("error"===t){if(!r.error||1===r.error.code)return;i.player_error_code=r.error.code,i.player_error_message=tb[r.error.code]||r.error.message}e.emit(n,t,i)},r.addEventListener(t,r.mux.listeners[t],!1))})}(tL,e,t)},destroyMonitor:function(e){var t=B(Y(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():Q.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var i=q(e);tC[i]?tC[i].addHLSJS(t):Q.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(e,t){var i=q(e);tC[i]?tC[i].addDashJS(t):Q.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(e){var t=q(e);tC[t]?tC[t].removeHLSJS():Q.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=q(e);tC[t]?tC[t].removeDashJS():Q.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){z()&&t&&t.respectDoNotTrack&&Q.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=q(e);tC[i]=new tp(tL,i,t)},emit:function(e,t,i){var a=q(e);tC[a]?(tC[a].emit(t,i),"destroy"===t&&delete tC[a]):Q.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(e,t){var i=q(e);tC[i]?tC[i].emit("hb",t):Q.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(e,t){var i=q(e);tC[i]?tC[i].emitTranslator=t:Q.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(e,t){var i=q(e);tC[i]?tC[i].stateDataTranslator=t:Q.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var i=q(e);tC[i]?tC[i].getPlayheadTime=t:Q.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:z,log:Q,utils:tD,events:{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",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"},WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(tL,tM),void 0!==H.default&&"function"==typeof H.default.addEventListener&&H.default.addEventListener("pagehide",function(e){e.persisted||(tL.WINDOW_UNLOADING=!0)},!1);var tO=i(19309).Ay,tx={VIDEO:"video",DRM:"drm"},tN={NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,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_
1KEY_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},tP=e=>e===tx.VIDEO?"playback":e,tU=class e extends Error{constructor(t,i=e.MEDIA_ERR_CUSTOM,a,r){var n;super(t),this.name="MediaError",this.code=i,this.context=r,this.fatal=null!=a?a:i>=e.MEDIA_ERR_NETWORK&&i<=e.MEDIA_ERR_ENCRYPTED,this.message||(this.message=null!=(n=e.defaultMessages[this.code])?n:"")}};tU.MEDIA_ERR_ABORTED=1,tU.MEDIA_ERR_NETWORK=2,tU.MEDIA_ERR_DECODE=3,tU.MEDIA_ERR_SRC_NOT_SUPPORTED=4,tU.MEDIA_ERR_ENCRYPTED=5,tU.MEDIA_ERR_CUSTOM=100,tU.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 tB=tU,tH=(e,t)=>null!=t&&e in t,tW={ANY:"any",MUTED:"muted"},tV={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},tF={MSE:"mse",NATIVE:"native"},t$={HEADER:"header",QUERY:"query",NONE:"none"},tK=Object.values(t$),tq={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},tY={HLS:tq.M3U8},tG=(Object.keys(tY),[...Object.values(tq)],{upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"}),tj={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},tQ={DESCENDING:"desc"},tZ={code:"en"},tz=(e,t,i,a,r=e)=>{r.addEventListener(t,i,a),e.addEventListener("teardown",()=>{r.removeEventListener(t,i)},{once:!0})},tX=e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]},tJ=e=>{let{type:t}=e;if(t){let e=t.toUpperCase();return tH(e,tY)?tY[e]:t}return t2(e)},t0=e=>"VOD"===e?tV.ON_DEMAND:tV.LIVE,t1=e=>"EVENT"===e?1/0:"VOD"===e?NaN:0,t2=e=>{let{src:t}=e;if(!t)return"";let i="";try{i=new URL(t).pathname}catch{console.error("invalid url")}let a=i.lastIndexOf(".");if(a<0)return t4(e)?tq.M3U8:"";let r=i.slice(a+1).toUpperCase();return tH(r,tq)?tq[r]:""},t3="mux.com",t4=({src:e,customDomain:t=t3})=>{let i;try{i=new URL(`${e}`)}catch{return!1}let a="https:"===i.protocol,r=i.hostname===`stream.${t}`.toLowerCase(),n=i.pathname.split("/"),s=2===n.length,o=!(null!=n&&n[1].includes("."));return a&&r&&s&&o},t5=e=>{let t=(null!=e?e:"").split(".")[1];if(t)try{let e=t.replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}catch{return}};function t9(e,t=!0){var i;return new t8(t&&null!=(i=null==tZ?void 0:tZ[e])?i:e,t?tZ.code:"en")}var t8=class{constructor(e,t=(e=>null!=(e=tZ)?e:"en")()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,i)=>{var a;return null!=(a=e[i])?a:""})}toString(){return this.message}},t6=Object.values(tW),t7=e=>"boolean"==typeof e||"string"==typeof e&&t6.includes(e),ie=(e,t)=>{if(!t)return;let i=e.muted,a=()=>e.muted=i;switch(t){case tW.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(a)});break;case tW.MUTED:e.muted=!0,e.play().catch(a);break;default:e.play().catch(()=>{})}},it=e=>"time"in e?e.time:e.startTime;function ii(e,t,i,a,r,n){let s=document.createElement("track");return s.kind=t,s.label=i,a&&(s.srclang=a),r&&(s.id=r),n&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(t)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),e.append(s),s.track}function ia(e,t,i){var a;return null==(a=Array.from(e.querySelectorAll("track")).find(e=>e.track.label===t&&e.track.kind===i))?void 0:a.track}async function ir(e,t,i,a){let r=ia(e,i,a);return r||((r=ii(e,a,i)).mode="hidden",await new Promise(e=>setTimeout(()=>e(void 0),0))),"hidden"!==r.mode&&(r.mode="hidden"),[...t].sort((e,t)=>
1it(t)-it(e)).forEach(t=>{var i,n;let s=t.value,o=it(t);if("endTime"in t&&null!=t.endTime)null==r||r.addCue(new VTTCue(o,t.endTime,"chapters"===a?s:JSON.stringify(null!=s?s:null)));else{let t=Array.prototype.findIndex.call(null==r?void 0:r.cues,e=>e.startTime>=o),l=null==(i=null==r?void 0:r.cues)?void 0:i[t],d=l?l.startTime:Number.isFinite(e.duration)?e.duration:Number.MAX_SAFE_INTEGER,u=null==(n=null==r?void 0:r.cues)?void 0:n[t-1];u&&(u.endTime=o),null==r||r.addCue(new VTTCue(o,d,"chapters"===a?s:JSON.stringify(null!=s?s:null)))}}),e.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r}var is="cuepoints",io=Object.freeze({label:is});async function il(e,t,i=io){return ir(e,t,i.label,"metadata")}var id=e=>({time:e.startTime,value:JSON.parse(e.text)});function iu(e,t={label:is}){var i,a;let r=ia(e,t.label,"metadata");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return id(r.activeCues[0]);let{currentTime:n}=e;return id(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function ic(e,t=io){return new Promise(i=>{tz(e,"loadstart",async()=>{let a=await il(e,[],t);tz(e,"cuechange",()=>{let t=iu(e);if(t){let i=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var ih="chapters",im=Object.freeze({label:ih}),ip=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function iv(e,t,i=im){return ir(e,t,i.label,"chapters")}function iE(e,t={label:ih}){var i,a;let r=ia(e,t.label,"chapters");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return ip(r.activeCues[0]);let{currentTime:n}=e;return ip(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function ib(e,t=im){return new Promise(i=>{tz(e,"loadstart",async()=>{let a=await iv(e,[],t);tz(e,"cuechange",()=>{let t=iE(e);if(t){let i=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var ig={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},i_=(e,t,i,a,r=!1,n=!(e=>null==(e=globalThis.navigator)?void 0:e.onLine)())=>{var s,o;if(n){let i=t9("Your device appears to be offline",r),a=tB.MEDIA_ERR_NETWORK,n=new tB(i,a,!1,void 0);return n.errorCategory=t,n.muxCode=tN.NETWORK_OFFLINE,n.data=e,n}let l="status"in e?e.status:e.code,d=Date.now(),u=tB.MEDIA_ERR_NETWORK;if(200===l)return;let c=tP(t),h=((e,t)=>{var i,a;let r=tP(e),n=`${r}Token`;return null!=(i=t.tokens)&&i[r]?null==(a=t.tokens)?void 0:a[r]:tH(n,t)?t[n]:void 0})(t,i),m=(e=>e===tx.VIDEO?ig.VIDEO:e===tx.DRM?ig.DRM:void 0)(t),[p]=tX(null!=(s=i.playbackId)?s:"");if(!l||!p)return;let E=t5(h);if(h&&!E){let i=new tB(t9("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:c}),u,!0,t9("Compact JWT string: {token}",r).format({token:h}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_MALFORMED,i.data=e,i}if(l>=500){let e=new tB("",u,null==a||a);return e.errorCategory=t,e.muxCode=tN.NETWORK_UNKNOWN_ERROR,e}if(403===l)if(E){if((({exp:e},t=Date.now())=>!e||1e3*e<t)(E,d)){let i={timeStyle:"medium",dateStyle:"medium"},a=new tB(t9("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:c}),u,!0,t9("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",i).format(null!=(o=E.exp)?o:0),currentDate:new Intl.DateTimeFormat("en",i).format(d)}));return a.errorCategory=t,a.muxCode=tN.NETWORK_TOKEN_EXPIRED,a.data=e,a}if((({sub:e},t)=>e!==t)(E,p)){let i=new tB(t9("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:c}),u,!0,t9("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:c,playbackId:p,tokenPlaybackId:E.sub}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_SUB_MISMATCH,i.data=e,i}if((({aud:e},t)=>!e)(E,0)){let i=new tB(t9("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,t9("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:m}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_AUD_MISSING,i.data=e,i}if((({aud:e},t)=>e!==t)(E,m)){let i=new tB(t9("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,t9("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:m,aud:E.aud}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_AUD_MISMATCH,i.data=e,i}}else{let i=new tB(t9("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:c,category:t}),u,null==a||a,t9("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_MISSING,i.data=e,i}if(412===l){let n=new tB(t9("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),u,null==a||a,t9("Specified playback ID: {playbackId}",r).format({playbackId:p}));return n.errorCategory=t,n.muxCode=tN.NETWORK_NOT_READY,n.streamType=i.streamType===tV.LIVE?"live":i.streamType===tV.ON_DEMAND?"on-demand":"unknown",n.data=e,n}if(404===l){let i=new tB(t9("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),u,null==a||a,t9("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tN.NETWORK_NOT_FOUND,i.data=e,i}
1if(400===l){let i=new tB(t9("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),u,null==a||a,t9("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tN.NETWORK_INVALID_URL,i.data=e,i}let b=new tB("",u,null==a||a);return b.errorCategory=t,b.muxCode=tN.NETWORK_UNKNOWN_ERROR,b.data=e,b},iy=tO.DefaultConfig.capLevelController,iT={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400},iA=class e extends iy{constructor(e){super(e)}static setMaxAutoResolution(t,i){i?e.maxAutoResolution.set(t,i):e.maxAutoResolution.delete(t)}getMaxAutoResolution(){var t;let i=this.hls;return null!=(t=e.maxAutoResolution.get(i))?t:void 0}get levels(){var e;return null!=(e=this.hls.levels)?e:[]}getValidLevels(e){return this.levels.filter((t,i)=>this.isLevelAllowed(t)&&i<=e)}getMaxLevelCapped(e){let t=this.getValidLevels(e),i=this.getMaxAutoResolution();if(!i)return super.getMaxLevel(e);let a=iT[i.toLowerCase().trim()];if(!a)return super.getMaxLevel(e);let r=t.filter(e=>e.width*e.height<=a),n=r.findIndex(e=>e.width*e.height===a);if(-1!==n){let e=r[n];return t.findIndex(t=>t===e)}if(0===r.length)return 0;let s=r[r.length-1];return t.findIndex(e=>e===s)}getMaxLevel(t){if(void 0!==this.getMaxAutoResolution())return this.getMaxLevelCapped(t);let i=super.getMaxLevel(t),a=this.getValidLevels(t);if(!a[i])return i;let r=Math.min(a[i].width,a[i].height),n=e.minMaxResolution;return r>=n?i:iy.getMaxLevelByMediaSize(a,16/9*n,n)}};iA.minMaxResolution=720,iA.maxAutoResolution=new WeakMap;var ik,iw,iS,iI,iR,iD,iC,iL,iM,iO={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},ix=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g,iN=async(e,t)=>{if(t===tq.MP4)return{streamType:tV.ON_DEMAND,targetLiveWindow:NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(t===tq.M3U8){let t=await fetch(e);if(!t.ok)return Promise.reject(t);let i=await t.text(),a=await fetch(i.split(`
2`).find((e,t,i)=>t&&i[t-1].startsWith("#EXT-X-STREAM-INF"))).then(e=>200!==e.status?Promise.reject(e):e.text());return{...(e=>{let t=e.split(`
3`).filter(e=>e.startsWith("#EXT-X-SESSION-DATA"));if(!t.length)return{};let i={};for(let e of t){let t=Object.fromEntries([...e.matchAll(ix)].map(([,e,t])=>[e,t])),a=t["DATA-ID"];a&&(i[a]={...t})}return{sessionData:i}})(i),...(e=>{var t,i,a;let r=e.split(`
4`),n=null==(i=(null!=(t=r.find(e=>e.startsWith("#EXT-X-PLAYLIST-TYPE")))?t:"").split(":")[1])?void 0:i.trim(),s=t0(n),o=t1(n),l;if(s===tV.LIVE){let e=r.find(e=>e.startsWith("#EXT-X-PART-INF"));if(e)l=2*e.split(":")[1].split("=")[1];else{let e=r.find(e=>e.startsWith("#EXT-X-TARGETDURATION")),t=null==(a=null==e?void 0:e.split(":"))?void 0:a[1];l=(null!=t?t:6)*3}}return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}})(a)}}return console.error(`Media type ${t} is an unrecognized or unsupported type for src ${e}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}},iP=async(e,t,i=tJ({src:e}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:u}=await iN(e,i),c=null==u?void 0:u["com.apple.hls.chapters"];(null!=c&&c.URI||null!=c&&c.VALUE.toLocaleLowerCase().startsWith("http"))&&iU(null!=(a=c.URI)?a:c.VALUE,t),(null!=(r=i$.get(t))?r:{}).liveEdgeStartOffset=d,(null!=(n=i$.get(t))?n:{}).targetLiveWindow=l,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(s=i$.get(t))?s:{}).streamType=o,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},iU=async(e,t)=>{var i,a;try{let r=await fetch(e);if(!r.ok)throw Error(`Failed to fetch Mux metadata: ${r.status} ${r.statusText}`);let n=await r.json(),s={};if(!(null!=(i=null==n?void 0:n[0])&&i.metadata))return;for(let e of n[0].metadata)e.key&&e.value&&(s[e.key]=e.value);(null!=(a=i$.get(t))?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");t.dispatchEvent(o)}catch(e){console.error(e)}},iB=null!=(iw=null==(ik=null==globalThis?void 0:globalThis.navigator)?void 0:ik.userAgent)?iw:"",iH=null!=(iR=null==(iI=null==(iS=null==globalThis?void 0:globalThis.navigator)?void 0:iS.userAgentData)?void 0:iI.platform)?iR:"",iW=null!=(iL=null==(iC=null==(iD=null==globalThis?void 0:globalThis.navigator)?void 0:iD.userAgentData)?void 0:iC.brands)?iL:[],iV=iB.toLowerCase().includes("android")||["x11","android"].some(e=>iH.toLowerCase().includes(e)),iF=iW.find(e=>"Google Chrome"===e.brand),i$=new WeakMap,iK="mux.com",iq=null==(iM=tO.isSupported)?void 0:iM.call(tO),iY=()=>tL.utils.now(),iG=tL.utils.generateUUID,ij=({playbackId:e,customDomain:t=iK,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:u=d}={},extraSourceParams:c={}}={})=>
4{if(!e)return;let[h,m=""]=tX(e),p=new URL(`https://stream.${t}/${h}.m3u8${m}`);return u||p.searchParams.has("token")?(p.searchParams.forEach((e,t)=>{"token"!=t&&p.searchParams.delete(t)}),u&&p.searchParams.set("token",u)):(i&&p.searchParams.set("max_resolution",i),a&&(p.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&&p.searchParams.set("rendition_order",r),n&&p.searchParams.set("program_start_time",`${n}`),s&&p.searchParams.set("program_end_time",`${s}`),o&&p.searchParams.set("asset_start_time",`${o}`),l&&p.searchParams.set("asset_end_time",`${l}`),Object.entries(c).forEach(([e,t])=>{null!=t&&p.searchParams.set(e,t)})),p.toString()},iQ=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},iZ=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(/\.m3u8|\//);return t||void 0},iz=e=>{var t;return null==(t=i$.get(e))?void 0:t.error},iX=e=>{var t,i;return null!=(i=null==(t=i$.get(e))?void 0:t.streamType)?i:tV.UNKNOWN},iJ=e=>{var t,i;return null!=(i=null==(t=i$.get(e))?void 0:t.seekable)?i:e.seekable},i0=.034,i1=(e,t,i=i0)=>e>t||((e,t,i=i0)=>Math.abs(e-t)<=i)(e,t,i),i2=(e,t)=>{var i,a,r;if(!t||!e.buffered.length)return;if(e.readyState>2)return!1;let n=t.currentLevel>=0?null==(a=null==(i=t.levels)?void 0:i[t.currentLevel])?void 0:a.details:null==(r=t.levels.find(e=>!!e.details))?void 0:r.details;if(!n||n.live)return;let{fragments:s}=n;if(!(null!=s&&s.length))return;if(e.currentTime<e.duration-(n.targetduration+.5))return!1;let o=s[s.length-1];if(e.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=e.buffered.start(e.buffered.length-1),u=e.buffered.end(e.buffered.length-1);return l>d&&l<u},i3=(e,t)=>e.ended||e.loop?e.ended:!!(t&&i2(e,t))||((e,t=i0)=>e.paused&&i1(e.currentTime,e.duration,t))(e),i4=(e,t,i)=>{let a=null==t?void 0:t.engine;null!=e&&e.mux&&!e.mux.deleted&&(null!=i&&i.muxDataKeepSession?a&&e.mux.removeHLSJS():(e.mux.destroy(),delete e.mux)),a&&(a.detachMedia(),a.destroy()),e&&(e.hasAttribute("src")&&(e.removeAttribute("src"),e.load()),e.removeEventListener("error",ar),e.removeEventListener("error",as),e.removeEventListener("durationchange",aa),i$.delete(e),e.dispatchEvent(new Event("teardown")))};function i5(e,t){var i,a;let r=tJ(e);if(r!==tq.M3U8)return!0;let n=!r||null==(i=t.canPlayType(r))||i,{preferPlayback:s}=e,o=s===tF.MSE,l=s===tF.NATIVE,d=iq&&(o||iV||iF&&parseInt(null!=(a=iF.version)?a:"0")>=141&&!!t.canPlayType("application/vnd.apple.mpegurl"));return n&&(l||!d)}var i9=e=>e===tV.LIVE?{backBufferLength:8}:{},i8=e=>{let{tokens:{drm:t}={},playbackId:i,drmTypeCb:a}=e,r=iQ(i);return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:ae(e,"fairplay"),serverCertificateUrl:at(e,"fairplay")}
4,"com.widevine.alpha":{licenseUrl:ae(e,"widevine")},"com.microsoft.playready":{licenseUrl:ae(e,"playready")}},requestMediaKeySystemAccessFunc:(e,t)=>("com.widevine.alpha"===e&&(t=[...t.map(e=>{var t;let i=null==(t=e.videoCapabilities)?void 0:t.map(e=>({...e,robustness:"HW_SECURE_ALL"}));return{...e,videoCapabilities:i}}),...t]),navigator.requestMediaKeySystemAccess(e,t).then(t=>{let i=(e=>e.includes("fps")?iO.FAIRPLAY:e.includes("playready")?iO.PLAYREADY:e.includes("widevine")?iO.WIDEVINE:void 0)(e);return null==a||a(i),t}))}:{}},i6=async e=>{let t=await fetch(e);return 200!==t.status?Promise.reject(t):await t.arrayBuffer()},i7=async(e,t)=>{let i=await fetch(t,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:e});return 200!==i.status?Promise.reject(i):new Uint8Array(await i.arrayBuffer())},ae=({playbackId:e,tokens:{drm:t}={},customDomain:i=iK},a)=>{let r=iQ(e);return`https://license.${i.toLocaleLowerCase().endsWith(iK)?i:iK}/license/${a}/${r}?token=${t}`},at=({playbackId:e,tokens:{drm:t}={},customDomain:i=iK},a)=>{let r=iQ(e);return`https://license.${i.toLocaleLowerCase().endsWith(iK)?i:iK}/appcert/${a}/${r}?token=${t}`},ai=({playbackId:e,src:t,customDomain:i})=>{if(e)return!0;if("string"!=typeof t)return!1;let a=new URL(t,null==window?void 0:window.location.href).hostname.toLocaleLowerCase();return a.includes(iK)||!!i&&a.includes(i.toLocaleLowerCase())};function aa(e){var t;let i=e.target,a=null==(t=i$.get(i))?void 0:t.startTime;if(a&&function(e,t,i){t&&i>t&&(i=t);for(let t=0;t<e.length;t++)if(e.start(t)<=i&&e.end(t)>=i)return!0;return!1}(i.seekable,i.duration,a)){let e="auto"===i.preload;e&&(i.preload="none"),i.currentTime=a,e&&(i.preload="auto")}}async function ar(e){if(!e.isTrusted)return;e.stopImmediatePropagation();let t=e.target;if(!(null!=t&&t.error))return;let{message:i,code:a}=t.error,r=new tB(i,a);if(t.src&&a===tB.MEDIA_ERR_SRC_NOT_SUPPORTED&&t.readyState===HTMLMediaElement.HAVE_NOTHING)return void setTimeout(()=>{var e;let i=null!=(e=iz(t))?e:t.error;(null==i?void 0:i.code)===tB.MEDIA_ERR_SRC_NOT_SUPPORTED&&an(t,r)},500);if(t.src&&(a!==tB.MEDIA_ERR_DECODE||void 0!==a))try{let{status:e}=await fetch(t.src);r.data={response:{code:e}}}catch{}an(t,r)}function an(e,t){var i;t.fatal&&((null!=(i=i$.get(e))?i:{}).error=t,e.dispatchEvent(new CustomEvent("error",{detail:t})))}function as(e){var t,i;if(!(e instanceof CustomEvent)||!(e.detail instanceof tB))return;let a=e.target,r=e.detail;r&&r.fatal&&((null!=(t=i$.get(a))?t:{}).error=r,null==(i=a.mux)||i.emit("error",{player_error_code:r.code,player_error_message:r.message,player_error_context:r.context}))}var ao,al,ad,au,ac,ah,am,ap,av,aE,ab,ag,af=(e,t)=>{var i,a,r;e.fatal?console.error("getErrorFromHlsErrorData()",e):t.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",e);let n={[tO.ErrorTypes.NETWORK_ERROR]:tB.MEDIA_ERR_NETWORK,[tO.ErrorTypes.MEDIA_ERROR]:tB.MEDIA_ERR_DECODE,[tO.ErrorTypes.KEY_SYSTEM_ERROR]:tB.MEDIA_ERR_ENCRYPTED},s,o=(e=>[tO.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,tO.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(e.details)?tB.MEDIA_ERR_NETWORK:n[e.type])(e);if(o===tB.MEDIA_ERR_NETWORK&&e.response){let r=null!=(i=(e=>e.type===tO.ErrorTypes.KEY_SYSTEM_ERROR?tx.DRM:e.type===tO.ErrorTypes.NETWORK_ERROR?tx.VIDEO:void 0)(e))?i:tx.VIDEO;s=null!=(a=i_(e.response,r,t,e.fatal))?a:new tB("",o,e.fatal)}else o===tB.MEDIA_ERR_ENCRYPTED?e.details===tO.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE?((s=new tB(t9("Attempting to play DRM-protected content without providing a DRM token."),tB.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_MISSING_TOKEN):e.details===tO.ErrorDetails.KEY_SYSTEM_NO_ACCESS?((s=new tB(t9("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tB.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM):e.details===tO.ErrorDetails.KEY_SYSTEM_NO_SESSION?((s=new tB(t9("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tB.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_GENERATE_REQUEST_FAILED):e.details===tO.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED?((s=new tB(t9("Failed to update DRM license. This may be an issue with the player or your protected content."),tB.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_UPDATE_LICENSE_FAILED):e.details===tO.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED?((s=new tB(t9("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),tB.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_UPDATE_SERVER_CERT_FAILED):e.details===tO.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR?((s=new tB(t9("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),tB.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_CDM_ER
4ROR):e.details===tO.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED?((s=new tB(t9("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tB.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_OUTPUT_RESTRICTED):((s=new tB(e.error.message,tB.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tx.DRM,s.muxCode=tN.ENCRYPTED_ERROR):s=new tB("",o,e.fatal);return s.context||(s.context=`${e.url?`url: ${e.url}
5`:""}${e.response&&(e.response.code||e.response.text)?`response: ${e.response.code}, ${e.response.text}
6`:""}${e.reason?`failure reason: ${e.reason}
7`:""}${e.level?`level: ${e.level}
8`:""}${e.parent?`parent stream controller: ${e.parent}
9`:""}${e.buffer?`buffer length: ${e.buffer}
10`:""}${e.error?`error: ${e.error}
11`:""}${e.event?`event: ${e.event}
12`:""}${e.err?`error message: ${null==(r=e.err)?void 0:r.message}
13`:""}`),s.data=e,s},a_=i(20853),ay=e=>{throw TypeError(e)},aT=(e,t,i)=>t.has(e)||ay("Cannot "+i),aA=(e,t,i)=>(aT(e,t,"read from private field"),i?i.call(e):t.get(e)),ak=(e,t,i)=>t.has(e)?ay("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),aw=(e,t,i,a)=>(aT(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),aS=(e,t,i)=>(aT(e,t,"access private method"),i),aI=(()=>{try{return"0.29.0"}catch{}return"UNKNOWN"})(),aR=`
14<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,aD={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo"}
14,aC=Object.values(aD),aL="mux-video",aM=class extends a_.lB{constructor(){super(),ak(this,ab),ak(this,ao),ak(this,al),ak(this,ad),ak(this,au,{}),ak(this,ac,{}),ak(this,ah),ak(this,am),ak(this,ap),ak(this,av),ak(this,aE,""),aw(this,ad,iY()),this.nativeEl.addEventListener("muxmetadata",e=>{var t;let i=(e=>{var t;return null==(t=i$.get(e))?void 0:t.metadata})(this.nativeEl),a=null!=(t=this.metadata)?t:{};this.metadata={...i,...a},(null==i?void 0:i["com.mux.video.branding"])==="mux-free-plan"&&(aw(this,aE,"default"),this.updateLogo())})}static get NAME(){return aL}static get VERSION(){return aI}static get observedAttributes(){var e;return[...aC,...null!=(e=a_.lB.observedAttributes)?e:[]]}static getLogoHTML(e){return e&&"false"!==e?"default"===e?aR:`<img part="logo" src="${e}" />`:""}static getTemplateHTML(e={}){var t;return`
15      ${a_.lB.getTemplateHTML(e)}
16      <style>
17        :host {
18          position: relative;
19        }
20        slot[name="logo"] {
21          display: flex;
22          justify-content: end;
23          position: absolute;
24          top: 1rem;
25          right: 1rem;
26          opacity: 0;
27          transition: opacity 0.25s ease-in-out;
28          z-index: 1;
29        }
30        slot[name="logo"]:has([part="logo"]) {
31          opacity: 1;
32        }
33        slot[name="logo"] [part="logo"] {
34          width: 5rem;
35          pointer-events: none;
36          user-select: none;
37        }
38      </style>
39      <slot name="logo">
40        ${this.getLogoHTML(null!=(t=e[aD.LOGO])?t:"")}
41      </slot>
42    `}get preferCmcd(){var e;return null!=(e=this.getAttribute(aD.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tK.includes(e)?this.setAttribute(aD.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${tK.join()}`):this.removeAttribute(aD.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(aD.PLAYER_INIT_TIME)?+this.getAttribute(aD.PLAYER_INIT_TIME):aA(this,ad)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aD.PLAYER_INIT_TIME):this.setAttribute(aD.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=aA(this,ap))?e:aL}set playerSoftwareName(e){aw(this,ap,e)}get playerSoftwareVersion(){var e;return null!=(e=aA(this,am))?e:aI}set playerSoftwareVersion(e){aw(this,am,e)}get _hls(){var e;return null==(e=aA(this,ao))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=iz(this.nativeEl))?e:null}get errorTranslator(){return aA(this,av)}set errorTranslator(e){aw(this,av,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(null==e?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return null!=(e=this.getAttribute(aD.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(aD.TYPE,e):this.removeAttribute(aD.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 null!=this.getAttribute(aD.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(aD.DEBUG,""):this.removeAttribute(aD.DEBUG))}get disableTracking(){return this.hasAttribute(aD.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(aD.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(aD.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(aD.DISABLE_COOKIES,""):this.removeAttribute(aD.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(aD.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(aD.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(aD.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(aD.START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set startTime(e){e!==this.startTime&&(null==e?this.removeAttribute(aD.START_TIME):this.setAttribute(aD.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(aD.PLAYBACK_ID)?this.getAttribute(aD.PLAYBACK_ID):null!=(e=iZ(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(aD.PLAYBACK_ID,e):this.removeAttribute(aD.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(aD.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aD.MAX_RESOLUTION,e):this.removeAttribute(aD.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aD.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aD.MIN_RESOLUTION,e):this.removeAttribute(aD.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(aD.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(aD.MAX_AUTO_RESOLUTION):this.setAttribute(aD.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(aD.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aD.RENDITION_ORDER,e):this.removeAttribute(aD.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(aD.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(aD.PROGRAM_START_TIME):this.setAttribute(aD.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(aD.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(aD.PROGRAM_END_TIME):this.setAttribute(aD.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(aD.ASSET_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetStartTime(e){null==e?this.removeAttribute(aD.ASSET_START_TIME):this.setAttribute(aD.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(aD.ASSET_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetEndTime(e){null==e?this.removeAttribute(aD.ASSET_END_TIME):this.setAttribute(aD.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(aD.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aD.CUSTOM_DOMAIN,e):this.removeAttribute(aD.CUSTOM_DOMAIN))}get drmToken(){var e;return null!=(e=this.getAttribute(aD.DRM_TOKEN))?e:void 0}
42set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(aD.DRM_TOKEN,e):this.removeAttribute(aD.DRM_TOKEN))}get playbackToken(){var e,t,i,a;if(this.hasAttribute(aD.PLAYBACK_TOKEN))return null!=(e=this.getAttribute(aD.PLAYBACK_TOKEN))?e:void 0;if(this.hasAttribute(aD.PLAYBACK_ID)){let[,e]=tX(null!=(t=this.playbackId)?t:"");return null!=(i=new URLSearchParams(e).get("token"))?i:void 0}if(this.src)return null!=(a=new URLSearchParams(this.src).get("token"))?a:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(aD.PLAYBACK_TOKEN,e):this.removeAttribute(aD.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(aD.PLAYBACK_TOKEN),t=this.getAttribute(aD.DRM_TOKEN);return{...aA(this,ac),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{}}}set tokens(e){aw(this,ac,null!=e?e:{})}get ended(){return i3(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(aD.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(aD.ENV_KEY,e):this.removeAttribute(aD.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aD.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aD.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aD.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(aD.STREAM_TYPE))?e:iX(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(aD.STREAM_TYPE,e):this.removeAttribute(aD.STREAM_TYPE))}get targetLiveWindow(){var e,t,i;return this.hasAttribute(aD.TARGET_LIVE_WINDOW)?+this.getAttribute(aD.TARGET_LIVE_WINDOW):(e=this.nativeEl,null!=(i=null==(t=i$.get(e))?void 0:t.targetLiveWindow)?i:NaN)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(aD.TARGET_LIVE_WINDOW):this.setAttribute(aD.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,t;if(this.hasAttribute(aD.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:i}=this,a=null!=(e=this.nativeEl.seekable.end(0))?e:0;return Math.max(null!=(t=this.nativeEl.seekable.start(0))?t:0,a-i)}return(e=>{var t;let i=null==(t=i$.get(e))?void 0:t.liveEdgeStartOffset;if("number"!=typeof i)return NaN;let a=iJ(e);return a.length?a.end(a.length-1)-i:NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(aD.LIVE_EDGE_OFFSET))return+this.getAttribute(aD.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(null==e?this.removeAttribute(aD.LIVE_EDGE_OFFSET):this.setAttribute(aD.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return iJ(this.nativeEl)}async addCuePoints(e){return il(this.nativeEl,e)}get activeCuePoint(){return iu(this.nativeEl)}get cuePoints(){return function(e,t={label:is}){let i=ia(e,t.label,"metadata");return null!=i&&i.cues?Array.from(i.cues,e=>id(e)):[]}(this.nativeEl)}async addChapters(e){return iv(this.nativeEl,e)}get activeChapter(){return iE(this.nativeEl)}get chapters(){return function(e,t={label:ih}){var i;let a=ia(e,t.label,"chapters");return null!=(i=null==a?void 0:a.cues)&&i.length?Array.from(a.cues,e=>ip(e)):[]}(this.nativeEl)}getStartDate(){return function(e,t){if(t){let i=t.playingDate;if(null!=i)return new Date(i.getTime()-1e3*e.currentTime)}return"function"==typeof e.getStartDate?e.getStartDate():new Date(NaN)}(this.nativeEl,this._hls)}get currentPdt(){var e,t;return e=this.nativeEl,(t=this._hls)&&t.playingDate?t.playingDate:new Date("function"==typeof e.getStartDate?e.getStartDate().getTime()+1e3*e.currentTime:NaN)}get preferPlayback(){let e=this.getAttribute(aD.PREFER_PLAYBACK);if(e===tF.MSE||e===tF.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tF.MSE||e===tF.NATIVE?this.setAttribute(aD.PREFER_PLAYBACK,e):this.removeAttribute(aD.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![aD.METADATA_URL].includes(e)).reduce((e,t)=>{let i=this.getAttribute(t);return null!=i&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=i),e},{}),...aA(this,au)}}set metadata(e){aw(this,au,null!=e?e:{}),this.mux&&this.mux.emit("hb",aA(this,au))}get _hlsConfig(){return aA(this,ah)}set _hlsConfig(e){aw(this,ah,e)}get logo(){var e;return null!=(e=this.getAttribute(aD.LOGO))?e:aA(this,aE)}set logo(e){e?this.setAttribute(aD.LOGO,e):this.removeAttribute(aD.LOGO)}load(){aw(this,ao,((e,t,i)=>{var a,r,n,s;i4(t,i,e);let{metadata:o={}}=e,{view_session_id:l=iG()}=o,d=null!=(r=null==(a=e)?void 0:a.metadata)&&r.video_id?a.metadata.video_id:ai(a)&&null!=(s=null!=(n=iQ(a.playbackId))?n:iZ(a.src))?s:a.src;o.view_session_id=l,o.video_id=d,e.metadata=o,e.drmTypeCb=e=>{var i;null==(i=t.mux)||i.emit("hb",{view_drm_type:e})},i$.set(t,{retryCount:0});let u=((e,t)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l}=e,d=tJ(e)===tq.M3U8,u=i5(e,t);if(d&&!u&&iq){let d=i9(a),u=i8(e),c=[t$.QUERY,t$.HEADER].includes(s)?{useHeaders:s===t$.HEADER,sessionId:null==n?void 0:n.view_session_id,contentId:null==n?void 0:n.video_id}:void 0,h=null==o.capLevelToPlayerSize?{capLevelController:iA}:{},m=new tO({debug:i,startPosition:r,cmcd:c,xhrSetup:(e,t)=>{var i,a;if(s&&s!==t$.QUERY)return;let r=new URL(t);if(!r.searchParams.has("CMCD"))return;let n=(null!=(a=null==(i=r.searchParams.get("CMCD"))?void 0:i.split(","))?a:[]).filter(e=>e.startsWith("sid")||e.startsWith("cid")).join(",");r.searchParams.set("CMCD",n),e.open("GET",r)},...h,backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0,...d,...u,...o}
42);return h.capLevelController===iA&&void 0!==l&&iA.setMaxAutoResolution(m,l),m.on(tO.Events.MANIFEST_PARSED,async function(e,i){var a,r;let n=null==(a=i.sessionData)?void 0:a["com.apple.hls.chapters"];(null!=n&&n.URI||null!=n&&n.VALUE.toLocaleLowerCase().startsWith("http"))&&iU(null!=(r=null==n?void 0:n.URI)?r:null==n?void 0:n.VALUE,t)}),m}})(e,t),c=(({preload:e,src:t},i,a)=>{let r=e=>{null!=e&&["","none","metadata","auto"].includes(e)?i.setAttribute("preload",e):i.removeAttribute("preload")};if(!a)return r(e),r;let n=!1,s=!1,o=a.config.maxBufferLength,l=a.config.maxBufferSize,d=e=>{r(e);let t=null!=e?e:i.preload;s||"none"===t||("metadata"===t?(a.config.maxBufferLength=1,a.config.maxBufferSize=1):(a.config.maxBufferLength=o,a.config.maxBufferSize=l),u())},u=()=>{!n&&t&&(n=!0,a.loadSource(t))};return tz(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,u()},{once:!0}),d(e),d})(e,t,u);null!=e&&e.muxDataKeepSession&&null!=t&&t.mux&&!t.mux.deleted?u&&t.mux.addHLSJS({hlsjs:u,Hls:u?tO:void 0}):((e,t,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=tL,muxDataSDKOptions:o={}}=e,l=ai(e);if(!n&&(r||l)){let{playerInitTime:n,playerSoftwareName:l,playerSoftwareVersion:d,beaconCollectionDomain:u,debug:c,disableCookies:h}=e,m={...e.metadata,video_title:(null==(a=null==e?void 0:e.metadata)?void 0:a.video_title)||void 0};s.monitor(t,{debug:c,beaconCollectionDomain:u,hlsjs:i,Hls:i?tO:void 0,automaticErrorTracking:!1,errorTranslator:t=>"string"!=typeof t.player_error_code&&("function"==typeof e.errorTranslator?e.errorTranslator(t):t),disableCookies:h,...o,data:{...r?{env_key:r}:{},player_software_name:l,player_software:l,player_software_version:d,player_init_time:n,...m}})}})(e,t,u),((e,t,i)=>{var a,r;let n=i5(e,t),{src:s,customDomain:o=iK}=e,l=()=>{t.ended||e.disablePseudoEnded||!i3(t,i)||(i2(t,i)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},d,u,c=()=>{let e=iJ(t),i,a;e.length>0&&(i=e.start(0),a=e.end(0)),(u!==a||d!==i)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),d=i,u=a};if(tz(t,"durationchange",c),t&&n){let i=tJ(e);if("string"==typeof s){if(s.endsWith(".mp4")&&s.includes(o)){let e=iZ(s);iU(new URL(`https://stream.${o}/${e}/metadata.json`).toString(),t)}let n=()=>{if(iX(t)!==tV.LIVE||Number.isFinite(t.duration))return;let e=setInterval(c,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),tz(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})},l=async()=>iP(s,t,i).then(n).catch(i=>{if(i instanceof Response){let a=i_(i,tx.VIDEO,e);if(a)return void an(t,a)}});if("none"===t.preload){let e=()=>{l(),t.removeEventListener("loadedmetadata",i)},i=()=>{l(),t.removeEventListener("play",e)};tz(t,"play",e,{once:!0}),tz(t,"loadedmetadata",i,{once:!0})}else l();null!=(a=e.tokens)&&a.drm?((e,t)=>{let i=async i=>{let a=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[i],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(t=>{var i;return null==(i=e.drmTypeCb)||i.call(e,iO.FAIRPLAY),t}).catch(()=>{let e=new tB(t9("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tB.MEDIA_ERR_ENCRYPTED,!0);e.errorCategory=tx.DRM,e.muxCode=tN.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,an(t,e)});if(!a)return;let r=await a.createMediaKeys();try{let t=await i6(at(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=i_(t,tx.DRM,e);return console.error("mediaError",null==i?void 0:i.message,null==i?void 0:i.context),i?Promise.reject(i):Promise.reject(Error("Unexpected error in app cert request"))}return Promise.reject(t)});await r.setServerCertificate(t).catch(()=>{let e=t9("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),t=new tB(e,tB.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tx.DRM,t.muxCode=tN.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(t)})}catch(e){an(t,e);return}await t.setMediaKeys(r)},a=async(i,a)=>{let r=t.mediaKeys.createSession(),n=()=>
42{r.keyStatuses.forEach(e=>(e=>{let i;"internal-error"===e?((i=new tB(t9("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),tB.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tx.DRM,i.muxCode=tN.ENCRYPTED_CDM_ERROR):("output-restricted"===e||"output-downscaled"===e)&&((i=new tB(t9("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tB.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tx.DRM,i.muxCode=tN.ENCRYPTED_OUTPUT_RESTRICTED),i&&an(t,i)})(e))},s=async i=>{let a=i.message;try{let i=await i7(a,ae(e,"fairplay"));try{await r.update(i)}catch{let e=t9("Failed to update DRM license. This may be an issue with the player or your protected content."),i=new tB(e,tB.MEDIA_ERR_ENCRYPTED,!0);i.errorCategory=tx.DRM,i.muxCode=tN.ENCRYPTED_UPDATE_LICENSE_FAILED,an(t,i)}}catch(i){if(i instanceof Response){let a=i_(i,tx.DRM,e);if(console.error("mediaError",null==a?void 0:a.message,null==a?void 0:a.context),a)return void an(t,a);console.error("Unexpected error in license key request",i);return}console.error(i)}};r.addEventListener("keystatuseschange",n),r.addEventListener("message",s),t.addEventListener("teardown",()=>{r.removeEventListener("keystatuseschange",n),r.removeEventListener("message",s),r.close()},{once:!0}),await r.generateRequest(i,a).catch(e=>{console.error("Failed to generate license request",e);let t=new tB(t9("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tB.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tx.DRM,t.muxCode=tN.ENCRYPTED_GENERATE_REQUEST_FAILED,Promise.reject(t)})};tz(t,"encrypted",async e=>{try{let r=e.initDataType;if("skd"!==r)return void console.error(`Received unexpected initialization data type "${r}"`);t.mediaKeys||await i(r);let n=e.initData;if(null==n)return void console.error(`Could not start encrypted playback due to missing initData in ${e.type} event`);await a(r,n)}catch(e){an(t,e);return}})})(e,t):tz(t,"encrypted",()=>{let e=new tB(t9("Attempting to play DRM-protected content without providing a DRM token."),tB.MEDIA_ERR_ENCRYPTED,!0);e.errorCategory=tx.DRM,e.muxCode=tN.ENCRYPTED_MISSING_TOKEN,an(t,e)},{once:!0}),t.setAttribute("src",s),e.startTime&&((null!=(r=i$.get(t))?r:{}).startTime=e.startTime,t.addEventListener("durationchange",aa,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",ar),t.addEventListener("error",as),t.addEventListener("emptied",()=>{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),tz(t,"pause",l),tz(t,"seeked",l),tz(t,"play",()=>{t.ended||i1(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else i&&s?(i.once(tO.Events.LEVEL_LOADED,(e,a)=>{((e,t,i)=>{var a,r,n,s,o,l,d,u;let{streamType:c,targetLiveWindow:h,liveEdgeStartOffset:m,lowLatency:p}=(e=>{var t;let i=e.type,a=t0(i),r=t1(i),n,s=!!(null!=(t=e.partList)&&t.length);return a===tV.LIVE&&(n=s?2*e.partTarget:3*e.targetduration),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}})(e);if(c===tV.LIVE){p?(i.config.backBufferLength=null!=(a=i.userConfig.backBufferLength)?a:4,i.config.maxFragLookUpTolerance=null!=(r=i.userConfig.maxFragLookUpTolerance)?r:.001,i.config.abrBandWidthUpFactor=null!=(n=i.userConfig.abrBandWidthUpFactor)?n:i.config.abrBandWidthFactor):i.config.backBufferLength=null!=(s=i.userConfig.backBufferLength)?s:8;let e=Object.freeze({get length(){return t.seekable.length},start:e=>t.seekable.start(e),end(e){var a;return e>this.length||e<0||Number.isFinite(t.duration)?t.seekable.end(e):null!=(a=i.liveSyncPosition)?a:t.seekable.end(e)}});(null!=(o=i$.get(t))?o:{}).seekable=e}(null!=(l=i$.get(t))?l:{}).liveEdgeStartOffset=m,(null!=(d=i$.get(t))?d:{}).targetLiveWindow=h,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=i$.get(t))?u:{}).streamType=c,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))})(a.details,t,i),c(),iX(t)!==tV.LIVE||Number.isFinite(t.duration)||(i.on(tO.Events.LEVEL_UPDATED,c),tz(t,"durationchange",()=>{Number.isFinite(t.duration)&&i.off(tO.Events.LEVELS_UPDATED,c)}))}),i.on(tO.Events.ERROR,(a,r)=>{var n,s;let o=af(r,e);if(o.muxCode===tN.NETWORK_NOT_READY){let e=null!=(n=i$.get(t))?n:{},a=null!=(s=e.retryCount)?s:0;if(a<6){let n=0===a?5e3:6e4,s=new tB(`Retrying in ${n/1e3} seconds...`,o.code,o.fatal);Object.assign(s,o),an(t,s),setTimeout(()=>{e.retryCount=a+1,"manifestLoadError"===r.details&&r.url&&i.loadSource(r.url)},n);return}{e.retryCount=0;let i=new tB('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',o.code,o.fatal);Object.assign(i,o),an(t,i);return}}an(t,o)}),i.on(tO.Events.MANIFEST_LOADED,()=>{let e=i$.get(t);e&&e.error&&(e.error=null,e.retryCount=0,t.dispatchEvent(new Event("emptied")),t.dispatchEvent(new Event("loadstart")))}),t.addEventListener("error",as),tz(t,"waiting",l),function(e,t){var i;if(!("videoTracks"in e))return;let a=new WeakMap;t.on(tO.Events.MANIFEST_PARSED,function(t,i){n();let r=e.addVideoTrack("main");for(let[e,t]of(r.selected=!0,i.levels.entries())){let i=r.addRendition(t.url[0],t.width,t.height,t.videoCodec,t.bitrate);a.set(t,`${e}`),i.id=`${e}`}}),t.on(tO.Events.AUDIO_TRACKS_UPDATED,function(t,i){for(let t of(r(),i.audioTracks)){let i=t.default?"main":"alternative",a=e.addAudioTrack(i,t.name,t.lang);a.id=`${t.id}`,t.default&&(a.enabled=!0)}}),e.audioTracks.addEventListener("change",()=>{var i;let a=+(null==(i=[...e.audioTracks].find(e=>e.enabled))?void 0:i.id),r=t.audioTracks.map(e=>e.id);a!=t.audioTrack&&r.includes(a)&&(t.audioTrack=a)}),t.on(tO.Events.LEVELS_UPDATED,function(t,i){var r;let n=e.videoTracks[null!=(r=e.videoTracks.selectedIndex)?r:0];if(!n)return;let s=i.levels.map(e=>a.get(e));for(let t of e.videoRenditions)t.id&&!s.includes(t.id)&&n.removeRendition(t)}),null==(i=e.videoRenditions)||i.addEventListener("change",e=>{let i=e.target.selectedIndex;i!=t.nextLevel&&(t.nextLevel=i)});let r=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},n=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),r()};t.once(tO.Events.DESTROYING,n)}(e,i),function(e,t){t.on(tO.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(i,{tracks:a})=>{a.forEach(i=>
42{var a,r;let n=null!=(a=i.subtitleTrack)?a:i.closedCaptions,s=t.subtitleTracks.findIndex(({lang:e,name:t,type:a})=>e==(null==n?void 0:n.lang)&&t===i.label&&a.toLowerCase()===i.kind),o=(null!=(r=i._id)?r:i.default)?"default":`${i.kind}${s}`;ii(e,i.kind,i.label,null==n?void 0:n.lang,o,i.default)})});let i=()=>{if(!t.subtitleTracks.length)return;let i=Array.from(e.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind));if(!i)return;let a=t.subtitleTracks[t.subtitleTrack],r=a?a.default?"default":`${t.subtitleTracks[t.subtitleTrack].type.toLowerCase()}${t.subtitleTrack}`:void 0;if(t.subtitleTrack<0||(null==i?void 0:i.id)!==r){let e=t.subtitleTracks.findIndex(({lang:e,name:t,type:a,default:r})=>"default"===i.id&&r||e==i.language&&t===i.label&&a.toLowerCase()===i.kind);t.subtitleTrack=e}(null==i?void 0:i.id)===r&&i.cues&&Array.from(i.cues).forEach(e=>{i.addCue(e)})};e.textTracks.addEventListener("change",i),t.on(tO.Events.CUES_PARSED,(t,{track:i,cues:a})=>{let r=e.textTracks.getTrackById(i);if(!r)return;let n="disabled"===r.mode;n&&(r.mode="hidden"),a.forEach(e=>{var t;null!=(t=r.cues)&&t.getCueById(e.id)||r.addCue(e)}),n&&(r.mode="disabled")}),t.once(tO.Events.DESTROYING,()=>{e.textTracks.removeEventListener("change",i),e.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})});let a=()=>
42{Array.from(e.textTracks).forEach(t=>{var i,a;if(!["subtitles","caption"].includes(t.kind)&&("thumbnails"===t.label||"chapters"===t.kind)){if(!(null!=(i=t.cues)&&i.length)){let i="track";t.kind&&(i+=`[kind="${t.kind}"]`),t.label&&(i+=`[label="${t.label}"]`);let r=e.querySelector(i),n=null!=(a=null==r?void 0:r.getAttribute("src"))?a:"";null==r||r.removeAttribute("src"),setTimeout(()=>{null==r||r.setAttribute("src",n)},0)}"hidden"!==t.mode&&(t.mode="hidden")}})};t.once(tO.Events.MANIFEST_LOADED,a),t.once(tO.Events.MEDIA_ATTACHED,a)}(t,i),i.attachMedia(t)):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.")})(e,t,u),ic(t),ib(t);let h=((e,t,i)=>{let{autoplay:a}=e,r=!1,n=!1,s=t7(a)?a:!!a,o=()=>{r||tz(t,"playing",()=>{r=!0},{once:!0})};if(o(),tz(t,"loadstart",()=>{r=!1,o(),ie(t,s)},{once:!0}),tz(t,"loadstart",()=>{i||(n=e.streamType&&e.streamType!==tV.UNKNOWN?e.streamType===tV.LIVE:!Number.isFinite(t.duration)),ie(t,s)},{once:!0}),i&&i.once(tO.Events.LEVEL_LOADED,(t,i)=>{var a;n=e.streamType&&e.streamType!==tV.UNKNOWN?e.streamType===tV.LIVE:null!=(a=i.details.live)&&a}),!s){let a=()=>{!n||Number.isFinite(e.startTime)||(null!=i&&i.liveSyncPosition?t.currentTime=i.liveSyncPosition:Number.isFinite(t.seekable.end(0))&&(t.currentTime=t.seekable.end(0)))};i&&tz(t,"play",()=>{"metadata"===t.preload?i.once(tO.Events.LEVEL_UPDATED,a):a()},{once:!0})}return e=>{r||ie(t,s=t7(e)?e:!!e)}})(e,t,u);return{engine:u,setAutoplay:h,setPreload:c}})(this,this.nativeEl,aA(this,ao)))}unload(){i4(this.nativeEl,aA(this,ao),this),aw(this,ao,void 0)}attributeChangedCallback(e,t,i){var a,r;switch(a_.lB.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,i),e){case aD.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=i?i:void 0;break;case aD.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=i?i:void 0;break;case"src":{let e=!!t,a=!!i;!e&&a?aS(this,ab,ag).call(this):e&&!a?this.unload():e&&a&&(this.unload(),aS(this,ab,ag).call(this));break}
42case"autoplay":if(i===t)break;null==(a=aA(this,ao))||a.setAutoplay(this.autoplay);break;case"preload":if(i===t)break;null==(r=aA(this,ao))||r.setPreload(i);break;case aD.PLAYBACK_ID:this.src=ij(this);break;case aD.DEBUG:{let e=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=e);break}case aD.METADATA_URL:i&&fetch(i).then(e=>e.json()).then(e=>this.metadata=e).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${i}!`));break;case aD.STREAM_TYPE:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case aD.TARGET_LIVE_WINDOW:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case aD.LOGO:(null==i||i!==t)&&this.updateLogo();break;case aD.DISABLE_TRACKING:if(null==i||i!==t){let e=this.currentTime,t=this.paused;this.unload(),aS(this,ab,ag).call(this).then(()=>{this.currentTime=e,t||this.play()})}break;case aD.DISABLE_COOKIES:(null==i||i!==t)&&this.disableCookies&&document.cookie.split(";").forEach(e=>{e.trim().startsWith("muxData")&&(document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires="+new Date().toUTCString()+";path=/"))})}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');e&&(e.innerHTML=this.constructor.getLogoHTML(aA(this,aE)||this.logo))}connectedCallback(){var e;null==(e=super.connectedCallback)||e.call(this),this.nativeEl&&this.src&&!aA(this,ao)&&aS(this,ab,ag).call(this)}disconnectedCallback(){this.unload()}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};ao=new WeakMap,al=new WeakMap,ad=new WeakMap,au=new WeakMap,ac=new WeakMap,ah=new WeakMap,am=new WeakMap,ap=new WeakMap,av=new WeakMap,aE=new WeakMap,ab=new WeakSet,ag=async function(){aA(this,al)||(await aw(this,al,Promise.resolve()),aw(this,al,null),this.load())};let aO=new WeakMap;class ax extends Error{}class aN extends Error{}let aP=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function aU(){return globalThis.cast?.framework?.CastContext.getInstance()}function aB(){return aU()?.getCurrentSession()}function aH(){return aB()?.getSessionObj().media[0]}function aW(e){return aU().setOptions({...aV(),...e})}function aV(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}async function aF(e){try{let t=(await fetch(e,{method:"HEAD"})).headers.get("Content-Type");return aP.some(e=>t===e)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function a$(e){try{let i=await (await fetch(e)).text(),a=i,r=function(e){let t=e.split("\n"),i=[];for(let e=0;e<t.length;e++)if(t[e].trim().startsWith("#EXT-X-STREAM-INF")){let a=t[e+1]?t[e+1].trim():"";a&&!a.startsWith("#")&&i.push(a)}return i}(i);if(r.length>0){let t=new URL(r[0],e).toString();a=await (await fetch(t)).text()}var t=a.split("\n").find(e=>!e.trim().startsWith("#")&&""!==e.trim());if(!t)return;let n=t.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);return n?n[1]:null}catch(e){console.error("Error while trying to parse the manifest playlist",e);return}}let aK=new(globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(t=>{let i=t.deref();i&&e(i)})}}:Set),aq=new WeakSet;!function(e){globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(e)}}(()=>{if(!globalThis.chrome?.cast?.isAvailable)return void console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable);a||(a=cast.framework,aU().addEventListener(a.CastContextEventType.CAST_STATE_CHANGED,e=>{aK.forEach(t=>aO.get(t).onCastStateChanged?.(e))}),aU().addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,e=>{aK.forEach(t=>aO.get(t).onSessionStateChanged?.(e))}
42),aK.forEach(e=>aO.get(e).init?.()))});let aY=0;class aG extends EventTarget{#e;#t;#i;#a;#r="disconnected";#n=!1;#s=new Set;#o=new WeakMap;constructor(e){super(),this.#e=e,aK.add(this),aO.set(this,{init:()=>this.#l(),onCastStateChanged:()=>this.#d(),onSessionStateChanged:()=>this.#u(),getCastPlayer:()=>this.#c}),this.#l()}get #c(){if(aq.has(this.#e))return this.#i}get state(){return this.#r}async watchAvailability(e){if(this.#e.disableRemotePlayback)throw new ax("disableRemotePlayback attribute is present.");return this.#o.set(e,++aY),this.#s.add(e),queueMicrotask(()=>e(this.#h())),aY}async cancelWatchAvailability(e){if(this.#e.disableRemotePlayback)throw new ax("disableRemotePlayback attribute is present.");e?this.#s.delete(e):this.#s.clear()}async prompt(){if(this.#e.disableRemotePlayback)throw new ax("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new aN("The RemotePlayback API is disabled on this platform.");let e=aq.has(this.#e);aq.add(this.#e),aW(this.#e.castOptions),Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.addEventListener(e,t)});try{await aU().requestSession()}catch(t){if(e||aq.delete(this.#e),"cancel"===t)return;throw Error(t)}aO.get(this.#e)?.loadOnPrompt?.()}#m(){aq.has(this.#e)&&(Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.removeEventListener(e,t)}),aq.delete(this.#e),this.#e.muted=this.#i.isMuted,this.#e.currentTime=this.#i.savedPlayerState.currentTime,!1===this.#i.savedPlayerState.isPau
42sed&&this.#e.play())}#h(){let e=aU()?.getCastState();return e&&"NO_DEVICES_AVAILABLE"!==e}#d(){let e=aU().getCastState();if(aq.has(this.#e)&&"CONNECTING"===e&&(this.#r="connecting",this.dispatchEvent(new Event("connecting"))),!this.#n&&e?.includes("CONNECT"))for(let e of(this.#n=!0,this.#s))e(!0);else if(this.#n&&(!e||"NO_DEVICES_AVAILABLE"===e))for(let e of(this.#n=!1,this.#s))e(!1)}async #u(){let{SESSION_RESUMED:e}=a.SessionState;if(aU().getSessionState()===e&&this.#e.castSrc===aH()?.media.contentId){aq.add(this.#e),Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.addEventListener(e,t)});try{var t;await (t=new chrome.cast.media.GetStatusRequest,new Promise((e,i)=>{aH().getStatus(t,e,i)}))}catch(e){console.error(e)}this.#a[a.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#a[a.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#l(){a&&!this.#t&&(this.#t=!0,aW(this.#e.castOptions),this.#e.textTracks.addEventListener("change",()=>this.#p()),this.#d(),this.#i=new a.RemotePlayer,new a.RemotePlayerController(this.#i),this.#a={[a.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{!0===e?(this.#r="connected",this.dispatchEvent(new Event("connect"))):(this.#m(),this.#r="disconnected",this.dispatchEvent(new Event("disconnect")))},[a.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#e.dispatchEvent(new Event("durationchange"))},[a.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#e.dispatchEvent(new Event("volumechange"))},[a.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#e.dispatchEvent(new Event("volumechange"))},[a.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#c?.isMediaLoaded&&this.#e.dispatchEvent(new Event("timeupdate"))},[a.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#e.dispatchEvent(new Event("resize"))},[a.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#e.dispatchEvent(new Event(this.paused?"pause":"play"))},[a.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#c?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#e.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#c?.playerState]))},[a.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#c?.isMediaLoaded&&(await Promise.resolve(),this.#v())}})}#v(){this.#p()}async #p(){let e;if(!this.#c)return;let t=(this.#i.mediaInfo?.tracks??[]).filter(({type:e})=>e===chrome.cast.media.TrackType.TEXT),i=[...this.#e.textTracks].filter(({kind:e})=>"subtitles"===e||"captions"===e),a=t.map(({language:e,name:t,trackId:a})=>{let{mode:r}=i.find(i=>i.language===e&&i.label===t)??{};return!!r&&{mode:r,trackId:a}}).filter(Boolean),r=a.filter(({mode:e})=>"showing"!==e).map(({trackId:e})=>e),n=a.find(({mode:e})=>"showing"===e),s=aB()?.getSessionObj().media[0]?.activeTrackIds??[],o=s;if(s.length&&(o=o.filter(e=>!r.includes(e))),n?.trackId&&(o=[...o,n.trackId]),e=o=[...new Set(o)],!(s.length===e.length&&s.every(t=>e.includes(t))))try{let e=new chrome.cast.media.EditTracksInfoRequest(o);await new Promise((t,i)=>{aH().editTracksInfo(e,t,i)})}catch(e){console.error(e)}}}let aj=e=>class extends e{static observedAttributes=[...e.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#E={paused:!1};#b=aV();#g;#f;get remote(){return this.#f?this.#f:globalThis.chrome?(this.disableRemotePlayback||function(){let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.src=e,document.head.append(t)}(),aO.set(this,{loadOnPrompt:()=>this.#_()}),this.#f=new aG(this)):super.remote}get #c(){return aO.get(this.remote)?.getCastPlayer?.()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"cast-receiver"===e&&i){this.#b.receiverApplicationId=i;return}if(this.#c)switch(e){case"cast-stream-type":case"cast-src":this.load()}}async #_(){this.#E.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(e){console.error(e)}}async load(){if(!this.#c)return super.load();let e=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);e.customData=this.castCustomData;let t=[...this.querySelectorAll("track")].filter(({kind:e,src:t})=>t&&("subtitles"===e||"captions"===e)),i=[],a=0;if(t.length&&(e.tracks=t.map(e=>{let t=++a;0===i.length&&"showing"===e.track.mode&&i.push(t);let r=new chrome.cast.media.Track(t,chrome.cast.media.TrackType.TEXT);return r.trackContentId=e.src,r.trackContentType="text/vtt",r.subtype="captions"===e.kind?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,r.name=e.label,r.language=e.srclang,r})),"live"===this.castStreamType?e.streamType=chrome.cast.media.StreamType.LIVE:e.streamType=chrome.cast.media.StreamType.BUFFERED,e.metadata=new chrome.cast.media.GenericMediaMetadata,e.metadata.title=this.title,e.metadata.images=[{url:this.poster}],aF(this.castSrc)){let t=await a$(this.castSrc);t?.includes("m4s")||t?.includes("mp4")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):t?.includes("ts")&&(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}let r=new chrome.cast.media.LoadRequest(e);r.currentTime=super.currentTime??0,r.autoplay=!this.#E.paused,r.activeTrackIds=i,await aB()?.loadMedia(r),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#c){this.#c.isPaused&&this.#c.controller?.playOrPause();return}return super.play()}pause(){if(this.#c){this.#c.isPaused||this.#c.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#b}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(e){this.castSrc!=e&&this.setAttribute("cast-src",`${e}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(e){this.setAttribute("cast-content-type",`${e}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(e){this.setAttribute("cast-stream-type",`${e}`)}get castCustomData(){return this.#g}set castCustomData(e){let t=typeof e;if(!["object","undefined"].includes(t))return void console.error(`castCustomData must be nullish or an object but value was of type ${t}`);this.#g=e}get readyState(){if(this.#c)switch(this.#c.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.#c?this.#c.isPaused:super.paused}get muted(){return this.#c?this.#c?.isMuted:super.muted}set muted(e){if(this.#c){(e&&!this.#c.isMuted||!e&&this.#c.isMuted)&&this.#c.controller?.muteOr
42Unmute();return}super.muted=e}get volume(){return this.#c?this.#c?.volumeLevel??1:super.volume}set volume(e){if(this.#c){this.#c.volumeLevel=+e,this.#c.controller?.setVolumeLevel();return}super.volume=e}get duration(){return this.#c&&this.#c?.isMediaLoaded?this.#c?.duration??NaN:super.duration}get currentTime(){return this.#c&&this.#c?.isMediaLoaded?this.#c?.currentTime??0:super.currentTime}set currentTime(e){if(this.#c){this.#c.currentTime=e,this.#c.controller?.seek();return}super.currentTime=e}};var aQ=i(60507),aZ=e=>{throw TypeError(e)},az=(e,t,i)=>t.has(e)||aZ("Cannot "+i),aX=(e,t,i)=>(az(e,t,"read from private field"),i?i.call(e):t.get(e)),aJ=(e,t,i)=>t.has(e)?aZ("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),a0=(e,t,i,a)=>(az(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),a1=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends a1{}globalThis.DocumentFragment=e}var a2,a3=class extends a1{},a4=class{constructor(e,t={}){aJ(this,a2),a0(this,a2,null==t?void 0:t.detail)}get detail(){return aX(this,a2)}initCustomEvent(){}};a2=new WeakMap;var a5={document:{createElement:function(e,t){return new a3}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(a3)},CustomEvent:a4,EventTarget:a1,HTMLElement:a3,HTMLVideoElement:class extends a1{}},a9="undefined"==typeof window||void 0===globalThis.customElements,a8=a9?a5:globalThis;a9?a5.document:globalThis.document;var a6,a7=class extends aj((0,aQ.u6)(aM)){constructor(){super(...arguments),aJ(this,a6)}get autoplay(){let e=this.getAttribute("autoplay");return null!==e&&(""===e||e)}set autoplay(e){e!==this.autoplay&&(e?this.setAttribute("autoplay","string"==typeof e?e:""):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 e;return null!=(e=aX(this,a6))?e:this.muxCastCustomData}set castCustomData(e){a0(this,a6,e)}};a6=new WeakMap,a8.customElements.get("mux-video")||(a8.customElements.define("mux-video",a7),a8.MuxVideoElement=a7);let re={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},rt={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},ri={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:"mediaChapter
42sCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},ra=Object.entries(ri),rr=ra.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),rn=ra.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(rn).reduce((e,[t,i])=>{let a=rr[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"});let rs=Object.entries(rr).reduce((e,[t,i])=>{let a=rn[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),ro={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},rl={DISABLED:"disabled",SHOWING:"showing"},rd={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},ru={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},rc={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},rh={FULLSCREEN:"fullscreen"};function rm(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function rp(e){if(e){let[t,i,a]=e.split(":");return{id:t,width:+i,height:+a}}}function rv(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function rE(e){if(e){let[t,i,a,r]=e.split(":");return{id:t,kind:i,language:a,label:r}}}function rb(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function rg(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}let rf=e=>new Promise(t=>setTimeout(t,e)),r_=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],ry=e=>{if(!rb(e))return"";let t=Math.abs(e),i=t!==e,a=new Date(0,0,0,0,0,t,0),r=[a.getHours(),a.getMinutes(),a.getSeconds()].map((e,t)=>e&&((e,t)=>{let i=1===e?r_[t].singular:r_[t].plural;return`${e} ${i}`})(e,t)).filter(e=>e).join(", ");return`${r}${i?" remaining":""}`};function rT(e,t){let i=!1;e<0&&(i=!0,e=0-e);let a=Math.floor((e=e<0?0:e)%60),r=Math.floor(e/60%60),n=Math.floor(e/3600),s=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=r=a="0"),r=(((n=n>0||o>0?n+":":"")||s>=10)&&r<10?"0"+r:r)+":",(i?"-":"")+n+r+(a=a<10?"0"+a:a)}Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});let rA={en:{"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","S
42ource Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."}},rk=(null==(dQ=globalThis.navigator)?void 0:dQ.language)||"en",rw=(e,t={})=>(e=>{var t,i,a;let[r]=rk.split("-");return(null==(t=rA[rk])?void 0:t[e])||(null==(i=rA[r])?void 0:i[e])||(null==(a=rA.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`);class rS{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class rI extends rS{}class rR extends rI{constructor(){super(...arguments),this.role=null}}class rD{observe(){}unobserve(){}disconnect(){}}let rC={createElement:function(){return new rL.HTMLElement},createElementNS:function(){return new rL.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},rL={ResizeObserver:rD,document:rC,Node:rI,Element:rR,HTMLElement:class extends rR{constructor(){super(...arguments),this.innerHTML=""}get content(){return new rL.DocumentFragment}},DocumentFragment:class extends rS{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:e=>null,setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:e=>({matches:!1,media:e}),DOMParser:class{parseFromString(e,t){return{body:{textContent:e}}}}},rM="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"undefined"==typeof window||void 0===window.customElements,rO=Object.keys(rL).every(e=>e in globalThis),rx=rM&&!rO?rL:globalThis,rN=rM&&!rO?rC:globalThis.document,rP=new WeakMap,rU=e=>{let t=rP.get(e);return t||rP.set(e,t=new Set),t},rB=new rx.ResizeObserver(e=>{for(let t of e)for(let e of rU(t.target))e(t)});function rH(e,t){rU(e).add(t),rB.observe(e)}function rW(e,t){let i=rU(e);i.delete(t),i.size||rB.unobserve(e)}function rV(e){let t={};for(let i of e)t[i.name]=i.value;return t}function rF(e){var t;return null!=(t=r$(e))?t:rG(e,"media-controller")}function r$(e){var t;let{MEDIA_CONTROLLER:i}=rt,a=e.getAttribute(i);if(a)return null==(t=rQ(e))?void 0:t.getElementById(a)}let rK=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},rq=(e,t)=>((e,t)=>{let i=`slot[name="${t}"]`,a=e.shadowRoot.querySelector(i);return a?a.children:[]})(e,t)[0],rY=(e,t)=>!!e&&!!t&&(null!=e&&!!e.contains(t)||rY(e,t.getRootNode().host)),rG=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||rG(e.getRootNode().host,t)};function rj(e=document){var t;let i=null==e?void 0:e.activeElement;return i?null!=(t=rj(i.shadowRoot))?t:i:null}function rQ(e){var t;let i=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);return i instanceof ShadowRoot||i instanceof Document?i:null}function rZ(e,{depth:t=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=e;for(;r&&t>0;){let e=getComputedStyle(r);if(i&&"0"===e.opacity||a&&"hidden"===e.visibility||"none"===e.display)return!1;r=r.parentElement,t--}return!0}function rz(e,t){let i=function(e,t){var i,a;let r;for(r of null!=(i=e.querySelectorAll("style:not([media])"))?i:[]){let e;try{e=null==(a=r.sheet)?void 0:a.cssRules}catch{continue}for(let i of null!=e?e:[])if(t(i.selectorText))return i}}(e,e=>e===t);return i||rX(e,t)}function rX(e,t){var i,a;let r=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],n=null==r?void 0:r[r.length-1];return(null==n?void 0:n.sheet)?(null==n||n.sheet.insertRule(`${t}{}`,n.sheet.cssRules.length),null==(a=n.sheet.cssRules)?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function rJ(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function r0(e,t,i){let a=+i;
42if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}rJ(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function r1(e,t){return e.hasAttribute(t)}function r2(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}r1(e,t)!=i&&e.toggleAttribute(t,i)}function r3(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function r4(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;r3(e,t,void 0)!==a&&e.setAttribute(t,a)}var r5=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},r9=(e,t,i)=>(r5(e,t,"read from private field"),i?i.call(e):t.get(e)),r8=(e,t,i,a)=>(r5(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class r6 extends rx.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,dZ,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rt.MEDIA_CONTROLLER,rr.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rt.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=r9(this,dZ))?void 0:a.unassociateElement)||r.call(a,this),r8(this,dZ,null)),i&&this.isConnected&&(r8(this,dZ,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=r9(this,dZ))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i,a;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),r8(this,dZ,function(e){var t;let i=e.getAttribute(rt.MEDIA_CONTROLLER);return i?null==(t=e.getRootNode())?void 0:t.getElementById(i):rG(e,"media-controller")}(this)),this.getAttribute(rt.MEDIA_CONTROLLER)&&(null==(t=null==(e=r9(this,dZ))?void 0:e.associateElement)||t.call(e,this)),null==(i=r9(this,dZ))||i.addEventListener("pointerdown",this),null==(a=r9(this,dZ))||a.addEventListener("click",this)}disconnectedCallback(){var e,t,i,a;this.getAttribute(rt.MEDIA_CONTROLLER)&&(null==(t=null==(e=r9(this,dZ))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=r9(this,dZ))||i.removeEventListener("pointerdown",this),null==(a=r9(this,dZ))||a.removeEventListener("click",this),r8(this,dZ,null)}handleEvent(e){var t;let i=null==(t=e.composedPath())?void 0:t[0];if(["video","media-controller"].includes(null==i?void 0:i.localName)){if("pointerdown"===e.type)this._pointerType=e.pointerType;else if("click"===e.type){let{clientX:t,clientY:i}=e,{left:a,top:r,width:n,height:s}=this.getBoundingClientRect(),o=t-a,l=i-r;if(o<0||l<0||o>n||l>s||0===n&&0===s)return;let d=this._pointerType||"mouse";if(this._pointerType=void 0,d===rd.TOUCH)return void this.handleTap(e);if(d===rd.MOUSE||d===rd.PEN)return void this.handleMouseClick(e)}}}get mediaPaused(){return r1(this,rr.MEDIA_PAUSED)}set mediaPaused(e){r2(this,rr.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?re.MEDIA_PLAY_REQUEST:re.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new rx.CustomEvent(t,{composed:!0,bubbles:!0}))}}dZ=new WeakMap,r6.shadowRootOptions={mode:"open"},r6.getTemplateHTML=function(e){return`
43    <style>
44      :host {
45        display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
46        box-sizing: border-box;
47      }
48    </style>
49  `},rx.customElements.get("media-gesture-receiver")||rx.customElements.define("media-gesture-receiver",r6);var r7=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ne=(e,t,i)=>(r7(e,t,"read from private field"),i?i.call(e):t.get(e)),nt=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ni=(e,t,i,a)=>(r7(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),na=(e,t,i)=>(r7(e,t,"access private method"),i);let nr={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"},nn=Object.values(rr);function ns(e,t){var i,a,r;if(!e.isConnected)return;let n=Object.fromEntries((null!=(i=e.getAttribute(nr.BREAKPOINTS))?i:"sm:384 md:576 lg:768 xl:960").split(/\s+/).map(e=>e.split(":"))),s=(a=n,r=t,Object.keys(a).filter(e=>r>=parseInt(a[e]))),o=!1;
49if(Object.keys(n).forEach(t=>{if(s.includes(t)){e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),o=!0);return}e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),o=!0)}),o){let t=new CustomEvent(rn.BREAKPOINTS_CHANGE,{detail:s});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(rn.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class no extends rx.HTMLElement{constructor(){if(super(),nt(this,d2),nt(this,d9),nt(this,d6),nt(this,ue),nt(this,ui),nt(this,ur),nt(this,dz,0),nt(this,dX,null),nt(this,dJ,null),nt(this,d0,void 0),this.breakpointsComputed=!1,nt(this,d1,new MutationObserver(na(this,d2,d3).bind(this))),nt(this,d4,!1),nt(this,d5,e=>{ne(this,d4)||(setTimeout(()=>{!function(e){ns(e.target,e.contentRect.width)}(e),ni(this,d4,!1)},0),ni(this,d4,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}let e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){ne(this,dX)&&this.mediaUnsetCallback(ne(this,dX));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[nr.AUTOHIDE,nr.GESTURES_DISABLED].concat(nn).filter(e=>![rr.MEDIA_RENDITION_LIST,rr.MEDIA_AUDIO_TRACK_LIST,rr.MEDIA_CHAPTERS_CUES,rr.MEDIA_WIDTH,rr.MEDIA_HEIGHT,rr.MEDIA_ERROR,rr.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==nr.AUTOHIDE&&(this.autohide=i)}get media(){let e=this.querySelector(":scope > [slot=media]");return(null==e?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(ni(this,dX,e),e.localName.includes("-")&&await rx.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;ne(this,d1).observe(this,{childList:!0,subtree:!0}),rH(this,ne(this,d5));let t=null!=this.getAttribute(nr.AUDIO)?rw("audio player"):rw("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(nr.USER_INACTIVE,""),ns(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=rx.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;ne(this,d1).disconnect(),rW(this,ne(this,d5)),this.media&&this.mediaUnsetCallback(this.media),null==(e=rx.window)||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){ni(this,dX,null)}handleEvent(e){switch(e.type){case"pointerdown":ni(this,dz,e.timeStamp);break;case"pointermove":na(this,d9,d8).call(this,e);break;case"pointerup":na(this,d6,d7).call(this,e);break;case"mouseleave":na(this,ue,ut).call(this);break;case"mouseup":this.removeAttribute(nr.KEYBOARD_CONTROL);break;case"keyup":na(this,ur,un).call(this),this.setAttribute(nr.KEYBOARD_CONTROL,"")}}set autohide(e){let t=Number(e);ni(this,d0,isNaN(t)?0:t)}get autohide(){return(void 0===ne(this,d0)?2:ne(this,d0)).toString()}get breakpoints(){return r3(this,nr.BREAKPOINTS)}set breakpoints(e){r4(this,nr.BREAKPOINTS,e)}get audio(){return r1(this,nr.AUDIO)}set audio(e){r2(this,nr.AUDIO,e)}get gesturesDisabled(){return r1(this,nr.GESTURES_DISABLED)}set gesturesDisabled(e){r2(this,nr.GESTURES_DISABLED,e)}get keyboardControl(){return r1(this,nr.KEYBOARD_CONTROL)}set keyboardControl(e){r2(this,nr.KEYBOARD_CONTROL,e)}get noAutohide(){return r1(this,nr.NO_AUTOHIDE)}set noAutohide(e){r2(this,nr.NO_AUTOHIDE,e)}get autohideOverControls(){return r1(this,nr.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){r2(this,nr.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return r1(this,nr.USER_INACTIVE)}set userInteractive(e){r2(this,nr.USER_INACTIVE,e)}}dz=new WeakMap,dX=new WeakMap,dJ=new WeakMap,d0=new WeakMap,d1=new WeakMap,d2=new WeakSet,d3=function(e){let t=this.media;for(let i of e)if("childList"===i.type){for(let e of i.removedNodes
49){if("media"!=e.slot||i.target!=this)continue;let a=i.previousSibling&&i.previousSibling.previousElementSibling;if(a&&t){let t="media"!==a.slot;for(;null!==(a=a.previousSibling);)"media"==a.slot&&(t=!1);t&&this.mediaUnsetCallback(e)}else this.mediaUnsetCallback(e)}if(t)for(let e of i.addedNodes)e===t&&this.handleMediaUpdated(t)}},d4=new WeakMap,d5=new WeakMap,d9=new WeakSet,d8=function(e){if("mouse"!==e.pointerType&&e.timeStamp-ne(this,dz)<250)return;na(this,ui,ua).call(this),clearTimeout(ne(this,dJ));let t=this.hasAttribute(nr.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&na(this,ur,un).call(this)},d6=new WeakSet,d7=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(nr.USER_INACTIVE);[this,this.media].includes(e.target)&&t?na(this,ue,ut).call(this):na(this,ur,un).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&na(this,ur,un).call(this)},ue=new WeakSet,ut=function(){if(0>ne(this,d0)||this.hasAttribute(nr.USER_INACTIVE))return;this.setAttribute(nr.USER_INACTIVE,"");let e=new rx.CustomEvent(rn.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},ui=new WeakSet,ua=function(){if(!this.hasAttribute(nr.USER_INACTIVE))return;this.removeAttribute(nr.USER_INACTIVE);let e=new rx.CustomEvent(rn.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},ur=new WeakSet,un=function(){na(this,ui,ua).call(this),clearTimeout(ne(this,dJ));let e=parseInt(this.autohide);e<0||ni(this,dJ,setTimeout(()=>{na(this,ue,ut).call(this)},1e3*e))},no.shadowRootOptions={mode:"open"},no.getTemplateHTML=function(e){return`
50    <style>
51      
52      :host([${rr.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
53        outline: none;
54      }
55
56      :host {
57        box-sizing: border-box;
58        position: relative;
59        display: inline-block;
60        line-height: 0;
61        background-color: var(--media-background-color, #000);
62        overflow: hidden;
63      }
64
65      :host(:not([${nr.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
66        position: absolute;
67        top: 0;
68        left: 0;
69        bottom: 0;
70        right: 0;
71        display: flex;
72        flex-flow: column nowrap;
73        align-items: start;
74        pointer-events: none;
75        background: none;
76      }
77
78      slot[name=media] {
79        display: var(--media-slot-display, contents);
80      }
81
82      
83      :host([${nr.AUDIO}]) slot[name=media] {
84        display: var(--media-slot-display, none);
85      }
86
87      
88      :host([${nr.AUDIO}]) [part~=layer][part~=gesture-layer] {
89        height: 0;
90        display: block;
91      }
92
93      
94      :host(:not([${nr.AUDIO}])[${nr.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
95          :host(:not([${nr.AUDIO}])[${nr.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
96        display: none;
97      }
98
99      
100      ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {
101        pointer-events: auto;
102      }
103
104      :host(:not([${nr.AUDIO}])) *[part~=layer][part~=centered-layer] {
105        align-items: center;
106        justify-content: center;
107      }
108
109      :host(:not([${nr.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
110      :host(:not([${nr.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
111        align-self: stretch;
112        flex-grow: 1;
113      }
114
115      slot[name=middle-chrome] {
116        display: inline;
117        flex-grow: 1;
118        pointer-events: none;
119        background: none;
120      }
121
122      
123      ::slotted([slot=media]),
124      ::slotted([slot=poster]) {
125        width: 100%;
126        height: 100%;
127      }
128
129      
130      :host(:not([${nr.AUDIO}])) .spacer {
131        flex-grow: 1;
132      }
133
134      
135      :host(:-webkit-full-screen) {
136        
137        width: 100% !important;
138        height: 100% !important;
139      }
140
141      
142      ::slotted(:not([slot=media]):not([slot=poster]):not([${nr.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {
143        opacity: 1;
144        transition: var(--media-control-transition-in, opacity 0.25s);
145      }
146
147      
148      :host([${nr.USER_INACTIVE}]:not([${rr.MEDIA_PAUSED}]):not([${rr.MEDIA_IS_AIRPLAYING}
148]):not([${rr.MEDIA_IS_CASTING}]):not([${nr.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${nr.NO_AUTOHIDE}]):not([role=dialog])) {
149        opacity: 0;
150        transition: var(--media-control-transition-out, opacity 1s);
151      }
152
153      :host([${nr.USER_INACTIVE}]:not([${nr.NO_AUTOHIDE}]):not([${rr.MEDIA_PAUSED}]):not([${rr.MEDIA_IS_CASTING}]):not([${nr.AUDIO}])) ::slotted([slot=media]) {
154        cursor: none;
155      }
156
157      :host([${nr.USER_INACTIVE}][${nr.AUTOHIDE_OVER_CONTROLS}]:not([${nr.NO_AUTOHIDE}]):not([${rr.MEDIA_PAUSED}]):not([${rr.MEDIA_IS_CASTING}]):not([${nr.AUDIO}])) * {
158        --media-cursor: none;
159        cursor: none;
160      }
161
162
163      ::slotted(media-control-bar)  {
164        align-self: stretch;
165      }
166
167      
168      :host(:not([${nr.AUDIO}])[${rr.MEDIA_HAS_PLAYED}]) slot[name=poster] {
169        display: none;
170      }
171
172      ::slotted([role=dialog]) {
173        width: 100%;
174        height: 100%;
175        align-self: center;
176      }
177
178      ::slotted([role=menu]) {
179        align-self: end;
180      }
181    </style>
182
183    <slot name="media" part="layer media-layer"></slot>
184    <slot name="poster" part="layer poster-layer"></slot>
185    <slot name="gestures-chrome" part="layer gesture-layer">
186      <media-gesture-receiver slot="gestures-chrome">
187        <template shadowrootmode="${r6.shadowRootOptions.mode}">
188          ${r6.getTemplateHTML({})}
189        </template>
190      </media-gesture-receiver>
191    </slot>
192    <span part="layer vertical-layer">
193      <slot name="top-chrome" part="top chrome"></slot>
194      <slot name="middle-chrome" part="middle chrome"></slot>
195      <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>
196      
197      <slot part="bottom chrome"></slot>
198    </span>
199    <slot name="dialog" part="layer dialog-layer"></slot>
200  `},rx.customElements.get("media-container")||rx.customElements.define("media-container",no);var nl=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nd=(e,t,i)=>(nl(e,t,"read from private field"),i?i.call(e):t.get(e)),nu=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},nc=(e,t,i,a)=>(nl(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);
200class nh{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){nu(this,uu),nu(this,us,void 0),nu(this,uo,void 0),nu(this,ul,void 0),nu(this,ud,new Set),nc(this,us,e),nc(this,uo,t),nc(this,ul,new Set(i))}[Symbol.iterator](){return nd(this,uu,uc).values()}get length(){return nd(this,uu,uc).size}get value(){var e;return null!=(e=[...nd(this,uu,uc)].join(" "))?e:""}set value(e){var t;e!==this.value&&(nc(this,ud,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...nd(this,uu,uc)][e]}values(){return nd(this,uu,uc).values()}forEach(e,t){nd(this,uu,uc).forEach(e,t)}add(...e){var t,i;e.forEach(e=>nd(this,ud).add(e)),(""!==this.value||(null==(t=nd(this,us))?void 0:t.hasAttribute(`${nd(this,uo)}`)))&&(null==(i=nd(this,us))||i.setAttribute(`${nd(this,uo)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>nd(this,ud).delete(e)),null==(t=nd(this,us))||t.setAttribute(`${nd(this,uo)}`,`${this.value}`)}contains(e){return nd(this,uu,uc).has(e)}toggle(e,t){if(void 0!==t)if(t)return this.add(e),!0;else return this.remove(e),!1;return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}}us=new WeakMap,uo=new WeakMap,ul=new WeakMap,ud=new WeakMap,uu=new WeakSet,uc=function(){return nd(this,ud).size?nd(this,ud):nd(this,ul)};let nm=(e="")=>{let[t,i,a]=e.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:"cc"===t?ro.CAPTIONS:ro.SUBTITLES,language:i,label:r}},np=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=nm(e);return{...t,...i}}),nv=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?nm(e):e):"string"==typeof e?np(e):[e]:[],nE=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,nb=(e=[])=>Array.prototype.map.call(e,nE).join(" "),ng=e=>{let t=Object.entries(e).map(([e,t])=>i=>i[e]===t);return e=>t.every(t=>t(e))},nf=(e,t=[],i=[])=>{let a=nv(i).map(ng);Array.from(t).filter(e=>a.some(t=>t(e))).forEach(t=>{t.mode=e})},n_=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:ng(t);return Array.from(e.textTracks).filter(i)},ny=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(rr.MEDIA_SUBTITLES_SHOWING)},nT="exitFullscreen"in rN?"exitFullscreen":"webkitExitFullscreen"in rN?"webkitExitFullscreen":"webkitCancelFullScreen"in rN?"webkitCancelFullScreen":void 0,nA="fullscreenElement"in rN?"fullscreenElement":"webkitFullscreenElement"in rN?"webkitFullscreenElement":void 0,nk="fullscreenEnabled"in rN?"fullscreenEnabled":"webkitFullscreenEnabled"in rN?"webkitFullscreenEnabled":void 0,nw=()=>{var e;return r||(r=null==(e=null==rN?void 0:rN.createElement)?void 0:e.call(rN,"video"))},nS=async(e=nw())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([nI(e,i.signal),nR(e,t)]);return i.abort(),a},nI=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),nR=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await rf(10)}return e.volume!==t},nD=/.*Version\/.*Safari\/.*/.test(rx.navigator.userAgent),nC=(e=nw())=>(!rx.matchMedia("(display-mode: standalone)").matches||!nD)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),nL=(e=nw())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[nk])||i&&"webkitSupportsFullscreen"in i})({documentElement:rN,media:e}
200),nM=nL(),nO=nC(),nx=!!rx.WebKitPlaybackTargetAvailabilityEvent,nN=!!rx.chrome,nP=e=>n_(e.media,e=>[ro.SUBTITLES,ro.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),nU=e=>n_(e.media,e=>e.mode===rl.SHOWING&&[ro.SUBTITLES,ro.CAPTIONS].includes(e.kind)),nB=(e,t)=>{let i=nP(e),a=nU(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)nf(rl.DISABLED,i,a);else if(!0===t||!r&&!1!==t){let t=i[0],{options:r}=e;if(!(null==r?void 0:r.noSubtitlesLangPref)){let e=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),a=e?[e,...globalThis.navigator.languages]:globalThis.navigator.languages,r=i.filter(e=>a.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>a.findIndex(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))-a.findIndex(e=>t.language.toLowerCase().startsWith(e.split("-")[0])));r[0]&&(t=r[0])}let{language:n,label:s,kind:o}=t;nf(rl.DISABLED,i,a),nf(rl.SHOWING,i,[{language:n,label:s,kind:o}])}}},nH=(e,t)=>e===t||null!=e&&null!=t&&typeof e==typeof t&&(!!("number"==typeof e&&Number.isNaN(e)&&Number.isNaN(t))||"object"==typeof e&&(Array.isArray(e)?nW(e,t):Object.entries(e).every(([e,i])=>e in t&&nH(i,t[e])))),nW=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>nH(e,t[i])))},nV=Object.values(rc),nF=nS().then(e=>n=e),n$=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof rx.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=rx.customElements.get(t);i&&e instanceof i||(await rx.customElements.whenDefined(t),rx.customElements.upgrade(e))}))},nK=new rx.DOMParser,nq={mediaError:{get(e,t){let{media:i}=e;if((null==t?void 0:t.type)!=="playing")return null==i?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(e,t){var i;let{media:a}=e;if((null==t?void 0:t.type)!=="playing")return null==(i=null==a?void 0:a.error)?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(e,t){var i,a;let{media:r}=e;if((null==t?void 0:t.type)!=="playing")return null!=(a=null==(i=null==r?void 0:r.error)?void 0:i.message)?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoWidth)?t:0},mediaEvents:["resize"]},mediaHeight:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoHeight)?t:0},mediaEvents:["resize"]},mediaPaused:{get(e){var t;let{media:i}=e;return null==(t=null==i?void 0:i.paused)||t},set(e,t){var i;let{media:a}=t;a&&(e?a.pause():null==(i=a.play())||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(e,t){let{media:i}=e;return!!i&&(t?"playing"===t.type:!i.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.ended)&&t},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.playbackRate)?t:1},set(e,t){let{media:i}=t;i&&Number.isFinite(+e)&&(i.playbackRate=+e)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.muted)&&t},set(e,t){let{media:i,options:{noMutedPref:a}={}}=t;if(i){i.muted=e;try{let t=null!==rx.localStorage.getItem("media-chrome-pref-muted"),r=i.hasAttribute("muted");if(a){t&&rx.localStorage.removeItem("media-chrome-pref-muted");return}if(r&&!t)return;rx.localStorage.setItem("media-chrome-pref-muted",e?"true":"false")}catch(e){console.debug("Error setting muted pref",e)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noMutedPref:i}}=t,{media:a}=t;if(a&&!a.muted&&!i)try{let i="true"===rx.localStorage.getItem("media-chrome-pref-muted");nq.mediaMuted.set(i,t),e(i)}catch(e){console.debug("Error getting muted pref",e)}}]},mediaLoop:{get(e){let{media:t}=e;return null==t?void 0:t.loop},set(e,t){let{media:i}=t;i&&(i.loop=e)},mediaEvents:["medialooprequest"]},mediaVolume:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.volume)?t:1},set(e,t){let{media:i,options:{noVolumePref:a}={}}=t;if(i){try{null==e?rx.localStorage.removeItem("media-chrome-pref-volume"):i.hasAttribute("muted")||a||rx.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(e){console.debug("Error setting volume pref",e)}Number.isFinite(+e)&&(i.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noVolumePref:i}}=t;if(!i)try{let{media:i}=t;if(!i)return;let a=rx.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;nq.mediaVolume.set(+a,t),e(+a)}catch(e){console.debug("Error getting volume pref",e)}}]},mediaVolumeLevel:{get(e){let{media:t}=e;return void 0===(null==t?void 0:t.volume)?"high":t.muted||0===t.volume?"off":t.volume<.5?"low":t.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.currentTime)?t:0},set(e,t){let{media:i}=t;i&&rb(e)&&(i.currentTime=e)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(e){let{media:t,options:{defaultDuration:i}={}}=e;return i&&(!t||!t.duration||Number.isNaN(t.duration)||!Number.isFinite(t.duration))?i:Number.isFinite(null==t?void 0:t.duration)?t.duration:NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(e){let{media:t}=e;return(null==t?void 0:t.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(e){var t;let{media:i}=e;if(!(null==(t=null==i?void 0:i.seekable)?void 0:t.length))return;let 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(e){var t;let{media:i}=e,a=null!=(t=null==i?void 0:i.buffered)?t:[];return Array.from(a).map((e,t)=>[Number(a.start(t).toFixed(3)),Number(a.end(t).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(e){let{media:t,options:{defaultStreamType:i}={}}=e,a=[rc.LIVE,rc.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(nV.includes(r))return r===rc.UNKNOWN?a:r;let n=t.duration;return n===1/0?rc.LIVE:Number.isFinite(n)?rc.ON_DEMAND:a}
200,mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:i}=t,a=nq.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===rc.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(e){let{media:t,options:{liveEdgeOffset:i=10}={}}=e;if(!t)return!1;if("number"==typeof t.liveEdgeStart)return!Number.isNaN(t.liveEdgeStart)&&t.currentTime>=t.liveEdgeStart;if(nq.mediaStreamType.get(e)!==rc.LIVE)return!1;let a=t.seekable;if(!a)return!0;if(!a.length)return!1;let r=a.end(a.length-1)-i;return t.currentTime>=r},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get:e=>nP(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>nU(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i,a;let{media:r,options:n}=t;if(!r)return;let s=e=>{var i;n.defaultSubtitles&&(e&&![ro.CAPTIONS,ro.SUBTITLES].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||nB(t,!0))};return r.addEventListener("loadstart",s),null==(i=r.textTracks)||i.addEventListener("addtrack",s),null==(a=r.textTracks)||a.addEventListener("removetrack",s),()=>{var e,t;r.removeEventListener("loadstart",s),null==(e=r.textTracks)||e.removeEventListener("addtrack",s),null==(t=r.textTracks)||t.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(e){var t;let{media:i}=e;if(!i)return[];let[a]=n_(i,{kind:ro.CHAPTERS});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e&&nK.parseFromString(e,"text/html").body.textContent||e,startTime:t,endTime:i}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),n=null==(i=a.shadowRoot)?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==r||r.addEventListener("load",e),null==n||n.addEventListener("load",e),()=>{null==r||r.removeEventListener("load",e),null==n||n.removeEventListener("load",e)}}]},mediaIsPip:{get(e){var t,i;let{media:a,documentElement:r}=e;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=a.localName)?void 0:t.includes("-"))&&rY(a,r.pictureInPictureElement);if(r.pictureInPictureElement.localName.includes("-")){let e=r.pictureInPictureElement.shadowRoot;for(;null==e?void 0:e.pictureInPictureElement;){if(e.pictureInPictureElement===a)return!0;e=null==(i=e.pictureInPictureElement)?void 0:i.shadowRoot}}return!1},set(e,t){let{media:i}=t;if(i)if(e){if(!rN.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!i.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(11===t.code){if(!i.src)return void console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");if(0===i.readyState&&"none"===i.preload){let t=()=>{i.removeEventListener("loadedmetadata",a),i.preload="none"},a=()=>{i.requestPictureInPicture().catch(e),t()};i.addEventListener("loadedmetadata",a),i.preload="metadata",setTimeout(()=>{0===i.readyState&&e(),t()},1e3)}else throw t}else throw t})}else rN.pictureInPictureElement&&rN.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.videoRenditions)?t:[]].map(e=>({...e}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(e){var t,i,a;let{media:r}=e;return null==(a=null==(i=null==r?void 0:r.videoRenditions)?void 0:i[null==(t=r.videoRenditions)?void 0:t.selectedIndex])?void 0:a.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.videoRenditions))return void console.warn("MediaController: Rendition selection not supported by this media.");let a=Array.prototype.findIndex.call(i.videoRenditions,t=>t.id==e);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.audioTracks)?t:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(e){var t,i;let{media:a}=e;return null==(i=[...null!=(t=null==a?void 0:a.audioTracks)?t:[]].find(e=>e.enabled))?void 0:i.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.audioTracks))return void console.warn("MediaChrome: Audio track selection not supported by this media.");
200for(let t of i.audioTracks)t.enabled=e==t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get:e=>(e=>{var t;let{media:i,documentElement:a,fullscreenElement:r=i}=e;if(!i||!a)return!1;let n=(e=>{let{documentElement:t,media:i}=e,a=null==t?void 0:t[nA];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===rh.FULLSCREEN?i:a})(e);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let e=n.shadowRoot;if(!(nA in e))return rY(n,r);for(;null==e?void 0:e[nA];){if(e[nA]===r)return!0;e=null==(t=e[nA])?void 0:t.shadowRoot}}return!1})(e),set(e,t,i){var a;e?((e=>{var t;let{media:i,fullscreenElement:a}=e;try{let e=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(e){let i=null==(t=a[e])?void 0:t.call(a);if(i instanceof Promise)return i.catch(()=>{})}else(null==i?void 0:i.webkitEnterFullscreen)?i.webkitEnterFullscreen():(null==i?void 0:i.requestFullscreen)&&i.requestFullscreen()}catch(e){console.error(e)}})(t),i.detail&&(null==(a=t.media)||a.focus())):(e=>{var t;let{documentElement:i}=e;if(nT){let e=null==(t=null==i?void 0:i[nT])?void 0:t.call(i);if(e instanceof Promise)return e.catch(()=>{})}})(t)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(e){var t;let{media:i}=e;return!!(null==i?void 0:i.remote)&&(null==(t=i.remote)?void 0:t.state)!=="disconnected"&&!!i.remote.state},set(e,t){var i,a;let{media:r}=t;if(r&&(!e||(null==(i=r.remote)?void 0:i.state)==="disconnected")&&(e||(null==(a=r.remote)?void 0:a.state)==="connected")){if("function"!=typeof r.remote.prompt)return void console.warn("MediaChrome: Casting is not supported in this environment");r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get:()=>!1,set(e,t){let{media:i}=t;if(i){if(!(i.webkitShowPlaybackTargetPicker&&rx.WebKitPlaybackTargetAvailabilityEvent))return void console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(e){let{media:t}=e;if(!nM||!nL(t))return ru.UNSUPPORTED}},mediaPipUnavailable:{get(e){let{media:t}=e;return nO&&nC(t)?(null==t?void 0:t.disablePictureInPicture)?ru.UNAVAILABLE:void 0:ru.UNSUPPORTED}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===n||(null==t?void 0:t.volume)==void 0)return ru.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{null==n&&nF.then(t=>e(t?void 0:ru.UNSUPPORTED))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;return nN&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?ru.UNAVAILABLE:void 0:ru.UNSUPPORTED},stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get:(e,t)=>nx?(null==t?void 0:t.availability)==="not-available"?ru.UNAVAILABLE:void 0:ru.UNSUPPORTED,mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(e){var t;let{media:i}=e;return(null==i?void 0:i.videoRenditions)?(null==(t=i.videoRenditions)?void 0:t.length)?void 0:ru.UNAVAILABLE:ru.UNSUPPORTED},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(e){var t,i;let{media:a}=e;return(null==a?void 0:a.audioTracks)?(null!=(i=null==(t=a.audioTracks)?void 0:t.length)?i:0)<=1?ru.UNAVAILABLE:void 0:ru.UNSUPPORTED},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){let{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},nY={[re.MEDIA_PREVIEW_REQUEST](e,t,{detail:i}){var a,r,n;let s,o,{media:l}=t,d=null!=i?i:void 0;if(l&&null!=d){let[e]=n_(l,{kind:ro.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,i)=>0===t?e.endTime>
200d:t===i.length-1?e.startTime<=d:e.startTime<=d&&e.endTime>d);if(t){let e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(r=null==l?void 0:l.querySelector('track[label="thumbnails"]'))?void 0:r.src,i=new URL(t.text,e);o=new URLSearchParams(i.hash).get("#xywh").split(",").map(e=>+e),s=i.href}}let u=e.mediaDuration.get(t),c=null==(n=e.mediaChaptersCues.get(t).find((e,t,i)=>t===i.length-1&&u===e.endTime?e.startTime<=d&&e.endTime>=d:e.startTime<=d&&e.endTime>d))?void 0:n.text;return null!=i&&null==c&&(c=""),{mediaPreviewTime:d,mediaPreviewImage:s,mediaPreviewCoords:o,mediaPreviewChapter:c}},[re.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[re.MEDIA_PLAY_REQUEST](e,t){var i,a,r,n;let s=e.mediaStreamType.get(t)===rc.LIVE,o=!(null==(i=t.options)?void 0:i.noAutoSeekToLive),l=e.mediaTargetLiveWindow.get(t)>0;if(s&&o&&!l){let i=null==(a=e.mediaSeekable.get(t))?void 0:a[1];if(i){let a=null!=(n=null==(r=t.options)?void 0:r.seekToLiveOffset)?n:0;e.mediaCurrentTime.set(i-a,t)}}e.mediaPaused.set(!1,t)},[re.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[re.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[re.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[re.MEDIA_LOOP_REQUEST](e,t,{detail:i}){let a=!!i;return e.mediaLoop.set(a,t),{mediaLoop:a}},[re.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[re.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[re.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var i,a,r;let n=null==(i=e.mediaSeekable.get(t))?void 0:i[1];if(Number.isNaN(Number(n)))return;let s=null!=(r=null==(a=t.options)?void 0:a.seekToLiveOffset)?r:0;e.mediaCurrentTime.set(n-s,t)},[re.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,n=nP(t),s=nv(i),o=null==(a=s[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&rx.localStorage.setItem("media-chrome-pref-subtitles-lang",o),nf(rl.SHOWING,n,s)},[re.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){let a=nP(t);nf(rl.DISABLED,a,null!=i?i:[])},[re.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){nB(t,i)},[re.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[re.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[re.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[re.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[re.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,i){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,i)},[re.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[re.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[re.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[re.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var nG=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nj=(e,t,i)=>(nG(e,t,"read from private field"),i?i.call(e):t.get(e)),nQ=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},nZ=(e,t,i,a)=>(nG(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nz=(e,t,i)=>(nG(e,t,"access private method"),i);let nX=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],nJ={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"};class n0 extends no{constructor(){super(),nQ(this,uf),nQ(this,uy),nQ(this,uA),nQ(this,uw),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,nQ(this,uh,new nh(this,nJ.HOTKEYS)),nQ(this,um,void 0),nQ(this,up,void 0),nQ(this,uv,null),nQ(this,uE,void 0),nQ(this,ub,void 0),nQ(this,ug,e=>{var t;null==(t=nj(this,up))||t.dispatch(e)}),this.associateElement(this);let e={};nZ(this,uE,t=>{Object.entries(t).forEach(([t,i])=>{if(t in e&&e[t]===i)return;
200this.propagateMediaState(t,i);let a=t.toLowerCase(),r=new rx.CustomEvent(rs[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t}),this.hasAttribute(nJ.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(nJ.NO_HOTKEYS,nJ.HOTKEYS,nJ.DEFAULT_STREAM_TYPE,nJ.DEFAULT_SUBTITLES,nJ.DEFAULT_DURATION,nJ.NO_MUTED_PREF,nJ.NO_VOLUME_PREF,nJ.LANG,nJ.LOOP)}get mediaStore(){return nj(this,up)}set mediaStore(e){var t,i;if(nj(this,up)&&(null==(t=nj(this,ub))||t.call(this),nZ(this,ub,void 0)),nZ(this,up,e),!nj(this,up)&&!this.hasAttribute(nJ.NO_DEFAULT_STORE))return void nz(this,uf,u_).call(this);nZ(this,ub,null==(i=nj(this,up))?void 0:i.subscribe(nj(this,uE)))}get fullscreenElement(){var e;return null!=(e=nj(this,um))?e:this}set fullscreenElement(e){var t;this.hasAttribute(nJ.FULLSCREEN_ELEMENT)&&this.removeAttribute(nJ.FULLSCREEN_ELEMENT),nZ(this,um,e),null==(t=nj(this,up))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return r1(this,nJ.DEFAULT_SUBTITLES)}set defaultSubtitles(e){r2(this,nJ.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return r3(this,nJ.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){r4(this,nJ.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return rJ(this,nJ.DEFAULT_DURATION)}set defaultDuration(e){r0(this,nJ.DEFAULT_DURATION,e)}get noHotkeys(){return r1(this,nJ.NO_HOTKEYS)}set noHotkeys(e){r2(this,nJ.NO_HOTKEYS,e)}get keysUsed(){return r3(this,nJ.KEYS_USED)}set keysUsed(e){r4(this,nJ.KEYS_USED,e)}get liveEdgeOffset(){return rJ(this,nJ.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){r0(this,nJ.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return r1(this,nJ.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){r2(this,nJ.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return r1(this,nJ.NO_VOLUME_PREF)}set noVolumePref(e){r2(this,nJ.NO_VOLUME_PREF,e)}get noMutedPref(){return r1(this,nJ.NO_MUTED_PREF)}set noMutedPref(e){r2(this,nJ.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return r1(this,nJ.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){r2(this,nJ.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return r1(this,nJ.NO_DEFAULT_STORE)}set noDefaultStore(e){r2(this,nJ.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,t,i){var a,r,n,s,o,l,d,u,c,h,m,p;if(super.attributeChangedCallback(e,t,i),e===nJ.NO_HOTKEYS)i!==t&&""===i?(this.hasAttribute(nJ.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):i!==t&&null===i&&this.enableHotkeys();else if(e===nJ.HOTKEYS)nj(this,uh).value=i;else if(e===nJ.DEFAULT_SUBTITLES&&i!==t)null==(a=nj(this,up))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(nJ.DEFAULT_SUBTITLES)}});else if(e===nJ.DEFAULT_STREAM_TYPE)null==(n=nj(this,up))||n.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(nJ.DEFAULT_STREAM_TYPE))?r:void 0}});else if(e===nJ.LIVE_EDGE_OFFSET)null==(s=nj(this,up))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(nJ.LIVE_EDGE_OFFSET)?+this.getAttribute(nJ.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(nJ.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(nJ.LIVE_EDGE_OFFSET)}});else if(e===nJ.SEEK_TO_LIVE_OFFSET)null==(o=nj(this,up))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(nJ.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(nJ.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===nJ.NO_AUTO_SEEK_TO_LIVE)null==(l=nj(this,up))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(nJ.NO_AUTO_SEEK_TO_LIVE)}});else if(e===nJ.FULLSCREEN_ELEMENT){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;nZ(this,um,e),null==(u=nj(this,up))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===nJ.LANG&&i!==t?(rk=i,null==(c=nj(this,up))||c.dispatch({type:"optionschangerequest",detail:{mediaLang:i}})):e===nJ.LOOP&&i!==t?null==(h=nj(this,up))||h.dispatch({type:re.MEDIA_LOOP_REQUEST,detail:null!=i}
200):e===nJ.NO_VOLUME_PREF&&i!==t?null==(m=nj(this,up))||m.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(nJ.NO_VOLUME_PREF)}}):e===nJ.NO_MUTED_PREF&&i!==t&&(null==(p=nj(this,up))||p.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(nJ.NO_MUTED_PREF)}}))}connectedCallback(){var e,t;nj(this,up)||this.hasAttribute(nJ.NO_DEFAULT_STORE)||nz(this,uf,u_).call(this),null==(e=nj(this,up))||e.dispatch({type:"documentelementchangerequest",detail:rN}),super.connectedCallback(),nj(this,up)&&!nj(this,ub)&&nZ(this,ub,null==(t=nj(this,up))?void 0:t.subscribe(nj(this,uE))),this.hasAttribute(nJ.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,i,a;null==(e=super.disconnectedCallback)||e.call(this),nj(this,up)&&(null==(t=nj(this,up))||t.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(i=nj(this,up))||i.dispatch({type:re.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),nj(this,ub)&&(null==(a=nj(this,ub))||a.call(this),nZ(this,ub,void 0))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=nj(this,up))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=nj(this,up))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){n7(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=se(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(re).forEach(t=>{e.addEventListener(t,nj(this,ug))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(re).forEach(t=>{e.removeEventListener(t,nj(this,ug))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>-1)&&(t.push(e),nj(this,up)&&Object.entries(nj(this,up).getState()).forEach(([t,i])=>{n7([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",nz(this,uA,uk))}disableHotkeys(){this.removeEventListener("keydown",nz(this,uA,uk)),this.removeEventListener("keyup",nz(this,uy,uT))}get hotkeys(){return r3(this,nJ.HOTKEYS)}set hotkeys(e){r4(this,nJ.HOTKEYS,e)}keyboardShortcutHandler(e){var t,i,a,r,n,s,o,l,d;let u,c,h,m=e.target;if(!((null!=(a=null!=(i=null==(t=m.getAttribute(nJ.KEYS_USED))?void 0:t.split(" "))?i:null==m?void 0:m.keysUsed)?a:[]).map(e=>
200"Space"===e?" ":e).filter(Boolean).includes(e.key)||nj(this,uh).contains(`no${e.key.toLowerCase()}`)||" "===e.key&&nj(this,uh).contains("nospace"))&&!(e.shiftKey&&("/"===e.key||"?"===e.key)&&nj(this,uh).contains("noshift+/")))switch(e.key){case" ":case"k":u=nj(this,up).getState().mediaPaused?re.MEDIA_PLAY_REQUEST:re.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new rx.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"m":u="off"===this.mediaStore.getState().mediaVolumeLevel?re.MEDIA_UNMUTE_REQUEST:re.MEDIA_MUTE_REQUEST,this.dispatchEvent(new rx.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"f":u=this.mediaStore.getState().mediaIsFullscreen?re.MEDIA_EXIT_FULLSCREEN_REQUEST:re.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new rx.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new rx.CustomEvent(re.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{let e=this.hasAttribute(nJ.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(nJ.KEYBOARD_BACKWARD_SEEK_OFFSET):10;c=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),h=new rx.CustomEvent(re.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowRight":case"l":{let e=this.hasAttribute(nJ.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(nJ.KEYBOARD_FORWARD_SEEK_OFFSET):10;c=Math.max((null!=(n=this.mediaStore.getState().mediaCurrentTime)?n:0)+e,0),h=new rx.CustomEvent(re.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowUp":{let e=this.hasAttribute(nJ.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(nJ.KEYBOARD_UP_VOLUME_STEP):.025;c=Math.min((null!=(s=this.mediaStore.getState().mediaVolume)?s:1)+e,1),h=new rx.CustomEvent(re.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowDown":{let e=this.hasAttribute(nJ.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(nJ.KEYBOARD_DOWN_VOLUME_STEP):.025;c=Math.max((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)-e,0),h=new rx.CustomEvent(re.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"<":c=Math.max((null!=(l=this.mediaStore.getState().mediaPlaybackRate)?l:1)-.25,.25).toFixed(2),h=new rx.CustomEvent(re.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break;case">":c=Math.min((null!=(d=this.mediaStore.getState().mediaPlaybackRate)?d:1)+.25,2).toFixed(2),h=new rx.CustomEvent(re.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break;case"/":case"?":e.shiftKey&&nz(this,uw,uS).call(this);break;case"p":u=this.mediaStore.getState().mediaIsPip?re.MEDIA_EXIT_PIP_REQUEST:re.MEDIA_ENTER_PIP_REQUEST,h=new rx.CustomEvent(u,{composed:!0,bubbles:!0}),this.dispatchEvent(h)}}}uh=new WeakMap,um=new WeakMap,up=new WeakMap,uv=new WeakMap,uE=new WeakMap,ub=new WeakMap,ug=new WeakMap,uf=new WeakSet,u_=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=nq,requestMap:r=nY,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let o,l=[],d={options:{...n}},u=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),c=e=>{void 0!=e&&(nH(e,u)||(u=Object.freeze({...u,...e}),l.forEach(e=>e(u))))},h=()=>{c(Object.entries(a).reduce((e,[t,{get:i}])=>(e[t]=i(d),e),{}))},m={},p=async(e,t)=>{var i,r,n,u,p,E,b,g,f,_,y,T,A,k,w,S;let I=!!o;if(o={...d,...null!=o?o:{},...e},I)return;await n$(...Object.values(e));let R=l.length>0&&0===t&&s,D=d.media!==o.media,C=(null==(i=d.media)?void 0:i.textTracks)!==(null==(r=o.media)?void 0:r.textTracks),L=(null==(n=d.media)?void 0:n.videoRenditions)!==(null==(u=o.media)?void 0:u.videoRenditions),M=(null==(p=d.media)?void 0:p.audioTracks)!==(null==(E=o.media)?void 0:E.audioTracks),O=(null==(b=d.media)?void 0:b.remote)!==(null==(g=o.media)?void 0:g.remote),x=d.documentElement!==o.documentElement,N=!!d.media&&(D||R),P=!!(null==(f=d.media)?void 0:f.textTracks)&&(C||R),U=!!(null==(_=d.media)?void 0:_.videoRenditions)&&(L||R),B=!!(null==(y=d.media)?void 0:y.audioTracks)&&(M||R),H=!!(null==(T=d.media)?void 0:T.remote)&&(O||R),W=!!d.documentElement&&(x||R),V=N||P||U||B||H||W,F=0===l.length&&1===t&&s,$=!!o.media&&(D||F),K=!!(null==(A=o.media)?void 0:A.textTracks)&&(C||F),q=!!(null==(k=o.media)?void 0:k.videoRenditions)&&(L||F),Y=!!(null==(w=o.media)?void 0:w.audioTracks)&&(M||F),G=!!(null==(S=o.media)?void 0:S.remote)&&(O||F),j=!!o.documentElement&&(x||F),Q=$||K||q||Y||G||j;
200if(!(V||Q)){Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0;return}Object.entries(a).forEach(([e,{get:t,mediaEvents:i=[],textTracksEvents:a=[],videoRenditionsEvents:r=[],audioTracksEvents:n=[],remoteEvents:s=[],rootEvents:l=[],stateOwnersUpdateHandlers:u=[]}])=>{let h;m[e]||(m[e]={});let p=i=>{c({[e]:t(d,i)})};h=m[e].mediaEvents,i.forEach(t=>{h&&N&&(d.media.removeEventListener(t,h),m[e].mediaEvents=void 0),$&&(o.media.addEventListener(t,p),m[e].mediaEvents=p)}),h=m[e].textTracksEvents,a.forEach(t=>{var i,a;h&&P&&(null==(i=d.media.textTracks)||i.removeEventListener(t,h),m[e].textTracksEvents=void 0),K&&(null==(a=o.media.textTracks)||a.addEventListener(t,p),m[e].textTracksEvents=p)}),h=m[e].videoRenditionsEvents,r.forEach(t=>{var i,a;h&&U&&(null==(i=d.media.videoRenditions)||i.removeEventListener(t,h),m[e].videoRenditionsEvents=void 0),q&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,p),m[e].videoRenditionsEvents=p)}),h=m[e].audioTracksEvents,n.forEach(t=>{var i,a;h&&B&&(null==(i=d.media.audioTracks)||i.removeEventListener(t,h),m[e].audioTracksEvents=void 0),Y&&(null==(a=o.media.audioTracks)||a.addEventListener(t,p),m[e].audioTracksEvents=p)}),h=m[e].remoteEvents,s.forEach(t=>{var i,a;h&&H&&(null==(i=d.media.remote)||i.removeEventListener(t,h),m[e].remoteEvents=void 0),G&&(null==(a=o.media.remote)||a.addEventListener(t,p),m[e].remoteEvents=p)}),h=m[e].rootEvents,l.forEach(t=>{h&&W&&(d.documentElement.removeEventListener(t,h),m[e].rootEvents=void 0),j&&(o.documentElement.addEventListener(t,p),m[e].rootEvents=p)});let E=m[e].stateOwnersUpdateHandlers;if(E&&V&&(Array.isArray(E)?E:[E]).forEach(e=>{"function"==typeof e&&e()}),Q){let t=u.map(e=>e(p,o)).filter(e=>"function"==typeof e);m[e].stateOwnersUpdateHandlers=1===t.length?t[0]:t}else V&&(m[e].stateOwnersUpdateHandlers=void 0)}),Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0};return p({media:e,fullscreenElement:t,documentElement:i,options:n}),{dispatch(e){let{type:t,detail:i}=e;if(r[t]&&null==u.mediaErrorCode)return void c(r[t](a,d,e));"mediaelementchangerequest"===t?p({media:i}):"fullscreenelementchangerequest"===t?p({fullscreenElement:i}):"documentelementchangerequest"===t?p({documentElement:i}):"optionschangerequest"===t&&(Object.entries(null!=i?i:{}).forEach(([e,t])=>{d.options[e]=t}),h())},getState:()=>u,subscribe:e=>(p({},l.length+1),l.push(e),e(u),()=>{let t=l.indexOf(e);t>=0&&(p({},l.length-1),l.splice(t,1))})}})({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(nJ.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(nJ.DEFAULT_DURATION)?+this.getAttribute(nJ.DEFAULT_DURATION):void 0,defaultStreamType:null!=(e=this.getAttribute(nJ.DEFAULT_STREAM_TYPE))?e:void 0,liveEdgeOffset:this.hasAttribute(nJ.LIVE_EDGE_OFFSET)?+this.getAttribute(nJ.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(nJ.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(nJ.SEEK_TO_LIVE_OFFSET):this.hasAttribute(nJ.LIVE_EDGE_OFFSET)?+this.getAttribute(nJ.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(nJ.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(nJ.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(nJ.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(nJ.NO_SUBTITLES_LANG_PREF)}})},uy=new WeakSet,uT=function(e){let{key:t,shiftKey:i}=e;if(!(i&&("/"===t||"?"===t)||nX.includes(t)))return void this.removeEventListener("keyup",nz(this,uy,uT));this.keyboardShortcutHandler(e)},uA=new WeakSet,uk=function(e){var t;let{metaKey:i,altKey:a,key:r,shiftKey:n}=e,s=n&&("/"===r||"?"===r);if(s&&(null==(t=nj(this,uv))?void 0:t.open)||i||a||!s&&!nX.includes(r))return void this.removeEventListener("keyup",nz(this,uy,uT));let o=e.target,l=o instanceof HTMLElement&&("media-volume-range"===o.tagName.toLowerCase()||"media-time-range"===o.tagName.toLowerCase());![" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)||nj(this,uh).contains(`no${r.toLowerCase()}`)||" "===r&&nj(this,uh).contains("nospace")||l||e.preventDefault(),this.addEventListener("keyup",nz(this,uy,uT),{once:!0})},uw=new WeakSet,uS=function(){nj(this,uv)||(nZ(this,uv,rN.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(nj(this,uv))),nj(this,uv).open=!0};let n1=Object.values(rr),n2=Object.values(ri),n3=e=>{var t,i,a,r;let{observedAttributes:n}=e.constructor;!n&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(rx.customElements.upgrade(e),{observedAttributes:n}=e.constructor);let s=null==(r=null==(a=null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,rt.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(e=>n1.includes(e)):[]},n4=e=>(e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&rx.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof rx.customElements.get(e.nodeName.toLowerCase()))&&rx.customElements.upgrade(e),n2.some(t=>t in e)})(e)||!!n3(e).length,n5=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},n9={[rr.MEDIA_SUBTITLES_LIST]:nb,[rr.MEDIA_SUBTITLES_SHOWING]:nb,[rr.MEDIA_SEEKABLE]:n5,[rr.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(n5).join(" "),[rr.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[rr.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(rm).join(" ")},[rr.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(rv).join(" ")}},n8=async(e,t,i)=>{var a,r;if(e.isConnected||await rf(0),"boolean"==typeof i||null==i)return r2(e,t,i);if("number"==typeof i)return r0(e,t,i);if("string"==typeof i)return r4(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);let n=null!=(r=null==(a=n9[t])?void 0:a.call(n9,i))?r:i;return e.setAttribute(t,n)},n6=(e,t)=>
200{if((e=>{var t;return!!(null==(t=e.closest)?void 0:t.call(e,'*[slot="media"]'))})(e))return;let i=(e,t)=>{var i,a;n4(e)&&t(e);let{children:r=[]}=null!=e?e:{};[...r,...null!=(a=null==(i=null==e?void 0:e.shadowRoot)?void 0:i.children)?a:[]].forEach(e=>n6(e,t))},a=null==e?void 0:e.nodeName.toLowerCase();if(a.includes("-")&&!n4(e))return void rx.customElements.whenDefined(a).then(()=>{i(e,t)});i(e,t)},n7=(e,t,i)=>{e.forEach(e=>{if(t in e){e[t]=i;return}let a=n3(e),r=t.toLowerCase();a.includes(r)&&n8(e,r,i)})},se=(e,t,i)=>{n6(e,t);let a=e=>{var i;t(null!=(i=null==e?void 0:e.composedPath()[0])?i:e.target)},r=e=>{var t;i(null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target)};e.addEventListener(re.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(re.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=[],s=e=>{let a=e.target;"media"!==a.name&&(n.forEach(e=>n6(e,i)),(n=[...a.assignedElements({flatten:!0})]).forEach(e=>n6(e,t)))};e.addEventListener("slotchange",s);let o=new MutationObserver(e=>{e.forEach(e=>{let{addedNodes:a=[],removedNodes:r=[],type:n,target:s,attributeName:o}=e;"childList"===n?(Array.prototype.forEach.call(a,e=>n6(e,t)),Array.prototype.forEach.call(r,e=>n6(e,i))):"attributes"===n&&o===rt.MEDIA_CHROME_ATTRIBUTES&&(n4(s)?t(s):i(s))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{n6(e,i),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(re.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(re.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};rx.customElements.get("media-controller")||rx.customElements.define("media-controller",n0);let st={PLACEMENT:"placement",BOUNDS:"bounds"};class si extends rx.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!rZ(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let t=this.placement;if("left"===t||"right"===t)return void this.style.removeProperty("--media-tooltip-offset-x");let i=getComputedStyle(this),a=null!=(e=rG(this,"#"+this.bounds))?e:rF(this);if(!a)return;let{x:r,width:n}=a.getBoundingClientRect(),{x:s,width:o}=this.getBoundingClientRect(),l=i.getPropertyValue("--media-tooltip-offset-x"),d=l?parseFloat(l.replace("px","")):0,u=i.getPropertyValue("--media-tooltip-container-margin"),c=u?parseFloat(u.replace("px","")):0,h=s-r+d-c,m=s+o-(r+n)+d+c;return h<0?void this.style.setProperty("--media-tooltip-offset-x",`${h}px`):m>0?void this.style.setProperty("--media-tooltip-offset-x",`${m}px`):void this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[st.PLACEMENT,st.BOUNDS]}get placement(){return r3(this,st.PLACEMENT)}set placement(e){r4(this,st.PLACEMENT,e)}get bounds(){return r3(this,st.BOUNDS)}set bounds(e){r4(this,st.BOUNDS,e)}}si.shadowRootOptions={mode:"open"},si.getTemplateHTML=function(e){return`
201    <style>
202      :host {
203        --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
204        --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
205        --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
206        --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
207        --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
208        position: relative;
209        pointer-events: none;
210        display: var(--media-tooltip-display, inline-flex);
211        justify-content: center;
212        align-items: center;
213        box-sizing: border-box;
214        z-index: var(--media-tooltip-z-index, 1);
215        background: var(--_tooltip-background);
216        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
217        font: var(--media-font,
218          var(--media-font-weight, 400)
219          var(--media-font-size, 13px) /
220          var(--media-text-content-height, var(--media-control-height, 18px))
221          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
222        padding: var(--media-tooltip-padding, .35em .7em);
223        border: var(--media-tooltip-border, none);
224        border-radius: var(--media-tooltip-border-radius, 5px);
225        filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
226        white-space: var(--media-tooltip-white-space, nowrap);
227      }
228
229      :host([hidden]) {
230        display: none;
231      }
232
233      img, svg {
234        display: inline-block;
235      }
236
237      #arrow {
238        position: absolute;
239        width: 0px;
240        height: 0px;
241        border-style: solid;
242        display: var(--media-tooltip-arrow-display, block);
243      }
244
245      :host(:not([placement])),
246      :host([placement="top"]) {
247        position: absolute;
248        bottom: calc(100% + var(--media-tooltip-distance, 12px));
249        left: 50%;
250        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
250);
251      }
252      :host(:not([placement])) #arrow,
253      :host([placement="top"]) #arrow {
254        top: 100%;
255        left: 50%;
256        border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
257        border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
258        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
259      }
260
261      :host([placement="right"]) {
262        position: absolute;
263        left: calc(100% + var(--media-tooltip-distance, 12px));
264        top: 50%;
265        transform: translate(0, -50%);
266      }
267      :host([placement="right"]) #arrow {
268        top: 50%;
269        right: 100%;
270        border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
271        border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
272        transform: translate(0, -50%);
273      }
274
275      :host([placement="bottom"]) {
276        position: absolute;
277        top: calc(100% + var(--media-tooltip-distance, 12px));
278        left: 50%;
279        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
280      }
281      :host([placement="bottom"]) #arrow {
282        bottom: 100%;
283        left: 50%;
284        border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
285        border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
286        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
287      }
288
289      :host([placement="left"]) {
290        position: absolute;
291        right: calc(100% + var(--media-tooltip-distance, 12px));
292        top: 50%;
293        transform: translate(0, -50%);
294      }
295      :host([placement="left"]) #arrow {
296        top: 50%;
297        left: 100%;
298        border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
299        border-color: transparent transparent transparent var(--_tooltip-arrow-background);
300        transform: translate(0, -50%);
301      }
302      
303      :host([placement="none"]) #arrow {
304        display: none;
305      }
306    </style>
307    <slot></slot>
308    <div id="arrow"></div>
309  `},rx.customElements.get("media-tooltip")||rx.customElements.define("media-tooltip",si);var sa=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sr=(e,t,i)=>(sa(e,t,"read from private field"),i?i.call(e):t.get(e)),sn=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ss=(e,t,i,a)=>(sa(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let so={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};class sl extends rx.HTMLElement{constructor(){if(super(),sn(this,uM),sn(this,uI,void 0),this.preventClick=!1,this.tooltipEl=null,sn(this,uR,e=>{this.preventClick||this.handleClick(e),setTimeout(sr(this,uD),0)}),sn(this,uD,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),sn(this,uC,e=>{let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",sr(this,uC));this.preventClick||this.handleClick(e)}),sn(this,uL,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",sr(this,uC));this.addEventListener("keyup",sr(this,uC),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",so.TOOLTIP_PLACEMENT,rt.MEDIA_CONTROLLER,rr.MEDIA_LANG]}enable(){this.addEventListener("click",sr(this,uR)),this.addEventListener("keydown",sr(this,uL)),this.tabIndex=0}disable(){this.removeEventListener("click",sr(this,uR)),this.removeEventListener("keydown",sr(this,uL)),this.removeEventListener("keyup",sr(this,uC)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rt.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=sr(this,uI))?void 0:a.unassociateElement)||r.call(a,this),ss(this,uI,null)),i&&this.isConnected&&(ss(this,uI,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sr(this,uI))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===so.TOOLTIP_PLACEMENT&&this.tooltipEl&&i!==t?this.tooltipEl.placement=i:e===rr.MEDIA_LA
309NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),sr(this,uD).call(this)}connectedCallback(){var e,t,i;let{style:a}=rz(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let r=this.getAttribute(rt.MEDIA_CONTROLLER);r&&(ss(this,uI,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sr(this,uI))?void 0:t.associateElement)||i.call(t,this)),rx.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=uM,t=uO,sa(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=sr(this,uI))?void 0:e.unassociateElement)||t.call(e,this),ss(this,uI,null),this.removeEventListener("mouseenter",sr(this,uD)),this.removeEventListener("focus",sr(this,uD)),this.removeEventListener("click",sr(this,uR))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return r3(this,so.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){r4(this,so.TOOLTIP_PLACEMENT,e)}get mediaController(){return r3(this,rt.MEDIA_CONTROLLER)}set mediaController(e){r4(this,rt.MEDIA_CONTROLLER,e)}get disabled(){return r1(this,so.DISABLED)}set disabled(e){r2(this,so.DISABLED,e)}get noTooltip(){return r1(this,so.NO_TOOLTIP)}set noTooltip(e){r2(this,so.NO_TOOLTIP,e)}handleClick(e){}}uI=new WeakMap,uR=new WeakMap,uD=new WeakMap,uC=new WeakMap,uL=new WeakMap,uM=new WeakSet,uO=function(){this.addEventListener("mouseenter",sr(this,uD)),this.addEventListener("focus",sr(this,uD)),this.addEventListener("click",sr(this,uR));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},sl.shadowRootOptions={mode:"open"},sl.getTemplateHTML=function(e,t={}){return`
310    <style>
311      :host {
312        position: relative;
313        font: var(--media-font,
314          var(--media-font-weight, bold)
315          var(--media-font-size, 14px) /
316          var(--media-text-content-height, var(--media-control-height, 24px))
317          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
318        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
319        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
320        padding: var(--media-button-padding, var(--media-control-padding, 10px));
321        justify-content: var(--media-button-justify-content, center);
322        display: inline-flex;
323        align-items: center;
324        vertical-align: middle;
325        box-sizing: border-box;
326        transition: background .15s linear;
327        pointer-events: auto;
328        cursor: var(--media-cursor, pointer);
329        -webkit-tap-highlight-color: transparent;
330      }
331
332      
333      :host(:focus-visible) {
334        box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
335        outline: 0;
336      }
337      
338      :host(:where(:focus)) {
339        box-shadow: none;
340        outline: 0;
341      }
342
343      :host(:hover) {
344        background: var(--media-control-hover-background, rgba(50 50 70 / .7));
345      }
346
347      svg, img, ::slotted(svg), ::slotted(img) {
348        width: var(--media-button-icon-width);
349        height: var(--media-button-icon-height, var(--media-control-height, 24px));
350        transform: var(--media-button-icon-transform);
351        transition: var(--media-button-icon-transition);
352        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
353        vertical-align: middle;
354        max-width: 100%;
355        max-height: 100%;
356        min-width: 100%;
357      }
358
359      media-tooltip {
360        
361        max-width: 0;
362        overflow-x: clip;
363        opacity: 0;
364        transition: opacity .3s, max-width 0s 9s;
365      }
366
367      :host(:hover) media-tooltip,
368      :host(:focus-visible) media-tooltip {
369        max-width: 100vw;
370        opacity: 1;
371        transition: opacity .3s;
372      }
373
374      :host([notooltip]) slot[name="tooltip"] {
375        display: none;
376      }
377    </style>
378
379    ${this.getSlotTemplateHTML(e,t)}
380
381    <slot name="tooltip">
382      <media-tooltip part="tooltip" aria-hidden="true">
383        <template shadowrootmode="${si.shadowRootOptions.mode}">
384          ${si.getTemplateHTML({})}
385        </template>
386        <slot name="tooltip-content">
387          ${this.getTooltipContentHTML(e)}
388        </slot>
389      </media-tooltip>
390    </slot>
391  `},sl.getSlotTemplateHTML=function(e,t){return`
392    <slot></slot>
393  `},sl.getTooltipContentHTML=function(){return""},rx.customElements.get("media-chrome-button")||rx.customElements.define("media-chrome-button",sl);let sd=`<svg aria-hidden="true" viewBox="0 0 26 24">
394  <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"/>
395</svg>
396`,su=e=>{let t=e.mediaIsAirplaying?rw("stop airplay"):rw("start airplay");e.setAttribute("aria-label",t)};class sc extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_IS_AIRPLAYING,rr.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),su(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_IS_AIRPLAYING&&su(this)}get mediaIsAirplaying(){return r1(this,rr.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){r2(this,rr.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return r3(this,rr.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){r4(this,rr.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new rx.CustomEvent(re.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}sc.getSlotTemplateHTML=function(e){return`
397    <style>
398      :host([${rr.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
399        display: none !important;
400      }
401
402      
403      :host(:not([${rr.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
404        display: none !important;
405      }
406
407      :host([${rr.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
408      :host(:not([${rr.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
409        display: none;
410      }
411    </style>
412
413    <slot name="icon">
414      <slot name="enter">${sd}</slot>
415      <slot name="exit">${sd}</slot>
416    </slot>
417  `},sc.getTooltipContentHTML=function(){return`
418    <slot name="tooltip-enter">${rw("start airplay")}</slot>
419    <slot name="tooltip-exit">${rw("stop airplay")}</slot>
420  `},rx.customElements.get("media-airplay-button")||rx.customElements.define("media-airplay-button",sc);let sh=`<svg aria-hidden="true" viewBox="0 0 26 24">
421  <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"/>
422</svg>`,sm=`<svg aria-hidden="true" viewBox="0 0 26 24">
423  <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
4231 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"/>
424</svg>`,sp=e=>{e.setAttribute("aria-checked",ny(e).toString())};class sv extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_SUBTITLES_LIST,rr.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",rw("closed captions")),sp(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_SUBTITLES_SHOWING&&sp(this)}get mediaSubtitlesList(){return sE(this,rr.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){sb(this,rr.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return sE(this,rr.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){sb(this,rr.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new rx.CustomEvent(re.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}sv.getSlotTemplateHTML=function(e){return`
425    <style>
426      :host([aria-checked="true"]) slot[name=off] {
427        display: none !important;
428      }
429
430      
431      :host(:not([aria-checked="true"])) slot[name=on] {
432        display: none !important;
433      }
434
435      :host([aria-checked="true"]) slot[name=tooltip-enable],
436      :host(:not([aria-checked="true"])) slot[name=tooltip-disable] {
437        display: none;
438      }
439    </style>
440
441    <slot name="icon">
442      <slot name="on">${sh}</slot>
443      <slot name="off">${sm}</slot>
444    </slot>
445  `},sv.getTooltipContentHTML=function(){return`
446    <slot name="tooltip-enable">${rw("Enable captions")}</slot>
447    <slot name="tooltip-disable">${rw("Disable captions")}</slot>
448  `};let sE=(e,t)=>{let i=e.getAttribute(t);return i?np(i):[]},sb=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=nb(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rx.customElements.get("media-captions-button")||rx.customElements.define("media-captions-button",sv);let sg=e=>{let t=e.mediaIsCasting?rw("stop casting"):rw("start casting");e.setAttribute("aria-label",t)};class sf extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_IS_CASTING,rr.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),sg(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_IS_CASTING&&sg(this)}get mediaIsCasting(){return r1(this,rr.MEDIA_IS_CASTING)}set mediaIsCasting(e){r2(this,rr.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return r3(this,rr.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){r4(this,rr.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?re.MEDIA_EXIT_CAST_REQUEST:re.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new rx.CustomEvent(e,{composed:!0,bubbles:!0}))}}sf.getSlotTemplateHTML=function(e){return`
449    <style>
450      :host([${rr.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
451        display: none !important;
452      }
453
454      
455      :host(:not([${rr.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
456        display: none !important;
457      }
458
459      :host([${rr.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
460      :host(:not([${rr.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
461        display: none;
462      }
463    </style>
464
465    <slot name="icon">
466      <slot name="enter"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg></slot>
467      <slot name="exit"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg></slot>
468    </slot>
469  `},sf.getTooltipContentHTML=function(){return`
470    <slot name="tooltip-enter">${rw("Start casting")}</slot>
471    <slot name="tooltip-exit">${rw("Stop casting")}</slot>
472  `},rx.customElements.get("media-cast-button")||rx.customElements.define("media-cast-button",sf);var s_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sy=(e,t,i)=>(s_(e,t,"read from private field"),i?i.call(e):t.get(e)),sT=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},sA=(e,t,i,a)=>(s_(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sk=(e,t,i)=>(s_(e,t,"access private method"),i);let sw={OPEN:"open",ANCHOR:"anchor"};class sS extends rx.HTMLElement{constructor(){super(),sT(this,uU),sT(this,uH),sT(this,uV),sT(this,u$),sT(this,uq),sT(this,uG),sT(this,ux,!1),sT(this,uN,null),sT(this,uP,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[sw.OPEN,sw.ANCHOR]}get open(){return r1(this,sw.OPEN)}set open(e){r2(this,sw.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":sk(this,u$,uK).call(this,e);break;case"focusout":sk(this,uq,uY).call(this,e);break;case"keydown":sk(this,uG,uj).call(this,e)}}connectedCallback(){sk(this,uU,uB).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,t,i){sk(this,uU,uB).call(this),e===sw.OPEN&&i!==t&&(this.open?sk(this,uH,uW).call(this):sk(this,uV,uF).call(this))}focus(){sA(this,uN,rj());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||t)return;
472let i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==i||i.focus()}get keysUsed(){return["Escape","Tab"]}}ux=new WeakMap,uN=new WeakMap,uP=new WeakMap,uU=new WeakSet,uB=function(){if(!sy(this,ux)&&(sA(this,ux,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=rz(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},uH=new WeakSet,uW=function(){var e;null==(e=sy(this,uP))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},uV=new WeakSet,uF=function(){var e;null==(e=sy(this,uP))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},u$=new WeakSet,uK=function(e){sA(this,uP,e.relatedTarget),rY(this,e.relatedTarget)||(this.open=!this.open)},uq=new WeakSet,uY=function(e){var t;!rY(this,e.relatedTarget)&&(null==(t=sy(this,uN))||t.focus(),sy(this,uP)&&sy(this,uP)!==e.relatedTarget&&this.open&&(this.open=!1))},uG=new WeakSet,uj=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;o||l||d||this.keysUsed.includes(s)&&(e.preventDefault(),e.stopPropagation(),"Tab"===s?(e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()):"Escape"===s&&(null==(n=sy(this,uN))||n.focus(),this.open=!1))},sS.shadowRootOptions={mode:"open"},sS.getTemplateHTML=function(e){return`
473    <style>
474      :host {
475        font: var(--media-font,
476          var(--media-font-weight, normal)
477          var(--media-font-size, 14px) /
478          var(--media-text-content-height, var(--media-control-height, 24px))
479          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
480        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
481        display: var(--media-dialog-display, inline-flex);
482        justify-content: center;
483        align-items: center;
484        
485        transition-behavior: allow-discrete;
486        visibility: hidden;
487        opacity: 0;
488        transform: translateY(2px) scale(.99);
489        pointer-events: none;
490      }
491
492      :host([open]) {
493        transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
494        visibility: visible;
495        opacity: 1;
496        transform: translateY(0) scale(1);
497        pointer-events: auto;
498      }
499
500      #content {
501        display: flex;
502        position: relative;
503        box-sizing: border-box;
504        width: min(320px, 100%);
505        word-wrap: break-word;
506        max-height: 100%;
507        overflow: auto;
508        text-align: center;
509        line-height: 1.4;
510      }
511    </style>
512    ${this.getSlotTemplateHTML(e)}
513  `},sS.getSlotTemplateHTML=function(e){return`
514    <slot id="content"></slot>
515  `},rx.customElements.get("media-chrome-dialog")||rx.customElements.define("media-chrome-dialog",sS);var sI=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sR=(e,t,i)=>(sI(e,t,"read from private field"),i?i.call(e):t.get(e)),sD=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},sC=(e,t,i,a)=>(sI(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sL=(e,t,i)=>(sI(e,t,"access private method"),i);class sM extends rx.HTMLElement{constructor(){if(super(),sD(this,u4),sD(this,u9),sD(this,u6),sD(this,ce),sD(this,ci),sD(this,cr),sD(this,cs),sD(this,cl),sD(this,uQ,void 0),sD(this,uZ,void 0),sD(this,uz,void 0),sD(this,uX,void 0),sD(this,uJ,{}),sD(this,u0,[]),sD(this,u1,()=>{if(this.range.matches(":focus-visible")){let{style:e}=rz(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),sD(this,u2,()=>{let{style:e}=rz(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),sD(this,u3,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),sC(this,uz,this.shadowRoot.querySelector("#startpoint")),sC(this,uX,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",rt.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rt.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=sR(this,uQ))?void 0:a.unassociateElement)||r.call(a,this),sC(this,uQ,null)),i&&this.isConnected&&(sC(this,uQ,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sR(this,uQ))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),sL(this,u9,u8).call(this)):(this.range.setAttribute(e,i),sL(this,u6,u7).call(this)))}connectedCallback(){var e,t,i;let{style:a}=rz(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),sR(this,uJ).pointer=rz(this.shadowRoot,"#pointer"),sR(this,uJ).progress=rz(this.shadowRoot,"#progress"),sR(this,uJ).thumb=rz(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),sR(this,uJ).activeSegment=rz(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(rt.MEDIA_CONTROLLER);r&&(sC(this,uQ,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sR(this,uQ))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",sR(this,u1)),this.shadowRoot.addEventListener("focusout",sR(this,u2)),sL(this,u9,u8).call(this),rH(this.container,sR(this,u3))}disconnectedCallback(){var e,t;sL(this,u6,u7).call(this),null==(t=null==(e=sR(this,uQ))?void 0:e.unassociateElement)||t.call(e,this),sC(this,uQ,null),this.shadowRoot.removeEventListener("focusin",sR(this,u1)),this.shadowRoot.removeEventListener("focusout",sR(this,u2)),rW(this.container,sR(this,u3))}updatePointerBar(e){var t;null==(t=sR(this,uJ).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=sR(this,uJ).progress)||e.style.setProperty("width",`${i}%`),null==(t=sR(this,uJ).thumb)||t.style.setProperty("left",`${i}%`)}updateSegments(e){let t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!!(null==e?void 0:e.length)),!(null==e?void 0:e.length))return;let i=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];sC(this,u0,[...i]);let a=i.pop();for(let[e,r]of i.entries()){let[n,s]=[0===e,e===i.length-1],o=n?"calc(var(--segments-gap) / -1)":`${100*r}%`,l=s?a:i[e+1],d=`calc(${(l-r)*100}%${n||s?"":" - var(--segments-gap)"})`,u=rN.createElementNS("http://www.w3.org/2000/svg","rect"),c=rX(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);c.style.setProperty("x",o),c.style.setProperty("width",d),t.append(u)}}getPointerRatio(e){return function(e,t,i,a){let r=a.x-i.x,n=a.y-i.y,s=r*r+n*n;return 0===s?0:Math.max(0,Math.min(1,((e-i.x)*r+(t-i.y)*n)/s))}(e.clientX,e.clientY,sR(this,uz).getBoundingClientRect(),sR(this,uX).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":sL(this,cl,cd).call(this,e);break;case"input":this.updateBar();break;
515case"pointerenter":sL(this,ci,ca).call(this,e);break;case"pointerdown":sL(this,ce,ct).call(this,e);break;case"pointerup":sL(this,cr,cn).call(this);break;case"pointerleave":sL(this,cs,co).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}uQ=new WeakMap,uZ=new WeakMap,uz=new WeakMap,uX=new WeakMap,uJ=new WeakMap,u0=new WeakMap,u1=new WeakMap,u2=new WeakMap,u3=new WeakMap,u4=new WeakSet,u5=function(e){let t=sR(this,uJ).activeSegment;if(!t)return;let i=this.getPointerRatio(e),a=sR(this,u0).findIndex((e,t,a)=>{let r=a[t+1];return null!=r&&i>=e&&i<=r}),r=`#segments-clipping rect:nth-child(${a+1})`;t.selectorText==r&&t.style.transform||(t.selectorText=r,t.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},u9=new WeakSet,u8=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},u6=new WeakSet,u7=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),null==(e=rx.window)||e.removeEventListener("pointerup",this),null==(t=rx.window)||t.removeEventListener("pointermove",this)},ce=new WeakSet,ct=function(e){var t;sC(this,uZ,e.composedPath().includes(this.range)),null==(t=rx.window)||t.addEventListener("pointerup",this)},ci=new WeakSet,ca=function(e){var t;"mouse"!==e.pointerType&&sL(this,ce,ct).call(this,e),this.addEventListener("pointerleave",this),null==(t=rx.window)||t.addEventListener("pointermove",this)},cr=new WeakSet,cn=function(){var e;null==(e=rx.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},cs=new WeakSet,co=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=rx.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=sR(this,uJ).activeSegment)||t.style.removeProperty("transform")},cl=new WeakSet,cd=function(e){("pen"!==e.pointerType||0!==e.buttons)&&(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),sL(this,u4,u5).call(this,e),this.dragging&&("mouse"!==e.pointerType||!sR(this,uZ))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},sM.shadowRootOptions={mode:"open"},sM.getTemplateHTML=function(e){return`
516    <style>
517      :host {
518        --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
519        --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));
520
521        box-shadow: var(--_focus-visible-box-shadow, none);
522        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
523        height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));
524        display: inline-flex;
525        align-items: center;
526        
527        vertical-align: middle;
528        box-sizing: border-box;
529        position: relative;
530        width: 100px;
531        transition: background .15s linear;
532        cursor: var(--media-cursor, pointer);
533        pointer-events: auto;
534        touch-action: none; 
535      }
536
537      
538      input[type=range]:focus {
539        outline: 0;
540      }
541      input[type=range]:focus::-webkit-slider-runnable-track {
542        outline: 0;
543      }
544
545      :host(:hover) {
546        background: var(--media-control-hover-background, rgb(50 50 70 / .7));
547      }
548
549      #leftgap {
550        padding-left: var(--media-range-padding-left, var(--_media-range-padding));
551      }
552
553      #rightgap {
554        padding-right: var(--media-range-padding-right, var(--_media-range-padding));
555      }
556
557      #startpoint,
558      #endpoint {
559        position: absolute;
560      }
561
562      #endpoint {
563        right: 0;
564      }
565
566      #container {
567        
568        width: var(--media-range-track-width, 100%);
569        transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));
570        position: relative;
571        height: 100%;
572        display: flex;
573        align-items: center;
574        min-width: 40px;
575      }
576
577      #range {
578        
579        display: var(--media-time-range-hover-display, block);
580        bottom: var(--media-time-range-hover-bottom, -7px);
581        height: var(--media-time-range-hover-height, max(100% + 7px, 25px));
582        width: 100%;
583        position: absolute;
584        cursor: var(--media-cursor, pointer);
585
586        -webkit-appearance: none; 
587        -webkit-tap-highlight-color: transparent;
588        background: transparent; 
589        margin: 0;
590        z-index: 1;
591      }
592
593      @media (hover: hover) {
594        #range {
595          bottom: var(--media-time-range-hover-bottom, -5px);
596          height: var(--media-time-range-hover-height, max(100% + 5px, 20px));
597        }
598      }
599
600      
601      
602      #range::-webkit-slider-thumb {
603        -webkit-appearance: none;
604        background: transparent;
605        width: .1px;
606        height: .1px;
607      }
608
609      
610      #range::-moz-range-thumb {
611        background: transparent;
612        border: transparent;
613        width: .1px;
614        height: .1px;
615      }
616
617      #appearance {
618        height: var(--media-range-track-height, 4px);
619        display: flex;
620        flex-direction: column;
621        justify-content: center;
622        width: 100%;
623        position: absolute;
624        
625        will-change: transform;
626      }
627
628      #track {
629        background: var(--media-range-track-background, rgb(255 255 255 / .2));
630        border-radius: var(--media-range-track-border-radius, 1px);
631        border: var(--media-range-track-border, none);
632        outline: var(--media-range-track-outline);
633        outline-offset: var(--media-range-track-outline-offset);
634        backdrop-filter: var(--media-range-track-backdrop-filter);
635        -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
636        box-shadow: var(--media-range-track-box-shadow, none);
637        position: absolute;
638        width: 100%;
639        height: 100%;
640        overflow: hidden;
641      }
642
643      #progress,
644      #pointer {
645        position: absolute;
646        height: 100%;
647        will-change: width;
648      }
649
650      #progress {
651        background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));
652        transition: var(--media-range-track-transition);
653      }
654
655      #pointer {
656        background: var(--media-range-track-pointer-background);
657        border-right: var(--media-range-track-pointer-border-right);
658        transition: visibility .25s, opacity .25s;
659        visibility: hidden;
660        opacity: 0;
661      }
662
663      @media (hover: hover) {
664        :host(:hover) #pointer {
665          transition: visibility .5s, opacity .5s;
666          visibility: visible;
667          opacity: 1;
668        }
669      }
670
671      #thumb,
672      ::slotted([slot=thumb]) {
673        width: var(--media-range-thumb-width, 10px);
674        height: var(--media-range-thumb-height, 10px);
675        transition: var(--media-range-thumb-transition);
676        transform: var(--media-range-thumb-transform, none);
677        opacity: var(--media-range-thumb-opacity, 1);
678        translate: -50%;
679        position: absolute;
680        left: 0;
681        cursor: var(--media-cursor, pointer);
682      }
683
684      #thumb {
685        border-radius: var(--media-range-thumb-border-radius, 10px);
686        background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));
687        box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);
688        border: var(--media-range-thumb-border, none);
689      }
690
691      :host([disabled]) #thumb {
692        background-color: #777;
693      }
694
695      .segments #appearance {
696        height: var(--media-range-segment-hover-height, 7px);
697      }
698
699      #track {
700        clip-path: url(#segments-clipping);
701      }
702
703      #segments {
704        --segments-gap: var(--media-range-segments-gap, 2px);
705        position: absolute;
706        width: 100%;
707        height: 100%;
708      }
709
710      #segments-clipping {
711        transform: translateX(calc(var(--segments-gap) / 2));
712      }
713
714      #segments-clipping:empty {
715        display: none;
716      }
717
718      #segments-clipping rect {
719        height: var(--media-range-track-height, 4px);
720        y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);
721        transition: var(--media-range-segment-transition, transform .1s ease-in-out);
722        transform: var(--media-range-segment-transform, scaleY(1));
723        transform-origin: center;
724      }
725    </style>
726    <div id="leftgap"></div>
727    <div id="container">
728      <div id="startpoint"></div>
729      <div id="endpoint"></div>
730      <div id="appearance">
731        <div id="track" part="track">
732          <div id="pointer"></div>
733          <div id="progress" part="progress"></div>
734        </div>
735        <slot name="thumb">
736          <div id="thumb" part="thumb"></div>
737        </slot>
738        <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>
739      </div>
740      <input id="range" type="range" min="0" max="1" step="any" value="0">
741    </div>
742    <div id="rightgap"></div>
743  `},rx.customElements.get("media-chrome-range")||rx.customElements.define("media-chrome-range",sM);var sO=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sx=(e,t,i)=>(sO(e,t,"read from private field"),i?i.call(e):t.get(e)),sN=(e,t,i,a)=>(sO(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class sP extends rx.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cu,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rt.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rt.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=sx(this,cu))?void 0:a.unassociateElement)||r.call(a,this),sN(this,cu,null)),i&&this.isConnected&&(sN(this,cu,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sx(this,cu))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(rt.MEDIA_CONTROLLER);a&&(sN(this,cu,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=sx(this,cu))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=sx(this,cu))?void 0:e.unassociateElement)||t.call(e,this),sN(this,cu,null)}}cu=new WeakMap,sP.shadowRootOptions={mode:"open"},sP.getTemplateHTML=function(e){return`
744    <style>
745      :host {
746        
747        box-sizing: border-box;
748        display: var(--media-control-display, var(--media-control-bar-display, inline-flex));
749        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
750        --media-loading-indicator-icon-height: 44px;
751      }
752
753      ::slotted(media-time-range),
754      ::slotted(media-volume-range) {
755        min-height: 100%;
756      }
757
758      ::slotted(media-time-range),
759      ::slotted(media-clip-selector) {
760        flex-grow: 1;
761      }
762
763      ::slotted([role="menu"]) {
764        position: absolute;
765      }
766    </style>
767
768    <slot></slot>
769  `},rx.customElements.get("media-control-bar")||rx.customElements.define("media-control-bar",sP);var sU=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sB=(e,t,i)=>(sU(e,t,"read from private field"),i?i.call(e):t.get(e)),sH=(e,t,i,a)=>(sU(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class sW extends rx.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cc,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rt.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rt.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=sB(this,cc))?void 0:a.unassociateElement)||r.call(a,this),sH(this,cc,null)),i&&this.isConnected&&(sH(this,cc,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sB(this,cc))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let{style:a}=rz(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(rt.MEDIA_CONTROLLER);r&&(sH(this,cc,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sB(this,cc))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=sB(this,cc))?void 0:e.unassociateElement)||t.call(e,this),sH(this,cc,null)}}cc=new WeakMap,sW.shadowRootOptions={mode:"open"},sW.getTemplateHTML=function(e,t={}){return`
770    <style>
771      :host {
772        font: var(--media-font,
773          var(--media-font-weight, normal)
774          var(--media-font-size, 14px) /
775          var(--media-text-content-height, var(--media-control-height, 24px))
776          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
777        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
778        background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));
779        padding: var(--media-control-padding, 10px);
780        display: inline-flex;
781        justify-content: center;
782        align-items: center;
783        vertical-align: middle;
784        box-sizing: border-box;
785        text-align: center;
786        pointer-events: auto;
787      }
788
789      
790      :host(:focus-visible) {
791        box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);
792        outline: 0;
793      }
794
795      
796      :host(:where(:focus)) {
797        box-shadow: none;
798        outline: 0;
799      }
800    </style>
801
802    ${this.getSlotTemplateHTML(e,t)}
803  `},sW.getSlotTemplateHTML=function(e,t){return`
804    <slot></slot>
805  `},rx.customElements.get("media-text-display")||rx.customElements.define("media-text-display",sW);var sV=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sF=(e,t,i)=>(sV(e,t,"read from private field"),i?i.call(e):t.get(e));class s$ extends sW{constructor(){var e;super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,ch,void 0),((e,t,i,a)=>(sV(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,ch,this.shadowRoot.querySelector("slot")),sF(this,ch).textContent=rT(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===rr.MEDIA_DURATION&&(sF(this,ch).textContent=rT(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return rJ(this,rr.MEDIA_DURATION)}set mediaDuration(e){r0(this,rr.MEDIA_DURATION,e)}}ch=new WeakMap,s$.getSlotTemplateHTML=function(e,t){return`
806    <slot>${rT(t.mediaDuration)}</slot>
807  `},rx.customElements.get("media-duration-display")||rx.customElements.define("media-duration-display",s$);let sK={2:rw("Network Error"),3:rw("Decode Error"),4:rw("Source Not Supported"),5:rw("Encryption 
807Error")},sq={2:rw("A network error caused the media download to fail."),3:rw("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:rw("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:rw("The media is encrypted and there are no keys to decrypt it.")},sY=e=>{var t,i;return 1===e.code?null:{title:null!=(t=sK[e.code])?t:`Error ${e.code}`,message:null!=(i=sq[e.code])?i:e.message}};var sG=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function sj(e){var t;let{title:i,message:a}=null!=(t=sY(e))?t:{},r="";return i&&(r+=`<slot name="error-${e.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${e.code}-message"><p>${a}</p></slot>`),r}let sQ=[rr.MEDIA_ERROR_CODE,rr.MEDIA_ERROR_MESSAGE];class sZ extends sS{constructor(){super(...arguments),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cm,null)}static get observedAttributes(){return[...super.observedAttributes,...sQ]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!sQ.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=r.code&&null!==sY(r),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r))}get mediaError(){var e,t;return sG(this,e=cm,"read from private field"),t?t.call(this):e.get(this)}set mediaError(e){var t,i;sG(this,t=cm,"write to private field"),i?i.call(this,e):t.set(this,e)}get mediaErrorCode(){return rJ(this,"mediaerrorcode")}set mediaErrorCode(e){r0(this,"mediaerrorcode",e)}get mediaErrorMessage(){return r3(this,"mediaerrormessage")}set mediaErrorMessage(e){r4(this,"mediaerrormessage",e)}}cm=new WeakMap,sZ.getSlotTemplateHTML=function(e){return`
808    <style>
809      :host {
810        background: rgb(20 20 30 / .8);
811      }
812
813      #content {
814        display: block;
815        padding: 1.2em 1.5em;
816      }
817
818      h3,
819      p {
820        margin-block: 0 .3em;
821      }
822    </style>
823    <slot name="error-${e.mediaerrorcode}" id="content">
824      ${sj({code:+e.mediaerrorcode,message:e.mediaerrormessage})}
825    </slot>
826  `},sZ.formatErrorMessage=sj,rx.customElements.get("media-error-dialog")||rx.customElements.define("media-error-dialog",sZ);var sz=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)},sX=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)};class sJ extends sS{constructor(){super(...arguments),sX(this,cp,e=>{var t;if(!this.open)return;let i=null==(t=this.shadowRoot)?void 0:t.querySelector("#content");if(!i)return;let a=e.composedPath(),r=a[0]===this||a.includes(this),n=a.includes(i);r&&!n&&(this.open=!1)}),sX(this,cv,e=>{if(!this.open)return;let t=e.shiftKey&&("/"===e.key||"?"===e.key);"Escape"!==e.key&&!t||e.ctrlKey||e.altKey||e.metaKey||(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",sz(this,cp)),document.addEventListener("keydown",sz(this,cv)))}disconnectedCallback(){this.removeEventListener("click",sz(this,cp)),document.removeEventListener("keydown",sz(this,cv))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"open"===e&&(this.open?(this.addEventListener("click",sz(this,cp)),document.addEventListener("keydown",sz(this,cv))):(this.removeEventListener("click",sz(this,cp)),document.removeEventListener("keydown",sz(this,cv))))}}cp=new WeakMap,cv=new WeakMap,sJ.getSlotTemplateHTML=function(e){return`
827    <style>
828      :host {
829        position: fixed;
830        top: 0;
831        left: 0;
832        z-index: 9999;
833        background: rgb(20 20 30 / .8);
834        backdrop-filter: blur(10px);
835      }
836
837      #content {
838        display: block;
839        width: clamp(400px, 40vw, 700px);
840        max-width: 90vw;
841        text-align: left;
842      }
843
844      h2 {
845        margin: 0 0 1.5rem 0;
846        font-size: 1.5rem;
847        font-weight: 500;
848        text-align: center;
849      }
850
851      .shortcuts-table {
852        width: 100%;
853        border-collapse: collapse;
854      }
855
856      .shortcuts-table tr {
857        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
858      }
859
860      .shortcuts-table tr:last-child {
861        border-bottom: none;
862      }
863
864      .shortcuts-table td {
865        padding: 0.75rem 0.5rem;
866      }
867
868      .shortcuts-table td:first-child {
869        text-align: right;
870        padding-right: 1rem;
871        width: 40%;
872        min-width: 120px;
873      }
874
875      .shortcuts-table td:last-child {
876        padding-left: 1rem;
877      }
878
879      .key {
880        display: inline-block;
881        background: rgba(255, 255, 255, 0.15);
882        border: 1px solid rgba(255, 255, 255, 0.2);
883        border-radius: 4px;
884        padding: 0.25rem 0.5rem;
885        font-family: 'Courier New', monospace;
886        font-size: 0.9rem;
887        font-weight: 500;
888        min-width: 1.5rem;
889        text-align: center;
890        margin: 0 0.2rem;
891      }
892
893      .description {
894        color: rgba(255, 255, 255, 0.9);
895        font-size: 0.95rem;
896      }
897
898      .key-combo {
899        display: flex;
900        align-items: center;
901        justify-content: flex-end;
902        gap: 0.3rem;
903      }
904
905      .key-separator {
906        color: rgba(255, 255, 255, 0.5);
907        font-size: 0.9rem;
908      }
909    </style>
910    <slot id="content">
911      ${function(){let e=[{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["←","j"],description:"Seek back 10s"},{keys:["→","l"],description:"Seek forward 10s"},{keys:["↑"],description:"Turn volume up"},{keys:["↓"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map(({keys:e,description:t})=>{let i=e.map((e,t)=>t>0?`<span class="key-separator">or</span><span class="key">${e}</span>`:`<span class="key">${e}</span>`).join("");return`
912      <tr>
913        <td>
914          <div class="key-combo">${i}</div>
915        </td>
916        <td class="description">${t}</td>
917      </tr>
918    `}).join("");return`
919    <h2>Keyboard Shortcuts</h2>
920    <table class="shortcuts-table">${e}</table>
921  `}()}
922    </slot>
923  `},rx.customElements.get("media-keyboard-shortcuts-dialog")||rx.customElements.define("media-keyboard-shortcuts-dialog",sJ);var s0=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};let s1=`<svg aria-hidden="true" viewBox="0 0 26 24">
924  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
925</svg>`,s2=`<svg aria-hidden="true" viewBox="0 0 26 24">
926  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
927</svg>`,s3=e=>{let t=e.mediaIsFullscreen?rw("exit fullscreen mode"):rw("enter fullscreen mode");e.setAttribute("aria-label",t)};class s4 extends sl{constructor(){super(...arguments),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cE,null)}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_IS_FULLSCREEN,rr.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),s3(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_IS_FULLSCREEN&&s3(this)}get mediaFullscreenUnavailable(){return r3(this,rr.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){r4(this,rr.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return r1(this,rr.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){r2(this,rr.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var t,i,a,r;s0(this,t=cE,"write to private field"),i?i.call(this,e):t.set(this,e);let n=(s0(this,a=cE,"read from private field"),(r?r.call(this):a.get(this))instanceof PointerEvent),s=this.mediaIsFullscreen?new rx.CustomEvent(re.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new rx.CustomEvent(re.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:n});this.dispatchEvent(s)}}cE=new WeakMap,s4.getSlotTemplateHTML=function(e){return`
928    <style>
929      :host([${rr.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
930        display: none !important;
931      }
932
933      
934      :host(:not([${rr.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
935        display: none !important;
936      }
937
938      :host([${rr.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
939      :host(:not([${rr.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
940        display: none;
941      }
942    </style>
943
944    <slot name="icon">
945      <slot name="enter">${s1}</slot>
946      <slot name="exit">${s2}</slot>
947    </slot>
948  `},s4.getTooltipContentHTML=function(){return`
949    <slot name="tooltip-enter">${rw("Enter fullscreen mode")}</slot>
950    <slot name="tooltip-exit">${rw("Exit fullscreen mode")}</slot>
951  `},rx.customElements.get("media-fullscreen-button")||rx.customElements.define("media-fullscreen-button",s4);let{MEDIA_TIME_IS_LIVE:s5,MEDIA_PAUSED:s9}=rr,{MEDIA_SEEK_TO_LIVE_REQUEST:s8,MEDIA_PLAY_REQUEST:s6}=re,s7=e=>{var t;let i=e.mediaPaused||!e.mediaTimeIsLive,a=i?rw("seek to live"):rw("playing live");e.setAttribute("aria-label",a);let r=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');r&&(r.textContent=rw("live")),i?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class oe extends sl{static get observedAttributes(){return[...super.observedAttributes,s5,s9]}connectedCallback(){super.connectedCallback(),s7(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),s7(this)}get mediaPaused(){return r1(this,rr.MEDIA_PAUSED)}set mediaPaused(e){r2(this,rr.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return r1(this,rr.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){r2(this,rr.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new rx.CustomEvent(s8,{c
951omposed:!0,bubbles:!0})),this.hasAttribute(s9)&&this.dispatchEvent(new rx.CustomEvent(s6,{composed:!0,bubbles:!0})))}}oe.getSlotTemplateHTML=function(e){return`
952    <style>
953      :host { --media-tooltip-display: none; }
954      
955      slot[name=indicator] > *,
956      :host ::slotted([slot=indicator]) {
957        
958        min-width: auto;
959        fill: var(--media-live-button-icon-color, rgb(140, 140, 140));
960        color: var(--media-live-button-icon-color, rgb(140, 140, 140));
961      }
962
963      :host([${s5}]:not([${s9}])) slot[name=indicator] > *,
964      :host([${s5}]:not([${s9}])) ::slotted([slot=indicator]) {
965        fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
966        color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
967      }
968
969      :host([${s5}]:not([${s9}])) {
970        cursor: var(--media-cursor, not-allowed);
971      }
972
973      slot[name=text]{
974        text-transform: uppercase;
975      }
976
977    </style>
978
979    <slot name="indicator"><svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg></slot>
980    
981    <slot name="spacer">&nbsp;</slot><slot name="text">${rw("live")}</slot>
982  `},rx.customElements.get("media-live-button")||rx.customElements.define("media-live-button",oe);var ot=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oi=(e,t,i)=>(ot(e,t,"read from private field"),i?i.call(e):t.get(e)),oa=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},or=(e,t,i,a)=>(ot(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let on={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},os=`
983<svg aria-hidden="true" viewBox="0 0 100 100">
984  <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">
985    <animateTransform
986       attributeName="transform"
987       attributeType="XML"
988       type="rotate"
989       dur="1s"
990       from="0 50 50"
991       to="360 50 50"
992       repeatCount="indefinite" />
993  </path>
994</svg>
995`;class oo extends rx.HTMLElement{constructor(){if(super(),oa(this,cb,void 0),oa(this,cg,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rt.MEDIA_CONTROLLER,rr.MEDIA_PAUSED,rr.MEDIA_LOADING,on.LOADING_DELAY]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===on.LOADING_DELAY&&t!==i?this.loadingDelay=Number(i):e===rt.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oi(this,cb))?void 0:a.unassociateElement)||r.call(a,this),or(this,cb,null)),i&&this.isConnected&&(or(this,cb,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oi(this,cb))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(rt.MEDIA_CONTROLLER);a&&(or(this,cb,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=oi(this,cb))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oi(this,cb))?void 0:e.unassociateElement)||t.call(e,this),or(this,cb,null)}get loadingDelay(){return oi(this,cg)}set loadingDelay(e){or(this,cg,e);let{style:t}=rz(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return r1(this,rr.MEDIA_PAUSED)}set mediaPaused(e){r2(this,rr.MEDIA_PAUSED,e)}get mediaLoading(){return r1(this,rr.MEDIA_LOADING)}set mediaLoading(e){r2(this,rr.MEDIA_LOADING,e)}get mediaController(){return r3(this,rt.MEDIA_CONTROLLER)}set mediaController(e){r4(this,rt.MEDIA_CONTROLLER,e)}get noAutohide(){return r1(this,on.NO_AUTOHIDE)}set noAutohide(e){r2(this,on.NO_AUTOHIDE,e)}}cb=new WeakMap,cg=new WeakMap,oo.shadowRootOptions={mode:"open"},oo.getTemplateHTML=function(e){return`
996    <style>
997      :host {
998        display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
999        vertical-align: middle;
1000        box-sizing: border-box;
1001        --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms);
1002      }
1003
1004      #status {
1005        color: rgba(0,0,0,0);
1006        width: 0px;
1007        height: 0px;
1008      }
1009
1010      :host slot[name=icon] > *,
1011      :host ::slotted([slot=icon]) {
1012        opacity: var(--media-loading-indicator-opacity, 0);
1013        transition: opacity 0.15s;
1014      }
1015
1016      :host([${rr.MEDIA_LOADING}]:not([${rr.MEDIA_PAUSED}])) slot[name=icon] > *,
1017      :host([${rr.MEDIA_LOADING}]:not([${rr.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
1018        opacity: var(--media-loading-indicator-opacity, 1);
1019        transition: opacity 0.15s var(--_loading-indicator-delay);
1020      }
1021
1022      :host #status {
1023        visibility: var(--media-loading-indicator-opacity, hidden);
1024        transition: visibility 0.15s;
1025      }
1026
1027      :host([${rr.MEDIA_LOADING}]:not([${rr.MEDIA_PAUSED}])) #status {
1028        visibility: var(--media-loading-indicator-opacity, visible);
1029        transition: visibility 0.15s var(--_loading-indicator-delay);
1030      }
1031
1032      svg, img, ::slotted(svg), ::slotted(img) {
1033        width: var(--media-loading-indicator-icon-width);
1034        height: var(--media-loading-indicator-icon-height, 100px);
1035        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1036        vertical-align: middle;
1037      }
1038    </style>
1039
1040    <slot name="icon">${os}</slot>
1041    <div id="status" role="status" aria-live="polite">${rw("media loading")}</div>
1042  `},rx.customElements.get("media-loading-indicator")||rx.customElements.define("media-loading-indicator",oo);let ol=`<svg aria-hidden="true" viewBox="0 0 24 24">
1043  <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"/>
1044</svg>`,od=`<svg aria-hidden="true" viewBox="0 0 24 24">
1045  <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"/>
1046</svg>`,ou=`<svg aria-hidden="true" viewBox="0 0 24 24">
1047  <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"/>
1048</svg>`,oc=e=>{let t="off"===e.mediaVolumeLevel?rw("unmute"):rw("mute");e.setAttribute("aria-label",t)};class oh extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),oc(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_VOLUME_LEVEL&&oc(this)}get mediaVolumeLevel(){return r3(this,rr.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){r4(this,rr.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?re.MEDIA_UNMUTE_REQUEST:re.MEDIA_MUTE_REQUEST;this.dispatchEvent(new rx.CustomEvent(e,{composed:!0,bubbles:!0}))}}oh.getSlotTemplateHTML=function(e){return`
1049    <style>
1050      :host(:not([${rr.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
1051      :host([${rr.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
1052        display: none !important;
1053      }
1054
1055      :host([${rr.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {
1056        display: none !important;
1057      }
1058
1059      :host([${rr.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {
1060        display: none !important;
1061      }
1062
1063      :host([${rr.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {
1064        display: none !important;
1065      }
1066
1067      :host(:not([${rr.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],
1068      :host([${rr.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {
1069        display: none;
1070      }
1071    </style>
1072
1073    <slot name="icon">
1074      <slot name="off">${ol}</slot>
1075      <slot name="low">${od}</slot>
1076      <slot name="medium">${od}</slot>
1077      <slot name="high">${ou}</slot>
1078    </slot>
1079  `},oh.getTooltipContentHTML=function(){return`
1080    <slot name="tooltip-mute">${rw("Mute")}</slot>
1081    <slot name="tooltip-unmute">${rw("Unmute")}</slot>
1082  `},rx.customElements.get("media-mute-button")||rx.customElements.define("media-mute-button",oh);let om=`<svg aria-hidden="true" viewBox="0 0 28 24">
1083  <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"/>
1084</svg>`,op=e=>{let t=e.mediaIsPip?rw("exit picture in picture mode"):rw("enter picture in picture mode");e.setAttribute("aria-label",t)};class ov extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_IS_PIP,rr.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),op(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_IS_PIP&&op(this)}get mediaPipUnavailable(){return r3(this,rr.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){r4(this,rr.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return r1(this,rr.MEDIA_IS_PIP)}set mediaIsPip(e){r2(this,rr.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?re.MEDIA_EXIT_PIP_REQUEST:re.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new rx.CustomEvent(e,{composed:!0,bubbles:!0}))}}ov.getSlotTemplateHTML=function(e){return`
1085    <style>
1086      :host([${rr.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
1087        display: none !important;
1088      }
1089
1090      :host(:not([${rr.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
1091        display: none !important;
1092      }
1093
1094      :host([${rr.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
1095      :host(:not([${rr.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
1096        display: none;
1097      }
1098    </style>
1099
1100    <slot name="icon">
1101      <slot name="enter">${om}</slot>
1102      <slot name="exit">${om}</slot>
1103    </slot>
1104  `},ov.getTooltipContentHTML=function(){return`
1105    <slot name="tooltip-enter">${rw("Enter picture in picture mode")}</slot>
1106    <slot name="tooltip-exit">${rw("Exit picture in picture mode")}</slot>
1107  `},rx.customElements.get("media-pip-button")||rx.customElements.define("media-pip-button",ov);var oE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let ob={RATES:"rates"},og=[1,1.2,1.5,1.7,2];class of extends sl{constructor(){var e;super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cf,new nh(this,ob.RATES,{defaultValue:og})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_PLAYBACK_RATE,ob.RATES]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===ob.RATES&&(oE(this,cf).value=i),e===rr.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",rw("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return oE(this,cf)}set rates(e){e?Array.isArray(e)?oE(this,cf).value=e.join(" "):"str
1107ing"==typeof e&&(oE(this,cf).value=e):oE(this,cf).value=""}get mediaPlaybackRate(){return rJ(this,rr.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r0(this,rr.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(oE(this,cf).values(),e=>+e).sort((e,t)=>e-t),a=null!=(t=null!=(e=i.find(e=>e>this.mediaPlaybackRate))?e:i[0])?t:1,r=new rx.CustomEvent(re.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}cf=new WeakMap,of.getSlotTemplateHTML=function(e){return`
1108    <style>
1109      :host {
1110        min-width: 5ch;
1111        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1112      }
1113    </style>
1114    <slot name="icon">${e.mediaplaybackrate||1}x</slot>
1115  `},of.getTooltipContentHTML=function(){return rw("Playback rate")},rx.customElements.get("media-playback-rate-button")||rx.customElements.define("media-playback-rate-button",of);let o_=`<svg aria-hidden="true" viewBox="0 0 24 24">
1116  <path d="m6 21 15-9L6 3v18Z"/>
1117</svg>`,oy=`<svg aria-hidden="true" viewBox="0 0 24 24">
1118  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
1119</svg>`,oT=e=>{let t=e.mediaPaused?rw("play"):rw("pause");e.setAttribute("aria-label",t)};class oA extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_PAUSED,rr.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),oT(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e===rr.MEDIA_PAUSED||e===rr.MEDIA_LANG)&&oT(this)}get mediaPaused(){return r1(this,rr.MEDIA_PAUSED)}set mediaPaused(e){r2(this,rr.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?re.MEDIA_PLAY_REQUEST:re.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new rx.CustomEvent(e,{composed:!0,bubbles:!0}))}}oA.getSlotTemplateHTML=function(e){return`
1120    <style>
1121      :host([${rr.MEDIA_PAUSED}]) slot[name=pause],
1122      :host(:not([${rr.MEDIA_PAUSED}])) slot[name=play] {
1123        display: none !important;
1124      }
1125
1126      :host([${rr.MEDIA_PAUSED}]) slot[name=tooltip-pause],
1127      :host(:not([${rr.MEDIA_PAUSED}])) slot[name=tooltip-play] {
1128        display: none;
1129      }
1130    </style>
1131
1132    <slot name="icon">
1133      <slot name="play">${o_}</slot>
1134      <slot name="pause">${oy}</slot>
1135    </slot>
1136  `},oA.getTooltipContentHTML=function(){return`
1137    <slot name="tooltip-play">${rw("Play")}</slot>
1138    <slot name="tooltip-pause">${rw("Pause")}</slot>
1139  `},rx.customElements.get("media-play-button")||rx.customElements.define("media-play-button",oA);let ok={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};class ow extends rx.HTMLElement{static get observedAttributes(){return[ok.PLACEHOLDER_SRC,ok.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if(e===ok.SRC&&(null==i?this.image.removeAttribute(ok.SRC):this.image.setAttribute(ok.SRC,i)),e===ok.PLACEHOLDER_SRC)if(null==i)this.image.style.removeProperty("background-image");else{var a;a=this.image,a.style["background-image"]=`url('${i}')`}}get placeholderSrc(){return r3(this,ok.PLACEHOLDER_SRC)}set placeholderSrc(e){r4(this,ok.SRC,e)}get src(){return r3(this,ok.SRC)}set src(e){r4(this,ok.SRC,e)}}ow.shadowRootOptions={mode:"open"},ow.getTemplateHTML=function(e){return`
1140    <style>
1141      :host {
1142        pointer-events: none;
1143        display: var(--media-poster-image-display, inline-block);
1144        box-sizing: border-box;
1145      }
1146
1147      img {
1148        max-width: 100%;
1149        max-height: 100%;
1150        min-width: 100%;
1151        min-height: 100%;
1152        background-repeat: no-repeat;
1153        background-position: var(--media-poster-image-background-position, var(--media-object-position, center));
1154        background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));
1155        object-fit: var(--media-object-fit, contain);
1156        object-position: var(--media-object-position, center);
1157      }
1158    </style>
1159
1160    <img part="poster img" aria-hidden="true" id="image"/>
1161  `},rx.customElements.get("media-poster-image")||rx.customElements.define("media-poster-image",ow);var oS=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class oI extends sW{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,c_,void 0),((e,t,i,a)=>(oS(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,c_,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_PREVIEW_CHAPTER,rr.MEDIA_LA
1161NG]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),(e===rr.MEDIA_PREVIEW_CHAPTER||e===rr.MEDIA_LANG)&&i!==t&&null!=i){var a,r;if((oS(this,a=c_,"read from private field"),r?r.call(this):a.get(this)).textContent=i,""!==i){let e=rw("chapter: {chapterName}",{chapterName:i});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext")}}get mediaPreviewChapter(){return r3(this,rr.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){r4(this,rr.MEDIA_PREVIEW_CHAPTER,e)}}c_=new WeakMap,rx.customElements.get("media-preview-chapter-display")||rx.customElements.define("media-preview-chapter-display",oI);var oR=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oD=(e,t,i)=>(oR(e,t,"read from private field"),i?i.call(e):t.get(e)),oC=(e,t,i,a)=>(oR(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class oL extends rx.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cy,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rt.MEDIA_CONTROLLER,rr.MEDIA_PREVIEW_IMAGE,rr.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(rt.MEDIA_CONTROLLER);a&&(oC(this,cy,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=oD(this,cy))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oD(this,cy))?void 0:e.unassociateElement)||t.call(e,this),oC(this,cy,null)}attributeChangedCallback(e,t,i){var a,r,n,s,o;[rr.MEDIA_PREVIEW_IMAGE,rr.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===rt.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oD(this,cy))?void 0:a.unassociateElement)||r.call(a,this),oC(this,cy,null)),i&&this.isConnected&&(oC(this,cy,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oD(this,cy))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return r3(this,rr.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){r4(this,rr.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(rr.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){if(!e)return void this.removeAttribute(rr.MEDIA_PREVIEW_COORDS);this.setAttribute(rr.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[i,a,r,n]=e,s=t.split("#")[0],{maxWidth:o,maxHeight:l,minWidth:d,minHeight:u}=getComputedStyle(this),c=Math.min(parseInt(o)/r,parseInt(l)/n),h=Math.max(parseInt(d)/r,parseInt(u)/n),m=c<1,p=m?c:h>1?h:1,{style:E}=rz(this.shadowRoot,":host"),b=rz(this.shadowRoot,"img").style,g=this.shadowRoot.querySelector("img"),f=m?"min":"max";E.setProperty(`${f}-width`,"initial","important"),E.setProperty(`${f}-height`,"initial","important"),E.width=`${r*p}px`,E.height=`${n*p}px`;let _=()=>{b.width=`${this.imgWidth*p}px`,b.height=`${this.imgHeight*p}px`,b.display="block"};g.src!==s&&(g.onload=()=>{this.imgWidth=g.naturalWidth,this.imgHeight=g.naturalHeight,_()},g.src=s,_()),_(),b.transform=`translate(-${i*p}px, -${a*p}px)`}}cy=new WeakMap,oL.shadowRootOptions={mode:"open"},oL.getTemplateHTML=function(e){return`
1162    <style>
1163      :host {
1164        box-sizing: border-box;
1165        display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));
1166        overflow: hidden;
1167      }
1168
1169      img {
1170        display: none;
1171        position: relative;
1172      }
1173    </style>
1174    <img crossorigin loading="eager" decoding="async">
1175  `},rx.customElements.get("media-preview-thumbnail")||rx.customElements.define("media-preview-thumbnail",oL);var oM=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oO=(e,t,i)=>(oM(e,t,"read from private field"),i?i.call(e):t.get(e));class ox extends sW{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cT,void 0),((e,t,i,a)=>(oM(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,cT,this.shadowRoot.querySelector("slot")),oO(this,cT).textContent=rT(0)}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_PREVIEW_TIME&&null!=i&&(oO(this,cT).textContent=rT(parseFloat(i)))}get mediaPreviewTime(){return rJ(this,rr.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){r0(this,rr.MEDIA_PREVIEW_TIME,e)}}cT=new WeakMap,rx.customElements.get("media-preview-time-display")||rx.customElements.define("media-preview-time-display",ox);let oN={SEEK_OFFSET:"seekoffset"};class oP extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_CURRENT_TIME,oN.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=rJ(this,oN.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===oN.SEEK_OFFSET&&(this.seekOffset=rJ(this,oN.SEEK_OFFSET,30))}get seekOffset(){return rJ(this,oN.SEEK_OFFSET,30)}set seekOffset(e){r0(this,oN.SEEK_OFFSET,e),this.setAttribute("aria-label",rw("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),rK(rq(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return rJ(this,rr.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){r0(this,rr.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new rx.CustomEvent(re.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}oP.getSlotTemplateHTML=function(e,t){let i;return`
1176    <slot name="icon">${i=t.seekOffset,`
1177  <svg aria-hidden="true" viewBox="0 0 20 24">
1178    <defs>
1179      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1180    </defs>
1181    <text class="text value" transform="translate(2.18 19.87)">${i}</text>
1182    <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"/>
1183  </svg>`}</slot>
1184  `},oP.getTooltipContentHTML=function(){return rw("Seek backward")},rx.customElements.get("media-seek-backward-button")||rx.customElements.define("media-seek-backward-button",oP);let oU={SEEK_OFFSET:"seekoffset"};class oB extends sl{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_CURRENT_TIME,oU.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=rJ(this,oU.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===oU.SEEK_OFFSET&&(this.seekOffset=rJ(this,oU.SEEK_OFFSET,30))}get seekOffset(){return rJ(this,oU.SEEK_OFFSET,30)}set seekOffset(e){r0(this,oU.SEEK_OFFSET,e),this.setAttribute("aria-label",rw("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),rK(rq(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return rJ(this,rr.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){r0(this,rr.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new rx.CustomEvent(re.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}oB.getSlotTemplateHTML=function(e,t){let i;return`
1185    <slot name="icon">${i=t.seekOffset,`
1186  <svg aria-hidden="true" viewBox="0 0 20 24">
1187    <defs>
1188      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1189    </defs>
1190    <text class="text value" transform="translate(8.9 19.87)">${i}</text>
1191    <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"/>
1192  </svg>`}</slot>
1193  `},oB.getTooltipContentHTML=function(){return rw("Seek forward")},rx.customElements.get("media-seek-forward-button")||rx.customElements.define("media-seek-forward-button",oB);var oH=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oW=(e,t,i)=>(oH(e,t,"read from private field"),i?i.call(e):t.get(e));let oV={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},oF=[...Object.values(oV),rr.MEDIA_CURRENT_TIME,rr.MEDIA_DURATION,rr.MEDIA_SEEKABLE],o$=["Enter"," "],oK="&nbsp;/&nbsp;",oq=(e,{timesSep:t=oK}={})=>{var i,a;let r=null!=(i=e.mediaCurrentTime)?i:0,[,n]=null!=(a=e.mediaSeekable)?a:[],s=0;Number.isFinite(e.mediaDuration)?s=e.mediaDuration:Number.isFinite(n)&&(s=n);let o=e.remaining?rT(0-(s-r)):rT(r);return e.showDuration?`${o}${t}${rT(s)}`:o};class oY extends sW{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,cA,void 0),((e,t,i,a)=>(oH(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,cA,this.shadowRoot.querySelector("slot")),oW(this,cA).innerHTML=`${oq(this)}`}static get observedAttributes(){return[...super.observedAttributes,...oF,"disabled"]}connectedCallback(){let{style:e}=rz(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",rw("playback time"));let t=e=>{let{key:i}=e;if(!o$.includes(i))return void this.removeEventListener("keyup",t);this.toggleTimeDisplay()};this.addEventListener("keydown",e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!o$.includes(r))return void this.removeEventListener("keyup",t);this.addEventListener("keyup",t)}),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,t,i){oF.includes(e)?this.update():"disabled"===e&&i!==t&&(null==i?this.enable():this.disable()),super.attributeChangedCallback(e,t,i)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return r1(this,oV.REMAINING)}set remaining(e){r2(this,oV.REMAINING,e)}get showDuration(){return r1(this,oV.SHOW_DURATION)}set showDuration(e){r2(this,oV.SHOW_DURATION,e)}get noToggle(){return r1(this,oV.NO_TOGGLE)}set noToggle(e){r2(this,oV.NO_TOGGLE,e)}get mediaDuration(){return rJ(this,rr.MEDIA_DURATION)}set mediaDuration(e){r0(this,rr.MEDIA_DURATION,e)}get mediaCurrentTime(){return rJ(this,rr.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){r0(this,rr.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(rr.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(rr.MEDIA_SEEKABLE);this.setAttribute(rr.MEDIA_SEEKABLE,e.join(":"))}update(){let e=oq(this);(e=>{var t;
1193let i=e.mediaCurrentTime,[,a]=null!=(t=e.mediaSeekable)?t:[],r=null;if(Number.isFinite(e.mediaDuration)?r=e.mediaDuration:Number.isFinite(a)&&(r=a),null==i||null===r)return e.setAttribute("aria-valuetext","video not loaded, unknown time.");let n=e.remaining?ry(0-(r-i)):ry(i);if(!e.showDuration)return e.setAttribute("aria-valuetext",n);let s=ry(r),o=`${n} of ${s}`;e.setAttribute("aria-valuetext",o)})(this),e!==oW(this,cA).innerHTML&&(oW(this,cA).innerHTML=e)}}cA=new WeakMap,oY.getSlotTemplateHTML=function(e,t){return`
1194    <slot>${oq(t)}</slot>
1195  `},rx.customElements.get("media-time-display")||rx.customElements.define("media-time-display",oY);var oG=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oj=(e,t,i)=>(oG(e,t,"read from private field"),i?i.call(e):t.get(e)),oQ=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},oZ=(e,t,i,a)=>(oG(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class oz{constructor(e,t,i){oQ(this,ck,void 0),oQ(this,cw,void 0),oQ(this,cS,void 0),oQ(this,cI,void 0),oQ(this,cR,void 0),oQ(this,cD,void 0),oQ(this,cC,void 0),oQ(this,cL,void 0),oQ(this,cM,0),oQ(this,cO,(e=performance.now())=>{oZ(this,cM,requestAnimationFrame(oj(this,cO))),oZ(this,cI,performance.now()-oj(this,cS));let t=1e3/this.fps;if(oj(this,cI)>t){oZ(this,cS,e-oj(this,cI)%t);let i=1e3/((e-oj(this,cw))/++((e,t,i,a)=>({set _(value){oZ(e,t,value,i)},get _(){return oj(e,t,a)}}))(this,cR)._),a=(e-oj(this,cD))/1e3/this.duration,r=oj(this,cC)+a*this.playbackRate;r-oj(this,ck).valueAsNumber>0?oZ(this,cL,this.playbackRate/this.duration/i):(oZ(this,cL,.995*oj(this,cL)),r=oj(this,ck).valueAsNumber+oj(this,cL)),this.callback(r)}}),oZ(this,ck,e),this.callback=t,this.fps=i}start(){0===oj(this,cM)&&(oZ(this,cS,performance.now()),oZ(this,cw,oj(this,cS)),oZ(this,cR,0),oj(this,cO).call(this))}stop(){0!==oj(this,cM)&&(cancelAnimationFrame(oj(this,cM)),oZ(this,cM,0))}update({start:e,duration:t,playbackRate:i}){let a=e-oj(this,ck).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),oZ(this,cC,e),oZ(this,cD,performance.now()),this.duration=t,this.playbackRate=i}}ck=new WeakMap,cw=new WeakMap,cS=new WeakMap,cI=new WeakMap,cR=new WeakMap,cD=new WeakMap,cC=new WeakMap,cL=new WeakMap,cM=new WeakMap,cO=new WeakMap;var oX=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oJ=(e,t,i)=>(oX(e,t,"read from private field"),i?i.call(e):t.get(e)),o0=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},o1=(e,t,i,a)=>(oX(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),o2=(e,t,i)=>(oX(e,t,"access private method"),i);let o3=(e,t=e.mediaCurrentTime)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:Math.max(0,Math.min((t-i)/(a-i),1))},o4=(e,t=e.range.valueAsNumber)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:t*(a-i)+i};class o5 extends sM{constructor(){super(),o0(this,cK),o0(this,cY),o0(this,cQ),o0(this,cz),o0(this,cJ),o0(this,c1),o0(this,c3),o0(this,c5),o0(this,cx,void 0),o0(this,cN,void 0),o0(this,cP,void 0),o0(this,cU,void 0),o0(this,cB,void 0),o0(this,cH,void 0),o0(this,cW,void 0),o0(this,cV,void 0),o0(this,cF,void 0),o0(this,c$,void 0),o0(this,cj,e=>{!this.dragging&&(rb(e)&&(this.range.valueAsNumber=e),oJ(this,c$)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),o1(this,cP,this.shadowRoot.querySelectorAll('[part~="box"]')),o1(this,cB,this.shadowRoot.querySelector('[part~="preview-box"]')),o1(this,cH,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);o1(this,cW,parseInt(e.getPropertyValue("--media-box-padding-left"))),o1(this,cV,parseInt(e.getPropertyValue("--media-box-padding-right"))),o1(this,cN,new oz(this.range,oJ(this,cj),60))}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_PAUSED,rr.MEDIA_DURATION,rr.MEDIA_SEEKABLE,rr.MEDIA_CURRENT_TIME,rr.MEDIA_PREVIEW_IMAGE,rr.MEDIA_PREVIEW_TIME,rr.MEDIA_PREVIEW_CHAPTER,rr.MEDIA_BUFFERED,rr.MEDIA_PLAYBACK_RATE,rr.MEDIA_LOADING,rr.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",rw("seek")),o2(this,cK,cq).call(this),o1(this,cx,this.getRootNode()),null==(e=oJ(this,cx))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),o2(this,cK,cq).call(this),null==(e=oJ(this,cx))||e.removeEventListener("transitionstart",this),o1(this,cx,null)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),t!=i&&(e===rr.MEDIA_CURRENT_TIME||e===rr.MEDIA_PAUSED||e===rr.MEDIA_ENDED||e===rr.MEDIA_LOADING||e===rr.MEDIA_DURATION||e===rr.MEDIA_SEEKABLE?(oJ(this,cN).update({start:o3(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),o2(this,cK,cq).call(this),(e=>
1195{let t=e.range,i=ry(+o4(e)),a=ry(+e.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:"video not loaded, unknown time.";t.setAttribute("aria-valuetext",r)})(this)):e===rr.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===rr.MEDIA_DURATION||e===rr.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=oJ(this,cF),this.updateBar()))}get mediaChaptersCues(){return oJ(this,cF)}set mediaChaptersCues(e){var t;o1(this,cF,e),this.updateSegments(null==(t=oJ(this,cF))?void 0:t.map(e=>({start:o3(this,e.startTime),end:o3(this,e.endTime)})))}get mediaPaused(){return r1(this,rr.MEDIA_PAUSED)}set mediaPaused(e){r2(this,rr.MEDIA_PAUSED,e)}get mediaLoading(){return r1(this,rr.MEDIA_LOADING)}set mediaLoading(e){r2(this,rr.MEDIA_LOADING,e)}get mediaDuration(){return rJ(this,rr.MEDIA_DURATION)}set mediaDuration(e){r0(this,rr.MEDIA_DURATION,e)}get mediaCurrentTime(){return rJ(this,rr.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){r0(this,rr.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return rJ(this,rr.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r0(this,rr.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(rr.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(rr.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(rr.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(rr.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(rr.MEDIA_SEEKABLE);this.setAttribute(rr.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,t=this.mediaDuration]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaSeekableStart(){var e;let[t=0]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaPreviewImage(){return r3(this,rr.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){r4(this,rr.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return rJ(this,rr.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){r0(this,rr.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return r1(this,rr.MEDIA_ENDED)}set mediaEnded(e){r2(this,rr.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let t,i=this.mediaBuffered;if(!i.length)return;if(this.mediaEnded)t=1;else{let a=this.mediaCurrentTime,[,r=this.mediaSeekableStart]=null!=(e=i.find(([e,t])=>e<=a&&a<=t))?e:[];t=o3(this,r)}let{style:a}=rz(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=rz(this.shadowRoot,"#current-rail"),t=rz(this.shadowRoot,'[part~="current-box"]'),i=o2(this,cQ,cZ).call(this,oJ(this,cH)),a=o2(this,cz,cX).call(this,i,this.range.valueAsNumber),r=o2(this,cJ,c0).call(this,i,this.range.valueAsNumber);e.style.transform=`translateX(${a})`,e.style.setProperty("--_range-width",`${i.range.width}`),t.style.setProperty("--_box-shift",`${r}`),t.style.setProperty("--_box-width",`${i.box.width}px`),t.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":o2(this,c5,c9).call(this);break;case"pointermove":o2(this,c1,c2).call(this,e);break;case"pointerup":oJ(this,c$)&&o1(this,c$,!1);break;case"pointerdown":o1(this,c$,!0);break;case"pointerleave":o2(this,c3,c4).call(this,null);break;case"transitionstart":rY(e.target,this)&&setTimeout(()=>o2(this,cK,cq).call(this),0)}}}cx=new WeakMap,cN=new WeakMap,cP=new WeakMap,cU=new WeakMap,cB=new WeakMap,cH=new WeakMap,cW=ne
1195w WeakMap,cV=new WeakMap,cF=new WeakMap,c$=new WeakMap,cK=new WeakSet,cq=function(){o2(this,cY,cG).call(this)?oJ(this,cN).start():oJ(this,cN).stop()},cY=new WeakSet,cG=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&rZ(this)},cj=new WeakMap,cQ=new WeakSet,cZ=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?rG(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),a=this.range.getBoundingClientRect(),r=e.offsetWidth,n=-(a.left-i.left-r/2),s=i.right-a.left-r/2;return{box:{width:r,min:n,max:s},bounds:i,range:a}},cz=new WeakSet,cX=function(e,t){let i=`${100*t}%`,{width:a,min:r,max:n}=e.box;if(!a)return i;if(!Number.isNaN(r)){let e=`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`;i=`max(${e}, ${i})`}if(!Number.isNaN(n)){let e=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${e})`}return i},cJ=new WeakSet,c0=function(e,t){let{width:i,min:a,max:r}=e.box,n=t*e.range.width;if(n<a+oJ(this,cW)){let t=e.range.left-e.bounds.left-oJ(this,cW);return`${n-i/2+t}px`}if(n>r-oJ(this,cV)){let t=e.bounds.right-e.range.right-oJ(this,cV);return`${n+i/2-t-e.range.width}px`}return 0},c1=new WeakSet,c2=function(e){let t=[...oJ(this,cP)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void o2(this,c3,c4).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=rz(this.shadowRoot,"#preview-rail"),r=rz(this.shadowRoot,'[part~="preview-box"]'),n=o2(this,cQ,cZ).call(this,oJ(this,cB)),s=(e.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let o=o2(this,cz,cX).call(this,n,s),l=o2(this,cJ,c0).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`),1>Math.abs(Math.round(oJ(this,cU))-Math.round(s*i))&&s>.01&&s<.99||(o1(this,cU,s*i),o2(this,c3,c4).call(this,oJ(this,cU)))},c3=new WeakSet,c4=function(e){this.dispatchEvent(new rx.CustomEvent(re.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},c5=new WeakSet,c9=function(){oJ(this,cN).stop();let e=o4(this);this.dispatchEvent(new rx.CustomEvent(re.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},o5.shadowRootOptions={mode:"open"},o5.getTemplateHTML=function(e){return`
1196    ${sM.getTemplateHTML(e)}
1197    <style>
1198      :host {
1199        --media-box-border-radius: 4px;
1200        --media-box-padding-left: 10px;
1201        --media-box-padding-right: 10px;
1202        --media-preview-border-radius: var(--media-box-border-radius);
1203        --media-box-arrow-offset: var(--media-box-border-radius);
1204        --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
1205        --_preview-background: var(--media-preview-background, var(--_control-background));
1206
1207        
1208        contain: layout;
1209      }
1210
1211      #buffered {
1212        background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));
1213        position: absolute;
1214        height: 100%;
1215        will-change: width;
1216      }
1217
1218      #preview-rail,
1219      #current-rail {
1220        width: 100%;
1221        position: absolute;
1222        left: 0;
1223        bottom: 100%;
1224        pointer-events: none;
1225        will-change: transform;
1226      }
1227
1228      [part~="box"] {
1229        width: min-content;
1230        
1231        position: absolute;
1232        bottom: 100%;
1233        flex-direction: column;
1234        align-items: center;
1235        transform: translateX(-50%);
1236      }
1237
1238      [part~="current-box"] {
1239        display: var(--media-current-box-display, var(--media-box-display, flex));
1240        margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));
1241        visibility: hidden;
1242      }
1243
1244      [part~="preview-box"] {
1245        display: var(--media-preview-box-display, var(--media-box-display, flex));
1246        margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));
1247        transition-property: var(--media-preview-transition-property, visibility, opacity);
1248        transition-duration: var(--media-preview-transition-duration-out, .25s);
1249        transition-delay: var(--media-preview-transition-delay-out, 0s);
1250        visibility: hidden;
1251        opacity: 0;
1252      }
1253
1254      :host(:is([${rr.MEDIA_PREVIEW_IMAGE}], [${rr.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
1255        transition-duration: var(--media-preview-transition-duration-in, .5s);
1256        transition-delay: var(--media-preview-transition-delay-in, .25s);
1257        visibility: visible;
1258        opacity: 1;
1259      }
1260
1261      @media (hover: hover) {
1262        :host(:is([${rr.MEDIA_PREVIEW_IMAGE}], [${rr.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
1263          transition-duration: var(--media-preview-transition-duration-in, .5s);
1264          transition-delay: var(--media-preview-transition-delay-in, .25s);
1265          visibility: visible;
1266          opacity: 1;
1267        }
1268      }
1269
1270      media-preview-thumbnail,
1271      ::slotted(media-preview-thumbnail) {
1272        visibility: hidden;
1273        
1274        transition: visibility 0s .25s;
1275        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1276        background: var(--media-preview-thumbnail-background, var(--_preview-background));
1277        box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));
1278        max-width: var(--media-preview-thumbnail-max-width, 180px);
1279        max-height: var(--media-preview-thumbnail-max-height, 160px);
1280        min-width: var(--media-preview-thumbnail-min-width, 120px);
1281        min-height: var(--media-preview-thumbnail-min-height, 80px);
1282        border: var(--media-preview-thumbnail-border);
1283        border-radius: var(--media-preview-thumbnail-border-radius,
1284          var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
1285      }
1286
1287      :host([${rr.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
1288      :host([${rr.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
1289        transition-delay: var(--media-preview-transition-delay-in, .25s);
1290        visibility: visible;
1291      }
1292
1293      @media (hover: hover) {
1294        :host([${rr.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
1295        :host([${rr.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
1296          transition-delay: var(--media-preview-transition-delay-in, .25s);
1297          visibility: visible;
1298        }
1299
1300        :host([${rr.MEDIA_PREVIEW_TIME}]:hover) {
1301          --media-time-range-hover-display: block;
1302        }
1303      }
1304
1305      media-preview-chapter-display,
1306      ::slotted(media-preview-chapter-display) {
1307        font-size: var(--media-font-size, 13px);
1308        line-height: 17px;
1309        min-width: 0;
1310        visibility: hidden;
1311        
1312        transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;
1313        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1314        background: var(--media-preview-chapter-background, var(--_preview-background));
1315        border-radius: var(--media-preview-chapter-border-radius,
1316          var(--media-preview-border-radius) var(--media-preview-border-radius)
1317          var(--media-preview-border-radius) var(--media-preview-border-radius));
1318        padding: var(--media-preview-chapter-padding, 3.5px 9px);
1319        margin: var(--media-preview-chapter-margin, 0 0 5px);
1320        text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1321      }
1322
1323      :host([${rr.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
1324      :host([${rr.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
1325        transition-delay: var(--media-preview-transition-delay-in, .25s);
1326        border-radius: var(--media-preview-chapter-border-radius, 0);
1327        padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
1328        margin: var(--media-preview-chapter-margin, 0);
1329        min-width: 100%;
1330      }
1331
1332      media-preview-chapter-display[${rr.MEDIA_PREVIEW_CHAPTER}],
1333      ::slotted(media-preview-chapter-display[${rr.MEDIA_PREVIEW_CHAPTER}]) {
1334        visibility: visible;
1335      }
1336
1337      media-preview-chapter-display:not([aria-valuetext]),
1338      ::slotted(media-preview-chapter-display:not([aria-valuetext])) {
1339        display: none;
1340      }
1341
1342      media-preview-time-display,
1343      ::slotted(media-preview-time-display),
1344      media-time-display,
1345      ::slotted(media-time-display) {
1346        font-size: var(--media-font-size, 13px);
1347        line-height: 17px;
1348        min-width: 0;
1349        
1350        transition: min-width 0s, border-radius 0s;
1351        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1352        background: var(--media-preview-time-background, var(--_preview-background));
1353        border-radius: var(--media-preview-time-border-radius,
1354          var(--media-preview-border-radius) var(--media-preview-border-radius)
1355          var(--media-preview-border-radius) var(--media-preview-border-radius));
1356        padding: var(--media-preview-time-padding, 3.5px 9px);
1357        margin: var(--media-preview-time-margin, 0);
1358        text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1359        transform: translateX(min(
1360          max(calc(50% - var(--_box-width) / 2),
1361          calc(var(--_box-shift, 0))),
1362          calc(var(--_box-width) / 2 - 50%)
1363        ));
1364      }
1365
1366      :host([${rr.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
1367      :host([${rr.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
1368        transition-delay: var(--media-preview-transition-delay-in, .25s);
1369        border-radius: var(--media-preview-time-border-radius,
1370          0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
1371        min-width: 100%;
1372      }
1373
1374      :host([${rr.MEDIA_PREVIEW_TIME}]:hover) {
1375        --media-time-range-hover-display: block;
1376      }
1377
1378      [part~="arrow"],
1379      ::slotted([part~="arrow"]) {
1380        display: var(--media-box-arrow-display, inline-block);
1381        transform: translateX(min(
1382          max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),
1383          calc(var(--_box-shift, 0))),
1384          calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))
1385        ));
1386        
1387        border-color: transparent;
1388        border-top-color: var(--media-box-arrow-background, var(--_control-background));
1389        border-width: var(--media-box-arrow-border-width,
1390          var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);
1391        border-style: solid;
1392        justify-content: center;
1393        height: 0;
1394      }
1395    </style>
1396    <div id="preview-rail">
1397      <slot name="preview" part="box preview-box">
1398        <media-preview-thumbnail>
1399          <template shadowrootmode="${oL.shadowRootOptions.mode}">
1400            ${oL.getTemplateHTML({})}
1401          </template>
1402        </media-preview-thumbnail>
1403        <media-preview-chapter-display></media-preview-chapter-display>
1404        <media-preview-time-display></media-preview-time-display>
1405        <slot name="preview-arrow"><div part="arrow"></div></slot>
1406      </slot>
1407    </div>
1408    <div id="current-rail">
1409      <slot name="current" part="box current-box">
1410        
1411      </slot>
1412    </div>
1413  `},rx.customElements.get("media-time-range")||rx.customElements.define("media-time-range",o5);class o9 extends sM{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_VOLUME,rr.MEDIA_MUTED,rr.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,t=new rx.CustomEvent(re.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",rw("volume"))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rr.MEDIA_VOLUME||e===rr.MEDIA_MUTED){let e;this.range.valueAsNumber=this.mediaMuted?0:this.mediaVolume,this.range.setAttribute("aria-valuetext",(e=this.range.valueAsNumber,`${Math.round(100*e)}%`)),this.updateBar()}}
1413get mediaVolume(){return rJ(this,rr.MEDIA_VOLUME,1)}set mediaVolume(e){r0(this,rr.MEDIA_VOLUME,e)}get mediaMuted(){return r1(this,rr.MEDIA_MUTED)}set mediaMuted(e){r2(this,rr.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return r3(this,rr.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){r4(this,rr.MEDIA_VOLUME_UNAVAILABLE,e)}}rx.customElements.get("media-volume-range")||rx.customElements.define("media-volume-range",o9);class o8 extends sl{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=rw("Loop"))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return r1(this,rr.MEDIA_LOOP)}set mediaLoop(e){r2(this,rr.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,t=new rx.CustomEvent(re.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}o8.getSlotTemplateHTML=function(e){return`
1414      <style>
1415        :host {
1416          min-width: 4ch;
1417          padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1418          width: 100%;
1419          display: grid;
1420          grid-template-columns: 1fr auto;
1421          gap: 1rem;
1422          font-weight: var(--media-button-font-weight, normal);
1423        }
1424
1425        #checked-indicator {
1426          display: none;
1427        }
1428
1429        :host([${rr.MEDIA_LOOP}]) #checked-indicator {
1430          display: block;
1431        }
1432      </style>
1433      
1434      <span id="icon">
1435     </span>
1436
1437      <div id="checked-indicator">
1438        <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
1439          <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"/>
1440        </svg>
1441      </div>
1442    `},o8.getTooltipContentHTML=function(){return rw("Loop")},rx.customElements.get("media-loop-button")||rx.customElements.define("media-loop-button",o8);var o6=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},o7=(e,t,i)=>(o6(e,t,"read from private field"),i?i.call(e):t.get(e)),le=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},lt=(e,t,i,a)=>(o6(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let li={processCallback(e,t,i){if(i){for(let[e,a]of t)if(e in i){let t=i[e];"boolean"==typeof t&&a instanceof lu&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof lu?a.element[a.attributeName]=t:a.value=t}}}};class la extends rx.DocumentFragment{constructor(e,t,i=li){var a;super(),le(this,c8,void 0),le(this,c6,void 0),this.append(e.content.cloneNode(!0)),lt(this,c8,lr(this)),lt(this,c6,i),null==(a=i.createCallback)||a.call(i,this,o7(this,c8),t),i.processCallback(this,o7(this,c8),t)}update(e){o7(this,c6).processCallback(this,o7(this,c8),e)}}c8=new WeakMap,c6=new WeakMap;let lr=(e,t=[])=>{let i,a;for(let r of e.attributes||[])if(r.value.includes("{{")){let n=new ld;for([i,a]of ls(r.value))if(i){let i=new lu(e,r.name,r.namespaceURI);n.append(i),t.push([a,i])}else n.append(a);r.value=n.toString()}for(let r of e.childNodes)if(1!==r.nodeType||r instanceof HTMLTemplateElement){let n=r.data;if(1===r.nodeType||n.includes("{{")){let s=[];if(n)for([i,a]of ls(n))if(i){let i=new lc(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(r instanceof HTMLTemplateElement){let i=new lh(e,r);s.push(i),t.push([i.expression,i])}r.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else lr(r,t);return t},ln={},ls=e=>{let t="",i=0,a=ln[e],r=0,n;if(a)return a;for(a=[];n=e[r];r++)"{"===n&&"{"===e[r+1]&&"\\"!==e[r-1]&&e[r+2]&&1==++i?(t&&a.push([0,t]),t="",r++):"}"!==n||"}"!==e[r+1]||"\\"===e[r-1]||--i?t+=n||"":(a.push([1,t.trim()]),t="",r++);return t&&a.push([0,(i>0?"{{":"")+t]),ln[e]=a};class lo{get value(){return""}set value(e){}toString(){return this.value}}let ll=new WeakMap;class ld{constructor(){le(this,c7,[])}[Symbol.iterator](){return o7(this,c7).values()}get length(){return o7(this,c7).length}item(e){return o7(this,c7)[e]}append(...e){for(let t of e)t instanceof lu&&ll.set(t,this),o7(this,c7).push(t)}toString(){return o7(this,c7).join("")}}c7=new WeakMap;class lu extends lo{constructor(e,t,i){super(),le(this,hr),le(this,he,""),le(this,ht,void 0),le(this,hi,void 0),le(this,ha,void 0),lt(this,ht,e),lt(this,hi,t),lt(this,ha,i)}get attributeName(){return o7(this,hi)}get attributeNamespace(){return o7(this,ha)}
1442get element(){return o7(this,ht)}get value(){return o7(this,he)}set value(e){o7(this,he)!==e&&(lt(this,he,e),o7(this,hr,hn)&&1!==o7(this,hr,hn).length?o7(this,ht).setAttributeNS(o7(this,ha),o7(this,hi),o7(this,hr,hn).toString()):null==e?o7(this,ht).removeAttributeNS(o7(this,ha),o7(this,hi)):o7(this,ht).setAttributeNS(o7(this,ha),o7(this,hi),e))}get booleanValue(){return o7(this,ht).hasAttributeNS(o7(this,ha),o7(this,hi))}set booleanValue(e){if(o7(this,hr,hn)&&1!==o7(this,hr,hn).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}he=new WeakMap,ht=new WeakMap,hi=new WeakMap,ha=new WeakMap,hr=new WeakSet,hn=function(){return ll.get(this)};class lc extends lo{constructor(e,t){super(),le(this,hs,void 0),le(this,ho,void 0),lt(this,hs,e),lt(this,ho,t?[...t]:[new Text])}get replacementNodes(){return o7(this,ho)}get parentNode(){return o7(this,hs)}get nextSibling(){return o7(this,ho)[o7(this,ho).length-1].nextSibling}get previousSibling(){return o7(this,ho)[0].previousSibling}get value(){return o7(this,ho).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(e=>null==e?[new Text]:e.forEach?[...e]:11===e.nodeType?[...e.childNodes]:e.nodeType?[e]:[new Text(e)]);t.length||t.push(new Text),lt(this,ho,function(e,t,i,a=null){let r=0,n,s,o,l=i.length,d=t.length;for(;r<l&&r<d&&t[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==t[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)e.insertBefore(i[r++],a);if(r==l)for(;r<d;)e.removeChild(t[r++]);else{for(n=t[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(e.replaceChild(o,n),n=s):e.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,e.removeChild(n),n=s}return i}(o7(this,ho)[0].parentNode,o7(this,ho),t,this.nextSibling))}}hs=new WeakMap,ho=new WeakMap;class lh extends lc{constructor(e,t){let i=t.getAttribute("directive")||t.getAttribute("type"),a=t.getAttribute("expression")||t.getAttribute(i)||"";a.startsWith("{{")&&(a=a.trim().slice(2,-2).trim()),super(e),this.expression=a,this.template=t,this.directive=i}}let lm={string:e=>String(e)};class lp{constructor(e){this.template=e,this.state=void 0}}let lv=new WeakMap,lE=new WeakMap,lb={partial:(e,t)=>{t[e.expression]=new lp(e.template)},if:(e,t)=>{var i;if(ly(e.expression,t))if(lv.get(e)!==e.template){lv.set(e,e.template);let i=new la(e.template,t,lf);e.replace(i),lE.set(e,i)}else null==(i=lE.get(e))||i.update(t);else e.replace(""),lv.delete(e),lE.delete(e)}},lg=Object.keys(lb),lf={processCallback(e,t,i){var a,r;if(i)for(let[e,n]of t){if(n instanceof lh){if(!n.directive){let e=lg.find(e=>n.template.hasAttribute(e));e&&(n.directive=e,n.expression=n.template.getAttribute(e))}null==(a=lb[n.directive])||a.call(lb,n,i);continue}let t=ly(e,i);if(t instanceof lp){lv.get(n)!==t.template?(lv.set(n,t.template),n.value=t=new la(t.template,t.state,lf),lE.set(n,t)):null==(r=lE.get(n))||r.update(t.state);continue}t?(n instanceof lu&&n.attributeName.startsWith("aria-")&&(t=String(t)),n instanceof lu?"boolean"==typeof t?n.booleanValue=t:"function"==typeof t?n.element[n.attributeName]=t:n.value=t:(n.value=t,lv.delete(n),lE.delete(n))):n instanceof lu?n.value=void 0:(n.value=void 0,lv.delete(n),lE.delete(n))}}},l_={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
1442e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=lm[t])?void 0:i.call(lm,e)}};function ly(e,t={}){var i,a,r,n,s,o,l;let d=(function(e,t){let i,a,r,n=[];for(;e;){for(let n in r=null,i=e.length,t)(a=t[n].exec(e))&&a.index<i&&(r={token:a[0],type:n,matches:a.slice(1)},i=a.index);i&&n.push({token:e.substr(0,i),type:void 0}),r&&n.push(r),e=e.substr(i+(r?r.token.length:0))}return n})(e,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>"ws"!==e);if(0===d.length||d.some(({type:e})=>!e))return lT(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return lT(e);let o={...t};i.state=o;let l=d.slice(2);for(let e=0;e<l.length;e+=3){let i=null==(r=l[e])?void 0:r.token,a=null==(n=l[e+1])?void 0:n.token,d=null==(s=l[e+2])?void 0:s.token;i&&"="===a&&(o[i]=lk(d,t))}return i}if(1===d.length)return lA(d[0])?lk(d[0].token,t):lT(e);if(2===d.length){let i=l_[null==(o=d[0])?void 0:o.token];return i&&lA(d[1])?i(lk(d[1].token,t)):lT(e)}if(3===d.length){let i=null==(l=d[1])?void 0:l.token,a=l_[i];if(!a||!lA(d[0])||!lA(d[2]))return lT(e);let r=lk(d[0].token,t);return a(r,"|"===i?d[2].token:lk(d[2].token,t))}}function lT(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function lA({type:e}){return["number","boolean","string","param"].includes(e)}function lk(e,t){let i=e[0],a=e.slice(-1);return"true"===e||"false"===e?"true"===e:i===a&&["'",'"'].includes(i)?e.slice(1,-1):rg(e)?parseFloat(e):t[e]}var lw=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lS=(e,t,i)=>(lw(e,t,"read from private field"),i?i.call(e):t.get(e)),lI=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},lR=(e,t,i,a)=>(lw(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lD=(e,t,i)=>(lw(e,t,"access private method"),i);let lC={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},lL=rN.createElement("template");lL.innerHTML=`
1443  <style>
1444    :host {
1445      display: inline-block;
1446      line-height: 0;
1447    }
1448
1449    media-controller {
1450      width: 100%;
1451      height: 100%;
1452    }
1453
1454    media-captions-button:not([mediasubtitleslist]),
1455    media-captions-menu:not([mediasubtitleslist]),
1456    media-captions-menu-button:not([mediasubtitleslist]),
1457    media-audio-track-menu[mediaaudiotrackunavailable],
1458    media-audio-track-menu-button[mediaaudiotrackunavailable],
1459    media-rendition-menu[mediarenditionunavailable],
1460    media-rendition-menu-button[mediarenditionunavailable],
1461    media-volume-range[mediavolumeunavailable],
1462    media-airplay-button[mediaairplayunavailable],
1463    media-fullscreen-button[mediafullscreenunavailable],
1464    media-cast-button[mediacastunavailable],
1465    media-pip-button[mediapipunavailable] {
1466      display: none;
1467    }
1468  </style>
1469`;class lM extends rx.HTMLElement{constructor(){super(),lI(this,hc),lI(this,hm),lI(this,hl,void 0),lI(this,hd,void 0),lI(this,hu,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(e=>{var t;(!this.mediaController||(null==(t=this.mediaController)?void 0:t.breakpointsComputed))&&e.some(e=>{let t=e.target;return t===this||"media-controller"===t.localName&&!!(lC[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(rn.BREAKPOINTS_COMPUTED,this.render),lD(this,hc,hh).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=lS(this,hl))?e:this.constructor.template}set template(e){if(null===e)return void this.removeAttribute("template");"string"==typeof e?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(lR(this,hl,e),lR(this,hu,null),this.createRenderer())}get props(){var e,t,i;let a=[...Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter(({name:e})=>lC[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(let e of a){let t=null!=(i=lC[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(rg(a)&&(a=parseFloat(a)),r[t]=""===a||a):r[t]=!1}return r}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&lD(this,hm,hp).call(this)}connectedCallback(){lD(this,hm,hp).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==lS(this,hd)&&(lR(this,hd,this.template),this.renderer=new la(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(lL.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}async function lO(e){let t=await fetch(e);if(200!==t.status)throw Error(`Failed to load resource: the server responded with a status of ${t.status}`);return t.text()}function lx(e){return e.split("-")[0]}hl=new WeakMap,hd=new WeakMap,hu=new WeakMap,hc=new WeakSet,hh=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},hm=new WeakSet,hp=function(){var e;let t=this.getAttribute("template");if(!t||t===lS(this,hu))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){lR(this,hu,t),lR(this,hl,a),this.createRenderer();return}(function(e){if(!/^(\/|\.\/|https?:\/\/)/.test(e))return!1;let t=/^https?:\/\//.test(e)?void 0:location.origin;try{new URL(e,t)}catch(e){return!1}return!0})(t)&&(lR(this,hu,t),lO(t).then(e=>{let t=rN.createElement("template");t.innerHTML=e,lR(this,hl,t),this.createRenderer()}).catch(console.error))},lM.observedAttributes=["template"],lM.processor=lf,rx.customElements.get("media-theme")||rx.customElements.define("media-theme",lM);
1469class lN extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}}class lP extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}}var lU=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lB=(e,t,i)=>(lU(e,t,"read from private field"),i?i.call(e):t.get(e)),lH=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},lW=(e,t,i,a)=>(lU(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lV=(e,t,i)=>(lU(e,t,"access private method"),i);function lF({type:e,text:t,value:i,checked:a}){let r=rN.createElement("media-chrome-menu-item");r.type=null!=e?e:"",r.part.add("menu-item"),e&&r.part.add(e),r.value=i,r.checked=a;let n=rN.createElement("span");return n.textContent=t,r.append(n),r}function l$(e,t){let i=e.querySelector(`:scope > [slot="${t}"]`);if((null==i?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i.cloneNode(!0);let a=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return a?a.cloneNode(!0):""}let lK={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class lq extends rx.HTMLElement{constructor(){if(super(),lH(this,hT),lH(this,hk),lH(this,hI),lH(this,hD),lH(this,hL),lH(this,hO),lH(this,hU),lH(this,hH),lH(this,hV),lH(this,h$),lH(this,hq),lH(this,hG),lH(this,hQ),lH(this,hz),lH(this,hJ),lH(this,h1),lH(this,h3),lH(this,h5),lH(this,hv,null),lH(this,hE,null),lH(this,hb,null),lH(this,hg,new Set),lH(this,hf,void 0),lH(this,h_,!1),lH(this,hy,null),lH(this,hS,()=>{let e=lB(this,hg),t=new Set(this.items);for(let i of e)t.has(i)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:i}));for(let i of t)e.has(i)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:i}));lW(this,hg,t)}),lH(this,hN,()=>{lV(this,hU,hB).call(this),lV(this,hH,hW).call(this,!1)}),lH(this,hP,()=>{lV(this,hU,hB).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(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),lW(this,hf,new MutationObserver(lB(this,hS))),lB(this,hf).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[lK.DISABLED,lK.HIDDEN,lK.STYLE,lK.ANCHOR,rt.MEDIA_CONTROLLER]}static formatMenuItemText(e,t){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":lV(this,hT,hA).call(this,e);break;case"invoke":lV(this,hD,hC).call(this,e);break;case"click":lV(this,hV,hF).call(this,e);break;case"toggle":lV(this,hq,hY).call(this,e);break;case"focusout":lV(this,hQ,hZ).call(this,e);break;case"keydown":lV(this,hz,hX).call(this,e)}}connectedCallback(){var e,t;lW(this,hy,rX(this.shadowRoot,":host")),lV(this,hI,hR).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),lW(this,hv,r$(this)),null==(t=null==(e=lB(this,hv))?void 0:e.associateElement)||t.call(e,this),this.hidden||(rH(lG(this),lB(this,hN)),rH(this,lB(this,hP))),lV(this,hk,hw).call(this)}disconnectedCallback(){var e,t;rW(lG(this),lB(this,hN)),rW(this,lB(this,hP)),this.disable(),null==(t=null==(e=lB(this,hv))?void 0:e.unassociateElement)||t.call(e,this),lW(this,hv,null)}attributeChangedCallback(e,t,i){var a,r,n,s;e===lK.HIDDEN&&i!==t?(lB(this,h_)||lW(this,h_,!0),this.hidden?lV(this,hO,hx).call(this):lV(this,hL,hM).call(this),this.dispatchEvent(new lP({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===rt.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=lB(this,hv))?void 0:a.unassociateElement)||r.call(a,this),lW(this,hv,null)),i&&this.isConnected&&(lW(this,hv,r$(this)),null==(s=null==(n=lB(this,hv))?void 0:n.associateElement)||s.call(n,this))):e===lK.DISABLED&&i!==t?null==i?this.enable():this.disable():e===lK.STYLE&&i!==t&&lV(this,hI,hR).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}
1469set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=rQ(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(lY)}get radioGroupItems(){return this.items.filter(e=>"menuitemradio"===e.role)}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,t;return null!=(t=null==(e=this.checkedItems[0])?void 0:e.value)?t:""}set value(e){let t=this.items.find(t=>t.value===e);t&&lV(this,h5,h9).call(this,t)}focus(){if(lW(this,hE,rj()),this.items.length){lV(this,h3,h4).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}handleSelect(e){var t;let i=lV(this,hJ,h0).call(this,e);i&&(lV(this,h5,h9).call(this,i,"checkbox"===i.type),lB(this,hb)&&!this.hidden&&(null==(t=lB(this,hE))||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,i;let{key:a}=e,r=this.items,n=null!=(i=null!=(t=lV(this,hJ,h0).call(this,e))?t:lV(this,h1,h2).call(this))?i:r[0],s=Math.max(0,r.indexOf(n));"ArrowDown"===a?s++:"ArrowUp"===a?s--:"Home"===e.key?s=0:"End"===e.key&&(s=r.length-1),s<0&&(s=r.length-1),s>r.length-1&&(s=0),lV(this,h3,h4).call(this,r[s]),r[s].focus()}}function lY(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function lG(e){var t;return null!=(t=e.getAttribute("bounds")?rG(e,`#${e.getAttribute("bounds")}`):rF(e)||e.parentElement)?t:e}hv=new WeakMap,hE=new WeakMap,hb=new WeakMap,hg=new WeakMap,hf=new WeakMap,h_=new WeakMap,hy=new WeakMap,hT=new WeakSet,hA=function(e){let t=e.target;for(let e of t.assignedNodes({flatten:!0}))3===e.nodeType&&""===e.textContent.trim()&&e.remove();["header","title"].includes(t.name)&&lV(this,hk,hw).call(this),t.name||lB(this,hS).call(this)},hk=new WeakSet,hw=function(){let e=this.shadowRoot.querySelector('slot[name="header"]');e.hidden=0===this.shadowRoot.querySelector('slot[name="title"]').assignedNodes().length&&0===e.assignedNodes().length},hS=new WeakMap,hI=new WeakSet,hR=function(){var e;let t=this.shadowRoot.querySelector("#layout-row"),i=null==(e=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:e.trim();t.setAttribute("media","row"===i?"":"width:0")},hD=new WeakSet,hC=function(e){lW(this,hb,e.relatedTarget),rY(this,e.relatedTarget)||(this.hidden=!this.hidden)},hL=new WeakSet,hM=function(){var e;null==(e=lB(this,hb))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),rH(lG(this),lB(this,hN)),rH(this,lB(this,hP))},hO=new WeakSet,hx=function(){var e;null==(e=lB(this,hb))||e.setAttribute("aria-expanded","false"),rW(lG(this),lB(this,hN)),rW(this,lB(this,hP))},hN=new WeakMap,hP=new WeakMap,hU=new WeakSet,hB=function(e){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:t,y:i}=function({anchor:e,floating:t,placement:i}){let{x:a,y:r}=function({anchor:e,floating:t},i){let a,r="x"==(["top","bottom"].includes(lx(i))?"y":"x")?"y":"x",n="y"===r?"height":"width",s=lx(i),o=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,d=e[n]/2-t[n]/2;switch(s){case"top":a={x:o,y:e.y-t.height};break;case"bottom":a={x:o,y:e.y+e.height};break;case"right":a={x:e.x+e.width,y:l};break;case"left":a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}switch(i.split("-")[1]){case"start":a[r]-=d;break;case"end":a[r]+=d}return a}(function({anchor:e,floating:t}){return{anchor:function(e,t){var i;let a=e.getBoundingClientRect(),r=null!=(i=null==t?void 0:t.getBoundingClientRect())?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}(e,t.offsetParent),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:e,floating:t}),i);return{x:a,y:r}}({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=e||(e=this.offsetWidth);let a=lG(this).getBoundingClientRect(),r=a.width-t-e,n=a.height-i-this.offsetHeight,{style:s}=lB(this,hy);s.setProperty("position","absolute"),s.setProperty("right",`${Math.max(0,r)}px`),s.setProperty("--_menu-bottom",`${n}px`);let o=getComputedStyle(this),l=s.getPropertyValue("--_menu-bottom")===o.bottom?n:parseFloat(o.bottom),d=a.height-l-parseFloat(o.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},hH=new WeakSet,hW=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=lB(this,hy);if(e||a.setProperty("--media-menu-transition-in","none"),i){let e=i.offsetHeight,a=Math.max(i.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${e}px`),lV(this,hU,hB).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),lV(this,hU,hB).call(this);a.removeProperty("--media-menu-transition-in")},hV=new WeakSet,hF=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(lB(this,h$,hK))){null==(t=lB(this,hE))||t.focu
1469s(),this.hidden=!0;return}let i=lV(this,hJ,h0).call(this,e);!i||i.hasAttribute("disabled")||(lV(this,h3,h4).call(this,i),this.handleSelect(e))},h$=new WeakSet,hK=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find(e=>e.matches('button[part~="back"]'))},hq=new WeakSet,hY=function(e){if(e.target===this)return;lV(this,hG,hj).call(this);let t=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of t)i.invokeTargetElement!=e.target&&("open"!=e.newState||"true"!=i.getAttribute("aria-expanded")||i.invokeTargetElement.hidden||i.invokeTargetElement.dispatchEvent(new lN({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);lV(this,hH,hW).call(this,!0)},hG=new WeakSet,hj=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},hQ=new WeakSet,hZ=function(e){var t;rY(this,e.relatedTarget)||(lB(this,h_)&&(null==(t=lB(this,hE))||t.focus()),lB(this,hb)&&lB(this,hb)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},hz=new WeakSet,hX=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;if(!o&&!l&&!d&&this.keysUsed.includes(s))if(e.preventDefault(),e.stopPropagation(),"Tab"===s){if(lB(this,h_)){this.hidden=!0;return}e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()}else"Escape"===s?(null==(n=lB(this,hE))||n.focus(),lB(this,h_)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},hJ=new WeakSet,h0=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},h1=new WeakSet,h2=function(){return this.items.find(e=>0===e.tabIndex)},h3=new WeakSet,h4=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},h5=new WeakSet,h9=function(e,t){let i=[...this.checkedItems];"radio"===e.type&&this.radioGroupItems.forEach(e=>e.checked=!1),t?e.checked=!e.checked:e.checked=!0,this.checkedItems.some((e,t)=>e!=i[t])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},lq.shadowRootOptions={mode:"open"},lq.getTemplateHTML=function(e){return`
1470    <style>
1471      :host {
1472        font: var(--media-font,
1473          var(--media-font-weight, normal)
1474          var(--media-font-size, 14px) /
1475          var(--media-text-content-height, var(--media-control-height, 24px))
1476          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
1477        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
1478        --_menu-bg: rgb(20 20 30 / .8);
1479        background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));
1480        border-radius: var(--media-menu-border-radius);
1481        border: var(--media-menu-border, none);
1482        display: var(--media-menu-display, inline-flex) !important;
1483        
1484        transition: var(--media-menu-transition-in,
1485          visibility 0s,
1486          opacity .2s ease-out,
1487          transform .15s ease-out,
1488          left .2s ease-in-out,
1489          min-width .2s ease-in-out,
1490          min-height .2s ease-in-out
1491        ) !important;
1492        
1493        visibility: var(--media-menu-visibility, visible);
1494        opacity: var(--media-menu-opacity, 1);
1495        max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
1496        transform: var(--media-menu-transform-in, translateY(0) scale(1));
1497        flex-direction: column;
1498        
1499        min-height: 0;
1500        position: relative;
1501        bottom: var(--_menu-bottom);
1502        box-sizing: border-box;
1503      } 
1504
1505      @-moz-document url-prefix() {
1506        :host{
1507          --_menu-bg: rgb(20 20 30);
1508        }
1509      }
1510
1511      :host([hidden]) {
1512        transition: var(--media-menu-transition-out,
1513          visibility .15s ease-in,
1514          opacity .15s ease-in,
1515          transform .15s ease-in
1516        ) !important;
1517        visibility: var(--media-menu-hidden-visibility, hidden);
1518        opacity: var(--media-menu-hidden-opacity, 0);
1519        max-height: var(--media-menu-hidden-max-height,
1520          var(--media-menu-max-height, var(--_menu-max-height, 300px)));
1521        transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
1522        pointer-events: none;
1523      }
1524
1525      :host([slot="submenu"]) {
1526        background: none;
1527        width: 100%;
1528        min-height: 100%;
1529        position: absolute;
1530        bottom: 0;
1531        right: -100%;
1532      }
1533
1534      #container {
1535        display: flex;
1536        flex-direction: column;
1537        min-height: 0;
1538        transition: transform .2s ease-out;
1539        transform: translate(0, 0);
1540      }
1541
1542      #container.has-expanded {
1543        transition: transform .2s ease-in;
1544        transform: translate(-100%, 0);
1545      }
1546
1547      button {
1548        background: none;
1549        color: inherit;
1550        border: none;
1551        padding: 0;
1552        font: inherit;
1553        outline: inherit;
1554        display: inline-flex;
1555        align-items: center;
1556      }
1557
1558      slot[name="header"][hidden] {
1559        display: none;
1560      }
1561
1562      slot[name="header"] > *,
1563      slot[name="header"]::slotted(*) {
1564        padding: .4em .7em;
1565        border-bottom: 1px solid rgb(255 255 255 / .25);
1566        cursor: var(--media-cursor, default);
1567      }
1568
1569      slot[name="header"] > button[part~="back"],
1570      slot[name="header"]::slotted(button[part~="back"]) {
1571        cursor: var(--media-cursor, pointer);
1572      }
1573
1574      svg[part~="back"] {
1575        height: var(--media-menu-icon-height, var(--media-control-height, 24px));
1576        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1577        display: block;
1578        margin-right: .5ch;
1579      }
1580
1581      slot:not([name]) {
1582        gap: var(--media-menu-gap);
1583        flex-direction: var(--media-menu-flex-direction, column);
1584        overflow: var(--media-menu-overflow, hidden auto);
1585        display: flex;
1586        min-height: 0;
1587      }
1588
1589      :host([role="menu"]) slot:not([name]) {
1590        padding-block: .4em;
1591      }
1592
1593      slot:not([name])::slotted([role="menu"]) {
1594        background: none;
1595      }
1596
1597      media-chrome-menu-item > span {
1598        margin-right: .5ch;
1599        max-width: var(--media-menu-item-max-width);
1600        text-overflow: ellipsis;
1601        overflow: hidden;
1602      }
1603    </style>
1604    <style id="layout-row" media="width:0">
1605
1606      slot[name="header"] > *,
1607      slot[name="header"]::slotted(*) {
1608        padding: .4em .5em;
1609      }
1610
1611      slot:not([name]) {
1612        gap: var(--media-menu-gap, .25em);
1613        flex-direction: var(--media-menu-flex-direction, row);
1614        padding-inline: .5em;
1615      }
1616
1617      media-chrome-menu-item {
1618        padding: .3em .5em;
1619      }
1620
1621      media-chrome-menu-item[aria-checked="true"] {
1622        background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
1623      }
1624
1625      
1626      media-chrome-menu-item::part(checked-indicator) {
1627        display: var(--media-menu-item-checked-indicator-display, none);
1628      }
1629    </style>
1630    <div id="container" part="container">
1631      <slot name="header" hidden>
1632        <button part="back button" aria-label="Back to previous menu">
1633          <slot name="back-icon">
1634            <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
1635              <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"/>
1636            </svg>
1637          </slot>
1638          <slot name="title"></slot>
1639        </button>
1640      </slot>
1641      <slot></slot>
1642    </div>
1643    <slot name="checked-indicator" hidden></slot>
1644  `},rx.customElements.get("media-chrome-menu")||rx.customElements.define("media-chrome-menu",lq);var lj=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lQ=(e,t,i)=>(lj(e,t,"read from private field"),i?i.call(e):t.get(e)),lZ=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},lz=(e,t,i,a)=>(lj(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lX=(e,t,i)=>(lj(e,t,"access private method"),i);let lJ={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class l0 extends rx.HTMLElement{constructor(){if(super(),lZ(this,h7),lZ(this,mt),lZ(this,ma),lZ(this,ms),lZ(this,ml),lZ(this,mu),lZ(this,h8,!1),lZ(this,h6,void 0),lZ(this,mn,()=>{var e,t;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let i=this.shadowRoot.querySelector('slot[name="description"]'),a=null==(e=this.submenuElement.checkedItems)?void 0:e[0],r=null!=(t=null==a?void 0:a.dataset.description)?t:null==a?void 0:a.text,n=rN.createElement("span");n.textContent=null!=r?r:"",i.replaceChildren(n)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rV(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[lJ.TYPE,lJ.DISABLED,lJ.CHECKED,lJ.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),l1(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
1644se"),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":lX(this,h7,me).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":lX(this,ml,md).call(this,e);break;case"keyup":lX(this,ms,mo).call(this,e)}}attributeChangedCallback(e,t,i){e===lJ.CHECKED&&l1(this)&&!lQ(this,h8)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===lJ.TYPE&&i!==t?this.role="menuitem"+i:e===lJ.DISABLED&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(lJ.DISABLED)||this.enable(),this.role="menuitem"+this.type,lz(this,h6,function e(t,i){if(!t)return null;let{host:a}=t.getRootNode();return!i&&a?e(t,a):(null==i?void 0:i.items)?i:e(i,null==i?void 0:i.parentNode)}(this,this.parentNode)),lX(this,mu,mc).call(this),this.submenuElement&&lX(this,mt,mi).call(this)}disconnectedCallback(){this.disable(),lX(this,mu,mc).call(this),lz(this,h6,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=rQ(this))?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 null!=(e=this.getAttribute(lJ.TYPE))?e:""}set type(e){this.setAttribute(lJ.TYPE,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(lJ.VALUE))?e:this.text}set value(e){this.setAttribute(lJ.VALUE,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(l1(this))return"true"===this.getAttribute("aria-checked")}set checked(e){l1(this)&&(lz(this,h8,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!l1(this)&&this.invokeTargetElement&&rY(this,e.target)&&this.invokeTargetElement.dispatchEvent(new lN({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function l1(e){return"radio"===e.type||"checkbox"===e.type}h8=new WeakMap,h6=new WeakMap,h7=new WeakSet,me=function(e){let t=e.target;if(!(null==t?void 0:t.name))for(let e of t.assignedNodes({flatten:!0}))e instanceof Text&&""===e.textContent.trim()&&e.remove();"submenu"===t.name&&(this.submenuElement?lX(this,mt,mi).call(this):lX(this,ma,mr).call(this))},mt=new WeakSet,mi=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",lQ(this,mn)),this.submenuElement.addEventListener("addmenuitem",lQ(this,mn)),this.submenuElement.addEventListener("removemenuitem",lQ(this,mn)),lQ(this,mn).call(this)},ma=new WeakSet,mr=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",lQ(this,mn)),this.submenuElement.removeEventListener("addmenuitem",lQ(this,mn)),this.submenuElement.removeEventListener("removemenuitem",lQ(this,mn)),lQ(this,mn).call(this)},mn=new WeakMap,ms=new WeakSet,mo=function(e){let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",lX(this,ms,mo));this.handleClick(e)},ml=new WeakSet,md=function(e){let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",lX(this,ms,mo));this.addEventListener("keyup",lX(this,ms,mo),{once:!0})},mu=new WeakSet,mc=function(){var e;let t=null==(e=lQ(this,h6))?void 0:e.radioGroupItems;if(!t)return;let i=t.filter(e=>"true"===e.getAttribute("aria-checked")).pop();for(let e of(i||(i=t[0]),t))e.setAttribute("aria-checked","false");null==i||i.setAttribute("aria-checked","true")},l0.shadowRootOptions={mode:"open"},l0.getTemplateHTML=function(e){return`
1645    <style>
1646      :host {
1647        transition: var(--media-menu-item-transition,
1648          background .15s linear,
1649          opacity .2s ease-in-out
1650        );
1651        outline: var(--media-menu-item-outline, 0);
1652        outline-offset: var(--media-menu-item-outline-offset, -1px);
1653        cursor: var(--media-cursor, pointer);
1654        display: flex;
1655        align-items: center;
1656        align-self: stretch;
1657        justify-self: stretch;
1658        white-space: nowrap;
1659        white-space-collapse: collapse;
1660        text-wrap: nowrap;
1661        padding: .4em .8em .4em 1em;
1662      }
1663
1664      :host(:focus-visible) {
1665        box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
1666        outline: var(--media-menu-item-hover-outline, 0);
1667        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));
1668      }
1669
1670      :host(:hover) {
1671        cursor: var(--media-cursor, pointer);
1672        background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));
1673        outline: var(--media-menu-item-hover-outline);
1674        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));
1675      }
1676
1677      :host([aria-checked="true"]) {
1678        background: var(--media-menu-item-checked-background);
1679      }
1680
1681      :host([hidden]) {
1682        display: none;
1683      }
1684
1685      :host([disabled]) {
1686        pointer-events: none;
1687        color: rgba(255, 255, 255, .3);
1688      }
1689
1690      slot:not([name]) {
1691        width: 100%;
1692      }
1693
1694      slot:not([name="submenu"]) {
1695        display: inline-flex;
1696        align-items: center;
1697        transition: inherit;
1698        opacity: var(--media-menu-item-opacity, 1);
1699      }
1700
1701      slot[name="description"] {
1702        justify-content: end;
1703      }
1704
1705      slot[name="description"] > span {
1706        display: inline-block;
1707        margin-inline: 1em .2em;
1708        max-width: var(--media-menu-item-description-max-width, 100px);
1709        text-overflow: ellipsis;
1710        overflow: hidden;
1711        font-size: .8em;
1712        font-weight: 400;
1713        text-align: right;
1714        position: relative;
1715        top: .04em;
1716      }
1717
1718      slot[name="checked-indicator"] {
1719        display: none;
1720      }
1721
1722      :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {
1723        display: var(--media-menu-item-checked-indicator-display, inline-block);
1724      }
1725
1726      
1727      svg, img, ::slotted(svg), ::slotted(img) {
1728        height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));
1729        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1730        display: block;
1731      }
1732
1733      
1734      [part~="indicator"],
1735      ::slotted([part~="indicator"]) {
1736        fill: var(--media-menu-item-indicator-fill,
1737          var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));
1738        height: var(--media-menu-item-indicator-height, 1.25em);
1739        margin-right: .5ch;
1740      }
1741
1742      [part~="checked-indicator"] {
1743        visibility: hidden;
1744      }
1745
1746      :host([aria-checked="true"]) [part~="checked-indicator"] {
1747        visibility: visible;
1748      }
1749    </style>
1750    <slot name="checked-indicator">
1751      <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
1752        <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"/>
1753      </svg>
1754    </slot>
1755    <slot name="prefix"></slot>
1756    <slot></slot>
1757    <slot name="description"></slot>
1758    <slot name="suffix">
1759      ${this.getSuffixSlotInnerHTML(e)}
1760    </slot>
1761    <slot name="submenu"></slot>
1762  `},l0.getSuffixSlotInnerHTML=function(e){return""},rx.customElements.get("media-chrome-menu-item")||rx.customElements.define("media-chrome-menu-item",l0);class l2 extends lq{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:rF(this).querySelector("media-settings-menu-button")}}l2.getTemplateHTML=function(e){return`
1763    ${lq.getTemplateHTML(e)}
1764    <style>
1765      :host {
1766        --_menu-bg: rgb(20 20 30 / .8);
1767        background: var(--media-settings-menu-background,
1768            var(--media-menu-background,
1769              var(--media-control-background,
1770                var(--media-secondary-color, var(--_menu-bg)))));
1771        min-width: var(--media-settings-menu-min-width, 170px);
1772        border-radius: 2px 2px 0 0;
1773        overflow: hidden;
1774      }
1775
1776      @-moz-document url-prefix() {
1777        :host{
1778          --_menu-bg: rgb(20 20 30);
1779        }
1780      }
1781
1782      :host([role="menu"]) {
1783        
1784        justify-content: end;
1785      }
1786
1787      slot:not([name]) {
1788        justify-content: var(--media-settings-menu-justify-content);
1789        flex-direction: var(--media-settings-menu-flex-direction, column);
1790        overflow: visible;
1791      }
1792
1793      #container.has-expanded {
1794        --media-settings-menu-item-opacity: 0;
1795      }
1796    </style>
1797  `},rx.customElements.get("media-settings-menu")||rx.customElements.define("media-settings-menu",l2);class l3 extends l0{}l3.shadowRootOptions={mode:"open"},l3.getTemplateHTML=function(e){return`
1798    ${l0.getTemplateHTML.call(this,e)}
1799    <style>
1800      slot:not([name="submenu"]) {
1801        opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));
1802      }
1803
1804      :host([aria-expanded="true"]:hover) {
1805        background: transparent;
1806      }
1807    </style>
1808  `},l3.getSuffixSlotInnerHTML=function(e){return`
1809    <svg aria-hidden="true" viewBox="0 0 20 24">
1810      <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"/>
1811    </svg>
1812  `},rx.customElements.get("media-settings-menu-item")||rx.customElements.define("media-settings-menu-item",l3);class l4 extends sl{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?null==(e=rQ(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new lN({relatedTarget:this}))}}rx.customElements.get("media-chrome-menu-button")||rx.customElements.define("media-chrome-menu-button",l4);class l5 extends l4{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",rw("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:rF(this).querySelector("media-settings-menu")}}l5.getSlotTemplateHTML=function(){return`
1813    <style>
1814      :host([aria-expanded="true"]) slot[name=tooltip] {
1815        display: none;
1816      }
1817    </style>
1818    <slot name="icon">
1819      <svg aria-hidden="true" viewBox="0 0 24 24">
1820        <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"/>
1821      </svg>
1822    </slot>
1823  `},l5.getTooltipContentHTML=function(){return rw("Settings")},rx.customElements.get("media-settings-menu-button")||rx.customElements.define("media-settings-menu-button",l5);var l9=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},l8=(e,t,i)=>(l9(e,t,"read from private field"),i?i.call(e):t.get(e)),l6=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},l7=(e,t,i,a)=>(l9(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),de=(e,t,i)=>(l9(e,t,"access private method"),i);class dt extends lq{constructor(){super(...arguments),l6(this,mp),l6(this,mE),l6(this,mh,[]),l6(this,mm,void 0)}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_AUDIO_TRACK_LIST,rr.MEDIA_AUDIO_TRACK_ENABLED,rr.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rr.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===rr.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;l7(this,mh,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(rE)),de(this,mp,mv).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",de(this,mE,mb))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",de(this,mE,mb))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=rF(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return l8(this,mh)}set mediaAudioTrackList(e){l7(this,mh,e),de(this,mp,mv).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=r3(this,rr.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){r4(this,rr.MEDIA_AUDIO_TRACK_ENABLED,e)}}mh=new WeakMap,mm=new WeakMap,mp=new WeakSet,mv=function(){if(l8(this,mm)===JSON.stringify(this.mediaAudioTrackList))return;l7(this,mm,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e.sort((e,t)=>
1823e.id.localeCompare(t.id,void 0,{numeric:!0})),e)){let e=lF({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});e.prepend(l$(this,"checked-indicator")),this.defaultSlot.append(e)}},mE=new WeakSet,mb=function(){if(null==this.value)return;let e=new rx.CustomEvent(re.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rx.customElements.get("media-audio-track-menu")||rx.customElements.define("media-audio-track-menu",dt);let di=`<svg aria-hidden="true" viewBox="0 0 24 24">
1824  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
1825  <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"/>
1826</svg>`,da=e=>{let t=rw("Audio");e.setAttribute("aria-label",t)};class dr extends l4{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_AUDIO_TRACK_ENABLED,rr.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),da(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_LANG&&da(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=rF(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=r3(this,rr.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){r4(this,rr.MEDIA_AUDIO_TRACK_ENABLED,e)}}dr.getSlotTemplateHTML=function(){return`
1827    <style>
1828      :host([aria-expanded="true"]) slot[name=tooltip] {
1829        display: none;
1830      }
1831    </style>
1832    <slot name="icon">${di}</slot>
1833  `},dr.getTooltipContentHTML=function(){return rw("Audio")},rx.customElements.get("media-audio-track-menu-button")||rx.customElements.define("media-audio-track-menu-button",dr);var dn=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ds=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},dl=(e,t,i)=>(dn(e,t,"access private method"),i);let dd=`
1834  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
1835    <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"/>
1836  </svg>`;class du extends lq{constructor(){super(...arguments),ds(this,mf),ds(this,my),ds(this,mg,void 0)}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_SUBTITLES_LIST,rr.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_SUBTITLES_LIST&&t!==i?dl(this,mf,m_).call(this):e===rr.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i||"",dl(this,mf,m_).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dl(this,my,mT))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dl(this,my,mT))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:rF(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return dc(this,rr.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){dh(this,rr.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return dc(this,rr.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){dh(this,rr.MEDIA_SUBTITLES_SHOWING,e)}}mg=new WeakMap,mf=new WeakSet,m_=function(){var e,t,i,a,r,n;let s=(dn(this,t=mg,"read from private field"),(i?i.call(this):t.get(this))!==JSON.stringify(this.mediaSubtitlesList)),o=this.value!==this.getAttribute(rr.MEDIA_SUBTITLES_SHOWING);if(!s&&!o)return;a=mg,r=JSON.stringify(this.mediaSubtitlesList),dn(this,a,"write to private field"),n?n.call(this,r):a.set(this,r),this.defaultSlot.textContent="";let l=!this.value,d=lF({type:"radio",text:this.formatMenuItemText(rw("Off")),value:"off",checked:l});for(let t of(d.prepend(l$(this,"checked-indicator")),this.defaultSlot.append(d),this.mediaSubtitlesList)){let i=lF({type:"radio",text:this.formatMenuItemText(t.label,t),value:nE(t),checked:this.value==nE(t)});i.prepend(l$(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(l$(this,"captions-indicator")),this.defaultSlot.append(i)}},my=new WeakSet,mT=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(rr.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new rx.CustomEvent(re.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new rx.CustomEvent(re.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},du.getTemplateHTML=function(e){return`
1837    ${lq.getTemplateHTML(e)}
1838    <slot name="captions-indicator" hidden>${dd}</slot>
1839  `};let dc=(e,t)=>{let i=e.getAttribute(t);return i?np(i):[]},dh=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=nb(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rx.customElements.get("media-captions-menu")||rx.customElements.define("media-captions-menu",du);let dm=`<svg aria-hidden="true" viewBox="0 0 26 24">
1840  <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 
18400 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"/>
1841</svg>`,dp=`<svg aria-hidden="true" viewBox="0 0 26 24">
1842  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
1843</svg>`,dv=e=>{e.setAttribute("data-captions-enabled",ny(e).toString())},dE=e=>{e.setAttribute("aria-label",rw("closed captions"))};class db extends l4{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_SUBTITLES_LIST,rr.MEDIA_SUBTITLES_SHOWING,rr.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),dE(this),dv(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_SUBTITLES_SHOWING?dv(this):e===rr.MEDIA_LANG&&dE(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=rF(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return dg(this,rr.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){df(this,rr.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return dg(this,rr.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){df(this,rr.MEDIA_SUBTITLES_SHOWING,e)}}db.getSlotTemplateHTML=function(){return`
1844    <style>
1845      :host([data-captions-enabled="true"]) slot[name=off] {
1846        display: none !important;
1847      }
1848
1849      
1850      :host(:not([data-captions-enabled="true"])) slot[name=on] {
1851        display: none !important;
1852      }
1853
1854      :host([aria-expanded="true"]) slot[name=tooltip] {
1855        display: none;
1856      }
1857    </style>
1858
1859    <slot name="icon">
1860      <slot name="on">${dm}</slot>
1861      <slot name="off">${dp}</slot>
1862    </slot>
1863  `},db.getTooltipContentHTML=function(){return rw("Captions")};let dg=(e,t)=>{let i=e.getAttribute(t);return i?np(i):[]},df=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=nb(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rx.customElements.get("media-captions-menu-button")||rx.customElements.define("media-captions-menu-button",db);var d_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dy=(e,t,i)=>(d_(e,t,"read from private field"),i?i.call(e):t.get(e)),dT=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},dA=(e,t,i)=>(d_(e,t,"access private method"),i);let dk={RATES:"rates"};class dw extends lq{constructor(){super(),dT(this,mk),dT(this,mS),dT(this,mA,new nh(this,dk.RATES,{defaultValue:og})),dA(this,mk,mw).call(this)}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_PLAYBACK_RATE,dk.RATES]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rr.MEDIA_PLAYBACK_RATE&&t!=i?(this.value=i,dA(this,mk,mw).call(this)):e===dk.RATES&&t!=i&&(dy(this,mA).value=i,dA(this,mk,mw).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dA(this,mS,mI))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dA(this,mS,mI))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:rF(this).querySelector("media-playback-rate-menu-button")}get rates(){return dy(this,mA)}set rates(e){e?Array.isArray(e)?dy(this,mA).value=e.join(" "):"str
1863ing"==typeof e&&(dy(this,mA).value=e):dy(this,mA).value="",dA(this,mk,mw).call(this)}get mediaPlaybackRate(){return rJ(this,rr.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r0(this,rr.MEDIA_PLAYBACK_RATE,e)}}mA=new WeakMap,mk=new WeakSet,mw=function(){this.defaultSlot.textContent="";let e=this.mediaPlaybackRate,t=new Set(Array.from(dy(this,mA)).map(e=>Number(e)));for(let i of(e>0&&!t.has(e)&&t.add(e),Array.from(t).sort((e,t)=>e-t))){let t=lF({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i.toString(),checked:e===i});t.prepend(l$(this,"checked-indicator")),this.defaultSlot.append(t)}},mS=new WeakSet,mI=function(){if(!this.value)return;let e=new rx.CustomEvent(re.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rx.customElements.get("media-playback-rate-menu")||rx.customElements.define("media-playback-rate-menu",dw);class dS extends l4{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rr.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",rw("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:rF(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return rJ(this,rr.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r0(this,rr.MEDIA_PLAYBACK_RATE,e)}}dS.getSlotTemplateHTML=function(e){return`
1864    <style>
1865      :host {
1866        min-width: 5ch;
1867        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1868      }
1869      
1870      :host([aria-expanded="true"]) slot[name=tooltip] {
1871        display: none;
1872      }
1873    </style>
1874    <slot name="icon">${e.mediaplaybackrate||1}x</slot>
1875  `},dS.getTooltipContentHTML=function(){return rw("Playback rate")},rx.customElements.get("media-playback-rate-menu-button")||rx.customElements.define("media-playback-rate-menu-button",dS);var dI=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dR=(e,t,i)=>(dI(e,t,"read from private field"),i?i.call(e):t.get(e)),dD=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},dC=(e,t,i,a)=>(dI(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dL=(e,t,i)=>(dI(e,t,"access private method"),i);class dM extends lq{constructor(){super(...arguments),dD(this,mC),dD(this,mM),dD(this,mR,[]),dD(this,mD,{})}static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_RENDITION_LIST,rr.MEDIA_RENDITION_SELECTED,rr.MEDIA_RENDITION_UNAVAILABLE,rr.MEDIA_HEIGHT]}static formatMenuItemText(e,t){return super.formatMenuItemText(e,t)}static formatRendition(e,{showBitrate:t=!1}={}){let i=`${Math.min(e.width,e.height)}p`;if(t&&e.bitrate){let t=e.bitrate/1e6,a=`${t.toFixed(+(t<1))} Mbps`;return`${i} (${a})`}return this.formatMenuItemText(i,e)}static compareRendition(e,t){var i,a;return t.height===e.height?(null!=(i=t.bitrate)?i:0)-(null!=(a=e.bitrate)?a:0):t.height-e.height}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rr.MEDIA_RENDITION_SELECTED&&t!==i)this.value=null!=i?i:"auto",dL(this,mC,mL).call(this);else if(e===rr.MEDIA_RENDITION_LIST&&t!==i)dC(this,mR,null==i?void 0:i.split(/\s+/).map(rp)),dL(this,mC,mL).call(this);else e===rr.MEDIA_HEIGHT&&t!==i&&dL(this,mC,mL).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dL(this,mM,mO))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dL(this,mM,mO))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:rF(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return dR(this,mR)}set mediaRenditionList(e){dC(this,mR,e),dL(this,mC,mL).call(this)}get mediaRenditionSelected(){return r3(this,rr.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){r4(this,rr.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return rJ(this,rr.MEDIA_HEIGHT)}set mediaHeight(e){r0(this,rr.MEDIA_HEIGHT,e)}compareRendition(e,t){return this.constructor.compareRendition(e,t)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}formatRendition(e,t){return this.constructor.formatRendition(e,t)}showRenditionBitrate(e){return this.mediaRenditionList.some(t=>t!==e&&t.height===e.height&&t.bitrate!==e.bitrate)}}mR=new WeakMap,mD=new WeakMap,mC=new WeakSet,mL=function(){if(dR(this,mD).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&dR(this,mD).mediaHeight===this.mediaHeight)return;dR(this,mD).mediaRenditionList=JSON.stringify(this.mediaRenditionList),dR(this,mD).mediaHeight=this.mediaHeight;let e=this.mediaRenditionList.sort(this.compareRendition.bind(this)),t=e.find(e=>e.id===this.mediaRenditionSelected);for(let i of e)i.selected=i===t;this.defaultSlot.textContent="";let i=!this.mediaRenditionSelected;for(let t of e){let e=lF({type:"radio",text:this.formatRendition(t,{showBitrate:this.showRenditionBitrate(t)}
1875),value:`${t.id}`,checked:t.selected&&!i});e.prepend(l$(this,"checked-indicator")),this.defaultSlot.append(e)}let a=t&&this.showRenditionBitrate(t),r=i?t?this.formatMenuItemText(`${rw("Auto")} \u2022 ${this.formatRendition(t,{showBitrate:a})}`,t):this.formatMenuItemText(`${rw("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(rw("Auto")),n=lF({type:"radio",text:r,value:"auto",checked:i});n.dataset.description=r,n.prepend(l$(this,"checked-indicator")),this.defaultSlot.append(n)},mM=new WeakSet,mO=function(){if(null==this.value)return;let e=new rx.CustomEvent(re.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rx.customElements.get("media-rendition-menu")||rx.customElements.define("media-rendition-menu",dM);let dO=`<svg aria-hidden="true" viewBox="0 0 24 24">
1876  <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" />
1877</svg>`;class dx extends l4{static get observedAttributes(){return[...super.observedAttributes,rr.MEDIA_RENDITION_SELECTED,rr.MEDIA_RENDITION_UNAVAILABLE,rr.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",rw("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:rF(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return r3(this,rr.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){r4(this,rr.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return rJ(this,rr.MEDIA_HEIGHT)}set mediaHeight(e){r0(this,rr.MEDIA_HEIGHT,e)}}dx.getSlotTemplateHTML=function(){return`
1878    <style>
1879      :host([aria-expanded="true"]) slot[name=tooltip] {
1880        display: none;
1881      }
1882    </style>
1883    <slot name="icon">${dO}</slot>
1884  `},dx.getTooltipContentHTML=function(){return rw("Quality")},rx.customElements.get("media-rendition-menu-button")||rx.customElements.define("media-rendition-menu-button",dx);var dN=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dP=(e,t,i)=>(dN(e,t,"read from private field"),i?i.call(e):t.get(e)),dU=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},dB=(e,t,i,a)=>(dN(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dH=(e,t,i)=>(dN(e,t,"access private method"),i);class dW extends lq{constructor(){super(),dU(this,mN),dU(this,mU),dU(this,mH),dU(this,mV),dU(this,mK),dU(this,mx,!1),dU(this,m$,e=>{let t=e.target,i=(null==t?void 0:t.nodeName)==="VIDEO",a=dH(this,mV,mF).call(this,t);(i||a)&&(dP(this,mx)?dH(this,mU,mB).call(this):dH(this,mK,mq).call(this,e))}),dU(this,mY,e=>{let t=e.target,i=this.contains(t),a=2===e.button,r=(null==t?void 0:t.nodeName)==="VIDEO",n=dH(this,mV,mF).call(this,t);!i&&(a&&(r||n)||dH(this,mU,mB).call(this))}),dU(this,mG,e=>{"Escape"===e.key&&dH(this,mU,mB).call(this)}),dU(this,mj,e=>{var t,i;let a=e.target;if(null==(t=a.matches)?void 0:t.call(a,'button[invoke="copy"]')){let e=null==(i=a.closest("media-context-menu-item"))?void 0:i.querySelector('input[slot="copy"]');e&&navigator.clipboard.writeText(e.value)}dH(this,mU,mB).call(this)}),this.setAttribute("noautohide",""),dH(this,mN,mP).call(this)}connectedCallback(){super.connectedCallback(),rF(this).addEventListener("contextmenu",dP(this,m$)),this.addEventListener("click",dP(this,mj))}disconnectedCallback(){super.disconnectedCallback(),rF(this).removeEventListener("contextmenu",dP(this,m$)),this.removeEventListener("click",dP(this,mj)),document.removeEventListener("mousedown",dP(this,mY)),document.removeEventListener("keydown",dP(this,mG))}}mx=new WeakMap,mN=new WeakSet,mP=function(){this.hidden=!dP(this,mx)},mU=new WeakSet,mB=function(){dB(this,mx,!1),dH(this,mN,mP).call(this)},mH=new WeakSet,mW=function(){document.querySelectorAll("media-context-menu").forEach(e=>{e!==this&&dH(e,mU,mB).call(e)})},mV=new WeakSet,mF=function(e){return!!e&&(!!e.hasAttribute("slot")&&"media"===e.getAttribute("slot")||!!(e.nodeName.includes("-")&&e.tagName.includes("-"))&&(e.hasAttribute("src")||e.hasAttribute("poster")||e.hasAttribute("preload")||e.hasAttribute("playsinline")))},m$=new WeakMap,mK=new WeakSet,mq=function(e){e.preventDefault(),dH(this,mH,mW).call(this),dB(this,mx,!0),this.style.position="fixed",this.style.left=`${e.clientX}px`,this.style.top=`${e.clientY}px`,dH(this,mN,mP).call(this),document.addEventListener("mousedown",dP(this,mY),{once:!0}),document.addEventListener("keydown",dP(this,mG),{once:!0})},mY=new WeakMap,mG=new WeakMap,mj=new WeakMap,dW.getTemplateHTML=function(e){return`
1885      ${lq.getTemplateHTML(e)}
1886      <style>
1887        :host {
1888          --_menu-bg: rgb(20 20 30 / .8);
1889          background: var(--media-settings-menu-background,
1890            var(--media-menu-background,
1891              var(--media-control-background,
1892                var(--media-secondary-color, var(--_menu-bg)))));
1893          min-width: var(--media-settings-menu-min-width, 170px);
1894          border-radius: 2px;
1895          overflow: hidden;
1896        }
1897      </style>
1898    `},rx.customElements.get("media-context-menu")||rx.customElements.define("media-context-menu",dW);class dV extends l0{}dV.shadowRootOptions={mode:"open"},dV.getTemplateHTML=function(e){return`
1899    ${l0.getTemplateHTML.call(this,e)}
1900    <style>
1901        ::slotted(*) {
1902            color: var(--media-text-color, white);
1903            text-decoration: none;
1904            border: none;
1905            background: none;
1906            cursor: pointer;
1907            padding: 0;
1908            min-height: var(--media-control-height, 24px);
1909        }
1910    </style>
1911  `},rx.customElements.get("media-context-menu-item")||rx.customElements.define("media-context-menu-item",dV);var dF=e=>{throw TypeError(e)},d$=(e,t,i)=>t.has(e)||dF("Cannot "+i),dK=(e,t,i)=>(d$(e,t,"read from private field"),i?i.call(e):t.get(e)),dq=(e,t,i)=>t.has(e)?dF("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),dY=(e,t,i,a)=>(d$(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dG=(e,t,i)=>(d$(e,t,"access private method"),i),dj=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends dj{}globalThis.DocumentFragment=e}var dQ,dZ,dz,dX,dJ,d0,d1,d2,d3,d4,d5,d9,d8,d6,d7,ue,ut,ui,ua,ur,un,us,uo,ul,ud,uu,u
1911c,uh,um,up,uv,uE,ub,ug,uf,u_,uy,uT,uA,uk,uw,uS,uI,uR,uD,uC,uL,uM,uO,ux,uN,uP,uU,uB,uH,uW,uV,uF,u$,uK,uq,uY,uG,uj,uQ,uZ,uz,uX,uJ,u0,u1,u2,u3,u4,u5,u9,u8,u6,u7,ce,ct,ci,ca,cr,cn,cs,co,cl,cd,cu,cc,ch,cm,cp,cv,cE,cb,cg,cf,c_,cy,cT,cA,ck,cw,cS,cI,cR,cD,cC,cL,cM,cO,cx,cN,cP,cU,cB,cH,cW,cV,cF,c$,cK,cq,cY,cG,cj,cQ,cZ,cz,cX,cJ,c0,c1,c2,c3,c4,c5,c9,c8,c6,c7,he,ht,hi,ha,hr,hn,hs,ho,hl,hd,hu,hc,hh,hm,hp,hv,hE,hb,hg,hf,h_,hy,hT,hA,hk,hw,hS,hI,hR,hD,hC,hL,hM,hO,hx,hN,hP,hU,hB,hH,hW,hV,hF,h$,hK,hq,hY,hG,hj,hQ,hZ,hz,hX,hJ,h0,h1,h2,h3,h4,h5,h9,h8,h6,h7,me,mt,mi,ma,mr,mn,ms,mo,ml,md,mu,mc,mh,mm,mp,mv,mE,mb,mg,mf,m_,my,mT,mA,mk,mw,mS,mI,mR,mD,mC,mL,mM,mO,mx,mN,mP,mU,mB,mH,mW,mV,mF,m$,mK,mq,mY,mG,mj,mQ,mZ=class extends dj{},mz=class{constructor(e,t={}){dq(this,mQ),dY(this,mQ,null==t?void 0:t.detail)}get detail(){return dK(this,mQ)}initCustomEvent(){}};mQ=new WeakMap;var mX={document:{createElement:function(e,t){return new mZ}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(mZ)},CustomEvent:mz,EventTarget:dj,HTMLElement:mZ,HTMLVideoElement:class extends dj{}},mJ="undefined"==typeof window||void 0===globalThis.customElements,m0=mJ?mX:globalThis,m1=mJ?mX.document:globalThis.document;function m2(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function m3(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function m4(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function m5(e){let t=(function(e){let t={};for(let i in e)null!=e[i]&&(t[i]=e[i]);return new URLSearchParams(t)})(e).toString();return t?"?"+t:""}var m9,m8,m6,m7=(e,t)=>!!e&&!!t&&(!!e.contains(t)||m7(e,t.getRootNode().host)),pe="mux.com",pt=(()=>{try{return"3.10.0"}catch{}return"UNKNOWN"})(),pi=e=>{if(e){if([tV.LIVE,tV.ON_DEMAND].includes(e))return e;if(null!=e&&e.includes("live"))return tV.LIVE}},pa={crossorigin:"crossOrigin",playsinline:"playsInline"},pr=class{constructor(e,t){dq(this,m9),dq(this,m8),dq(this,m6,[]),dY(this,m9,e),dY(this,m8,t)}[Symbol.iterator](){return dK(this,m6).values()}get length(){return dK(this,m6).length}get value(){var e;return null!=(e=dK(this,m6).join(" "))?e:""}set value(e){var t;e!==this.value&&(dY(this,m6,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return dK(this,m6)[e]}values(){return dK(this,m6).values()}keys(){return dK(this,m6).keys()}forEach(e){dK(this,m6).forEach(e)}add(...e){var t,i;e.forEach(e=>{this.contains(e)||dK(this,m6).push(e)}),(""!==this.value||null!=(t=dK(this,m9))&&t.hasAttribute(`${dK(this,m8)}`))&&null!=(i=dK(this,m9))&&i.setAttribute(`${dK(this,m8)}`,`${this.value}`)}remove(...e){var t;e.forEach(e=>{dK(this,m6).splice(dK(this,m6).indexOf(e),1)}),null==(t=dK(this,m9))||t.setAttribute(`${dK(this,m8)}`,`${this.value}`)}contains(e){return dK(this,m6).includes(e)}toggle(e,t){return void 0!==t?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};m9=new WeakMap,m8=new WeakMap,m6=new WeakMap;var pn=`[mux-player ${pt}]`;function ps(...e){console.warn(pn,...e)}function po(...e){console.error(pn,...e)}function pl(e){var t;let i=null!=(t=e.message)?t:"";e.context&&(i+=` ${e.context}`),e.file&&(i+=` ${t9("Read more: ")}
1912https://github.com/muxinc/elements/blob/main/errors/${e.file}`),ps(i)}var pd={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},pu={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},pc=Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),ph=[...Object.values(pd).filter(e=>pd.PLAYSINLINE!==e),...Object.values(pu)];function pm(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}var pp=class extends m0.HTMLElement{static get observedAttributes(){return ph}constructor(){super()}attributeChangedCallback(e,t,i){var a,r;switch(e){case pu.MUTED:this.media&&(this.media.muted=null!=i,this.media.defaultMuted=null!=i);return;case pu.VOLUME:{let e=null!=(a=m4(i))?a:1;this.media&&(this.media.volume=e);return}case pu.PLAYBACKRATE:{let e=null!=(r=m4(i))?r:1;this.media&&(this.media.playbackRate=e,this.media.defaultPlaybackRate=e);return}}}play(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.play())?t:Promise.reject()}pause(){var e;null==(e=this.media)||e.pause()}load(){var e;null==(e=this.media)||e.load()}get media(){var e;return null==(e=this.shadowRoot)?void 0:e.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 e,t;return null==(t=null==(e=this.media)?void 0:e.paused)||t}get duration(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.duration)?t:NaN}
1912get ended(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.ended)&&t}get buffered(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.buffered)?t:pc}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:pc}get readyState(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.readyState)?t:0}get videoWidth(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoWidth)?t:0}get videoHeight(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoHeight)?t:0}get currentSrc(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentSrc)?t:""}get currentTime(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentTime)?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.volume)?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.playbackRate)?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return null!=(e=m4(this.getAttribute(pu.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(pu.PLAYBACKRATE,`${e}`):this.removeAttribute(pu.PLAYBACKRATE)}get crossOrigin(){return pm(this,pd.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(pd.CROSSORIGIN,`${e}`)}get autoplay(){return null!=pm(this,pd.AUTOPLAY)}set autoplay(e){e?this.setAttribute(pd.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(pd.AUTOPLAY)}get loop(){return null!=pm(this,pd.LOOP)}set loop(e){e?this.setAttribute(pd.LOOP,""):this.removeAttribute(pd.LOOP)}get muted(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.muted)&&t}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return null!=pm(this,pd.MUTED)}set defaultMuted(e){e?this.setAttribute(pd.MUTED,""):this.removeAttribute(pd.MUTED)}get playsInline(){return null!=pm(this,pd.PLAYSINLINE)}set playsInline(e){po("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(e){["","none","metadata","auto"].includes(e)?this.setAttribute(pd.PRELOAD,e):this.removeAttribute(pd.PRELOAD)}},pv=`:host {
1913  --media-control-display: var(--controls);
1914  --media-loading-indicator-display: var(--loading-indicator);
1915  --media-dialog-display: var(--dialog);
1916  --media-play-button-display: var(--play-button);
1917  --media-live-button-display: var(--live-button);
1918  --media-seek-backward-button-display: var(--seek-backward-button);
1919  --media-seek-forward-button-display: var(--seek-forward-button);
1920  --media-mute-button-display: var(--mute-button);
1921  --media-captions-button-display: var(--captions-button);
1922  --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display));
1923  --media-rendition-menu-button-display: var(--rendition-menu-button);
1924  --media-audio-track-menu-button-display: var(--audio-track-menu-button);
1925  --media-airplay-button-display: var(--airplay-button);
1926  --media-pip-button-display: var(--pip-button);
1927  --media-fullscreen-button-display: var(--fullscreen-button);
1928  --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display));
1929  --media-playback-rate-button-display: var(--playback-rate-button);
1930  --media-playback-rate-menu-button-display: var(--playback-rate-menu-button);
1931  --media-volume-range-display: var(--volume-range);
1932  --media-time-range-display: var(--time-range);
1933  --media-time-display-display: var(--time-display);
1934  --media-duration-display-display: var(--duration-display);
1935  --media-title-display-display: var(--title-display);
1936
1937  display: inline-block;
1938  line-height: 0;
1939  width: 100%;
1940}
1941
1942a {
1943  color: #fff;
1944  font-size: 0.9em;
1945  text-decoration: underline;
1946}
1947
1948media-theme {
1949  display: inline-block;
1950  line-height: 0;
1951  width: 100%;
1952  height: 100%;
1953  direction: ltr;
1954}
1955
1956media-poster-image {
1957  display: inline-block;
1958  line-height: 0;
1959  width: 100%;
1960  height: 100%;
1961}
1962
1963media-poster-image:not([src]):not([placeholdersrc]) {
1964  display: none;
1965}
1966
1967::part(top),
1968[part~='top'] {
1969  --media-control-display: var(--controls, var(--top-controls));
1970  --media-play-button-display: var(--play-button, var(--top-play-button));
1971  --media-live-button-display: var(--live-button, var(--top-live-button));
1972  --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button));
1973  --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button));
1974  --media-mute-button-display: var(--mute-button, var(--top-mute-button));
1975  --media-captions-button-display: var(--captions-button, var(--top-captions-button));
1976  --media-captions-menu-button-display: var(
1977    --captions-menu-button,
1978    var(--media-captions-button-display, var(--top-captions-menu-button))
1979  );
1980  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button));
1981  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button));
1982  --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));
1983  --media-pip-button-display: var(--pip-button, var(--top-pip-button));
1984  --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));
1985  --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display)));
1986  --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));
1987  --media-playback-rate-menu-button-display: var(
1988    --captions-menu-button,
1989    var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button))
1990  );
1991  --media-volume-range-display: var(--volume-range, var(--top-volume-range));
1992  --media-time-range-display: var(--time-range, var(--top-time-range));
1993  --media-time-display-display: var(--time-display, var(--top-time-display));
1994  --media-duration-display-display: var(--duration-display, var(--top-duration-display));
1995  --media-title-display-display: var(--title-display, var(--top-title-display));
1996}
1997
1998::part(center),
1999[part~='center'] {
2000  --media-control-display: var(--controls, var(--center-controls));
2001  --media-play-button-display: var(--play-button, var(--center-play-button));
2002  --media-live-button-display: var(--live-button, var(--center-live-button));
2003  --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button));
2004  --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button));
2005  --media-mute-button-display: var(--mute-button, var(--center-mute-button));
2006  --media-captions-button-display: var(--captions-button, var(--center-captions-button));
2007  --media-captions-menu-button-display: var(
2008    --captions-menu-button,
2009    var(--media-captions-button-display, var(--center-captions-menu-button))
2010  );
2011  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button));
2012  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button));
2013  --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));
2014  --media-pip-button-display: var(--pip-button, var(--center-pip-button));
2015  --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));
2016  --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display)));
2017  --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));
2018  --media-playback-rate-menu-button-display: var(
2019    --playback-rate-menu-button,
2020    var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button))
2021  );
2022  --media-volume-range-display: var(--volume-range, var(--center-volume-range));
2023  --media-time-range-display: var(--time-range, var(--center-time-range));
2024  --media-time-display-display: var(--time-display, var(--center-time-display));
2025  --media-duration-display-display: var(--duration-display, var(--center-duration-display));
2026}
2027
2028::part(bottom),
2029[part~='bottom'] {
2030  --media-control-display: var(--controls, var(--bottom-controls));
2031  --media-play-button-display: var(--play-button, var(--bottom-play-button));
2032  --media-live-button-display: var(--live-button, var(--bottom-live-button));
2033  --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button));
2034  --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button));
2035  --media-mute-button-display: var(--mute-button, var(--bottom-mute-button));
2036  --media-captions-button-display: var(--captions-button, var(--bottom-captions-button));
2037  --media-captions-menu-button-display: var(
2038    --captions-menu-button,
2039    var(--media-captions-button-display, var(--bottom-captions-menu-button))
2040  );
2041  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button));
2042  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button));
2043  --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));
2044  --media-pip-button-display: var(--pip-button, var(--bottom-pip-button));
2045  --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));
2046  --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display)));
2047  --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));
2048  --media-playback-rate-menu-button-display: var(
2049    --playback-rate-menu-button,
2050    var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button))
2051  );
2052  --media-volume-range-display: var(--volume-range, var(--bottom-volume-range));
2053  --media-time-range-display: var(--time-range, var(--bottom-time-range));
2054  --media-time-display-display: var(--time-display, var(--bottom-time-display));
2055  --media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
2056  --media-title-display-display: var(--title-display, var(--bottom-title-display));
2057}
2058
2059:host([no-tooltips]) {
2060  --media-tooltip-display: none;
2061}
2062`,pE=new WeakMap,pb=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let i=pE.get(this.element);i&&i.set(this.type,this)}set(e){if("function"==typeof e)this.handleEvent=e.bind(this.element);else if("object"==typeof e&&"function"==typeof e.handleEvent)this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let e=pE.get(this.element);
2062e&&e.delete(this.type)}}static for(t){pE.has(t.element)||pE.set(t.element,new Map);let i=t.attributeName.slice(2),a=pE.get(t.element);return a&&a.has(i)?a.get(i):new e(t.element,i)}},pg=new Map,pf=new WeakMap,p_=new WeakMap,py=class{constructor(e,t,i){this.strings=e,this.values=t,this.processor=i,this.stringsKey=this.strings.join("\x01")}get template(){if(pg.has(this.stringsKey))return pg.get(this.stringsKey);{let e=m1.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,i,a)=>e+i+(a<t?`{{ ${a} }}`:""),""),pg.set(this.stringsKey,e),e}}renderInto(e){var t;let i=this.template;if(pf.get(e)!==i){pf.set(e,i);let t=new la(i,this.values,this.processor);p_.set(e,t),e instanceof lc?e.replace(...t.children):e.appendChild(t);return}let a=p_.get(e);null==(t=null==a?void 0:a.update)||t.call(a,this.values)}},pT={processCallback(e,t,i){var a;if(i)for(let[e,r]of t)e in i&&function(e,t){(function(e,t){if(e instanceof lu&&t instanceof Element){let i=e.element;return i[e.attributeName]!==t&&(e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),i[e.attributeName]=t),!0}return!1})(e,t)||function(e,t){if("boolean"==typeof t&&e instanceof lu){let i=e.attributeNamespace;return t!==e.element.hasAttributeNS(i,e.attributeName)&&(e.booleanValue=t),!0}return!1}(e,t)||e instanceof lu&&e.attributeName.startsWith("on")&&(pb.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),1)||!1===t&&e instanceof lc&&(e.replace(""),1)||t instanceof py&&e instanceof lc&&(t.renderInto(e),1)||t instanceof DocumentFragment&&e instanceof lc&&(t.childNodes.length&&e.replace(...t.childNodes),1)||function(e,t){if(e instanceof lu){let i=e.attributeNamespace,a=e.element.getAttributeNS(i,e.attributeName);return String(t)!==a&&(e.value=String(t))}e.value=String(t)}(e,t)}(r,null!=(a=i[e])?a:"")}};function pA(e,...t){return new py(e,t,pT)}var pk=Object.values({TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"}).join(", "),pw=e=>e.charAt(0).toUpperCase()+e.slice(1),pS=(e,t)=>{let i=(e=>{if(e.muxCode){if(e.muxCode===tN.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(e.muxCode===tN.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([tN.NETWORK_TOKEN_AUD_MISMATCH,tN.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode))return"403-incorrect-aud-value.md";if(e.muxCode===tN.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(e.muxCode===tN.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(e.muxCode===tN.NETWORK_NOT_FOUND)return"404-not-found.md";if(e.muxCode===tN.NETWORK_NOT_READY)return"412-not-playable.md"}if(e.code){if(e.code===tB.MEDIA_ERR_NETWORK)return"";if(e.code===tB.MEDIA_ERR_DECODE)return"media-decode-error.md";if(e.code===tB.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(e);return{message:e.message,context:e.context,file:i}},pI
vendor: 8,830 bytes, lines 2062-2362
2062=`<template id="media-theme-gerwig">
2063  <style>
2064    @keyframes pre-play-hide {
2065      0% {
2066        transform: scale(1);
2067        opacity: 1;
2068      }
2069
2070      30% {
2071        transform: scale(0.7);
2072      }
2073
2074      100% {
2075        transform: scale(1.5);
2076        opacity: 0;
2077      }
2078    }
2079
2080    :host {
2081      --_primary-color: var(--media-primary-color, #fff);
2082      --_secondary-color: var(--media-secondary-color, transparent);
2083      --_accent-color: var(--media-accent-color, #fa50b5);
2084      --_text-color: var(--media-text-color, #000);
2085
2086      --media-icon-color: var(--_primary-color);
2087      --media-control-background: var(--_secondary-color);
2088      --media-control-hover-background: var(--_accent-color);
2089      --media-time-buffered-color: rgba(255, 255, 255, 0.4);
2090      --media-preview-time-text-shadow: none;
2091      --media-control-height: 14px;
2092      --media-control-padding: 6px;
2093      --media-tooltip-container-margin: 6px;
2094      --media-tooltip-distance: 18px;
2095
2096      color: var(--_primary-color);
2097      display: inline-block;
2098      width: 100%;
2099      height: 100%;
2100    }
2101
2102    :host([audio]) {
2103      --_secondary-color: var(--media-secondary-color, black);
2104      --media-preview-time-text-shadow: none;
2105    }
2106
2107    :host([audio]) ::slotted([slot='media']) {
2108      height: 0px;
2109    }
2110
2111    :host([audio]) media-loading-indicator {
2112      display: none;
2113    }
2114
2115    :host([audio]) media-controller {
2116      background: transparent;
2117    }
2118
2119    :host([audio]) media-controller::part(vertical-layer) {
2120      background: transparent;
2121    }
2122
2123    :host([audio]) media-control-bar {
2124      width: 100%;
2125      background-color: var(--media-control-background);
2126    }
2127
2128    /*
2129     * 0.433s is the transition duration for VTT Regions.
2130     * Borrowed here, so the captions don't move too fast.
2131     */
2132    media-controller {
2133      --media-webkit-text-track-transform: translateY(0) scale(0.98);
2134      --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
2135    }
2136    media-controller:is([mediapaused], :not([userinactive])) {
2137      --media-webkit-text-track-transform: translateY(-50px) scale(0.98);
2138      --media-webkit-text-track-transition: transform 0.15s ease;
2139    }
2140
2141    /*
2142     * CSS specific to iOS devices.
2143     * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757
2144     */
2145    @supports (-webkit-touch-callout: none) {
2146      /* Disable subtitle adjusting for iOS Safari */
2147      media-controller[mediaisfullscreen] {
2148        --media-webkit-text-track-transform: unset;
2149        --media-webkit-text-track-transition: unset;
2150      }
2151    }
2152
2153    media-time-range {
2154      --media-box-padding-left: 6px;
2155      --media-box-padding-right: 6px;
2156      --media-range-bar-color: var(--_accent-color);
2157      --media-time-range-buffered-color: var(--_primary-color);
2158      --media-range-track-color: transparent;
2159      --media-range-track-background: rgba(255, 255, 255, 0.4);
2160      --media-range-thumb-background: radial-gradient(
2161        circle,
2162        #000 0%,
2163        #000 25%,
2164        var(--_accent-color) 25%,
2165        var(--_accent-color)
2166      );
2167      --media-range-thumb-width: 12px;
2168      --media-range-thumb-height: 12px;
2169      --media-range-thumb-transform: scale(0);
2170      --media-range-thumb-transition: transform 0.3s;
2171      --media-range-thumb-opacity: 1;
2172      --media-preview-background: var(--_primary-color);
2173      --media-box-arrow-background: var(--_primary-color);
2174      --media-preview-thumbnail-border: 5px solid var(--_primary-color);
2175      --media-preview-border-radius: 5px;
2176      --media-text-color: var(--_text-color);
2177      --media-control-hover-background: transparent;
2178      --media-preview-chapter-text-shadow: none;
2179      color: var(--_accent-color);
2180      padding: 0 6px;
2181    }
2182
2183    :host([audio]) media-time-range {
2184      --media-preview-time-padding: 1.5px 6px;
2185      --media-preview-box-margin: 0 0 -5px;
2186    }
2187
2188    media-time-range:hover {
2189      --media-range-thumb-transform: scale(1);
2190    }
2191
2192    media-preview-thumbnail {
2193      border-bottom-width: 0;
2194    }
2195
2196    [part~='menu'] {
2197      border-radius: 2px;
2198      border: 1px solid rgba(0, 0, 0, 0.1);
2199      bottom: 50px;
2200      padding: 2.5px 10px;
2201    }
2202
2203    [part~='menu']::part(indicator) {
2204      fill: var(--_accent-color);
2205    }
2206
2207    [part~='menu']::part(menu-item) {
2208      box-sizing: border-box;
2209      display: flex;
2210      align-items: center;
2211      padding: 6px 10px;
2212      min-height: 34px;
2213    }
2214
2215    [part~='menu']::part(checked) {
2216      font-weight: 700;
2217    }
2218
2219    media-captions-menu,
2220    media-rendition-menu,
2221    media-audio-track-menu,
2222    media-playback-rate-menu {
2223      position: absolute; /* ensure they don't take up space in DOM on load */
2224      --media-menu-background: var(--_primary-color);
2225      --media-menu-item-checked-background: transparent;
2226      --media-text-color: var(--_text-color);
2227      --media-menu-item-hover-background: transparent;
2228      --media-menu-item-hover-outline: var(--_accent-color) solid 1px;
2229    }
2230
2231    media-rendition-menu {
2232      min-width: 140px;
2233    }
2234
2235    /* The icon is a circle so make it 16px high instead of 14px for more balance. */
2236    media-audio-track-menu-button {
2237      --media-control-padding: 5px;
2238      --media-control-height: 16px;
2239    }
2240
2241    media-playback-rate-menu-button {
2242      --media-control-padding: 6px 3px;
2243      min-width: 4.4ch;
2244    }
2245
2246    media-playback-rate-menu {
2247      --media-menu-flex-direction: row;
2248      --media-menu-item-checked-background: var(--_accent-color);
2249      --media-menu-item-checked-indicator-display: none;
2250      margin-right: 6px;
2251      padding: 0;
2252      --media-menu-gap: 0.25em;
2253    }
2254
2255    media-playback-rate-menu[part~='menu']::part(menu-item) {
2256      padding: 6px 6px 6px 8px;
2257    }
2258
2259    media-playback-rate-menu[part~='menu']::part(checked) {
2260      color: #fff;
2261    }
2262
2263    :host(:not([audio])) media-time-range {
2264      /* Adding px is required here for calc() */
2265      --media-range-padding: 0px;
2266      background: transparent;
2267      z-index: 10;
2268      height: 10px;
2269      bottom: -3px;
2270      width: 100%;
2271    }
2272
2273    media-control-bar :is([role='button'], [role='switch'], button) {
2274      line-height: 0;
2275    }
2276
2277    media-control-bar :is([part*='button'], [part*='range'], [part*='display']) {
2278      border-radius: 3px;
2279    }
2280
2281    .spacer {
2282      flex-grow: 1;
2283      background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
2284    }
2285
2286    media-control-bar[slot~='top-chrome'] {
2287      min-height: 42px;
2288      pointer-events: none;
2289    }
2290
2291    media-control-bar {
2292      --gradient-steps:
2293        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%,
2294        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%,
2295        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%,
2296        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%;
2297    }
2298
2299    :host([title]) media-control-bar[slot='top-chrome']::before,
2300    :host([videotitle]) media-control-bar[slot='top-chrome']::before {
2301      content: '';
2302      position: absolute;
2303      width: 100%;
2304      padding-bottom: min(100px, 25%);
2305      background: linear-gradient(to top, var(--gradient-steps));
2306      opacity: 0.8;
2307      pointer-events: none;
2308    }
2309
2310    :host(:not([audio])) media-control-bar[part~='bottom']::before {
2311      content: '';
2312      position: absolute;
2313      width: 100%;
2314      bottom: 0;
2315      left: 0;
2316      padding-bottom: min(100px, 25%);
2317      background: linear-gradient(to bottom, var(--gradient-steps));
2318      opacity: 0.8;
2319      z-index: 1;
2320      pointer-events: none;
2321    }
2322
2323    media-control-bar[part~='bottom'] > * {
2324      z-index: 20;
2325    }
2326
2327    media-control-bar[part~='bottom'] {
2328      padding: 6px 6px;
2329    }
2330
2331    media-control-bar[slot~='top-chrome'] > * {
2332      --media-control-background: transparent;
2333      --media-control-hover-background: transparent;
2334      position: relative;
2335    }
2336
2337    media-controller::part(vertical-layer) {
2338      transition: background-color 1s;
2339    }
2340
2341    media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {
2342      background-color: var(--controls-backdrop-color, var(--controls, transparent));
2343      transition: background-color 0.25s;
2344    }
2345
2346    .center-controls {
2347      --media-button-icon-width: 100%;
2348      --media-button-icon-height: auto;
2349      --media-tooltip-display: none;
2350      pointer-events: none;
2351      width: 100%;
2352      display: flex;
2353      flex-flow: row;
2354      align-items: center;
2355      justify-content: center;
2356      paint-order: stroke;
2357      stroke: rgba(102, 102, 102, 1);
2358      stroke-width: 0.3px;
2359      text-shadow:
2360        0 0 2px rgb(0 0 0 / 0.25),
2361        0 0 6px rgb(0 0 0 / 0.25);
2362    
2362}
2363
2364    .center-controls media-play-button {
2365      --media-control-background: transparent;
2366      --media-control-hover-background: transparent;
2367      --media-control-padding: 0;
2368      width: 40px;
2369      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25))
vendor: 38,939 bytes, lines 2369-3194
2369;
2370    }
2371
2372    [breakpointsm] .center-controls media-play-button {
2373      width: 90px;
2374      height: 90px;
2375      border-radius: 50%;
2376      transition: background 0.4s;
2377      padding: 24px;
2378      --media-control-background: #000;
2379      --media-control-hover-background: var(--_accent-color);
2380    }
2381
2382    .center-controls media-seek-backward-button,
2383    .center-controls media-seek-forward-button {
2384      --media-control-background: transparent;
2385      --media-control-hover-background: transparent;
2386      padding: 0;
2387      margin: 0 20px;
2388      width: max(33px, min(8%, 40px));
2389      text-shadow:
2390        0 0 2px rgb(0 0 0 / 0.25),
2391        0 0 6px rgb(0 0 0 / 0.25);
2392    }
2393
2394    [breakpointsm]:not([audio]) .center-controls.pre-playback {
2395      display: grid;
2396      align-items: initial;
2397      justify-content: initial;
2398      height: 100%;
2399      overflow: hidden;
2400    }
2401
2402    [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {
2403      place-self: var(--_pre-playback-place, center);
2404      grid-area: 1 / 1;
2405      margin: 16px;
2406    }
2407
2408    /* Show and hide controls or pre-playback state */
2409
2410    [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])
2411      .center-controls.pre-playback
2412      media-play-button {
2413      /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */
2414      animation: 0.3s linear pre-play-hide;
2415      opacity: 0;
2416      pointer-events: none;
2417    }
2418
2419    .autoplay-unmute {
2420      --media-control-hover-background: transparent;
2421      width: 100%;
2422      display: flex;
2423      align-items: center;
2424      justify-content: center;
2425      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
2426    }
2427
2428    .autoplay-unmute-btn {
2429      --media-control-height: 16px;
2430      border-radius: 8px;
2431      background: #000;
2432      color: var(--_primary-color);
2433      display: flex;
2434      align-items: center;
2435      padding: 8px 16px;
2436      font-size: 18px;
2437      font-weight: 500;
2438      cursor: pointer;
2439    }
2440
2441    .autoplay-unmute-btn:hover {
2442      background: var(--_accent-color);
2443    }
2444
2445    [breakpointsm] .autoplay-unmute-btn {
2446      --media-control-height: 30px;
2447      padding: 14px 24px;
2448      font-size: 26px;
2449    }
2450
2451    .autoplay-unmute-btn svg {
2452      margin: 0 6px 0 0;
2453    }
2454
2455    [breakpointsm] .autoplay-unmute-btn svg {
2456      margin: 0 10px 0 0;
2457    }
2458
2459    media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {
2460      display: none;
2461    }
2462
2463    media-error-dialog:not([mediaerrorcode]) {
2464      opacity: 0;
2465    }
2466
2467    media-loading-indicator {
2468      --media-loading-icon-width: 100%;
2469      --media-button-icon-height: auto;
2470      display: var(--media-control-display, var(--media-loading-indicator-display, flex));
2471      pointer-events: none;
2472      position: absolute;
2473      width: min(15%, 150px);
2474      flex-flow: row;
2475      align-items: center;
2476      justify-content: center;
2477    }
2478
2479    /* Intentionally don't target the div for transition but the children
2480     of the div. Prevents messing with media-chrome's autohide feature. */
2481    media-loading-indicator + div * {
2482      transition: opacity 0.15s;
2483      opacity: 1;
2484    }
2485
2486    media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {
2487      opacity: 0;
2488      transition-delay: 400ms;
2489    }
2490
2491    media-volume-range {
2492      width: min(100%, 100px);
2493      --media-range-padding-left: 10px;
2494      --media-range-padding-right: 10px;
2495      --media-range-thumb-width: 12px;
2496      --media-range-thumb-height: 12px;
2497      --media-range-thumb-background: radial-gradient(
2498        circle,
2499        #000 0%,
2500        #000 25%,
2501        var(--_primary-color) 25%,
2502        var(--_primary-color)
2503      );
2504      --media-control-hover-background: none;
2505    }
2506
2507    media-time-display {
2508      white-space: nowrap;
2509    }
2510
2511    /* Generic style for explicitly disabled controls */
2512    media-control-bar[part~='bottom'] [disabled],
2513    media-control-bar[part~='bottom'] [aria-disabled='true'] {
2514      opacity: 60%;
2515      cursor: not-allowed;
2516    }
2517
2518    media-text-display {
2519      --media-font-size: 16px;
2520      --media-control-padding: 14px;
2521      font-weight: 500;
2522    }
2523
2524    media-play-button.animated *:is(g, path) {
2525      transition: all 0.3s;
2526    }
2527
2528    media-play-button.animated[mediapaused] .pause-icon-pt1 {
2529      opacity: 0;
2530    }
2531
2532    media-play-button.animated[mediapaused] .pause-icon-pt2 {
2533      transform-origin: center center;
2534      transform: scaleY(0);
2535    }
2536
2537    media-play-button.animated[mediapaused] .play-icon {
2538      clip-path: inset(0 0 0 0);
2539    }
2540
2541    media-play-button.animated:not([mediapaused]) .play-icon {
2542      clip-path: inset(0 0 0 100%);
2543    }
2544
2545    media-seek-forward-button,
2546    media-seek-backward-button {
2547      --media-font-weight: 400;
2548    }
2549
2550    .mute-icon {
2551      display: inline-block;
2552    }
2553
2554    .mute-icon :is(path, g) {
2555      transition: opacity 0.5s;
2556    }
2557
2558    .muted {
2559      opacity: 0;
2560    }
2561
2562    media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high),
2563    media-mute-button[mediavolumelevel='medium'] :is(.volume-high) {
2564      opacity: 0;
2565    }
2566
2567    media-mute-button[mediavolumelevel='off'] .unmuted {
2568      opacity: 0;
2569    }
2570
2571    media-mute-button[mediavolumelevel='off'] .muted {
2572      opacity: 1;
2573    }
2574
2575    /**
2576     * Our defaults for these buttons are to hide them at small sizes
2577     * users can override this with CSS
2578     */
2579    media-controller:not([breakpointsm]):not([audio]) {
2580      --bottom-play-button: none;
2581      --bottom-seek-backward-button: none;
2582      --bottom-seek-forward-button: none;
2583      --bottom-time-display: none;
2584      --bottom-playback-rate-menu-button: none;
2585      --bottom-pip-button: none;
2586    }
2587
2588    [part='mux-badge'] {
2589      position: absolute;
2590      bottom: 10px;
2591      right: 10px;
2592      z-index: 2;
2593      opacity: 0.6;
2594      transition:
2595        opacity 0.2s ease-in-out,
2596        bottom 0.2s ease-in-out;
2597    }
2598
2599    [part='mux-badge']:hover {
2600      opacity: 1;
2601    }
2602
2603    [part='mux-badge'] a {
2604      font-size: 14px;
2605      font-family: var(--_font-family);
2606      color: var(--_primary-color);
2607      text-decoration: none;
2608      display: flex;
2609      align-items: center;
2610      gap: 5px;
2611    }
2612
2613    [part='mux-badge'] .mux-badge-text {
2614      transition: opacity 0.5s ease-in-out;
2615      opacity: 0;
2616    }
2617
2618    [part='mux-badge'] .mux-badge-logo {
2619      width: 40px;
2620      height: auto;
2621      display: inline-block;
2622    }
2623
2624    [part='mux-badge'] .mux-badge-logo svg {
2625      width: 100%;
2626      height: 100%;
2627      fill: white;
2628    }
2629
2630    media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'],
2631    media-controller:not([userinactive]) [part='mux-badge'],
2632    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2633      transition: bottom 0.1s ease-in-out;
2634    }
2635
2636    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2637      transition: bottom 0.2s ease-in-out 0.62s;
2638    }
2639
2640    media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text,
2641    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text {
2642      opacity: 1;
2643    }
2644
2645    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text {
2646      opacity: 0;
2647    }
2648
2649    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2650      bottom: 10px;
2651    }
2652
2653    media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] {
2654      bottom: 10px;
2655    }
2656
2657    media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'],
2658    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2659      bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2);
2660    }
2661  </style>
2662
2663  <template partial="TitleDisplay">
2664    <template if="videotitle">
2665      <template if="videotitle != true">
2666        <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display>
2667      </template>
2668    </template>
2669    <template if="!videotitle">
2670      <template if="title">
2671        <media-text-display part="top title display" class="title-display">{{title}}</media-text-display>
2672      </template>
2673    </template>
2674  </template>
2675
2676  <template partial="PlayButton">
2677    <media-play-button
2678      part="{{section ?? 'bottom'}} play button"
2679      disabled="{{disabled}}"
2680      aria-disabled="{{disabled}}"
2681      class="animated"
2682    >
2683      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">
2684        <g class="play-icon">
2685          <path
2686            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"
2687          />
2688        </g>
2689        <g class="pause-icon">
2690          <path
2691            class="pause-icon-pt1"
2692            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"
2693          />
2694          <path
2695            class="pause-icon-pt2"
2696            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"
2697          />
2698        </g>
2699      </svg>
2700    </media-play-button>
2701  </template>
2702
2703  <template partial="PrePlayButton">
2704    <media-play-button
2705      part="{{section ?? 'center'}} play button pre-play"
2706      disabled="{{disabled}}"
2707      aria-disabled="{{disabled}}"
2708    >
2709      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)">
2710        <path
2711          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"
2712        />
2713      </svg>
2714    </media-play-button>
2715  </template>
2716
2717  <template partial="SeekBackwardButton">
2718    <media-seek-backward-button
2719      seekoffset="{{backwardseekoffset}}"
2720      part="{{section ?? 'bottom'}} seek-backward button"
2721      disabled="{{disabled}}"
2722      aria-disabled="{{disabled}}"
2723    >
2724      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2725        <path
2726          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"
2727        />
2728        <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2729          {{backwardseekoffset}}
2730        </text>
2731      </svg>
2732    </media-seek-backward-button>
2733  </template>
2734
2735  <template partial="SeekForwardButton">
2736    <media-seek-forward-button
2737      seekoffset="{{forwardseekoffset}}"
2738      part="{{section ?? 'bottom'}} seek-forward button"
2739      disabled="{{disabled}}"
2740      aria-disabled="{{disabled}}"
2741    >
2742      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2743        <g>
2744          <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2745            {{forwardseekoffset}}
2746          </text>
2747          <path
2748            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"
2749          />
2750        </g>
2751      </svg>
2752    </media-seek-forward-button>
2753  </template>
2754
2755  <template partial="MuteButton">
2756    <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2757      <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">
2758        <g class="unmuted">
2759          <path
2760            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"
2761          />
2762          <path
2763            class="volume-low"
2764            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"
2765          />
2766          <path
2767            class="volume-medium"
2768            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"
2769          />
2770          <path
2771            class="volume-high"
2772            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"
2773          />
2774        </g>
2775        <g class="muted">
2776          <path
2777            fill-rule="evenodd"
2778            clip-rule="evenodd"
2779            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"
2780          />
2781          <path
2782            fill-rule="evenodd"
2783            clip-rule="evenodd"
2784            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"
2785          />
2786        </g>
2787      </svg>
2788    </media-mute-button>
2789  </template>
2790
2791  <template partial="PipButton">
2792    <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2793      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2794        <path
2795          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"
2796        />
2797        <path
2798          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"
2799        />
2800      </svg>
2801    </media-pip-button>
2802  </template>
2803
2804  <template partial="CaptionsMenu">
2805    <media-captions-menu-button part="bottom captions button">
2806      <svg aria-hidden="true" viewBox="0 0 18 14" slot="on">
2807        <path
2808          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"
2809        />
2810      </svg>
2811      <svg aria-hidden="true" viewBox="0 0 18 14" slot="off">
2812        <path
2813          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"
2814        />
2815        <path
2816          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"
2817        />
2818        <path
2819          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"
2820        />
2821      </svg>
2822    </media-captions-menu-button>
2823    <media-captions-menu
2824      hidden
2825      anchor="auto"
2826      part="bottom captions menu"
2827      disabled="{{disabled}}"
2828      aria-disabled="{{disabled}}"
2829      exportparts="menu-item"
2830    >
2831      <div slot="checked-indicator">
2832        <style>
2833          .indicator {
2834            position: relative;
2835            top: 1px;
2836            width: 0.9em;
2837            height: auto;
2838            fill: var(--_accent-color);
2839            margin-right: 5px;
2840          }
2841
2842          [aria-checked='false'] .indicator {
2843            display: none;
2844          }
2845        </style>
2846        <svg viewBox="0 0 14 18" class="indicator">
2847          <path
2848            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"
2849            fill-rule="evenodd"
2850          />
2851        </svg></div
2852    ></media-captions-menu>
2853  </template>
2854
2855  <template partial="AirplayButton">
2856    <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2857      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2858        <path
2859          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"
2860        />
2861        <path
2862          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"
2863        />
2864      </svg>
2865    </media-airplay-button>
2866  </template>
2867
2868  <template partial="FullscreenButton">
2869    <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2870      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2871        <path
2872          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"
2873        />
2874        <path
2875          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"
2876        />
2877        <path
2878          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"
2879        />
2880        <path
2881          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"
2882        />
2883      </svg>
2884      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2885        <path
2886          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"
2887        />
2888        <path
2889          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"
2890        />
2891        <path
2892          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"
2893        />
2894        <path
2895          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"
2896        />
2897      </svg>
2898    </media-fullscreen-button>
2899  </template>
2900
2901  <template partial="CastButton">
2902    <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2903      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2904        <path
2905          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"
2906        />
2907      </svg>
2908      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2909        <path
2910          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"
2911        />
2912        <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />
2913      </svg>
2914    </media-cast-button>
2915  </template>
2916
2917  <template partial="LiveButton">
2918    <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2919      <span slot="text">Live</span>
2920    </media-live-button>
2921  </template>
2922
2923  <template partial="PlaybackRateMenu">
2924    <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button>
2925    <media-playback-rate-menu
2926      hidden
2927      anchor="auto"
2928      rates="{{playbackrates}}"
2929      exportparts="menu-item"
2930      part="bottom playback-rate menu"
2931      disabled="{{disabled}}"
2932      aria-disabled="{{disabled}}"
2933    ></media-playback-rate-menu>
2934  </template>
2935
2936  <template partial="VolumeRange">
2937    <media-volume-range
2938      part="bottom volume range"
2939      disabled="{{disabled}}"
2940      aria-disabled="{{disabled}}"
2941    ></media-volume-range>
2942  </template>
2943
2944  <template partial="TimeDisplay">
2945    <media-time-display
2946      remaining="{{defaultshowremainingtime}}"
2947      showduration="{{!hideduration}}"
2948      part="bottom time display"
2949      disabled="{{disabled}}"
2950      aria-disabled="{{disabled}}"
2951    ></media-time-display>
2952  </template>
2953
2954  <template partial="TimeRange">
2955    <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}" exportparts="thumb">
2956      <media-preview-thumbnail slot="preview"></media-preview-thumbnail>
2957      <media-preview-chapter-display slot="preview"></media-preview-chapter-display>
2958      <media-preview-time-display slot="preview"></media-preview-time-display>
2959      <div slot="preview" part="arrow"></div>
2960    </media-time-range>
2961  </template>
2962
2963  <template partial="AudioTrackMenu">
2964    <media-audio-track-menu-button part="bottom audio-track button">
2965      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16">
2966        <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" />
2967        <path
2968          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"
2969        />
2970      </svg>
2971    </media-audio-track-menu-button>
2972    <media-audio-track-menu
2973      hidden
2974      anchor="auto"
2975      part="bottom audio-track menu"
2976      disabled="{{disabled}}"
2977      aria-disabled="{{disabled}}"
2978      exportparts="menu-item"
2979    >
2980      <div slot="checked-indicator">
2981        <style>
2982          .indicator {
2983            position: relative;
2984            top: 1px;
2985            width: 0.9em;
2986            height: auto;
2987            fill: var(--_accent-color);
2988            margin-right: 5px;
2989          }
2990
2991          [aria-checked='false'] .indicator {
2992            display: none;
2993          }
2994        </style>
2995        <svg viewBox="0 0 14 18" class="indicator">
2996          <path
2997            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"
2998            fill-rule="evenodd"
2999          />
3000        </svg>
3001      </div>
3002    </media-audio-track-menu>
3003  </template>
3004
3005  <template partial="RenditionMenu">
3006    <media-rendition-menu-button part="bottom rendition button">
3007      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14">
3008        <path
3009          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"
3010        />
3011      </svg>
3012    </media-rendition-menu-button>
3013    <media-rendition-menu
3014      hidden
3015      anchor="auto"
3016      part="bottom rendition menu"
3017      disabled="{{disabled}}"
3018      aria-disabled="{{disabled}}"
3019    >
3020      <div slot="checked-indicator">
3021        <style>
3022          .indicator {
3023            position: relative;
3024            top: 1px;
3025            width: 0.9em;
3026            height: auto;
3027            fill: var(--_accent-color);
3028            margin-right: 5px;
3029          }
3030
3031          [aria-checked='false'] .indicator {
3032            opacity: 0;
3033          }
3034        </style>
3035        <svg viewBox="0 0 14 18" class="indicator">
3036          <path
3037            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"
3038            fill-rule="evenodd"
3039          />
3040        </svg>
3041      </div>
3042    </media-rendition-menu>
3043  </template>
3044
3045  <template partial="MuxBadge">
3046    <div part="mux-badge">
3047      <a href="https://www.mux.com/player" target="_blank">
3048        <span class="mux-badge-text">Powered by</span>
3049        <div class="mux-badge-logo">
3050          <svg
3051            viewBox="0 0 1600 500"
3052            style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2"
3053          >
3054            <g>
3055              <path
3056                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"
3057                style="fill-rule: nonzero"
3058              ></path>
3059              <path
3060                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"
3061                style="fill-rule: nonzero"
3062              ></path>
3063              <path
3064                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"
3065                style="fill-rule: nonzero"
3066              ></path>
3067            </g>
3068          </svg>
3069        </div>
3070      </a>
3071    </div>
3072  </template>
3073
3074  <media-controller
3075    part="controller"
3076    defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
3077    breakpoints="sm:470"
3078    gesturesdisabled="{{disabled}}"
3079    hotkeys="{{hotkeys}}"
3080    nohotkeys="{{nohotkeys}}"
3081    novolumepref="{{novolumepref}}"
3082    audio="{{audio}}"
3083    noautoseektolive="{{noautoseektolive}}"
3084    defaultsubtitles="{{defaultsubtitles}}"
3085    defaultduration="{{defaultduration ?? false}}"
3086    keyboardforwardseekoffset="{{forwardseekoffset}}"
3087    keyboardbackwardseekoffset="{{backwardseekoffset}}"
3088    exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
3089    style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
3090  >
3091    <slot name="media" slot="media"></slot>
3092    <slot name="poster" slot="poster"></slot>
3093
3094    <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
3095
3096    <template if="!audio">
3097      <media-error-dialog slot="dialog" noautohide></media-error-dialog>
3098      <!-- Pre-playback UI -->
3099      <!-- same for both on-demand and live -->
3100      <div slot="centered-chrome" class="center-controls pre-playback">
3101        <template if="!breakpointsm">{{>PlayButton section="center"}}</template>
3102        <template if="breakpointsm">{{>PrePlayButton section="center"}}</template>
3103      </div>
3104
3105      <!-- Mux Badge -->
3106      <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template>
3107
3108      <!-- Autoplay centered unmute button -->
3109      <!--
3110        todo: figure out how show this with available state variables
3111        needs to show when:
3112        - autoplay is enabled
3113        - playback has been successful
3114        - audio is muted
3115        - in place / instead of the pre-plaback play button
3116        - not to show again after user has interacted with this button
3117          - OR user has interacted with the mute button in the control bar
3118      -->
3119      <!--
3120        There should be a >MuteButton to the left of the "Unmute" text, but a templating bug
3121        makes it appear even if commented out in the markup, add it back when code is un-commented
3122      -->
3123      <!-- <div slot="centered-chrome" class="autoplay-unmute">
3124        <div role="button" class="autoplay-unmute-btn">Unmute</div>
3125      </div> -->
3126
3127      <template if="streamtype == 'on-demand'">
3128        <template if="breakpointsm">
3129          <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar>
3130        </template>
3131        {{>TimeRange}}
3132        <media-control-bar part="control-bar bottom">
3133          {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}
3134          {{>VolumeRange}}
3135          <div class="spacer"></div>
3136          {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}}
3137          {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
3138        </media-control-bar>
3139      </template>
3140
3141      <template if="streamtype == 'live'">
3142        <media-control-bar part="control-bar top" slot="top-chrome">
3143          {{>LiveButton}}
3144          <template if="breakpointsm"> {{>TitleDisplay}} </template>
3145        </media-control-bar>
3146        <template if="targetlivewindow > 0">{{>TimeRange}}</template>
3147        <media-control-bar part="control-bar bottom">
3148          {{>PlayButton}}
3149          <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>
3150          {{>MuteButton}} {{>VolumeRange}}
3151          <div class="spacer"></div>
3152          {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}
3153          {{>FullscreenButton}}
3154        </media-control-bar>
3155      </template>
3156    </template>
3157
3158    <template if="audio">
3159      <template if="streamtype == 'on-demand'">
3160        <template if="title">
3161          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
3162        </template>
3163        <media-control-bar part="control-bar bottom">
3164          {{>PlayButton}}
3165          <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3166          {{>MuteButton}}
3167          <template if="breakpointsm">{{>VolumeRange}}</template>
3168          {{>TimeDisplay}} {{>TimeRange}}
3169          <template if="breakpointsm">{{>PlaybackRateMenu}}</template>
3170          {{>AirplayButton}} {{>CastButton}}
3171        </media-control-bar>
3172      </template>
3173
3174      <template if="streamtype == 'live'">
3175        <template if="title">
3176          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
3177        </template>
3178        <media-control-bar part="control-bar bottom">
3179          {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}}
3180          <template if="breakpointsm">
3181            {{>VolumeRange}}
3182            <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3183          </template>
3184          <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>
3185          <template if="!targetlivewindow"><div class="spacer"></div></template>
3186          {{>AirplayButton}} {{>CastButton}}
3187        </media-control-bar>
3188      </template>
3189    </template>
3190
3191    <slot></slot>
3192  </media-controller>
3193</template>
3194`
3194,pR=m1.createElement("template");"innerHTML"in pR&&(pR.innerHTML=pI);var pD,pC,pL=class extends lM{};pL.template=null==(pC=null==(pD=pR.content)?void 0:pD.children)?void 0:pC[0],m0.customElements.get("media-theme-gerwig")||m0.customElements.define("media-theme-gerwig",pL);var pM={SRC:"src",POSTER:"poster"},pO={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},px=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"],pN=sZ.formatErrorMessage;function pP(e){let t=e.videoTitle?{video_title:e.videoTitle}:{};return e.getAttributeNames().filter(e=>e.startsWith("metadata-")).reduce((t,i)=>{let a=e.getAttribute(i);return null!==a&&(t[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),t},t)}sZ.formatErrorMessage=e=>{var t,i;if(e instanceof tB){let a=((e,t=!1)=>({title:((e,t=!1)=>{var i,a;if(e.muxCode){let r=pw(null!=(i=e.errorCategory)?i:"video"),n=tP(null!=(a=e.errorCategory)?a:tx.VIDEO);if(e.muxCode===tN.NETWORK_OFFLINE)return t9("Your device appears to be offline",t);if(e.muxCode===tN.NETWORK_TOKEN_EXPIRED)return t9("{category} URL has expired",t).format({category:r});if([tN.NETWORK_TOKEN_SUB_MISMATCH,tN.NETWORK_TOKEN_AUD_MISMATCH,tN.NETWORK_TOKEN_AUD_MISSING,tN.NETWORK_TOKEN_MALFORMED].includes(e.muxCode))return t9("{category} URL is formatted incorrectly",t).format({category:r});if(e.muxCode===tN.NETWORK_TOKEN_MISSING)return t9("Invalid {categoryName} URL",t).format({categoryName:n});if(e.muxCode===tN.NETWORK_NOT_FOUND)return t9("{category} does not exist",t).format({category:r});if(e.muxCode===tN.NETWORK_NOT_READY){let i="live"===e.streamType?"Live stream":"Video";return t9("{mediaType} is not currently available",t).format({mediaType:i})}}if(e.code){if(e.code===tB.MEDIA_ERR_NETWORK)return t9("Network Error",t);if(e.code===tB.MEDIA_ERR_DECODE)return t9("Media Error",t);if(e.code===tB.MEDIA_ERR_SRC_NOT_SUPPORTED)return t9("Source Not Supported",t)}return t9("Error",t)})(e,t).toString(),message:((e,t=!1)=>{var i,a;if(e.muxCode){let r=pw(null!=(i=e.errorCategory)?i:"video"),n=tP(null!=(a=e.errorCategory)?a:tx.VIDEO);return e.muxCode===tN.NETWORK_OFFLINE?t9("Check your internet connection and try reloading this video.",t):e.muxCode===tN.NETWORK_TOKEN_EXPIRED?t9("The video’s secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:n}):e.muxCode===tN.NETWORK_TOKEN_SUB_MISMATCH?t9("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:n}):e.muxCode===tN.NETWORK_TOKEN_MALFORMED?t9("{category} URL is formatted incorrectly",t).format({category:r}):[tN.NETWORK_TOKEN_AUD_MISMATCH,tN.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode)?t9("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:n}):[tN.NETWORK_TOKEN_MISSING,tN.NETWORK_INVALID_URL].includes(e.muxCode)?t9("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:n}):e.muxCode===tN.NETWORK_NOT_FOUND?"":e.message}return e.code&&(e.code===tB.MEDIA_ERR_NETWORK||e.code===tB.MEDIA_ERR_DECODE||e.code===tB.MEDIA_ERR_SRC_NOT_SUPPORTED),e.message})(e,t).toString()}))(e,!1);return`
3195      ${null!=a&&a.title?`<h3>${a.title}</h3>`:""}
3196      ${null!=a&&a.message||null!=a&&a.linkUrl?`<p>
3197        ${null==a?void 0:a.message}
3198        ${null!=a&&a.linkUrl?`<a
3199              href="${a.linkUrl}"
3200              target="_blank"
3201              rel="external noopener"
3202              aria-label="${null!=(t=a.linkText)?t:""} ${t9("(opens in a new window)")}"
3203              >${null!=(i=a.linkText)?i:a.linkUrl}</a
3204            >`:""}
3205      </p>`:""}
3206    `}return pN(e)};var pU,pB,pH,pW,pV,pF,p$,pK,pq,pY,pG,pj,pQ,pZ,pz,pX=Object.values(aD),pJ=Object.values(pM),p0=Object.values(pO),p1="mux-player",p2={isDialogOpen:!1},p3={redundant_streams:!0},p4=class extends pp{constructor(){super(),dq(this,p$),dq(this,pU),dq(this,pB,!1),dq(this,pH,{}),dq(this,pW,!0),dq(this,pV,new pr(this,"hotkeys")),dq(this,pF,{...p2,onCloseErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&dG(this,p$,pY).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&(m7(this,m1.activeElement)||e.preventDefault())}}),dY(this,pU,iY()),this.attachShadow({mode:"open"}),dG(this,p$,pq).call(this),this.isConnected&&dG(this,p$,pK).call(this)}static get NAME(){return p1}static get VERSION(){return pt}static get observedAttributes(){var e;return[...null!=(e=pp.observedAttributes)?e:[],...pJ,...pX,...p0]}get mediaTheme(){var e;return null==(e=this.shadowRoot)?void 0:e.querySelector("media-theme")}get mediaController(){var e,t;return null==(t=null==(e=this.mediaTheme)?void 0:e.shadowRoot)?void 0:t.querySelector("media-controller")}connectedCallback(){let e=this.media;e&&(e.metadata=pP(this))}attributeChangedCallback(e,t,i){var a;switch(dG(this,p$,pK).call(this),super.attributeChangedCallback(e,t,i),e){case pO.HOTKEYS:dK(this,pV).value=i;break;
3206case pO.THUMBNAIL_TIME:null!=i&&this.tokens.thumbnail&&ps(t9("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case pO.THUMBNAIL_TOKEN:if(i){let e=t5(i);if(e){let{aud:t}=e,i=ig.THUMBNAIL;t!==i&&ps(t9("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"thumbnail"}))}}break;case pO.STORYBOARD_TOKEN:if(i){let e=t5(i);if(e){let{aud:t}=e,i=ig.STORYBOARD;t!==i&&ps(t9("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"storyboard"}))}}break;case pO.DRM_TOKEN:if(i){let e=t5(i);if(e){let{aud:t}=e,i=ig.DRM;t!==i&&ps(t9("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"drm"}))}}break;case aD.PLAYBACK_ID:null!=i&&i.includes("?token")&&po(t9("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break;case aD.STREAM_TYPE:i&&![tV.LIVE,tV.ON_DEMAND,tV.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?1/0:0:pl({file:"invalid-stream-type.md",message:t9("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===tV.LIVE?null==this.getAttribute(pO.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=NaN;break;case pO.FULLSCREEN_ELEMENT:if(null!=i||i!==t){let e=m1.getElementById(i),t=null==e?void 0:e.querySelector("mux-player");this.mediaController&&e&&t&&(this.mediaController.fullscreenElement=e)}}[aD.PLAYBACK_ID,pM.SRC,pO.PLAYBACK_TOKEN].includes(e)&&t!==i&&dY(this,pF,{...dK(this,pF),...p2}),dG(this,p$,pG).call(this,{[null!=(a=pa[e])?a:m3(e)]:i}
3206)}async requestFullscreen(e){var t;if(!(!this.mediaController||this.mediaController.hasAttribute(rr.MEDIA_IS_FULLSCREEN)))return null==(t=this.mediaController)||t.dispatchEvent(new m0.CustomEvent(re.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(rn.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}async exitFullscreen(){var e;if(!(!this.mediaController||!this.mediaController.hasAttribute(rr.MEDIA_IS_FULLSCREEN)))return null==(e=this.mediaController)||e.dispatchEvent(new m0.CustomEvent(re.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(rn.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var e;return null!=(e=this.getAttribute(aD.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tK.includes(e)?this.setAttribute(aD.PREFER_CMCD,e):ps(`Invalid value for preferCmcd. Must be one of ${tK.join()}`):this.removeAttribute(aD.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(rr.MEDIA_HAS_P
3206LAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(rr.MEDIA_TIME_IS_LIVE)}get _hls(){var e;return null==(e=this.media)?void 0:e._hls}get mux(){var e;return null==(e=this.media)?void 0:e.mux}get theme(){var e;return null!=(e=this.getAttribute(pO.THEME))?e:"gerwig"}set theme(e){this.setAttribute(pO.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let i of e.getAttributeNames()){if(px.includes(i))continue;let a=e.getAttribute(i);t[m3(i)]=""===a||a}return t}set themeProps(e){var t,i;dG(this,p$,pK).call(this);let a={...this.themeProps,...e};for(let r in a){if(px.includes(r))continue;let a=null==e?void 0:e[r];"boolean"==typeof a||null==a?null==(t=this.mediaTheme)||t.toggleAttribute(m2(r),!!a):null==(i=this.mediaTheme)||i.setAttribute(m2(r),a)}}get playbackId(){var e;return null!=(e=this.getAttribute(aD.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(aD.PLAYBACK_ID,e):this.removeAttribute(aD.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=p5(this,pM.SRC))?e:void 0:null!=(t=this.getAttribute(pM.SRC))?t:void 0}set src(e){e?this.setAttribute(pM.SRC,e):this.removeAttribute(pM.SRC)}get poster(){var e;let t=this.getAttribute(pM.POSTER);if(null!=t)return t;let{tokens:i}=this;return i.playback&&!i.thumbnail?void ps("Missing expected thumbnail token. No poster image will be shown"):this.playbackId&&!this.audio?((e,{token:t,customDomain:i=pe,thumbnailTime:a,programTime:r}={})=>{var n;let s=null==t?a:void 0,{aud:o}=null!=(n=t5(t))?n:{};if(!(t&&"t"!==o))return`https://image.${i}/${e}/thumbnail.webp${m5({token:t,time:s,program_time:r})}`})(this.playbackId,{customDomain:this.customDomain,thumbnailTime:null!=(e=this.thumbnailTime)?e:this.startTime,programTime:this.programStartTime,token:i.thumbnail}):void 0}set poster(e){e||""===e?this.setAttribute(pM.POSTER,e):this.removeAttribute(pM.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(pO.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(pO.STORYBOARD_SRC,e):this.removeAttribute(pO.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;return this.storyboardSrc&&!e.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[tV.LIVE,tV.UNKNOWN].includes(this.streamType)||e.playback&&!e.storyboard?void 0:((e,{token:t,customDomain:i=pe,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=null!=(n=t5(t))?n:{};if(!(t&&"s"!==s))return`https://image.${i}/${e}/storyboard.vtt${m5({token:t,format:"webp",program_start_time:a,program_end_time:r})}`})(this.playbackId,{customDomain:this.customDomain,token:e.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(pO.AUDIO)}set audio(e){if(!e)return void this.removeAttribute(pO.AUDIO);this.setAttribute(pO.AUDIO,"")}get hotkeys(){return dK(this,pV)}get nohotkeys(){return this.hasAttribute(pO.NOHOTKEYS)}set nohotkeys(e){if(!e)return void this.removeAttribute(pO.NOHOTKEYS);this.setAttribute(pO.NOHOTKEYS,"")}get thumbnailTime(){return m4(this.getAttribute(pO.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(pO.THUMBNAIL_TIME,`${e}`)}get videoTitle(){var e,t;return null!=(t=null!=(e=this.getAttribute(pO.VIDEO_TITLE))?e:this.getAttribute(pO.TITLE))?t:""}set videoTitle(e){e!==this.videoTitle&&(e?this.setAttribute(pO.VIDEO_TITLE,e):this.removeAttribute(pO.VIDEO_TITLE))}get placeholder(){var e;return null!=(e=p5(this,pO.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(pO.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let i=this.getAttribute(pO.PRIMARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=m0.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim()))return i}set primaryColor(e){this.setAttribute(pO.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let i=this.getAttribute(pO.SECONDARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=m0.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim()))return i}set secondaryColor(e){this.setAttribute(pO.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let i=this.getAttribute(pO.ACCENT_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=m0.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim()))return i}set accentColor(e){this.setAttribute(pO.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(pO.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(pO.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(pO.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(pO.PLAYBACK_RATES))return this.getAttribute(pO.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>
3206e-t)}set playbackRates(e){if(!e)return void this.removeAttribute(pO.PLAYBACK_RATES);this.setAttribute(pO.PLAYBACK_RATES,e.join(" "))}get forwardSeekOffset(){var e;return null!=(e=m4(this.getAttribute(pO.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(pO.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=m4(this.getAttribute(pO.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(pO.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(pO.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(pO.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(pO.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return m4(this.getAttribute(pO.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(pO.DEFAULT_DURATION):this.setAttribute(pO.DEFAULT_DURATION,`${e}`)}get playerInitTime(){return this.hasAttribute(aD.PLAYER_INIT_TIME)?m4(this.getAttribute(aD.PLAYER_INIT_TIME)):dK(this,pU)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aD.PLAYER_INIT_TIME):this.setAttribute(aD.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(aD.PLAYER_SOFTWARE_NAME))?e:p1}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(aD.PLAYER_SOFTWARE_VERSION))?e:pt}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aD.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aD.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aD.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(aD.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aD.MAX_RESOLUTION,e):this.removeAttribute(aD.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aD.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aD.MIN_RESOLUTION,e):this.removeAttribute(aD.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(aD.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(aD.MAX_AUTO_RESOLUTION):this.setAttribute(aD.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(aD.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aD.RENDITION_ORDER,e):this.removeAttribute(aD.RENDITION_ORDER))}get programStartTime(){return m4(this.getAttribute(aD.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(aD.PROGRAM_START_TIME):this.setAttribute(aD.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return m4(this.getAttribute(aD.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(aD.PROGRAM_END_TIME):this.setAttribute(aD.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){return m4(this.getAttribute(aD.ASSET_START_TIME))}set assetStartTime(e){null==e?this.removeAttribute(aD.ASSET_START_TIME):this.setAttribute(aD.ASSET_START_TIME,`${e}`)}get assetEndTime(){return m4(this.getAttribute(aD.ASSET_END_TIME))}set assetEndTime(e){null==e?this.removeAttribute(aD.ASSET_END_TIME):this.setAttribute(aD.ASSET_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(pO.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(pO.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,i])=>(e[t]=i,e),{}):p3}set extraSourceParams(e){null==e?this.removeAttribute(pO.EXTRA_SOURCE_PARAMS):this.setAttribute(pO.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(aD.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aD.CUSTOM_DOMAIN,e):this.removeAttribute(aD.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=p5(this,aD.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(aD.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(pO.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(pO.NO_VOLUME_PREF,""):this.removeAttribute(pO.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(pO.NO_MUTED_PREF)}set noMutedPref(e){e?this.setAttribute(pO.NO_MUTED_PREF,""):this.removeAttribute(pO.NO_MUTED_PREF)}get debug(){return null!=p5(this,aD.DEBUG)}set debug(e){e?this.setAttribute(aD.DEBUG,""):this.removeAttribute(aD.DEBUG)}get disableTracking(){return null!=p5(this,aD.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(aD.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=p5(this,aD.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(aD.DISABLE_COOKIES,""):this.removeAttribute(aD.DISABLE_COOKIES)}get streamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(aD.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?i:tV.UNKNOWN}set streamType(e){this.setAttribute(aD.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(pO.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(pO.DEFAULT_STREAM_TYPE))?i:tV.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(pO.DEFAULT_STREAM_TYPE,e):this.removeAttribute(pO.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(pO.TARGET_LIVE_WINDOW)?+this.getAttribute(pO.TARGET_LIVE_WINDOW):null!=(t=null==(e=this.media)?void 0:e.targetLiveWindow)?t:NaN}
3206set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(null==e?this.removeAttribute(pO.TARGET_LIVE_WINDOW):this.setAttribute(pO.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return m4(p5(this,aD.START_TIME))}set startTime(e){this.setAttribute(aD.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(aD.PREFER_PLAYBACK);if(e===tF.MSE||e===tF.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tF.MSE||e===tF.NATIVE?this.setAttribute(aD.PREFER_PLAYBACK,e):this.removeAttribute(aD.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){if(dG(this,p$,pK).call(this),!this.media)return void po("underlying media element missing when trying to set metadata. metadata will not be set.");this.media.metadata={...pP(this),...e}}get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){if(dG(this,p$,pK).call(this),!this.media)return void po("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");this.media._hlsConfig=e}async addCuePoints(e){var t;return(dG(this,p$,pK).call(this),this.media)?null==(t=this.media)?void 0:t.addCuePoints(e):void po("underlying media element missing when trying to addCuePoints. cuePoints will not be added.")}get activeCuePoint(){var e;return null==(e=this.media)?void 0:e.activeCuePoint}get cuePoints(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.cuePoints)?t:[]}addChapters(e){var t;return(dG(this,p$,pK).call(this),this.media)?null==(t=this.media)?void 0:t.addChapters(e):void po("underlying media element missing when trying to addChapters. chapters will not be added.")}get activeChapter(){var e;return null==(e=this.media)?void 0:e.activeChapter}get chapters(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.chapters)?t:[]}getStartDate(){var e;return null==(e=this.media)?void 0:e.getStartDate()}get currentPdt(){var e;return null==(e=this.media)?void 0:e.currentPdt}get tokens(){let e=this.getAttribute(pO.PLAYBACK_TOKEN),t=this.getAttribute(pO.DRM_TOKEN),i=this.getAttribute(pO.THUMBNAIL_TOKEN),a=this.getAttribute(pO.STORYBOARD_TOKEN);return{...dK(this,pH),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=i?{thumbnail:i}:{},...null!=a?{storyboard:a}:{}}}set tokens(e){dY(this,pH,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(pO.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(pO.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(pO.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(pO.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(pO.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(pO.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(pO.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(pO.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,i,a){var r;let n=null==(r=this.media)?void 0:r.nativeEl;if(n)return ii(n,e,t,i,a)}removeTextTrack(e){var t;let i=null==(t=this.media)?void 0:t.nativeEl;if(i){let t;return void(null==(t=Array.prototype.find.call(i.querySelectorAll("track"),t=>t.track===e))||t.remove())}}get textTracks(){var e;return null==(e=this.media)?void 0:e.textTracks}get castReceiver(){var e;return null!=(e=this.getAttribute(pO.CAST_RECEIVER))?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(pO.CAST_RECEIVER,e):this.removeAttribute(pO.CAST_RECEIVER))}get castCustomData(){var e;return null==(e=this.media)?void 0:e.castCustomData}set castCustomData(e){if(!this.media)return void po("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");this.media.castCustomData=e}get noTooltips(){return this.hasAttribute(pO.NO_TOOLTIPS)}set noTooltips(e){if(!e)return void this.removeAttribute(pO.NO_TOOLTIPS);this.setAttribute(pO.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(pO.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(e){e?this.setAttribute(pO.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(pO.PROUDLY_DISPLAY_MUX_BADGE)}};function p5(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}pU=new WeakMap,pB=new WeakMap,pH=new WeakMap,pW=new WeakMap,pV=new WeakMap,pF=new WeakMap,p$=new WeakSet,pK=function(){var e,t,i,a;if(!dK(this,pB)){dY(this,pB,!0),dG(this,p$,pG).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof m0.HTMLElement))throw""}catch{po("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{po("underlying media element failed to upgrade!")}
3206try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof n0))throw""}catch{po("<media-controller> failed to upgrade!")}dG(this,p$,pj).call(this),dG(this,p$,pQ).call(this),dG(this,p$,pZ).call(this),dY(this,pW,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nr.USER_INACTIVE))||t),dG(this,p$,pz).call(this),null==(i=this.media)||i.addEventListener("streamtypechange",()=>dG(this,p$,pG).call(this)),null==(a=this.media)||a.addEventListener("loadstart",()=>dG(this,p$,pG).call(this))}},pq=function(){var e,t;try{null==(e=null==window?void 0:window.CSS)||e.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),null==(t=null==window?void 0:window.CSS)||t.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},pY=function(e){Object.assign(dK(this,pF),e),dG(this,p$,pG).call(this)},pG=function(e={}){var t,i,a,r,n,s,o,l,d,u,c,h,m,p,E,b,g,f,_,y,T,A,k,w,S,I,R,D,C,L,M,O,x,N,P,U,B,H,W,V,F,$,K,q,Y;let G,j;t={...dK(this,pF),...e},G={src:!this.playbackId&&this.src,playbackId:this.playbackId,hasSrc:!!this.playbackId||!!this.src||!!this.currentSrc,poster:this.poster,storyboard:this.storyboard,storyboardSrc:this.getAttribute(pO.STORYBOARD_SRC),fullscreenElement:this.getAttribute(pO.FULLSCREEN_ELEMENT),placeholder:this.getAttribute("placeholder"),themeTemplate:function(e){var t,i;let a=e.theme;if(a){let r=null==(i=null==(t=e.getRootNode())?void 0:t.getElementById)?void 0:i.call(t,a);if(r&&r instanceof HTMLTemplateElement)return r;a.startsWith("media-theme-")||(a=`media-theme-${a}`);let n=m0.customElements.get(a);if(null!=n&&n.template)return n.template}}(this),thumbnailTime:!this.tokens.thumbnail&&this.thumbnailTime,autoplay:this.autoplay,crossOrigin:this.crossOrigin,loop:this.loop,noHotKeys:this.hasAttribute(pO.NOHOTKEYS),hotKeys:this.getAttribute(pO.HOTKEYS),muted:this.muted,paused:this.paused,preload:this.preload,envKey:this.envKey,preferCmcd:this.preferCmcd,debug:this.debug,disableTracking:this.disableTracking,disableCookies:this.disableCookies,tokens:this.tokens,beaconCollectionDomain:this.beaconCollectionDomain,maxResolution:this.maxResolution,minResolution:this.minResolution,maxAutoResolution:this.maxAutoResolution,programStartTime:this.programStartTime,programEndTime:this.programEndTime,assetStartTime:this.assetStartTime,assetEndTime:this.assetEndTime,renditionOrder:this.renditionOrder,metadata:this.metadata,playerInitTime:this.playerInitTime,playerSoftwareName:this.playerSoftwareName,playerSoftwareVersion:this.playerSoftwareVersion,startTime:this.startTime,preferPlayback:this.preferPlayback,audio:this.audio,defaultStreamType:this.defaultStreamType,targetLiveWindow:this.getAttribute(aD.TARGET_LIVE_WINDOW),streamType:pi(this.getAttribute(aD.STREAM_TYPE)),primaryColor:this.getAttribute(pO.PRIMARY_COLOR),secondaryColor:this.getAttribute(pO.SECONDARY_COLOR),accentColor:this.getAttribute(pO.ACCENT_COLOR),forwardSeekOffset:this.forwardSeekOffset,backwardSeekOffset:this.backwardSeekOffset,defaultHiddenCaptions:this.defaultHiddenCaptions,defaultDuration:this.defaultDuration,defaultShowRemainingTime:this.defaultShowRemainingTime,hideDuration:(j=null==(r=this.mediaController)?void 0:r.querySelector("media-time-display"))&&"none"===getComputedStyle(j).getPropertyValue("--media-duration-display-display").trim(),playbackRates:this.getAttribute(pO.PLAYBACK_RATES),customDomain:null!=(i=this.getAttribute(aD.CUSTOM_DOMAIN))?i:void 0,title:this.getAttribute(pO.TITLE),videoTitle:null!=(a=this.getAttribute(pO.VIDEO_TITLE))?a:this.getAttribute(pO.TITLE),novolumepref:this.hasAttribute(pO.NO_VOLUME_PREF),nomutedpref:this.hasAttribute(pO.NO_MUTED_PREF),proudlyDisplayMuxBadge:this.hasAttribute(pO.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:this.castReceiver,disablePseudoEnded:this.hasAttribute(pO.DISABLE_PSEUDO_ENDED),...t,extraSourceParams:this.extraSourceParams},n=pA`
3207  <style>
3208    ${(e=>{let{tokens:t}=e;return t.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""})(G)}
3209    ${pv}
3210  </style>
3211  ${o=G,pA`
3212  <media-theme
3213    template="${o.themeTemplate||!1}"
3214    defaultstreamtype="${null!=(l=o.defaultStreamType)&&l}"
3215    hotkeys="${(e=>{let t=e.hotKeys?`${e.hotKeys}`:"";return"live"===pi(e.streamType)&&(t+=" noarrowleft noarrowright"),t})(o)||!1}"
3216    nohotkeys="${o.noHotKeys||!o.hasSrc||!1}"
3217    noautoseektolive="${!!(null!=(d=o.streamType)&&d.includes(tV.LIVE))&&0!==o.targetLiveWindow}"
3218    novolumepref="${o.novolumepref||!1}"
3219    nomutedpref="${o.nomutedpref||!1}"
3220    disabled="${!o.hasSrc||o.isDialogOpen}"
3221    audio="${null!=(u=o.audio)&&u}"
3222    style="${null!=(c=function(e){let t="";return Object.entries(e).forEach(([e,i])=>{null!=i&&(t+=`${m2(e)}: ${i}; `)}),t?t.trim():void 0}({"--media-primary-color":o.primaryColor,"--media-secondary-color":o.secondaryColor,"--media-accent-color":o.accentColor}))&&c}"
3223    defaultsubtitles="${!o.defaultHiddenCaptions}"
3224    forwardseekoffset="${null!=(h=o.forwardSeekOffset)&&h}"
3225    backwardseekoffset="${null!=(m=o.backwardSeekOffset)&&m}"
3226    playbackrates="${null!=(p=o.playbackRates)&&p}"
3227    defaultshowremainingtime="${null!=(E=o.defaultShowRemainingTime)&&E}"
3228    defaultduration="${null!=(b=o.defaultDuration)&&b}"
3229    hideduration="${null!=(g=o.hideDuration)&&g}"
3230    title="${null!=(f=o.title)&&f}"
3231    videotitle="${null!=(_=o.videoTitle)&&_}"
3232    proudlydisplaymuxbadge="${null!=(y=o.proudlyDisplayMuxBadge)&&y}"
3233    exportparts="${pk}"
3234    onclose="${o.onCloseErrorDialog}"
3235    onfocusin="${o.onFocusInErrorDialog}"
3236  >
3237    <mux-video
3238      slot="media"
3239      inert="${null!=(T=o.noHotKeys)&&T}"
3240      target-live-window="${null!=(A=o.targetLiveWindow)&&A}"
3241      stream-type="${null!=(k=pi(o.streamType))&&k}"
3242      crossorigin="${null!=(w=o.crossOrigin)?w:""}"
3243      playsinline
3244      autoplay="${null!=(S=o.autoplay)&&S}"
3245      muted="${null!=(I=o.muted)&&I}"
3246      loop="${null!=(R=o.loop)&&R}"
3247      preload="${null!=(D=o.preload)&&D}"
3248      debug="${null!=(C=o.debug)&&C}"
3249      prefer-cmcd="${null!=(L=o.preferCmcd)&&L}"
3250      disable-tracking="${null!=(M=o.disableTracking)&&M}"
3251      disable-cookies="${null!=(O=o.disableCookies)&&O}"
3252      prefer-playback="${null!=(x=o.preferPlayback)&&x}"
3253      start-time="${null!=o.startTime&&o.startTime}"
3254      beacon-collection-domain="${null!=(N=o.beaconCollectionDomain)&&N}"
3255      player-init-time="${null!=(P=o.playerInitTime)&&P}"
3256      player-software-name="${null!=(U=o.playerSoftwareName)&&U}"
3257      player-software-version="${null!=(B=o.playerSoftwareVersion)&&B}"
3258      env-key="${null!=(H=o.envKey)&&H}"
3259      custom-domain="${null!=(W=o.customDomain)&&W}"
3260      src="${o.src?o.src:!!o.playbackId&&ij(o)}"
3261      cast-src="${o.src?o.src:!!o.playbackId&&ij(o)}"
3262      cast-receiver="${null!=(V=o.castReceiver)&&V}"
3263      drm-token="${null!=($=null==(F=o.tokens)?void 0:F.drm)&&$}"
3264      exportparts="video"
3265      disable-pseudo-ended="${null!=(K=o.disablePseudoEnded)&&K}"
3266      max-auto-resolution="${null!=(q=o.maxAutoResolution)&&q}"
3267    >
3268      ${o.storyboard?pA`<track label="thumbnails" default kind="metadata" src="${o.storyboard}" />`:pA``}
3269      <slot></slot>
3270    </mux-video>
3271    <slot name="poster" slot="poster">
3272      <media-poster-image
3273        part="poster"
3274        exportparts="poster, img"
3275        src="${!!o.poster&&o.poster}"
3276        placeholdersrc="${null!=(Y=o.placeholder)&&Y}"
3277      ></media-poster-image>
3278    </slot>
3279  </media-theme>
3280`}
3281`,s=this.shadowRoot,n.renderInto(s)},pj=function(){let e=e=>{var t,i;if(!(null!=e&&e.startsWith("theme-")))return;let a=e.replace(/^theme-/,"");if(px.includes(a))return;let r=this.getAttribute(e);null!=r?null==(t=this.mediaTheme)||t.setAttribute(a,r):null==(i=this.mediaTheme)||i.removeAttribute(a)};new MutationObserver(t=>{for(let{attributeName:i}of t)e(i)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(e)},pQ=function(){let e=e=>{var t;let i=null==(t=this.media)?void 0:t.error;if(!(i instanceof tB)){let{message:e,code:t}=null!=i?i:{};i=new tB(e,t)}if(!(null!=i&&i.fatal)){ps(i),i.data&&ps(`${i.name} data:`,i.data);return}let a=pS(i,!1);a.message&&pl(a),po(i),i.data&&po(`${i.name} data:`,i.data),dG(this,p$,pY).call(this,{isDialogOpen:!0})};this.addEventListener("error",e),this.media&&(this.media.errorTranslator=(e={})=>{var t,i,a;if(!((null==(t=this.media)?void 0:t.error)instanceof tB))return e;let r=pS(null==(i=this.media)?void 0:i.error,!1);return{player_error_code:null==(a=this.media)?void 0:a.error.code,player_error_message:r.message?String(r.message):e.player_error_message,player_error_context:r.context?String(r.context):e.player_error_context}})},pZ=function(){var e,t,i,a;let r=()=>dG(this,p$,pG).call(this);null==(t=null==(e=this.media)?void 0:e.textTracks)||t.addEventListener("addtrack",r),null==(a=null==(i=this.media)?void 0:i.textTracks)||a.addEventListener("removetrack",r)},pz=function(){var e,t;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===tV.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(e,t,i=!1)=>
3281{r()||Array.from(e&&e.activeCues||[]).forEach(e=>{if(!(!e.snapToLines||e.line<-5||e.line>=0&&e.line<10))if(!t||this.paused){let t=e.text.split(`
3282`).length,r=-3;this.streamType===tV.LIVE&&(r=-2);let n=r-t;if(e.line===n&&!i)return;a.has(e)||a.set(e,e.line),e.line=n}else setTimeout(()=>{e.line=a.get(e)||"auto"},500)})},s=()=>{var e,t;n(i,null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nr.USER_INACTIVE))&&t)},o=()=>{var e,t;let a=Array.from((null==(t=null==(e=this.mediaController)?void 0:e.media)?void 0:t.textTracks)||[]).filter(e=>["subtitles","captions"].includes(e.kind)&&"showing"===e.mode)[0];a!==i&&(null==i||i.removeEventListener("cuechange",s)),null==(i=a)||i.addEventListener("cuechange",s),n(i,dK(this,pW))};o(),null==(e=this.textTracks)||e.addEventListener("change",o),null==(t=this.textTracks)||t.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var e,t;let a=null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nr.USER_INACTIVE))||t;dK(this,pW)!==a&&(dY(this,pW,a),n(i,dK(this,pW)))})};var p9=e=>{throw TypeError(e)},p8=(e,t,i)=>t.has(e)||p9("Cannot "+i),p6=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends p6{}globalThis.DocumentFragment=e}var p7,ve=class extends p6{},vt=class{constructor(e,t={}){((e,t,i)=>t.has(e)?p9("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i))(this,p7),((e,t,i,a)=>(p8(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,p7,null==t?void 0:t.detail)}get detail(){let e,t;return p8(this,e=p7,"read from private field"),t?t.call(this):e.get(this)}initCustomEvent(){}};p7=new WeakMap;var vi={document:{createElement:function(e,t){return new ve}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(ve)},CustomEvent:vt,EventTarget:p6,HTMLElement:ve,HTMLVideoElement:class extends p6{}},va="undefined"==typeof window||void 0===globalThis.customElements,vr=va?vi:globalThis;va?vi.document:globalThis.document,vr.customElements.get("mux-player")||(vr.customElements.define("mux-player",p4),vr.MuxPlayerElement=p4);var vn=parseInt(s.version)>=19,vs={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"};function vo(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}var vl=Object.prototype.hasOwnProperty,vd=(e,t,i)=>!((e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(Array.isArray(e))return!!Array.isArray(t)&&e.length===t.length&&e.some((e,i)=>t[i]===e);let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++)if(!vl.call(t,i[a])||!Object.is(e[i[a]],t[i[a]]))return!1;return!0})(t,e[i]),vu=(e,t,i)=>{e[i]=t},vc=(e,t,i,a=vu,r=vd)=>(0,s.useEffect)(()=>{let n=null==i?void 0:i.current;n&&r(n,t,e)&&a(n,t,e)},[null==i?void 0:i.current,t]),vh=(()=>{try{return"3.10.0"}catch{}return"UNKNOWN"})(),vm=(e,t,i)=>(0,s.useEffect)(()=>{let a=null==t?void 0:t.current;if(a&&i)return a.addEventListener(e,i),()=>{a.removeEventListener(e,i)}},[null==t?void 0:t.current,i,e]),vp=s.forwardRef(({children:e,...t},i)=>s.createElement("mux-player",{suppressHydrationWarning:!0,...((e={})=>{let{ref:t,...i}=e;return Object.entries(i).reduce((e,[t,i])=>{let a=((e,t)=>{if(!(!vn&&"boolean"==typeof t&&!t)){if(((e,t)=>null!=t&&e in t)(e,vs))return vs[e];if(void 0!==t)return/[A-Z]/.test(e)?e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`):e}})(t,i);if(!a)return e;let r=((e,t)=>vn||"boolean"!=typeof e?e:"")(i,0);return e[a]=r,e},{})})(t),ref:i},e)),vv=vh,vE="mux-player-react",vb=s.forwardRef((e,t)=>{var i;let a=(0,s.useRef)(null),r=function(...e){return s.useCallback(function(...e){return t=>{let i=!1,a=e.map(e=>{let a=vo(e,t);return i||"function"!=typeof a||(i=!0),a});if(i)return()=>{for(let t=0;t<a.length;t++){let i=a[t];"function"==typeof i?i():vo(e[t],null)}}}}(...e),e)}(a,t),[n]=((e,t)=>{let{onAbort:i,onCanPlay:a,onCanPlayThrough:r,onEmptied:n,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:u,onVolumeChange:c,onRateChange:h,onResize:m,onWaiting:p,onPlay:E,onPlaying:b,onTimeUpdate:g,onPause:f,onSeeking:_,onSeeked:y,onStalled:T,onSuspend:A,onEnded:k,onError:w,onCuePointChange:S,onChapterChange:I,metadata:R,tokens:D,paused:C,playbackId:L,playbackRates:M,currentTime:O,themeProps:x,extraSourceParams:N,castCustomData:P,_hlsConfig:U,...B}=t;
3282return vc("tokens",D,e),vc("playbackId",L,e),vc("playbackRates",M,e),vc("metadata",R,e),vc("extraSourceParams",N,e),vc("_hlsConfig",U,e),vc("themeProps",x,e),vc("castCustomData",P,e),vc("paused",C,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,i)=>(!e.hasAttribute("autoplay")||!!e.hasPlayed)&&vd(e,t,i)),vc("currentTime",O,e,(e,t)=>{null!=t&&(e.currentTime=t)}),vm("abort",e,i),vm("canplay",e,a),vm("canplaythrough",e,r),vm("emptied",e,n),vm("loadstart",e,s),vm("loadeddata",e,o),vm("loadedmetadata",e,l),vm("progress",e,d),vm("durationchange",e,u),vm("volumechange",e,c),vm("ratechange",e,h),vm("resize",e,m),vm("waiting",e,p),vm("play",e,E),vm("playing",e,b),vm("timeupdate",e,g),vm("pause",e,f),vm("seeking",e,_),vm("seeked",e,y),vm("stalled",e,T),vm("suspend",e,A),vm("ended",e,k),vm("error",e,w),vm("cuepointchange",e,S),vm("chapterchange",e,I),[B]})(a,e),[o]=(0,s.useState)(null!=(i=e.playerInitTime)?i:iY());return s.createElement(vp,{ref:r,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:vE,playerSoftwareVersion:vv,playerInitTime:o,...n})})}}]);

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.