1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68399,32655,e=>{"use strict";let t,i,a;var r=e.i(71645),n=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,d=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,c=function(e,t){return function(){return e&&(t=e(e=0)),t}},h=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},m=function(e,t,i,a){if(t&&"object"==typeof t||"function"==typeof t)for(var r,n=l(t),d=0,c=n.length;d<c;d++)r=n[d],u.call(e,r)||r===i||s(e,r,{get:(function(e){return t[e]}).bind(null,r),enumerable:!(a=o(t,r))||a.enumerable});return e},p=function(e,t,i){return i=null!=e?n(d(e)):{},m(!t&&e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)},v=h(function(t,i){i.exports="u">typeof window?window:e.g});function b(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):b(e,t)}var E=c(function(){E()});function g(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var f=c(function(){}),y=h(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))}}}),T=h(function(e,t){function i(e,t){if(!b(this,i))return new i(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}E(),t.exports=i,i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),A=h(function(e,t){function i(e,t){if(!b(this,i))return new i(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}E(),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}}),k=h(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)}}),w=h(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)}}),I=h(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)}}}),S=h(function(e,t){f(),t.exports=function e(t){switch(t.nodeType){case 3:return r(t.data);case 8:return"<!--"+t.data+"-->";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=g(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,""")+'"')}),t.length?" "+t.join(" "):""}function r(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}),R=h(function(e,t){E();var i=y(),a=k(),r=w(),n=I(),s=S(),o="http://www.w3.org/1999/xhtml";function l(e,t,i){if(!b(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}}),C=h(function(e,t){E();var i=R();function a(e){if(!b(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("")}}),L=h(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(){}}),D=h(function(e,t){E();var i=y(),a=T(),r=A(),n=R(),s=C(),o=L(),l=k(),d=w(),u=I();function c(){if(!b(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}),M=h(function(e,t){t.exports=new(D())}),x=h(function(t,i){var a,r=e.g,n=M();"u">typeof document?a=document:(a=r["__GLOBAL_DOCUMENT_CACHE@4"])||(a=r["__GLOBAL_DOCUMENT_CACHE@4"]=n),i.exports=a});function N(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 O(e,t){if(e){if("string"==typeof e)return N(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 N(e,t)}}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"u">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)||O(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var U=p(v()),W=p(v()),H=p(v()),B=function(){var e=H.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=B(),o=null==s?void 0:s.toString(16).substring(3);return o?t.substring(0,28)+o:t},V=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=V()),e.muxId;try{t=document.querySelector(e)}catch(e){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},K=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 F(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(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 Y=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,F(o)),d=(i=console.info).bind.apply(i,F(o)),u=(a=console.debug).bind.apply(a,F(o)),c=(r=console.warn).bind.apply(r,F(o)),h=(n=console.error).bind.apply(n,F(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>0))return l.apply(void 0,F(t))},debug:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>1))return u.apply(void 0,F(t))},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>2))return d.apply(void 0,F(t))},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>3))return c.apply(void 0,F(t))},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>4))return h.apply(void 0,F(t))},get level(){return m},set level(_){_!==this.level&&(m=null!=_?_:s)}}}("[mux]"),G=p(v());function j(){return"1"===(G.default.doNotTrack||G.default.navigator&&G.default.navigator.doNotTrack)}function Q(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z(e,t){if(!b(e,t))throw TypeError("Cannot call a class as a function")}function Z(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 X(e,t,i){return t&&Z(e.prototype,t),i&&Z(e,i),e}function J(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e,t,i){return(et="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ee(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 ei(e,t){return(ei=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}E(),f();var ea=function(e){return er(e)[0]},er=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,i=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return i&&(t=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,t]},en=p(v()),es=function(){var e=en.default.performance;return void 0!==(e&&e.timing)}
1,eo=function(){var e=en.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},el=function(){var e=en.default.performance,t=e&&e.timing;return t&&t.navigationStart};function ed(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}function eu(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){J(e,t,i[t])})}return e}function ec(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}var eh=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],em=["x-cdn","content-type"].concat(eh);function ep(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var i=e.split(": "),a=i.shift();a&&(em.indexOf(a.toLowerCase())>=0||0===a.toLowerCase().indexOf("x-litix-"))&&(t[a]=i.join(": "))}}),t}function ev(e){if(e){var t=eh.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},eE=function(e){if(!e)return{};var t=el(),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)}},eg=function(e){if(!(!e||"function"!=typeof e.getAllResponseHeaders))return ep(e.getAllResponseHeaders())},ef=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(!es())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=eE(n),h=c.bytesLoaded,m=c.requestStart,p=c.responseStart,v=c.responseEnd;o("requestcompleted",ec(eu({},eb(l)),{request_event_type:e,request_bytes_loaded:h,request_start:m,request_response_start:p,request_response_end:v,request_type:"manifest",request_hostname:ea(r),request_response_headers:eg(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=eE(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:ea(i.url),request_response_headers:eg(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=eE(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:ea(i.url),request_response_headers:eg(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=eE(a=a||n.stats),l=s.bytesLoaded,d=s.requestStart,u=s.responseStart,c=s.responseEnd,h=r?eg(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?ea(r.responseURL):void 0,request_id:h?ev(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?eg(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:ea(c),request_id:h?ev(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:ea(a)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,p);var v=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,v),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,v),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()},e_=function(e,t){if(!e||!e.requestEndDate)return{};var i,a=ea(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=ep(u[u.length-1]._responseHeaders||""));var c=i?ev(i):void 0;return{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:n,requestResponseHeaders:i,requestMediaDuration:d,requestHostname:a,requestUrl:r,requestId:c}},eT=function(e,t){if("function"==typeof t.getCurrentRepresentationForType){var i=t.getCurrentRepresentationForType(e);return i?{currentLevel:i.absoluteIndex,renditionWidth:i.width||null,renditionHeight:i.height||null,renditionBitrate:i.bandwidth}:{}}var a=t.getQualityFor(e),r=t.getCurrentTrackFor(e).bitrateList;return r?{currentLevel:a,renditionWidth:r[a].width||null,renditionHeight:r[a].height||null,renditionBitrate:r[a].bandwidth}:{}},eA=function(e){var t;return null==(t=e.match(/.*codecs\*?="(.*)"/))?void 0:t[1]},ek=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}},ew=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=ek(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:ea(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=e_(r,i),h=c.requestStart,m=c.requestResponseStart,p=c.requestResponseEnd,v=c.requestResponseHeaders,b=c.requestMediaDuration,E=c.requestHostname,g=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:v,request_hostname:E,request_id:c.requestId,request_url:g,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=e_(r,i),c=u.requestStart,h=u.requestResponseStart,m=u.requestResponseEnd,p=u.requestBytesLoaded,v=u.requestResponseHeaders,b=u.requestMediaDuration,E=u.requestHostname,g=u.requestUrl,f=u.requestId,y=eT(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:v,request_hostname:E,request_id:f,request_url:g,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:eA(c.video.codec)}}},m=function(e,t,r){var s=e.mediaType;if("audio"===s||"video"===s){if("function"==typeof i.getRepresentationsByType)if(e.newRepresentation)o={bitrate:e.newRepresentation.bandwidth,width:e.newRepresentation.width,height:e.newRepresentation.height,qualityIndex:e.newRepresentation.absoluteIndex};else{var o,l=i.getRepresentationsByType(s);if(l&&"number"==typeof e.newQuality){var d=l.find(function(t){return t.absoluteIndex===e.newQuality||t.index===e.newQuality});d&&(o={bitrate:d.bandwidth,width:d.width,height:d.height,qualityIndex:e.newQuality})}}else{if("number"!=typeof e.newQuality)return void a.warn("missing evt.newQuality in qualityChangeRendered event",e);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]=ec(eu({},o),{codec:i.getCurrentTrackFor(s).codec});var u=h();u&&n("renditionchange",u)}};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:ea(t.url)})};i.on("fragmentLoadingAbandoned",p);var v=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:ea(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",v),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",d),i.off("mediaFragmentLoaded",u),i.off("qualityChangeRendered",m),i.off("error",v),i.off("fragmentLoadingAbandoned",p),delete i._stopMuxMonitor}},eI=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eS=0,eR=function(){function e(){z(this,e),J(this,"_listeners",void 0)}return X(e,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++eS,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||++eS;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"+e]||[],r=this._listeners["before*"]||[],n=this._listeners[e]||[],s=this._listeners["after"+e]||[],o=function(t,a){(t=t.slice()).forEach(function(t){t.call(i,{type:e},a)})};o(a,t),o(r,t),o(n,t),o(s,t)}}}]),e}(),eC=p(v()),eL=function(){function e(t){var i=this;z(this,e),J(this,"_playbackHeartbeatInterval",void 0),J(this,"_playheadShouldBeProgressing",void 0),J(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 X(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}(),eD=function e(t){var i=this;z(this,e),J(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})},eM=function(){function e(t){z(this,e),J(this,"_watchTimeTrackerLastCheckedTime",void 0),J(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 X(e,[{key:"_updateWatchTime",value:function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),ed(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;z(this,e),J(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),J(this,"_lastTime",void 0),J(this,"_isAdPlaying",void 0),J(this,"_callbackUpdatePlaybackTime",void 0),J(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=B(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,t.on("viewinit",function(){i.pm.data.view_playing_time_ms_cumulative=0});var a=this._startPlaybackTimeTracking.bind(this);t.on("playing",a),t.on("adplaying",a);var r=function(){i.pm.data.player_is_paused||a()};t.on("seeked",r),t.on("rebufferend",r);var n=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",n),t.on("seeking",n),t.on("rebufferstart",n),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=B(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return X(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=B(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,t=B(),i=t-this._lastTime,a=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?a=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(a=i),a>0&&a<=1e3&&ed(this.pm.data,"view_content_playback_time",a),null!==this._callbackUpdatePlaybackTime&&i>0&&i<=1e3&&(this._isAdPlaying&&ed(this.pm.data,"ad_playing_time_ms_cumulative",i),ed(this.pm.data,"view_playing_time_ms_cumulative",i)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),eN=function(){function e(t){z(this,e),J(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 X(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}(),eO=function e(t){if(z(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;ed(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||(ed(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)})}},eP=function(){function e(t){var i=this;z(this,e),J(this,"_lastCheckedTime",void 0),J(this,"_lastPlayheadTime",void 0),J(this,"_lastPlayheadTimeUpdatedTime",void 0),J(this,"_rebuffering",void 0),J(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:B()})}))}return X(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}(),eU=function(){function e(t){var i=this;z(this,e),J(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||B(),a):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||i._inPrerollPosition())&&i.calculateTimeToFirstFrame(n||B(),a)};t.one("playing",r),t.one("adplaying",r),t.one("viewend",function(){t.off("playing",r),t.off("adplaying",r)})}})}return X(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.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),e}(),eW=function e(t){var i=this;z(this,e),J(this,"_lastPlayerHeight",void 0),J(this,"_lastPlayerWidth",void 0),J(this,"_lastPlayheadPosition",void 0),J(this,"_lastSourceHeight",void 0),J(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){i._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"].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),ed(t.data,"view_total_content_playback_time",e),ed(t.data,"view_total_upscaling",r*e),ed(t.data,"view_total_downscaling",n*e)}i._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange","playbackmodechange"].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})})},eH=function e(t){var i=this;z(this,e),J(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var e=B(),r=(t.data.viewer_time||e)-(a||e);ed(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,ed(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})},eB=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},e$=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],eV=function(){function e(t){var i=this;z(this,e),J(this,"_adHasPlayed",void 0),J(this,"_adRequests",void 0),J(this,"_adResponses",void 0),J(this,"_currentAdRequestNumber",void 0),J(this,"_currentAdResponseNumber",void 0),J(this,"_prerollPlayTime",void 0),J(this,"_wouldBeNewAdPlay",void 0),J(this,"isAdBreak",void 0),J(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}),e$.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),eB(i._adRequests,a),ed(t.data,"view_ad_request_count"),i.inPrerollPosition()&&(t.data.view_preroll_requested=!0,i._adHasPlayed||ed(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},a),eB(i._adResponses,a);var r=i.findAdRequest(a.ad_request_id);r&&ed(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,ed(t.data,
1"view_ad_played_count")),i.inPrerollPosition()&&!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||ed(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,a){i._wouldBeNewAdPlay||ed(t.data,"view_ad_skipped_count")}),t.on("adended",function(){i._wouldBeNewAdPlay=!0}),t.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return X(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=P(er(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=P(er(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_type="preroll"}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,null!=t&&t.ad_type&&(this.pm.data.ad_type=null==t?void 0:t.ad_type)}}]),e}(),eq=function e(t){var i=this;z(this,e),J(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=B(),t.on("before*",r)},r=function(e){var a=B(),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)})},eK=p(v()),eF=(tf=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},function e(t){function i(e,a,r){var n;if("u">typeof document){if(arguments.length>1){if("number"==typeof(r=tf({path:"/"},i.defaults,r)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*r.expires),r.expires=s}try{n=JSON.stringify(a),/^[\{\[]/.test(n)&&(a=n)}catch(e){}return a=t.write?t.write(a,e):encodeURIComponent(String(a)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",a,r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")}e||(n={});for(var o=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,d=0;d<o.length;d++){var u=o[d].split("="),c=u.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{var h=u[0].replace(l,decodeURIComponent);if(c=t.read?t.read(c,h):t(c,h)||c.replace(l,decodeURIComponent),this.json)try{c=JSON.parse(c)}catch(e){}if(e===h){n=c;break}e||(n[h]=c)}catch(e){}}return n}}return i.set=i,i.get=function(e){return i.call(i,e)},i.getJSON=function(){return i.apply({json:!0},[].slice.call(arguments))},i.defaults={},i.remove=function(e,t){i(e,"",tf(t,{expires:-1}))},i.withConverter=e,i}(function(){})),eY="muxData",eG=function(){var e;try{e=(eF.get(eY)||"").split("&").reduce(function(e,t){var i=P(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},ej=function(e){try{eF.set(eY,Object.entries(e).map(function(e){var t=P(e,2),i=t[0],a=t[1];return"".concat(i,"=").concat(a)}).join("&"),{expires:365})}catch(e){}},eQ=function(){var e=eG();return e.mux_viewer_id=e.mux_viewer_id||$(),e.msn=e.msn||Math.random(),ej(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},ez=function(){var e=eG(),t=B();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,ej(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},eZ=eJ({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"}),eX=eJ({ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"c
1onnection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",lw:"low",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function eJ(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function e0(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=eZ[s];o||(Y.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(e){"url"===e&&(r=!0),eX[e]?o+=eX[e]:Number.isInteger(Number(e))?o+=e:(Y.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 e1=p(v()),e2=p(x()),e3={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},e4=["hb","requestcompleted","requestfailed","requestcanceled"],e5=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({},e3,t)};e5.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)},e5.prototype.flushEvents=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&1===this._eventQueue.length?this._eventQueue.pop():(this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending())},e5.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),e1.default.clearTimeout(this._sendTimeout)},e5.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],e0({mux_view_message:"event queue truncated"}));var i=this._createPayload(t);e8(this._beaconUrl,i,!0,function(){})},e5.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=B();e8(this._beaconUrl,i,!1,function(i,r){r?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,Y.info("Error sending beacon: "+r)):e._failureCount=0,e._roundTripTime=B()-a,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})},e5.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},e5.prototype._startBeaconSending=function(){var e=this;e1.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=e1.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},e5.prototype._createPayload=function(e){var t=this,i={transmission_timestamp:Math.round(B())};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()||(Y.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=e.filter(function(e){return -1===e4.indexOf(e.e)}),s()),o()||(Y.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 e9="function"==typeof e2.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},e8=function(e,t,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))return void a();if(e1.default.fetch)return void e1.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:e9(t)}).then(function(e){return a(null,e.ok?null:"Error")}).catch(function(e){return a(null,e)});if(e1.default.XMLHttpRequest){var r=new e1.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()},e6=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],e7=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],te=["ad_id","ad_creative_id","ad_universal_id"],tt=["viewstart","error","ended","viewend"],ti=function(){function e(t,i){var a,r,n,s,o,l,d,u,c,h,m,p,v,b,E,g,f,y,T,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};z(this,e),J(this,"mux",void 0),J(this,"envKey",void 0),J(this,"options",void 0),J(this,"eventQueue",void 0),J(this,"sampleRate",void 0),J(this,"disableCookies",void 0),J(this,"respectDoNotTrack",void 0),J(this,"previousBeaconData",void 0),J(this,"lastEventTime",void 0),J(this,"rateLimited",void 0),J(this,"pageLevelData",void 0),J(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 e5((a=this.envKey,n=(r=this.options).beaconCollectionDomain,s=r.beaconDomain,n?(/localhost(?::\d+)?$/.test(n)?"http://":"https://")+n:(a=a||"inferred").match(/^[a-z0-9]+$/)?"https://"+a+"."+(s||"litix.io"):"https://img.litix.io/a.gif")),this.sampleRate=null!=(f=this.options.sampleRate)?f: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==(v=this.options.platform)||null==(p=v.os)?void 0:p.architecture,viewer_os_version:null==(E=this.options.platform)||null==(b=E.os)?void 0:b.version,page_url:null===eK.default||void 0===eK.default||null==(g=eK.default.location)?void 0:g.href},this.viewerData=this.disableCookies?{}:eQ()}return X(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&j())return Y.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return Y.error("A data object was expected in send() but was not provided");var i=this.disableCookies?{}:ez(),a=ec(eu({},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=e0(this._deduplicateBeaconData(e,a));if(this.lastEventTime=this.mux.utils.now(),n)return Y.info("Not sending event due to sample rate restriction",e,a,s);if(this.envKey||Y.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(Y.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);else if(tt.indexOf(e)>=0){if("error"===e&&"warning"===t.player_error_severity)return;this.eventQueue.flushEvents()}if(this.rateLimited)return a.event="eventrateexceeded",s=e0(a),this.eventQueue.queueEvent(a.event,s),Y.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=eu({},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=P(t,2),s=r[0],o=r[1];i.previousBeaconData&&(o!==i.previousBeaconData[s]||e6.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_")||te.includes(t)&&e7.includes(e)||"playbackmodechange"===e&&0===t.indexOf("player_playback_mode"))}}]),e}(),ta=function e(t){z(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})},tr=function e(t){var i=this;z(this,e),J(this,"_lastEventTime",void 0),t.on("before*",function(e,a){var r=a.viewer_time,n=B(),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,J({},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}))}})};function tn(e,t){return(null==e?void 0:e.toLowerCase())===(null==t?void 0:t.toLowerCase())}var ts=function e(t){z(this,e);var i=function(e){var i,a,r,o=null!=(i=e)&&i.request_type&&("media"===i.request_type||"video"===i.request_type)&&null!=(a=i.request_response_headers)&&a["x-cdn"]?i.request_response_headers["x-cdn"]:null!=i&&i.video_cdn?i.video_cdn:null,l=null!=(r=e)&&r.request_start?r.request_start:null!=r&&r.viewer_time?r.viewer_time:Date.now();null!=o&&!tn(o,n)&&s<=l&&(n=o,s=l,t.emit("cdnchange",{video_cdn:o}))}
1,a=null,r=null,n=null,s=0;t.on("viewinit",function(){a=null,r=null,n=null,s=0}),t.on("beforecdnchange",function(e,t){var i=null==t?void 0:t.video_cdn;i&&(void 0===t.video_previous_cdn||null===t.video_previous_cdn)&&(tn(i,r)?t.video_previous_cdn=null!=a?a:void 0:(t.video_previous_cdn=null!=r?r:void 0,a=r,r=i))}),t.on("requestcompleted",function(e,t){i(t)})},to=function(e){try{return JSON.parse(e),!0}catch(e){return!1}},tl=function e(t){var i=this;z(this,e),J(this,"_emittingAutomaticEvent",!1),J(this,"_hasInitialized",!1),J(this,"_currentMode","standard"),t.on("viewstart",function(){i._hasInitialized||(i._hasInitialized=!0,i._currentMode=t.data.player_playback_mode||"standard",i._emittingAutomaticEvent=!0,t.emit("playbackmodechange",{player_playback_mode:i._currentMode,player_playback_mode_data:"{}"}),i._emittingAutomaticEvent=!1)}),t.on("viewend",function(){i._hasInitialized=!1}),t.on("playbackmodechange",function(e,a){i._emittingAutomaticEvent||(a.player_playback_mode_data?to(a.player_playback_mode_data)||(t.mux.log.warn("Invalid JSON string for player_playback_mode_data"),a.player_playback_mode_data="{}"):a.player_playback_mode_data="{}",t.data.player_playback_mode_data=a.player_playback_mode_data,t.data.player_playback_mode=a.player_playback_mode,i._currentMode=a.player_playback_mode)})},td=function(){function e(t){z(this,e),J(this,"pm",void 0),J(this,"_currentRangeStart",void 0),J(this,"_lastPlayheadTime",void 0),this.pm=t,this._currentRangeStart=null,this._lastPlayheadTime=null,t.on("playbackheartbeat",this._updatePlaybackRange.bind(this)),t.on("playbackheartbeatend",this._endPlaybackRange.bind(this))}return X(e,[{key:"_updateLastRangeEnd",value:function(){var e=this.pm.data.video_playback_ranges;if(e&&e.length>0){var t=this.pm.data.player_playhead_time||0;e[e.length-1][1]=t}}},{key:"_updatePlaybackRange",value:function(){var e,t=this.pm.data.player_playhead_time||0;if(!(!this.pm.disableAdPlaybackRangeFiltering&&null!=(e=this.pm.adTracker)&&e.isAdBreak&&null!==this._lastPlayheadTime&&t<this._lastPlayheadTime)){if(null!==this._lastPlayheadTime&&null!==this._currentRangeStart&&Math.abs(t-this._lastPlayheadTime)>1e3){var i=this.pm.data.video_playback_ranges;i&&i.length>0&&(i[i.length-1][1]=this._lastPlayheadTime),this._currentRangeStart=null}if(null===this._currentRangeStart){var a=this.pm.data.video_playback_ranges||[];a.length>0&&a[a.length-1][1]===t?this._currentRangeStart=a[a.length-1][0]:(this._currentRangeStart=t,a.push([t,t])),this.pm.data.video_playback_ranges=a}else this._updateLastRangeEnd();this._lastPlayheadTime=t}}},{key:"_endPlaybackRange",value:function(){null!==this._currentRangeStart&&(this._updateLastRangeEnd(),this._currentRangeStart=null,this._lastPlayheadTime=null)}}]),e}(),tu=Object.freeze({CELLULAR:"cellular",WIFI:"wifi",WIRED:"wired",OTHER:"other",NO_CONNECTION:"no_connection",UNKNOWN:"unknown"}),tc=function(e){if(!e)return tu.UNKNOWN;switch(e){case"cellular":case"wimax":return tu.CELLULAR;case"wifi":return tu.WIFI;case"ethernet":return tu.WIRED;case"none":return tu.NO_CONNECTION;case"bluetooth":case"other":default:return tu.OTHER;case"unknown":return tu.UNKNOWN}},th=p(v()),tm=function(){function e(t){var i=this;z(this,e),J(this,"pm",void 0),J(this,"lastType",void 0),J(this,"lastLowDataMode",void 0),this.pm=t,this.pm.one("viewinit",function(){var t,a=i.emit.bind(i);a(),th.default.addEventListener("online",a),th.default.addEventListener("offline",a),null==(t=e.connection)||t.addEventListener("change",a),i.pm.on("destroy",function(){var t;null==(t=e.connection)||t.removeEventListener("change",a),th.default.removeEventListener("online",a),th.default.removeEventListener("offline",a)})})}return X(e,[{key:"type",get:function(){var t,i;return(null==(t=th.default.navigator)?void 0:t.onLine)===!1?tu.NO_CONNECTION:null!=(i=e.connection)&&i.type?tc(e.connection.type):tu.UNKNOWN}},{key:"lowDataMode",get:function(){var t;return null==(t=e.connection)?void 0:t.saveData}},{key:"emit",value:function(){var e=this.type,t=this.lowDataMode;e===this.lastType&&t===this.lastLowDataMode||(this.lastType=e,this.lastLowDataMode=t,this.pm.emit("networkchange",eu({viewer_connection_type:e},void 0!==t&&{viewer_connection_low_data_mode:t})))}}
1],[{key:"connection",get:function(){var e;return"object"==typeof(e=th.default.navigator)&&"connection"in e&&"object"==typeof e.connection?th.default.navigator.connection:null}}]),e}(),tp=["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","networkchange","cdnchange","playbackmodechange"],tv=new Set(["requestcompleted","requestfailed","requestcanceled"]),tb=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&&ei(a,e);var t,i=(t=function(){if("u"<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=ee(a);return e=t?Reflect.construct(i,arguments,ee(this).constructor):i.apply(this,arguments),e&&("object"===g(e)||"function"==typeof e)?e:Q(this)});function a(e,t,r){z(this,a),J(Q(n=i.call(this)),"pageLoadEndTime",void 0),J(Q(n),"pageLoadInitTime",void 0),J(Q(n),"_destroyed",void 0),J(Q(n),"_heartBeatTimeout",void 0),J(Q(n),"adTracker",void 0),J(Q(n),"dashjs",void 0),J(Q(n),"data",void 0),J(Q(n),"disablePlayheadRebufferTracking",void 0),J(Q(n),"disableRebufferTracking",void 0),J(Q(n),"disableAdPlaybackRangeFiltering",void 0),J(Q(n),"errorTracker",void 0),J(Q(n),"errorTranslator",void 0),J(Q(n),"emitTranslator",void 0),J(Q(n),"getAdData",void 0),J(Q(n),"getPlayheadTime",void 0),J(Q(n),"getStateData",void 0),J(Q(n),"stateDataTranslator",void 0),J(Q(n),"hlsjs",void 0),J(Q(n),"id",void 0),J(Q(n),"longResumeTracker",void 0),J(Q(n),"minimumRebufferDuration",void 0),J(Q(n),"mux",void 0),J(Q(n),"playbackEventDispatcher",void 0),J(Q(n),"playbackHeartbeat",void 0),J(Q(n),"playbackHeartbeatTime",void 0),J(Q(n),"playheadTime",void 0),J(Q(n),"seekingTracker",void 0),J(Q(n),"sustainedRebufferThreshold",void 0),J(Q(n),"watchTimeTracker",void 0),J(Q(n),"currentFragmentPDT",void 0),J(Q(n),"currentFragmentStart",void 0),n.pageLoadInitTime=el(),n.pageLoadEndTime=eo(),n.mux=e,n.id=t,null!=r&&r.beaconDomain&&n.mux.log.warn("The `beaconDomain` setting has been deprecated in 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,disableAdPlaybackRangeFiltering:!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),Y.level=r.debug?1:3,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.disableAdPlaybackRangeFiltering=r.disableAdPlaybackRangeFiltering,n.errorTranslator=r.errorTranslator,n.emitTranslator=r.emitTranslator,n.stateDataTranslator=r.stateDataTranslator,n.playbackEventDispatcher=new ti(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
1("viewstart"),this.emit("renditionchange"))}).bind(Q(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),"u">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)}),tp.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.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),n.longResumeTracker=new tr(Q(n)),n.errorTracker=new eD(Q(n)),new eq(Q(n)),n.seekingTracker=new eH(Q(n)),n.playheadTime=new eN(Q(n)),n.playbackHeartbeat=new eL(Q(n)),new eW(Q(n)),n.watchTimeTracker=new eM(Q(n)),new ex(Q(n)),new td(Q(n)),n.adTracker=new eV(Q(n)),new eP(Q(n)),new eO(Q(n)),new eU(Q(n)),new ta(Q(n)),new ts(Q(n)),new tl(Q(n)),new tm(Q(n)),r.hlsjs&&n.addHLSJS(r),r.dashjs&&n.addDashJS(r),n.emit("viewinit",r.data),n}return X(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=et(ee(a.prototype),"emit",this)).call.apply(i,[this].concat(F(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=P(er(t.video_source_url),2),a=i[0];t.video_source_domain=i[1],t.video_source_hostname=a}delete t.ad_request_id,t.video_playback_ranges&&(t.video_playback_range=JSON.stringify(t.video_playback_ranges.filter(function(e){return e[0]!==e[1]}).map(function(e){return"".concat(e[0],":").concat(e[1])})),delete t.video_playback_ranges),this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,tv.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,t=this.getStateData();if("function"==typeof this.stateDataTranslator)try{t=this.stateDataTranslator(t)}catch(e){this.mux.log.warn("Exception in stateDataTranslator translator callback.",e)}null!=(e=this.data)&&e.video_cdn&&null!=t&&t.video_cdn&&(t.video_cdn,t=function(e,t){if(null==e)return{};var i,a,r=function(e,t){if(null==e)return{};var i,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)i=n[a],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}(t,["video_cdn"])),Object.assign(this.data,t),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&&ed(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){e.hlsjs?this.hlsjs?this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):(this.hlsjs=e.hlsjs,ef(this.mux,this.id,e.hlsjs,{},e.Hls||window.Hls)):this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(ey(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(e){e.dashjs?this.dashjs?this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):(this.dashjs=e.dashjs,ew(this.mux,this.id,e.dashjs)):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}(eR),tE=p(x());function tg(){return tE.default&&!!(tE.default.fullscreenElement||tE.default.webkitFullscreenElement||tE.default.mozFullScreenElement||tE.default.msFullscreenElement)}var tf,ty,t_=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],tT={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},tA=p(v());tA.default&&tA.default.WeakMap&&(ty=new WeakMap);var tk=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};tk.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)}
1,tk.prototype.processLine=function(e){var t=e.indexOf(":"),i=tD(e,t),a=i[0],r=2===i.length?tS(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"#EXT-X-TARGETDURATION":if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break;case"#EXT-X-PART-INF":tw(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case"#EXT-X-SERVER-CONTROL":tw(this.manifest,i),this.setHoldBack();break;case"#EXTINF":0===r?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break;case"#EXT-X-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"#EXT-X-VERSION":tw(this.manifest,i);break;case"#EXT-X-SESSION-DATA":var s=eb(tM(i[1]));Object.assign(this.manifest.sessionData,s)}},tk.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 tw=function(e,t){var i,a=tI(t[0].replace("#EXT-X-",""));
1tL(t[1])?(i={},i=Object.assign(tC(t[1]),i)):i=tS(t[1]),e[a]=i},tI=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},tS=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},tR=function(e){var t={},i=e.split("=");return i.length>1&&(t[tI(i[0])]=tS(i[1])),t},tC=function(e){for(var t=e.split(","),i={},a=0;t.length>a;a++)i=Object.assign(tR(t[a]),i);return i},tL=function(e){return e.indexOf("=")>-1},tD=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},tM=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}}},tx={safeCall:function(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){Y.info("safeCall error",e)}return r},safeIncrement:ed,getComputedStyle:function(e,t){var i;return e&&t&&tA.default&&"function"==typeof tA.default.getComputedStyle?(ty&&ty.has(e)&&(i=ty.get(e)),i||(i=tA.default.getComputedStyle(e,null),ty&&ty.set(e,i)),i.getPropertyValue(t)):""},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:ep,cdnHeadersToRequestId:ev,extractHostnameAndDomain:er,extractHostname:ea,manifestParser:tk,generateShortID:V,generateUUID:$,now:B,findMediaElement:K},tN={},tO=function(e){var t=arguments;"string"==typeof e?tO.hasOwnProperty(e)?U.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),tO[e].apply(null,t)},0):Y.warn("`"+e+"` is an unknown task"):"function"==typeof e?U.default.setTimeout(function(){e(tO)},0):Y.warn("`"+e+"` is invalid.")},tP={loaded:B(),NAME:"mux-embed",VERSION:"5.18.1",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,i){var a=P(K(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:tg(),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.")};r.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.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1),delete r.mux.fullscreenChangeListener),r.mux.destroy=u,r.mux.swapElement=u,r.mux.emit=u,r.mux.addHLSJS=u,r.mux.addD
1ashJS=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=P(K(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.fullscreenChangeListener=r.mux.fullscreenChangeListener,delete r.mux.fullscreenChangeListener,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={},t_.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=tT[r.error.code]||r.error.message}e.emit(n,t,i)},r.addEventListener(t,r.mux.listeners[t],!1))}),r.mux.listeners.enterpictureinpicture=function(){e.emit(n,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},r.mux.listeners.leavepictureinpicture=function(){var t=tg()?"fullscreen":"standard";e.emit(n,"playbackmodechange",{player_playback_mode:t,player_playback_mode_data:"{}"})},r.addEventListener("enterpictureinpicture",r.mux.listeners.enterpictureinpicture,!1),r.addEventListener("leavepictureinpicture",r.mux.listeners.leavepictureinpicture,!1),r.mux.fullscreenChangeListener=function(){var t=tg(),i=document.fullscreenElement;if(t&&(i===r||null!=i&&i.contains(r)))e.emit(n,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!t){var a=document.pictureInPictureElement===r;e.emit(n,"playbackmodechange",{player_playback_mode:a?"pip":"standard",player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1)}(tO,e,t)},destroyMonitor:function(e){var t=P(K(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():Y.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var i=q(e);tN[i]?tN[i].addHLSJS(t):Y.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(e,t){var i=q(e);tN[i]?tN[i].addDashJS(t):Y.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(e){var t=q(e);tN[t]?tN[t].removeHLSJS():Y.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=q(e);tN[t]?tN[t].removeDashJS():Y.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){j()&&t&&t.respectDoNotTrack&&Y.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=q(e);tN[i]=new tb(tO,i,t)},emit:function(e,t,i){var a=q(e);tN[a]?(tN[a].emit(t,i),"destroy"===t&&delete tN[a]):Y.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(e,t){var i=q(e);tN[i]?tN[i].emit("hb",t):Y.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(e,t){var i=q(e);tN[i]?tN[i].emitTranslator=t:Y.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(e,t){var i=q(e);tN[i]?tN[i].stateDataTranslator=t:Y.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var i=q(e);tN[i]?tN[i].getPlayheadTime=t:Y.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:j,log:Y,utils:tx,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",PLAYBACK_MODE_CHANGE:"playbackmodechange",NETWORK_CHANGE:"networkchange",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(tO,tP),void 0!==U.default&&"function"==typeof U.default.addEventListener&&U.default.addEventListener("pagehide",function(e){e.persisted||(tO.WINDOW_UNLOADING=!0)},!1);var tU=e.i(50471),tW=tU.default,tH={VIDEO:"video",THUMBNAIL:"thumbnail",STORYBOARD:"storyboard",DRM:"drm"},tB={NOT_AN_ERROR:0,NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_NO_STATUS:2000001,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_GENERIC_SERVER_FAIL:25e5,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_
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},t$=e=>e===tH.VIDEO?"playback":e,tV=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:"")}};tV.MEDIA_ERR_ABORTED=1,tV.MEDIA_ERR_NETWORK=2,tV.MEDIA_ERR_DECODE=3,tV.MEDIA_ERR_SRC_NOT_SUPPORTED=4,tV.MEDIA_ERR_ENCRYPTED=5,tV.MEDIA_ERR_CUSTOM=100,tV.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 tq=(e,t)=>null!=t&&e in t,tK={ANY:"any",MUTED:"muted"},tF={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},tY={MSE:"mse",NATIVE:"native"},tG={HEADER:"header",QUERY:"query",NONE:"none"},tj=Object.values(tG),tQ={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},tz={HLS:tQ.M3U8};Object.keys(tz),[...Object.values(tQ)];var tZ={code:"en"},tX=(e,t,i,a,r=e)=>{r.addEventListener(t,i,a),e.addEventListener("teardown",()=>{r.removeEventListener(t,i)},{once:!0})},tJ=e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]},t0=e=>{let{type:t}=e;if(t){let e=t.toUpperCase();return tq(e,tz)?tz[e]:t}return t3(e)},t1=e=>"VOD"===e?tF.ON_DEMAND:tF.LIVE,t2=e=>"EVENT"===e?1/0:"VOD"===e?NaN:0,t3=e=>{let{src:t}=e;if(!t)return"";let i="";try{i=t5(t).pathname}catch{console.error("Invalid url when trying to infer mime type",t)}let a=i.lastIndexOf(".");if(a<0)return t8(e)?tQ.M3U8:"";let r=i.slice(a+1).toUpperCase();return tq(r,tQ)?tQ[r]:""},t4=e=>{try{return new URL(e),!1}catch{return!0}},t5=(e,t)=>{var i;if(!t4(e))return new URL(e);let a=null==(i=null==window?void 0:window.location)?void 0:i.href,r=null!=t?t:a;return t&&t4(t.toString())&&(r=new URL(t,a)),new URL(e,r)},t9="mux.com",t8=({src:e,customDomain:t=t9})=>{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},t6=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 t7(e,t=!0){var i;return new ie(t&&null!=(i=null==tZ?void 0:tZ[e])?i:e,t?tZ.code:"en")}var ie=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}},it=Object.values(tK),ii=e=>"boolean"==typeof e||"string"==typeof e&&it.includes(e),ia=(e,t)=>{if(!t)return;let i=e.muted,a=()=>e.muted=i;switch(t){case tK.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(a)});break;case tK.MUTED:e.muted=!0,e.play().catch(a);break;default:e.play().catch(()=>{})}},ir=e=>"time"in e?e.time:e.startTime;function is(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 io(e,t){let i=Array.prototype.find.call(e.querySelectorAll("track"),e=>e.track===t);null==i||i.remove()}function il(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 id(e,t,i,a){let r=il(e,i,a);return r||((r=is(e,a,i)).mode="hidden",await new Promise(e=>setTimeout(()=>
1e(void 0),0))),"hidden"!==r.mode&&(r.mode="hidden"),[...t].sort((e,t)=>ir(t)-ir(e)).forEach(t=>{var i,n;let s=t.value,o=ir(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 iu="cuepoints",ic=Object.freeze({label:iu});async function ih(e,t,i=ic){return id(e,t,i.label,"metadata")}var im=e=>({time:e.startTime,value:JSON.parse(e.text)});function ip(e,t={label:iu}){let i=il(e,t.label,"metadata");return null!=i&&i.cues?Array.from(i.cues,e=>im(e)):[]}function iv(e,t={label:iu}){var i,a;let r=il(e,t.label,"metadata");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return im(r.activeCues[0]);let{currentTime:n}=e;return im(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=ic){return new Promise(i=>{tX(e,"loadstart",async()=>{let a=await ih(e,[],t);tX(e,"cuechange",()=>{let t=iv(e);if(t){let i=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var iE="chapters",ig=Object.freeze({label:iE}),iy=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function i_(e,t,i=ig){return id(e,t,i.label,"chapters")}function iT(e,t={label:iE}){var i;let a=il(e,t.label,"chapters");return null!=(i=null==a?void 0:a.cues)&&i.length?Array.from(a.cues,e=>iy(e)):[]}function iA(e,t={label:iE}){var i,a;let r=il(e,t.label,"chapters");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return iy(r.activeCues[0]);let{currentTime:n}=e;return iy(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function ik(e,t=ig){return new Promise(i=>{tX(e,"loadstart",async()=>{let a=await i_(e,[],t);tX(e,"cuechange",()=>{let t=iA(e);if(t){let i=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}function iw(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)}function iI(e,t){return t&&t.playingDate?t.playingDate:new Date("function"==typeof e.getStartDate?e.getStartDate().getTime()+1e3*e.currentTime:NaN)}var iS={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},iR=(e,t,i,a,r=!1,n=!(e=>null==(e=globalThis.navigator)?void 0:e.onLine)())=>{var s,o,l,d;let u,c;if(n){let i=t7("Your device appears to be offline",r),a=tV.MEDIA_ERR_NETWORK,n=new tV(i,a,!1,void 0);return n.errorCategory=t,n.muxCode=tB.NETWORK_OFFLINE,n.data=e,n}let h="status"in e?e.status:e.code,m=Date.now(),p=tV.MEDIA_ERR_NETWORK;if(200===h)return;let v=t$(t),b=(u=t$(t),c=`${u}Token`,null!=(l=i.tokens)&&l[u]?null==(d=i.tokens)?void 0:d[u]:tq(c,i)?i[c]:void 0),E=t===tH.VIDEO?iS.VIDEO:t===tH.DRM?iS.DRM:void 0,[g]=tJ(null!=(s=i.playbackId)?s:"");if(!h||!g)return;let f=t6(b);if(b&&!f){let i=new tV(t7("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:v}),p,!0,t7("Compact JWT string: {token}",r).format({token:b}));return i.errorCategory=t,i.muxCode=tB.NETWORK_TOKEN_MALFORMED,i.data=e,i}if(h>=500){let e=new tV("",p,null==a||a);return e.errorCategory=t,e.muxCode=tB.NETWORK_UNKNOWN_ERROR,e}if(403===h)if(f){if((({exp:e},t=Date.now())=>!e||1e3*e<t)(f,m)){let i={timeStyle:"medium",dateStyle:"medium"},a=new tV(t7("The videoâs secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:v}),p,!0,t7("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",i).format(null!=(o=f.exp)?o:0),currentDate:new Intl.DateTimeFormat("en",i).format(m)}));return a.errorCategory=t,a.muxCode=tB.NETWORK_TOKEN_EXPIRED,a.data=e,a}if((({sub:e},t)=>e!==t)(f,g)){let i=new tV(t7("The videoâs playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:v}),p,!0,t7("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:v,playbackId:g,tokenPlaybackId:f.sub}));return i.errorCategory=t,i.muxCode=tB.NETWORK_TOKEN_SUB_MISMATCH,i.data=e,i}if((({aud:e})=>!e)(f)){let i=new tV(t7("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:v}),p,!0,t7("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:v,expectedAud:E}));return i.errorCategory=t,i.muxCode=tB.NETWORK_TOKEN_AUD_MISSING,i.data=e,i}if((({aud:e},t)=>e!==t)(f,E)){let i=new tV(t7("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:v}),p,!0,t7("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:v,expectedAud:E,aud:f.aud}));return i.errorCategory=t,i.muxCode=tB.NETWORK_TOKEN_AUD_MISMATCH,i.data=e,i}}else{let i=new tV(t7("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:v,category:t}),p,null==a||a,t7("Specified playback ID: {playbackId}",r).format({playbackId:g}));return i.errorCategory=t,i.muxCode=tB.NETWORK_TOKEN_MISSING,i.data=e,i}if(412===h){let n=new tV(t7("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),p,null==a||a,t7("Specified playback ID: {playbackId}",r).format({playbackId:g}));return n.errorCategory=t,n.muxCode=tB.NETWORK_NOT_READY,n.streamType=i.streamType===tF.LIVE?"live":i.streamType===tF.ON_DEMAND?"on-demand":"unknown",n.data=e,n}if(404===h){let i=new tV(t7("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),p,null==a||a,t7("Specified playback ID: {playbackId}",r).format({playbackId:g}));return i.errorCategory=t,i.muxCode=tB.NETWORK_NOT_FOUND,i.data=e,i}
1if(400===h){let i=new tV(t7("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),p,null==a||a,t7("Specified playback ID: {playbackId}",r).format({playbackId:g}));return i.errorCategory=t,i.muxCode=tB.NETWORK_INVALID_URL,i.data=e,i}let y=new tV("",p,null==a||a);return y.errorCategory=t,y.muxCode=tB.NETWORK_UNKNOWN_ERROR,y.data=e,y},iC=tW.DefaultConfig.capLevelController,iL={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400},iD=class e extends iC{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=iL[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:iC.getMaxLevelByMediaSize(a,16/9*n,n)}};iD.minMaxResolution=720,iD.maxAutoResolution=new WeakMap;var iM,ix,iN,iO,iP,iU,iW=e=>new TextDecoder("utf-16le").decode(e).replace("skd://","").slice(1),iH="fairplay",iB=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g,i$=async(e,t)=>{if(t===tQ.MP4)return{streamType:tF.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 ((e,t)=>{let i,a=e.split(` 2`).find((e,t,i)=>t>0&&i[t-1].startsWith("#EXT-X-STREAM-INF"));if(!a)return Promise.reject(Error("No media playlist URL found in multivariant playlist"));if(t4(a)&&!t)return Promise.reject(Error("masterPlaylistUrl is required to resolve relative media playlist URL"));try{i=t5(a,t)}catch(e){return Promise.reject(e)}return fetch(i).then(e=>200!==e.status?Promise.reject(e):e.text())})(i,t.url);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(iB)].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=t1(n),o=t2(n),l;if(s===tF.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}},iV=async(e,t,i=t0({src:e}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:u}=await i$(e,i),c=null==u?void 0:u["com.apple.hls.chapters"];(null!=c&&c.URI||null!=c&&c.VALUE.toLocaleLowerCase().startsWith("http"))&&iq(null!=(a=c.URI)?a:c.VALUE,t),(null!=(r=iG.get(t))?r:{}).liveEdgeStartOffset=d,(null!=(n=iG.get(t))?n:{}).targetLiveWindow=l,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(s=iG.get(t))?s:{}).streamType=o,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},iq=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=iG.get(t))?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");t.dispatchEvent(o)}catch(e){console.error(e)}},iK=null!=(ix=null==(iM=null==globalThis?void 0:globalThis.navigator)?void 0:iM.userAgent)?ix:"",iF=null!=(iP=null==(iO=null==(iN=null==globalThis?void 0:globalThis.navigator)?void 0:iN.userAgentData)?void 0:iO.platform)?iP:"",iY=iK.toLowerCase().includes("android")||["x11","android"].some(e=>iF.toLowerCase().includes(e)),iG=new WeakMap,ij="mux.com",iQ=null==(iU=tW.isSupported)?void 0:iU.call(tW),iz=()=>{if("u">typeof window)return tO.utils.now()},iZ=tO.utils.generateUUID,iX=({playbackId:e,customDomain:t=ij,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=""]=tJ(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()},iJ=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},i0=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(/\.m3u8|\//);return t||void 0},i1=e=>{var t;return null==(t=iG.get(e))?void 0:t.error},i2=e=>{var t;return null==(t=iG.get(e))?void 0:t.metadata},i3=e=>{var t,i;return null!=(i=null==(t=iG.get(e))?void 0:t.streamType)?i:tF.UNKNOWN},i4=e=>{var t,i;return null!=(i=null==(t=iG.get(e))?void 0:t.targetLiveWindow)?i:NaN},i5=e=>{var t,i;return null!=(i=null==(t=iG.get(e))?void 0:t.seekable)?i:e.seekable},i9=e=>{var t;let i=null==(t=iG.get(e))?void 0:t.liveEdgeStartOffset;if("number"!=typeof i)return NaN;let a=i5(e);return a.length?a.end(a.length-1)-i:NaN},i8=e=>{var t;return null==(t=iG.get(e))?void 0:t.coreReference},i6=.034,i7=(e,t,i=i6)=>e>t||((e,t,i=i6)=>Math.abs(e-t)<=i)(e,t,i),ae=(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},at=(e,t)=>
4e.ended||e.loop?e.ended:!!(t&&ae(e,t))||((e,t=i6)=>e.paused&&i7(e.currentTime,e.duration,t))(e),ai=(e,t,i)=>{var a,r,n;aa(t,i,e);let{metadata:s={}}=e,{view_session_id:o=iZ()}=s,l=null!=(a=null==e?void 0:e.metadata)&&a.video_id?e.metadata.video_id:ah(e)&&null!=(n=null!=(r=iJ(e.playbackId))?r:i0(e.src))?n:e.src;s.view_session_id=o,s.video_id=l,e.metadata=s,e.drmTypeCb=e=>{var i;null==(i=t.mux)||i.emit("hb",{view_drm_type:e})},e.fallbackToWebkitFairplay=async()=>{var i;let a=!t.paused,r=t.currentTime;e.useWebkitFairplay=!0;let n=e.muxDataKeepSession;e.muxDataKeepSession=!0;let s=null==(i=iG.get(t))?void 0:i.coreReference;ai(e,t,s),e.muxDataKeepSession=n,e.useWebkitFairplay=!1,a&&await t.play().then(()=>{t.currentTime=r}).catch(()=>{}),t.currentTime=r},iG.set(t,{retryCount:0});let d=an(e,t),u=(({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 tX(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,u()},{once:!0}),d(e),d})(e,t,d);null!=e&&e.muxDataKeepSession&&null!=t&&t.mux&&!t.mux.deleted?d&&t.mux.addHLSJS({hlsjs:d,Hls:d?tW:void 0}):ap(e,t,d),av(e,t,d),ib(t),ik(t);let c=((e,t,i)=>{let{autoplay:a}=e,r=!1,n=!1,s=ii(a)?a:!!a,o=()=>{r||tX(t,"playing",()=>{r=!0},{once:!0})};if(o(),tX(t,"loadstart",()=>{r=!1,o(),ia(t,s)},{once:!0}),tX(t,"loadstart",()=>{i||(n=e.streamType&&e.streamType!==tF.UNKNOWN?e.streamType===tF.LIVE:!Number.isFinite(t.duration)),ia(t,s)},{once:!0}),i&&i.once(tW.Events.LEVEL_LOADED,(t,i)=>{var a;n=e.streamType&&e.streamType!==tF.UNKNOWN?e.streamType===tF.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&&tX(t,"play",()=>{"metadata"===t.preload?i.once(tW.Events.LEVEL_UPDATED,a):a()},{once:!0})}return e=>{r||ia(t,s=ii(e)?e:!!e)}})(e,t,d);((e,t,i)=>{let{minPreloadSegments:a}=e;if(null==a||a<=0||!i)return;let r=0,n=!1,s=t.playbackRate||1,o=()=>{0!==t.playbackRate&&(s=t.playbackRate,t.playbackRate=0)};t.playbackRate=0,tX(t,"ratechange",o);let l=(e,{frag:i})=>{n||"main"!==i.type||++r>=a&&(n=!0,t.removeEventListener("ratechange",o),t.playbackRate=s)};i.on(tW.Events.FRAG_BUFFERED,l),t.addEventListener("teardown",()=>{n||(n=!0,i.off(tW.Events.FRAG_BUFFERED,l),t.playbackRate=s)},{once:!0})})(e,t,d),((e,t)=>{let{initialEstimateSegments:i}=e;if(null==i||i<=0||!t)return;let a=0;t.on(tW.Events.FRAG_BUFFERED,(e,{frag:r})=>{"main"===r.type&&++a<i&&t.abrController.resetEstimator(t.config.abrEwmaDefaultEstimate)})})(e,d);let h={engine:d,setAutoplay:c,setPreload:u},m=iG.get(t);return m&&(m.coreReference=h),h},aa=(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",aE),e.removeEventListener("error",af),e.removeEventListener("durationchange",ab),iG.delete(e),e.dispatchEvent(new Event("teardown")))};function ar(e,t){var i;let a=t0(e);if(a!==tQ.M3U8)return!0;let r=!a||null==(i=t.canPlayType(a))||i,{preferPlayback:n}=e,s=n===tY.MSE,o=n===tY.NATIVE,l=iQ&&(s||iY||!(/^((?!chrome|android).)*safari/i.test(iK)&&t.canPlayType("application/vnd.apple.mpegurl")));return r&&(o||!l)}var an=(e,t)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l,initialBandwidthEstimateKbps:d}=e,u=t0(e)===tQ.M3U8,c=ar(e,t);if(u&&!c&&iQ){let u={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelOnFPSDrop:!0,...null!=d?{abrEwmaDefaultEstimate:1e3*d}:{}},c=as(a),h=ao(e),m=[tG.QUERY,tG.HEADER].includes(s)?{useHeaders:s===tG.HEADER,sessionId:null==n?void 0:n.view_session_id,contentId:null==n?void 0:n.video_id}:void 0,p=am(e,o),v=new tW({debug:i,startPosition:r,cmcd:m,xhrSetup:(e,t)=>{var i,a;if(s&&s!==tG.QUERY)return;let r=t5(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)},...u,...p,...c,...h,...o});
4return p.capLevelController===iD&&void 0!==l&&iD.setMaxAutoResolution(v,l),v.on(tW.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"))&&iq(null!=(r=null==n?void 0:n.URI)?r:null==n?void 0:n.VALUE,t)}),v}},as=e=>e===tF.LIVE?{backBufferLength:8}:{},ao=e=>{let{tokens:{drm:t}={},playbackId:i,drmTypeCb:a}=e,r=iJ(i);return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:au(e,"fairplay"),serverCertificateUrl:ac(e,"fairplay")},"com.widevine.alpha":{licenseUrl:au(e,"widevine")},"com.microsoft.playready":{licenseUrl:au(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.includes("fps")?iH:e.includes("playready")?"playready":e.includes("widevine")?"widevine":void 0;return null==a||a(i),t}))}:{}},al=async e=>{let t=await fetch(e);return 200!==t.status?Promise.reject(t):await t.arrayBuffer()},ad=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())},au=({playbackId:e,tokens:{drm:t}={},customDomain:i=ij},a)=>{let r=iJ(e);return`https://license.${i.toLocaleLowerCase().endsWith(ij)?i:ij}/license/${a}/${r}?token=${t}`},ac=({playbackId:e,tokens:{drm:t}={},customDomain:i=ij},a)=>{let r=iJ(e);return`https://license.${i.toLocaleLowerCase().endsWith(ij)?i:ij}/appcert/${a}/${r}?token=${t}`},ah=({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(ij)||!!i&&a.includes(i.toLocaleLowerCase())},am=(e,t)=>{let i={};return i.capLevelToPlayerSize=e.capRenditionToPlayerSize,null==i.capLevelToPlayerSize?(i.capLevelController=iD,i.capLevelToPlayerSize=!0):i.capLevelController=tU.CapLevelController,i},ap=(e,t,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=tO,muxDataSDKOptions:o={}}=e,l=ah(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?tW: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}})}},av=(e,t,i)=>{var a,r;let n=ar(e,t),{src:s,customDomain:o=ij}=e,l=()=>{t.ended||e.disablePseudoEnded||!at(t,i)||(ae(t,i)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},d,u,c=()=>{let e=i5(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(tX(t,"durationchange",c),t&&n){let i=t0(e);if("string"==typeof s){if(s.endsWith(".mp4")&&s.includes(o)){let e=i0(s);iq(new URL(`https://stream.${o}/${e}/metadata.json`).toString(),t)}let n=()=>{if(i3(t)!==tF.LIVE||Number.isFinite(t.duration))return;let e=setInterval(c,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),tX(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})},l=async()=>iV(s,t,i).then(n).catch(i=>{if(i instanceof Response){let a=iR(i,tH.VIDEO,e);if(a)return void ag(t,a)}});if("none"===t.preload){let e=()=>{l(),t.removeEventListener("loadedmetadata",i)},i=()=>{l(),t.removeEventListener("play",e)};tX(t,"play",e,{once:!0}),tX(t,"loadedmetadata",i,{once:!0})}else l();null!=(a=e.tokens)&&a.drm?((e,t)=>{let i={mediaEl:t,getAppCertificate:()=>al(ac(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=iR(t,tH.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)}),getLicenseKey:t=>ad(t,au(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=iR(t,tH.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 license key request"))}return Promise.reject(t)}),saveAndDispatchError:ag,drmTypeCb:()=>{var t;null==(t=e.drmTypeCb)||t.call(e,iH)}};if(e.useWebkitFairplay)(({mediaEl:e,getAppCertificate:t,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r})=>{if(!window.WebKitMediaKeys||!("onwebkitneedkey"in e)){console.error("No WebKitMediaKeys. FairPlay may not be supported");let t=new tV(t7("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tV.MEDIA_ERR_ENCRYPTED,!0);
4return t.errorCategory=tH.DRM,t.muxCode=tB.ENCRYPTED_CDM_ERROR,a(e,t),()=>{}}let n=t(),s=null,o=t=>{(async()=>{try{var i,r;let a,s,o,u,c,h,m,p;e.webkitKeys||l();let v=await n;if(null===t.initData||null==v)return;let b=(i=t.initData,r=v,a=function(e){let t=new ArrayBuffer(2*e.length),i=new DataView(t);for(let t=0;t<e.length;t++)i.setUint16(2*t,e.charCodeAt(t),!0);return t}(iW(i)),s=new Uint8Array(i),o=new Uint8Array(a),u=new Uint8Array(r),c=new Uint8Array(s.byteLength+4+u.byteLength+4+o.byteLength),h=0,m=e=>{c.set(e,h),h+=e.byteLength},p=e=>{let t=new DataView(c.buffer),i=e.byteLength;t.setUint32(h,i,!0),h+=4,m(e)},m(s),p(o),p(u),c);d(b)}catch(t){console.error("Could not start encrypted playback due to exception",t),a(e,t)}})()},l=()=>{try{let t=new WebKitMediaKeys("com.apple.fps.1_0");e.webkitSetMediaKeys(t),r()}catch{let e=new tV("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.",tV.MEDIA_ERR_ENCRYPTED,!0);throw e.errorCategory=tH.DRM,e.muxCode=tB.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,e}},d=t=>{let r=e.webkitKeys.createSession("application/vnd.apple.mpegurl",t),n=async t=>{try{let e=t.message,a=await i(e);r.update(a)}catch(t){console.error("Error on FairPlay session message",t),a(e,t)}},o=t=>{let i=t.target.error;if(!i)return;console.error(`Internal Webkit Key Session Error - sysCode: ${i.systemCode} code: ${i.code}`);let r=new tV(t7("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),tV.MEDIA_ERR_ENCRYPTED,!0);r.errorCategory=tH.DRM,r.muxCode=tB.ENCRYPTED_CDM_ERROR,a(e,r)},l=()=>{r.removeEventListener("webkitkeymessage",n),r.removeEventListener("webkitkeyerror",o),e.removeEventListener("teardown",l),"webkitCurrentPlaybackTargetIsWireless"in e&&e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",l),s=null;try{r.close()}catch{}};"webkitCurrentPlaybackTargetIsWireless"in e&&e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",l,{once:!0}),r.addEventListener("webkitkeymessage",n),r.addEventListener("webkitkeyerror",o),e.addEventListener("teardown",l),s=l},u=()=>{e.removeEventListener("webkitneedkey",o),e.removeEventListener("teardown",u),null==s||s();try{e.webkitSetMediaKeys(null)}catch{}};return e.addEventListener("webkitneedkey",o),e.addEventListener("teardown",u,{once:!0})})(i);else{let t=(({mediaEl:e,getAppCertificate:t,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r,fallbackToWebkitFairplay:n})=>{let s=null,o=async t=>{try{let i=t.initDataType;if("skd"!==i)return void console.error(`Received unexpected initialization data type "${i}"`);e.mediaKeys||await l(i);let a=t.initData;if(null==a)return void console.error(`Could not start encrypted playback due to missing initData in ${t.type} event`);await d(i,a)}catch(t){a(e,t);return}},l=async i=>{let n=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[i],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(e=>(r(),e)).catch(()=>{let t=new tV(t7("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tV.MEDIA_ERR_ENCRYPTED,!0);t.errorCategory=tH.DRM,t.muxCode=tB.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,a(e,t)});if(!n)return;let s=await n.createMediaKeys();try{let e=await t();await s.setServerCertificate(e).catch(()=>{let e=t7("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),t=new tV(e,tV.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tH.DRM,t.muxCode=tB.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(t)})}catch(t){a(e,t);return}await e.setMediaKeys(s)},d=async(t,r)=>{let o=e.mediaKeys.createSession(),l=async t=>{let r=t.message,n=await i(r);try{await o.update(n)}catch{let t=new tV(t7("Failed to update DRM license. This may be an issue with the player or your protected content."),tV.MEDIA_ERR_ENCRYPTED,!0);t.errorCategory=tH.DRM,t.muxCode=tB.ENCRYPTED_UPDATE_LICENSE_FAILED,a(e,t)}},d=()=>
4{o.keyStatuses.forEach(t=>{let i;"internal-error"===t?((i=new tV(t7("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),tV.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tH.DRM,i.muxCode=tB.ENCRYPTED_CDM_ERROR):("output-restricted"===t||"output-downscaled"===t)&&((i=new tV(t7("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tV.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tH.DRM,i.muxCode=tB.ENCRYPTED_OUTPUT_RESTRICTED),i&&a(e,i)})};o.addEventListener("keystatuseschange",d),o.addEventListener("message",l);let u=async()=>{o.removeEventListener("keystatuseschange",d),o.removeEventListener("message",l),"webkitCurrentPlaybackTargetIsWireless"in e&&e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",u),e.removeEventListener("teardown",u),await o.close().catch(e=>{console.warn("There was an error when closing EME session",e)}),s=null};"webkitCurrentPlaybackTargetIsWireless"in e&&e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",u,{once:!0}),e.addEventListener("teardown",u,{once:!0}),s=u,await o.generateRequest(t,r).catch(async t=>{if("NotSupportedError"===t.name&&"webkitCurrentPlaybackTargetIsWireless"in e&&e.webkitCurrentPlaybackTargetIsWireless)console.warn("Failed to generate a DRM license request. Attempting to fallback to Webkit DRM"),null==n||n();else{let e=new tV(t7("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tV.MEDIA_ERR_ENCRYPTED,!0);return e.errorCategory=tH.DRM,e.muxCode=tB.ENCRYPTED_GENERATE_REQUEST_FAILED,console.error("Failed to generate license request",t),Promise.reject(e)}})},u=async()=>{e.removeEventListener("encrypted",o),e.removeEventListener("teardown",u),s&&await s(),await e.setMediaKeys(null).catch(()=>{})};return e.addEventListener("encrypted",o),e.addEventListener("teardown",u,{once:!0}),u})({fallbackToWebkitFairplay:async()=>{var i;await t(),null==(i=e.fallbackToWebkitFairplay)||i.call(e)},...i})}})(e,t):tX(t,"encrypted",()=>{let e=new tV(t7("Attempting to play DRM-protected content without providing a DRM token."),tV.MEDIA_ERR_ENCRYPTED,!0);e.errorCategory=tH.DRM,e.muxCode=tB.ENCRYPTED_MISSING_TOKEN,ag(t,e)},{once:!0}),t.setAttribute("src",s),e.startTime&&((null!=(r=iG.get(t))?r:{}).startTime=e.startTime,t.addEventListener("durationchange",ab,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",aE),t.addEventListener("error",af),t.addEventListener("emptied",()=>{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),tX(t,"pause",l),tX(t,"seeked",l),tX(t,"play",()=>{t.ended||i7(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else{let a,r;i&&s?(i.once(tW.Events.LEVEL_LOADED,(e,a)=>{((e,t,i)=>{var a,r,n,s,o,l,d,u,c;let h,m,p,v,b,{streamType:E,targetLiveWindow:g,liveEdgeStartOffset:f,lowLatency:y}=(m=t1(h=e.type),p=t2(h),b=!!(null!=(c=e.partList)&&c.length),m===tF.LIVE&&(v=b?2*e.partTarget:3*e.targetduration),{streamType:m,targetLiveWindow:p,liveEdgeStartOffset:v,lowLatency:b});if(E===tF.LIVE){y?(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=iG.get(t))?o:{}).seekable=e}(null!=(l=iG.get(t))?l:{}).liveEdgeStartOffset=f,(null!=(d=iG.get(t))?d:{}).targetLiveWindow=g,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=iG.get(t))?u:{}).streamType=E,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))})(a.details,t,i),c(),i3(t)!==tF.LIVE||Number.isFinite(t.duration)||(i.on(tW.Events.LEVEL_UPDATED,c),tX(t,"durationchange",()=>{Number.isFinite(t.duration)&&i.off(tW.Events.LEVELS_UPDATED,c)}))}),i.on(tW.Events.ERROR,(a,r)=>{var n,s;let o=ay(r,e);if(o.muxCode===tB.NETWORK_NOT_READY){let e=null!=(n=iG.get(t))?n:{},a=null!=(s=e.retryCount)?s:0;if(a<6){let n=0===a?5e3:6e4,s=new tV(`Retrying in ${n/1e3} seconds...`,o.code,o.fatal);Object.assign(s,o),ag(t,s);let l=setTimeout(()=>{e.retryCount=a+1,"manifestLoadError"===r.details&&r.url&&i.loadSource(r.url)},n);t.addEventListener("teardown",()=>clearTimeout(l),{once:!0});return}{e.retryCount=0;let i=new tV('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),ag(t,i);return}}ag(t,o)}),i.on(tW.Events.MANIFEST_LOADED,()=>{let e=iG.get(t);e&&e.error&&(e.error=null,e.retryCount=0,t.dispatchEvent(new Event("emptied")),t.dispatchEvent(new Event("loadstart")))}),t.addEventListener("error",af),tX(t,"waiting",l),function(e,t){var i;if(!("videoTracks"in e))return;let a=new WeakMap;t.on(tW.Events.MANIFEST_PARSED,function(t,i){o();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(tW.Events.AUDIO_TRACKS_UPDATED,function(t,i){for(let t of(s(),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)}});let r=()=>{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)};e.audioTracks.addEventListener("change",r),t.on(tW.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)});let n=e=>{let i=e.target.selectedIndex;i!=t.nextLevel&&(t.nextLevel=i)};null==(i=e.videoRenditions)||i.addEventListener("change",n);let s=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},o=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),s()};t.once(tW.Events.DESTROYING,()=>{var t,i;o(),null==(t=e.audioTracks)||t.removeEventListener("change",r),null==(i=e.videoRenditions)||i.removeEventListener("change",n)})}(e,i),i.on(tW.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(e,{tracks:a})=>
4{a.forEach(e=>{var a,r;let n=null!=(a=e.subtitleTrack)?a:e.closedCaptions,s=i.subtitleTracks.findIndex(({lang:t,name:i,type:a})=>t==(null==n?void 0:n.lang)&&i===e.label&&a.toLowerCase()===e.kind),o=(null!=(r=e._id)?r:e.default)?"default":`${e.kind}${s}`;is(t,e.kind,e.label,null==n?void 0:n.lang,o,e.default)})}),a=()=>{if(!i.subtitleTracks.length)return;let e=Array.from(t.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind));if(!e)return;let a=i.subtitleTracks[i.subtitleTrack],r=a?a.default?"default":`${i.subtitleTracks[i.subtitleTrack].type.toLowerCase()}${i.subtitleTrack}`:void 0;if(i.subtitleTrack<0||(null==e?void 0:e.id)!==r){let t=i.subtitleTracks.findIndex(({lang:t,name:i,type:a,default:r})=>"default"===e.id&&r||t==e.language&&i===e.label&&a.toLowerCase()===e.kind);i.subtitleTrack=t}(null==e?void 0:e.id)===r&&e.cues&&Array.from(e.cues).forEach(t=>{e.addCue(t)})},t.textTracks.addEventListener("change",a),i.on(tW.Events.CUES_PARSED,(e,{track:i,cues:a})=>{let r=t.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")}),i.once(tW.Events.DESTROYING,()=>{t.textTracks.removeEventListener("change",a),t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})}),r=()=>
4{Array.from(t.textTracks).forEach(e=>{var i,a;if(!["subtitles","caption"].includes(e.kind)&&("thumbnails"===e.label||"chapters"===e.kind)){if(!(null!=(i=e.cues)&&i.length)){let i="track";e.kind&&(i+=`[kind="${e.kind}"]`),e.label&&(i+=`[label="${e.label}"]`);let r=t.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"!==e.mode&&(e.mode="hidden")}})},i.once(tW.Events.MANIFEST_LOADED,r),i.once(tW.Events.MEDIA_ATTACHED,r),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.")}};function ab(e){var t;let i=e.target,a=null==(t=iG.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 aE(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 tV(i,a);if(t.src&&a===tV.MEDIA_ERR_SRC_NOT_SUPPORTED&&t.readyState===HTMLMediaElement.HAVE_NOTHING)return void setTimeout(()=>{var e;let i=null!=(e=i1(t))?e:t.error;(null==i?void 0:i.code)===tV.MEDIA_ERR_SRC_NOT_SUPPORTED&&ag(t,r)},500);if(t.src&&(a!==tV.MEDIA_ERR_DECODE||void 0!==a))try{let{status:e}=await fetch(t.src);r.data={response:{code:e}}}catch{}ag(t,r)}function ag(e,t){var i;t.fatal&&((null!=(i=iG.get(e))?i:{}).error=t,e.dispatchEvent(new CustomEvent("error",{detail:t})))}function af(e){var t,i;if(!(e instanceof CustomEvent)||!(e.detail instanceof tV))return;let a=e.target,r=e.detail;r&&r.fatal&&((null!=(t=iG.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 ay=(e,t)=>{var i,a,r;e.fatal?console.error("getErrorFromHlsErrorData()",e):t.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",e);let n={[tW.ErrorTypes.NETWORK_ERROR]:tV.MEDIA_ERR_NETWORK,[tW.ErrorTypes.MEDIA_ERROR]:tV.MEDIA_ERR_DECODE,[tW.ErrorTypes.KEY_SYSTEM_ERROR]:tV.MEDIA_ERR_ENCRYPTED},s,o=[tW.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,tW.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(e.details)?tV.MEDIA_ERR_NETWORK:n[e.type];if(o===tV.MEDIA_ERR_NETWORK&&e.response){let r=null!=(i=e.type===tW.ErrorTypes.KEY_SYSTEM_ERROR?tH.DRM:e.type===tW.ErrorTypes.NETWORK_ERROR?tH.VIDEO:void 0)?i:tH.VIDEO;s=null!=(a=iR(e.response,r,t,e.fatal))?a:new tV("",o,e.fatal)}else o===tV.MEDIA_ERR_ENCRYPTED?e.details===tW.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE?((s=new tV(t7("Attempting to play DRM-protected content without providing a DRM token."),tV.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_MISSING_TOKEN):e.details===tW.ErrorDetails.KEY_SYSTEM_NO_ACCESS?((s=new tV(t7("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tV.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM):e.details===tW.ErrorDetails.KEY_SYSTEM_NO_SESSION?((s=new tV(t7("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tV.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_GENERATE_REQUEST_FAILED):e.details===tW.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED?((s=new tV(t7("Failed to update DRM license. This may be an issue with the player or your protected content."),tV.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_UPDATE_LICENSE_FAILED):e.details===tW.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED?((s=new tV(t7("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),tV.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_UPDATE_SERVER_CERT_FAILED):e.details===tW.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR?((s=new tV(t7("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),tV.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_CDM_ER
4ROR):e.details===tW.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED?((s=new tV(t7("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tV.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_OUTPUT_RESTRICTED):((s=new tV(e.error.message,tV.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tB.ENCRYPTED_ERROR):s=new tV("",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};e.s(["CmcdTypeValues",0,tj,"MaxResolution",0,{upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"},"MediaError",0,tV,"MinResolution",0,{noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},"MuxErrorCategory",0,tH,"MuxErrorCode",0,tB,"MuxJWTAud",0,iS,"PlaybackTypes",0,tY,"RenditionOrder",0,{DESCENDING:"desc"},"StreamTypes",0,tF,"addChapters",0,i_,"addCuePoints",0,ih,"addTextTrack",0,is,"errorCategoryToTokenNameOrPrefix",0,t$,"generatePlayerInitTime",0,iz,"getActiveChapter",0,iA,"getActiveCuePoint",0,iv,"getChapters",0,iT,"getCoreReference",0,i8,"getCuePoints",0,ip,"getCurrentPdt",0,iI,"getEnded",0,at,"getError",0,i1,"getLiveEdgeStart",0,i9,"getMetadata",0,i2,"getSeekable",0,i5,"getStartDate",0,iw,"getStreamType",0,i3,"getTargetLiveWindow",0,i4,"i18n",0,t7,"initialize",0,ai,"parseJwt",0,t6,"removeTextTrack",0,io,"teardown",0,aa,"toMuxVideoURL",0,iX,"toPlaybackIdFromSrc",0,i0,"toPlaybackIdParts",0,tJ],32655);var a_,aT,aA,ak,aw,aI,aS,aR,aC,aL,aD,aM,ax,aN,aO=e.i(34614),aP=e=>{throw TypeError(e)},aU=(e,t,i)=>t.has(e)||aP("Cannot "+i),aW=(e,t,i)=>(aU(e,t,"read from private field"),i?i.call(e):t.get(e)),aH=(e,t,i)=>t.has(e)?aP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),aB=(e,t,i,a)=>(aU(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),a$=(e,t,i)=>(aU(e,t,"access private method"),i),aV=(()=>{try{return"0.31.0"}catch{}return"UNKNOWN"})(),aq=` 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>`,aK={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",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size",INITIAL_BANDWIDTH_ESTIMATE_KBPS:"initial-bandwidth-estimate-kbps",INITIAL_ESTIMATE_SEGMENTS:"initial-estimate-segments",MIN_PRELOAD_SEGMENTS:"min-preload-segments"},aF=Object.values(aK),aY="mux-video",aG=class extends aO.CustomVideoElement{constructor(){super(),aH(this,aD),aH(this,a_),aH(this,aT),aH(this,aA,{}),aH(this,ak,{}),aH(this,aw),aH(this,aI),aH(this,aS),aH(this,aR),aH(this,aC,""),aH(this,aL,e=>{var t;let i=i2(this.nativeEl),a=null!=(t=this.metadata)?t:{};this.metadata={...i,...a},(null==i?void 0:i["com.mux.video.branding"])==="mux-free-plan"&&(aB(this,aC,"default"),this.updateLogo())}),aH(this,ax),aB(this,aT,iz())}static get NAME(){return aY}static get VERSION(){return aV}static get observedAttributes(){var e;return[...aF,...null!=(e=aO.CustomVideoElement.observedAttributes)?e:[]]}static getLogoHTML(e){return e&&"false"!==e?"default"===e?aq:`<img part="logo" src="${e}" />`:""}static getTemplateHTML(e={}){var t;return` 15 ${aO.CustomVideoElement.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[aK.LOGO])?t:"")} 41 </slot> 42 `}get preferCmcd(){var e;return null!=(e=this.getAttribute(aK.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tj.includes(e)?this.setAttribute(aK.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${tj.join()}`):this.removeAttribute(aK.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(aK.PLAYER_INIT_TIME)?+this.getAttribute(aK.PLAYER_INIT_TIME):aW(this,aT)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aK.PLAYER_INIT_TIME):this.setAttribute(aK.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=aW(this,aS))?e:aY}set playerSoftwareName(e){aB(this,aS,e)}get playerSoftwareVersion(){var e;return null!=(e=aW(this,aI))?e:aV}set playerSoftwareVersion(e){aB(this,aI,e)}
42get _hls(){var e;return null==(e=aW(this,aD,aM))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=i1(this.nativeEl))?e:null}get errorTranslator(){return aW(this,aR)}set errorTranslator(e){aB(this,aR,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(aK.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(aK.TYPE,e):this.removeAttribute(aK.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(aK.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(aK.DEBUG,""):this.removeAttribute(aK.DEBUG))}get disableTracking(){return this.hasAttribute(aK.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(aK.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(aK.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(aK.DISABLE_COOKIES,""):this.removeAttribute(aK.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(aK.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(aK.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(aK.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(aK.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(aK.START_TIME):this.setAttribute(aK.START_TIME,`${e}`))}get initialBandwidthEstimateKbps(){let e=this.getAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set initialBandwidthEstimateKbps(e){e!==this.initialBandwidthEstimateKbps&&(null==e?this.removeAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS,`${e}`))}get initialEstimateSegments(){let e=this.getAttribute(aK.INITIAL_ESTIMATE_SEGMENTS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set initialEstimateSegments(e){e!==this.initialEstimateSegments&&(null==e?this.removeAttribute(aK.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(aK.INITIAL_ESTIMATE_SEGMENTS,`${e}`))}get minPreloadSegments(){let e=this.getAttribute(aK.MIN_PRELOAD_SEGMENTS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set minPreloadSegments(e){e!==this.minPreloadSegments&&(null==e?this.removeAttribute(aK.MIN_PRELOAD_SEGMENTS):this.setAttribute(aK.MIN_PRELOAD_SEGMENTS,`${e}`))}get playbackId(){var e;return this.hasAttribute(aK.PLAYBACK_ID)?this.getAttribute(aK.PLAYBACK_ID):null!=(e=i0(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(aK.PLAYBACK_ID,e):this.removeAttribute(aK.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aK.MAX_RESOLUTION,e):this.removeAttribute(aK.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aK.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aK.MIN_RESOLUTION,e):this.removeAttribute(aK.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(aK.MAX_AUTO_RESOLUTION):this.setAttribute(aK.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(aK.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aK.RENDITION_ORDER,e):this.removeAttribute(aK.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(aK.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(aK.PROGRAM_START_TIME):this.setAttribute(aK.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(aK.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(aK.PROGRAM_END_TIME):this.setAttribute(aK.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(aK.ASSET_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetStartTime(e){null==e?this.removeAttribute(aK.ASSET_START_TIME):this.setAttribute(aK.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(aK.ASSET_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetEndTime(e){null==e?this.removeAttribute(aK.ASSET_END_TIME):this.setAttribute(aK.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(aK.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aK.CUSTOM_DOMAIN,e):this.removeAttribute(aK.CUSTOM_DOMAIN))}get capRenditionToPlayerSize(){var e;return(null==(e=this._hlsConfig)?void 0:e.capLevelToPlayerSize)!=null?this._hlsConfig.capLevelToPlayerSize:aW(this,ax)}set capRenditionToPlayerSize(e){aB(this,ax,e)}get drmToken(){var e;return null!=(e=this.getAttribute(aK.DRM_TOKEN))?e:void 0}
42set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(aK.DRM_TOKEN,e):this.removeAttribute(aK.DRM_TOKEN))}get playbackToken(){var e,t,i,a;if(this.hasAttribute(aK.PLAYBACK_TOKEN))return null!=(e=this.getAttribute(aK.PLAYBACK_TOKEN))?e:void 0;if(this.hasAttribute(aK.PLAYBACK_ID)){let[,e]=tJ(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(aK.PLAYBACK_TOKEN,e):this.removeAttribute(aK.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(aK.PLAYBACK_TOKEN),t=this.getAttribute(aK.DRM_TOKEN);return{...aW(this,ak),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{}}}set tokens(e){aB(this,ak,null!=e?e:{})}get ended(){return at(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(aK.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(aK.ENV_KEY,e):this.removeAttribute(aK.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aK.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aK.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aK.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(aK.STREAM_TYPE))?e:i3(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(aK.STREAM_TYPE,e):this.removeAttribute(aK.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(aK.TARGET_LIVE_WINDOW)?+this.getAttribute(aK.TARGET_LIVE_WINDOW):i4(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(aK.TARGET_LIVE_WINDOW):this.setAttribute(aK.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,t;if(this.hasAttribute(aK.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 i9(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(aK.LIVE_EDGE_OFFSET))return+this.getAttribute(aK.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(null==e?this.removeAttribute(aK.LIVE_EDGE_OFFSET):this.setAttribute(aK.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return i5(this.nativeEl)}async addCuePoints(e){return ih(this.nativeEl,e)}get activeCuePoint(){return iv(this.nativeEl)}get cuePoints(){return ip(this.nativeEl)}async addChapters(e){return i_(this.nativeEl,e)}get activeChapter(){return iA(this.nativeEl)}get chapters(){return iT(this.nativeEl)}getStartDate(){return iw(this.nativeEl,this._hls)}get currentPdt(){return iI(this.nativeEl,this._hls)}get preferPlayback(){let e=this.getAttribute(aK.PREFER_PLAYBACK);if(e===tY.MSE||e===tY.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tY.MSE||e===tY.NATIVE?this.setAttribute(aK.PREFER_PLAYBACK,e):this.removeAttribute(aK.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![aK.METADATA_URL].includes(e)).reduce((e,t)=>{let i=this.getAttribute(t);return null!=i&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=i),e},{}),...aW(this,aA)}}set metadata(e){aB(this,aA,null!=e?e:{}),this.mux&&this.mux.emit("hb",aW(this,aA))}get _hlsConfig(){return aW(this,aw)}set _hlsConfig(e){aB(this,aw,e)}get logo(){var e;return null!=(e=this.getAttribute(aK.LOGO))?e:aW(this,aC)}set logo(e){e?this.setAttribute(aK.LOGO,e):this.removeAttribute(aK.LOGO)}load(){ai(this,this.nativeEl,aW(this,aD,aM))}unload(){aa(this.nativeEl,aW(this,aD,aM),this)}attributeChangedCallback(e,t,i){var a,r;switch(aO.CustomVideoElement.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,i),e){case aK.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=i?i:void 0;break;case aK.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=i?i:void 0;break;case"src":{let e=!!t,a=!!i;!e&&a?a$(this,aD,aN).call(this):e&&!a?this.unload():e&&a&&(this.unload(),a$(this,aD,aN).call(this));break}
42case"autoplay":if(i===t)break;null==(a=aW(this,aD,aM))||a.setAutoplay(this.autoplay);break;case"preload":if(i===t)break;null==(r=aW(this,aD,aM))||r.setPreload(i);break;case aK.PLAYBACK_ID:case aK.CUSTOM_DOMAIN:case aK.MAX_RESOLUTION:case aK.MIN_RESOLUTION:case aK.RENDITION_ORDER:case aK.PROGRAM_START_TIME:case aK.PROGRAM_END_TIME:case aK.ASSET_START_TIME:case aK.ASSET_END_TIME:case aK.PLAYBACK_TOKEN:this.src=iX(this);break;case aK.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 aK.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 aK.STREAM_TYPE:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case aK.TARGET_LIVE_WINDOW:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case aK.LOGO:(null==i||i!==t)&&this.updateLogo();break;case aK.DISABLE_TRACKING:if(null==i||i!==t){let e=this.currentTime,t=this.paused;this.unload(),a$(this,aD,aN).call(this).then(()=>{this.currentTime=e,t||this.play()})}break;case aK.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=/"))});break;case aK.CAP_RENDITION_TO_PLAYER_SIZE:(null==i||i!==t)&&(this.capRenditionToPlayerSize=null!=i||void 0)}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');e&&(e.innerHTML=this.constructor.getLogoHTML(aW(this,aC)||this.logo))}connectedCallback(){var e,t;null==(e=super.connectedCallback)||e.call(this),null==(t=this.nativeEl)||t.addEventListener("muxmetadata",aW(this,aL)),this.nativeEl&&this.src&&!aW(this,aD,aM)&&a$(this,aD,aN).call(this)}disconnectedCallback(){var e,t;null==(e=this.nativeEl)||e.removeEventListener("muxmetadata",aW(this,aL)),this.unload(),null==(t=super.disconnectedCallback)||t.call(this)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};a_=new WeakMap,aT=new WeakMap,aA=new WeakMap,ak=new WeakMap,aw=new WeakMap,aI=new WeakMap,aS=new WeakMap,aR=new WeakMap,aC=new WeakMap,aL=new WeakMap,aD=new WeakSet,aM=function(){return i8(this.nativeEl)},ax=new WeakMap,aN=async function(){aW(this,a_)||(await aB(this,a_,Promise.resolve()),aB(this,a_,null),this.load())};let aj=new WeakMap;class aQ extends Error{}class az extends Error{}let aZ=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function aX(){return globalThis.cast?.framework?.CastContext.getInstance()}function aJ(){return aX()?.getCurrentSession()}function a0(){return aJ()?.getSessionObj().media[0]}function a1(e){return aX().setOptions({...a2(),...e})}function a2(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}function a3(e){if(!e)return;let t=e.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);return t?t[1]:null}function a4(e){let t=e.split("\n").find(e=>!e.trim().startsWith("#")&&""!==e.trim());return t?.trim()}async function a5(e){if(!e)return!1;if(/\.m3u8?(\?.*)?$/i.test(e))return!0;if(e.startsWith("blob:"))return!1;try{let t=(await fetch(e,{method:"HEAD"})).headers.get("Content-Type");return aZ.some(e=>t===e)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function a9(e){if(!e||e.startsWith("blob:"))return{videoFormat:void 0,audioFormat:void 0};try{let t=await (await fetch(e)).text(),i=t,a=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}(t);if(a.length>0){let t=new URL(a[0],e).toString();i=await (await fetch(t)).text()}let r=a4(i),n=a3(r),s=function(e){for(let t of e.split("\n")){let e=t.trim();if(e.startsWith("#EXT-X-MEDIA")&&/TYPE=AUDIO/i.test(e)){let t=e.match(/URI="([^"]+)"/i);if(t)return t[1]}}}(t),o=n;if(s)try{let t=new URL(s,e).toString(),i=await (await fetch(t)).text(),a=a4(i);o=a3(a)??n}catch(e){console.error("Error while trying to parse the audio rendition playlist",e)}return{videoFormat:n,audioFormat:o}}catch(e){return console.error("Error while trying to parse the manifest playlist",e),{videoFormat:void 0,audioFormat:void 0}}}let a8=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),a6=new WeakSet;rd=()=>{globalThis.chrome?.cast?.isAvailable?t||(t=cast.framework,aX().addEventListener(t.CastContextEventType.CAST_STATE_CHANGED,e=>{a8.forEach(t=>aj.get(t).onCastStateChanged?.(e))}),aX().addEventListener(t.CastContextEventType.SESSION_STATE_CHANGED,e=>{a8.forEach(t=>aj.get(t).onSessionStateChanged?.(e))}
42),a8.forEach(e=>aj.get(e).init?.())):console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable)},globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?rd():customElements.whenDefined("google-cast-button").then(rd):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(rd)};let a7=0;class re extends EventTarget{#e;#t;#i;#a;#r="disconnected";#n=!1;#s=new Set;#o=new WeakMap;#l=()=>this.#d();constructor(e){super(),this.#e=e,a8.add(this),aj.set(this,{init:()=>this.#u(),onCastStateChanged:()=>this.#c(),onSessionStateChanged:()=>this.#h(),getCastPlayer:()=>this.#m}),this.#u()}destroy(){this.#e?.textTracks?.removeEventListener("change",this.#l),this.#a&&this.#i?.controller&&Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.removeEventListener(e,t)}),this.#e&&a6.delete(this.#e),this.#t=!1}get #m(){if(a6.has(this.#e))return this.#i}get state(){return this.#r}async watchAvailability(e){if(this.#e.disableRemotePlayback)throw new aQ("disableRemotePlayback attribute is present.");return this.#o.set(e,++a7),this.#s.add(e),queueMicrotask(()=>e(this.#p())),a7}async cancelWatchAvailability(e){if(this.#e.disableRemotePlayback)throw new aQ("disableRemotePlayback attribute is present.");e?this.#s.delete(e):this.#s.clear()}async prompt(){if(this.#e.disableRemotePlayback)throw new aQ("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new az("The RemotePlayback API is disabled on this platform.");let e=a6.has(this.#e);a6.add(this.#e),a1(this.#e.castOptions),Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.addEventListener(e,t)});try{await aX().requestSession()}catch(t){if(e||a6.delete(this.#e),"cancel"===t)return;throw Error(t)}aj.get(this.#e)?.loadOnPrompt?.()}#v(){a6.has(this.#e)&&(Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.removeEventListener(e,t)}),a6.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())}#p(){let e=aX()?.getCastState();return e&&"NO_DEVICES_AVAILABLE"!==e}#c(){let e=aX().getCastState();if(a6.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 #h(){let{SESSION_RESUMED:e}=t.SessionState;if(aX().getSessionState()===e&&this.#e.castSrc===a0()?.media.contentId){a6.add(this.#e),Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.addEventListener(e,t)});try{var i;await (i=new chrome.cast.media.GetStatusRequest,new Promise((e,t)=>{a0().getStatus(i,e,t)}))}catch(e){console.error(e)}this.#a[t.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#a[t.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#u(){t&&!this.#t&&(this.#t=!0,a1(this.#e.castOptions),this.#e.textTracks.addEventListener("change",this.#l),this.#c(),this.#i=new t.RemotePlayer,new t.RemotePlayerController(this.#i),this.#a={[t.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{!0===e?(this.#r="connected",this.dispatchEvent(new Event("connect"))):(this.#v(),this.#r="disconnected",this.dispatchEvent(new Event("disconnect")))},[t.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#e.dispatchEvent(new Event("durationchange"))},[t.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#e.dispatchEvent(new Event("volumechange"))},[t.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#e.dispatchEvent(new Event("volumechange"))},[t.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#m?.isMediaLoaded&&this.#e.dispatchEvent(new Event("timeupdate"))},[t.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#e.dispatchEvent(new Event("resize"))},[t.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#e.dispatchEvent(new Event(this.paused?"pause":"play"))},[t.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#m?.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.#m?.playerState]))},[t.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#m?.isMediaLoaded&&(await Promise.resolve(),this.#b())}})}#b(){this.#d()}async #d(){let e;if(!this.#m)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=aJ()?.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)=>{a0().editTracksInfo(e,t,i)})}catch(e){console.error(e)}}}let rt=e=>class extends e{static observedAttributes=[...e.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#E={paused:!1};#g=a2();#f;#y;get remote(){if(this.#y)return this.#y;if(globalThis.chrome){if(!this.isConnected)return;return 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)}(),aj.set(this,{loadOnPrompt:()=>this.#_()}),this.#y=new re(this)}return super.remote}get #m(){return aj.get(this.#y)?.getCastPlayer?.()}disconnectedCallback(){this.#y?.destroy(),this.#y=null,aj.delete(this),super.disconnectedCallback?.()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"cast-receiver"===e&&i){this.#g.receiverApplicationId=i;return}if(this.#m)switch(e){case"cast-stream-type":case"cast-src":this.load()}}
42async #_(){this.#E.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(e){console.error(e)}}async load(){if(!this.#m)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}],await a5(this.castSrc)){e.contentType||(e.contentType="application/x-mpegURL");let{videoFormat:t,audioFormat:i}=await a9(this.castSrc);t?.includes("m4s")||t?.includes("mp4")||t?.includes("m4a")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):i?.includes("aac")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.AAC,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.MPEG2_TS):(t?.includes("ts")||i?.includes("ts"))&&(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.MPEG2_TS)}let r=new chrome.cast.media.LoadRequest(e);r.currentTime=super.currentTime??0,r.autoplay=!this.#E.paused,r.activeTrackIds=i,await aJ()?.loadMedia(r),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#m){this.#m.isPaused&&this.#m.controller?.playOrPause();return}return super.play()}pause(){if(this.#m){this.#m.isPaused||this.#m.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#g}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){let e=this.currentSrc,t=e?.startsWith("blob:")?void 0:e;return this.getAttribute("cast-src")??this.querySelector("source")?.src??t??this.getAttribute("src")??void 0}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.#f}set castCustomData(e){let t=typeof e;["object","undefined"].includes(t)?this.#f=e:console.error(`castCustomData must be nullish or an object but value was of type ${t}`)}get readyState(){if(this.#m)switch(this.#m.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.#m?this.#m.isPaused:super.paused}get muted(){return this.#m?this.#m?.isMuted:super.muted}set muted(e){if(this.#m){(e&&!this.#m.isMuted||!e&&this.#m.isMuted)&&this.#m.controller?.muteOr
42Unmute();return}super.muted=e}get volume(){return this.#m?this.#m?.volumeLevel??1:super.volume}set volume(e){if(this.#m){this.#m.volumeLevel=+e,this.#m.controller?.setVolumeLevel();return}super.volume=e}get duration(){return this.#m&&this.#m?.isMediaLoaded?this.#m?.duration??NaN:super.duration}get currentTime(){return this.#m&&this.#m?.isMediaLoaded?this.#m?.currentTime??0:super.currentTime}set currentTime(e){if(this.#m){this.#m.currentTime=e,this.#m.controller?.seek();return}super.currentTime=e}};e.i(91205);var ri=e.i(7180),ra=e=>{throw TypeError(e)},rr=(e,t,i)=>t.has(e)||ra("Cannot "+i),rn=(e,t,i)=>(rr(e,t,"read from private field"),i?i.call(e):t.get(e)),rs=(e,t,i)=>t.has(e)?ra("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),ro=(e,t,i,a)=>(rr(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rl=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};"u"<typeof DocumentFragment&&(globalThis.DocumentFragment=class extends rl{});var rd,ru,rc=class extends rl{},rh=class{constructor(e,t={}){rs(this,ru),ro(this,ru,null==t?void 0:t.detail)}get detail(){return rn(this,ru)}initCustomEvent(){}};ru=new WeakMap;var rm={document:{createElement:function(e,t){return new rc}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(rc)},CustomEvent:rh,EventTarget:rl,HTMLElement:rc,HTMLVideoElement:class extends rl{}},rp="u"<typeof window||void 0===globalThis.customElements,rv=rp?rm:globalThis;rp&&rm.document;var rb,rE=class extends rt((0,ri.MediaTracksMixin)(aG)){constructor(){super(...arguments),rs(this,rb)}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=rn(this,rb))?e:this.muxCastCustomData}set castCustomData(e){ro(this,rb,e)}};rb=new WeakMap,rv.customElements.get("mux-video")||(rv.customElements.define("mux-video",rE),rv.MuxVideoElement=rE);let rg={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"},rf={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},ry={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"},r_=Object.entries(ry),rT=r_.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),rA=r_.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),rk=Object.entries(rA).reduce((e,[t,i])=>{let a=rT[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"}),rw=Object.entries(rT).reduce((e,[t,i])=>{let a=rA[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),rI={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},rS={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"},rR={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},rC={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},rL={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},rD={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};function rM(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function rx(e){if(e){let[t,i,a]=e.split(":");return{id:t,width:+i,height:+a}}}function rN(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function rO(e){if(e){let[t,i,a,r]=e.split(":");return{id:t,kind:i,language:a,label:r}}}function rP(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function rU(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}e.s(["AttributeToStateChangeEventMap",0,rw,"AvailabilityStates",0,rC,"MediaStateChangeEvents",0,rA,"MediaStateReceiverAttributes",0,rf,"MediaUIAttributes",0,rT,"MediaUIEvents",0,rg,"MediaUIProps",0,ry,"PointerTypes",0,rR,"ReadyStates",0,{HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},"StateChangeEventToAttributeMap",0,rk,"StreamTypes",0,rL,"TextTrackKinds",0,rI,"TextTrackModes",0,rS,"VolumeLevels",0,{HIGH:"high",MEDIUM:"medium",LOW:"low",OFF:"off"},"WebkitPresentationModes",0,rD],92617),e.i(92617);let rW=e=>new Promise(t=>setTimeout(t,e)),rH={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.",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds","{time} remaining":"{time} remaining","{currentTime} of {totalTime}":"{currentTime} of {totalTime}","video not loaded, unknown time.":"video not loaded, unknown time."}},rB=(null==(uW=globalThis.navigator)?void 0:uW.language)||"en",r$=(e,t={})=>(e=>{var t,i,a;let[r]=rB.split("-");return(null==(t=rH[rB])?void 0:t[e])||(null==(i=rH[r])?void 0:i[e])||(null==(a=rH.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`),rV=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],rq=e=>{if(!rP(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)=>{let i;return e&&(i=1===e?r$(rV[t].singular):r$(rV[t].plural),`${e} ${i}`)}).filter(e=>e).join(", ");return i?r$("{time} remaining",{time:r}):r};function rK(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)}let rF=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}});e.s(["emptyTimeRanges",0,rF,"formatAsTimePhrase",0,rq,"formatTime",0,rK,"serializeTimeRanges",0,function(e=rF){return Array.from(e).map((t,i)=>[Number(e.start(i).toFixed(3)),Number(e.end(i).toFixed(3))].join(":")).join(" ")}],38333),e.i(38333);class rY{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class rG extends rY{}class rj extends rG{constructor(){super(...arguments),this.role=null}}let rQ={createElement:function(){return new rz.HTMLElement},createElementNS:function(){return new rz.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},rz={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:rQ,Node:rG,Element:rj,HTMLElement:class extends rj{constructor(){super(...arguments),this.innerHTML=""}get content(){return new rz.DocumentFragment}},DocumentFragment:class extends rY{},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}}}}},rZ="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"u"<typeof window||void 0===window.customElements,rX=Object.keys(rz).every(e=>e in globalThis),rJ=rZ&&!rX?rz:globalThis,r0=rZ&&!rX?rQ:globalThis.document,r1=new WeakMap,r2=e=>{let t=r1.get(e);return t||r1.set(e,t=new Set),t},r3=new rJ.ResizeObserver(e=>{for(let t of e)for(let e of r2(t.target))e(t)});function r4(e,t){r2(e).add(t),r3.observe(e)}function r5(e,t){let i=r2(e);i.delete(t),i.size||r3.unobserve(e)}function r9(e){let t={};for(let i of e)t[i.name]=i.value;return t}function r8(e){var t;return null!=(t=r6(e))?t:ni(e,"media-controller")}function r6(e){var t;let{MEDIA_CONTROLLER:i}=rf,a=e.getAttribute(i);if(a)return null==(t=nr(e))?void 0:t.getElementById(a)}let r7=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},ne=(e,t)=>{let i,a;return(i=`slot[name="${t}"]`,!(a=e.shadowRoot.querySelector(i))?[]:a.children)[0]},nt=(e,t)=>
42!!e&&!!t&&(null!=e&&!!e.contains(t)||nt(e,t.getRootNode().host)),ni=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||ni(e.getRootNode().host,t)};function na(e=document){var t;let i=null==e?void 0:e.activeElement;return i?null!=(t=na(i.shadowRoot))?t:i:null}function nr(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 nn(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 ns(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||no(e,t)}function no(e,t){var i,a;let r=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],n=null==r?void 0:r[r.length-1];if(!(null==n?void 0:n.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};let s=null==n?void 0:n.sheet.insertRule(`${t}{}`,n.sheet.cssRules.length);return null==(a=n.sheet.cssRules)?void 0:a[s]}function nl(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function nd(e,t,i){let a=+i;if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}nl(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function nu(e,t){return e.hasAttribute(t)}function nc(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}nu(e,t)!=i&&e.toggleAttribute(t,i)}function nh(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function nm(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;nh(e,t,void 0)!==a&&e.setAttribute(t,a)}var np=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nv=(e,t,i)=>(np(e,t,"read from private field"),i?i.call(e):t.get(e)),nb=(e,t,i,a)=>(np(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);
42class nE extends rJ.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,uH,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rf.MEDIA_CONTROLLER,rT.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rf.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=nv(this,uH))?void 0:a.unassociateElement)||r.call(a,this),nb(this,uH,null)),i&&this.isConnected&&(nb(this,uH,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=nv(this,uH))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i,a;let r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),nb(this,uH,(i=this,(r=i.getAttribute(rf.MEDIA_CONTROLLER))?null==(a=i.getRootNode())?void 0:a.getElementById(r):ni(i,"media-controller"))),this.getAttribute(rf.MEDIA_CONTROLLER)&&(null==(t=null==(e=nv(this,uH))?void 0:e.associateElement)||t.call(e,this)),nv(this,uH)&&(nv(this,uH).addEventListener("pointerdown",this),nv(this,uH).addEventListener("click",this),nv(this,uH).hasAttribute("tabindex")||(nv(this,uH).tabIndex=0))}disconnectedCallback(){var e,t,i,a;this.getAttribute(rf.MEDIA_CONTROLLER)&&(null==(t=null==(e=nv(this,uH))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=nv(this,uH))||i.removeEventListener("pointerdown",this),null==(a=nv(this,uH))||a.removeEventListener("click",this),nb(this,uH,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===rR.TOUCH)return void this.handleTap(e);if(d===rR.MOUSE||d===rR.PEN)return void this.handleMouseClick(e)}}}get mediaPaused(){return nu(this,rT.MEDIA_PAUSED)}set mediaPaused(e){nc(this,rT.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?rg.MEDIA_PLAY_REQUEST:rg.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new rJ.CustomEvent(t,{composed:!0,bubbles:!0}))}}uH=new WeakMap,nE.shadowRootOptions={mode:"open"},nE.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 `},rJ.customElements.get("media-gesture-receiver")||rJ.customElements.define("media-gesture-receiver",nE);var ng=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nf=(e,t,i)=>(ng(e,t,"read from private field"),i?i.call(e):t.get(e)),ny=(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)},n_=(e,t,i,a)=>(ng(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nT=(e,t,i)=>(ng(e,t,"access private method"),i);let nA="audio",nk="autohide",nw="breakpoints",nI="gesturesdisabled",nS="keyboardcontrol",nR="noautohide",nC="userinactive",nL="autohideovercontrols",nD=Object.values(rT);function nM(e,t){var i,a,r;if(!e.isConnected)return;let n=Object.fromEntries((null!=(i=e.getAttribute(nw))?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;if(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(rA.BREAKPOINTS_CHANGE,{detail:s});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(rA.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class nx extends rJ.HTMLElement{constructor(){if(super(),ny(this,uj),ny(this,uz),ny(this,uX),ny(this,u0),ny(this,u2),ny(this,uB,void 0),ny(this,u$,0),ny(this,uV,null),ny(this,uq,null),ny(this,uK,void 0),this.breakpointsComputed=!1,ny(this,uF,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)}}),ny(this,uY,!1),ny(this,uG,e=>{nf(this,uY)||(setTimeout(()=>{nM(e.target,e.contentRect.width),n_(this,uY,!1)},0),n_(this,uY,!0))}),ny(this,u4,void 0),ny(this,u5,()=>{if(!nf(this,u4).assignedElements({flatten:!0}).length){nf(this,uV)&&this.mediaUnsetCallback(nf(this,uV));return}this.handleMediaUpdated(this.media)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}n_(this,uB,new MutationObserver(nf(this,uF)))}static get observedAttributes(){return[nk,nI].concat(nD).filter(e=>![rT.MEDIA_RENDITION_LIST,rT.MEDIA_AUDIO_TRACK_LIST,rT.MEDIA_CHAPTERS_CUES,rT.MEDIA_WIDTH,rT.MEDIA_HEIGHT,rT.MEDIA_ERROR,rT.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==nk&&(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&&(n_(this,uV,e),e.localName.includes("-")&&await rJ.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;nf(this,uB).observe(this,{childList:!0,subtree:!0}),r4(this,nf(this,uG));let t=null!=this.getAttribute(nA)?r$("audio player"):r$("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(nC,""),nM(this,this.getBoundingClientRect().width);let i=this.querySelector(":scope > slot[slot=media]");i&&(n_(this,u4,i),nf(this,u4).addEventListener("slotchange",nf(this,u5))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=rJ.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;r5(this,nf(this,uG)),clearTimeout(nf(this,uq)),nf(this,uB).disconnect(),this.media&&this.mediaUnsetCallback(this.media),null==(e=rJ.window)||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),nf(this,u4)&&(nf(this,u4).removeEventListener("slotchange",nf(this,u5)),n_(this,u4,null)),n_(this,uY,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){n_(this,uV,null)}handleEvent(e){switch(e.type){case"pointerdown":n_(this,u$,e.timeStamp);break;case"pointermove":nT(this,uj,uQ).call(this,e);break;case"pointerup":nT(this,uz,uZ).call(this,e);break;case"mouseleave":nT(this,uX,uJ).call(this);break;case"mouseup":this.removeAttribute(nS);break;case"keyup":nT(this,u2,u3).call(this),this.setAttribute(nS,"")}}set autohide(e){let t=Number(e);n_(this,uK,isNaN(t)?0:t)}get autohide(){return(void 0===nf(this,uK)?2:nf(this,uK)).toString()}get breakpoints(){return nh(this,nw)}set breakpoints(e){nm(this,nw,e)}get audio(){return nu(this,nA)}set audio(e){nc(this,nA,e)}get gesturesDisabled(){return nu(this,nI)}set gesturesDisabled(e){nc(this,nI,e)}get keyboardControl(){return nu(this,nS)}set keyboardControl(e){nc(this,nS,e)}get noAutohide(){return nu(this,nR)}set noAutohide(e){nc(this,nR,e)}get autohideOverControls(){return nu(this,nL)}set autohideOverControls(e){nc(this,nL,e)}get userInteractive(){return nu(this,nC)}set userInteractive(e){nc(this,nC,e)}}uB=new WeakMap,u$=new WeakMap,uV=new WeakMap,uq=new WeakMap,uK=new WeakMap,uF=new WeakMap,uY=new WeakMap,uG=new WeakMap,uj=new WeakSet,uQ=function(e){if("mouse"!==e.pointerType&&e.timeStamp-nf(this,u$)<250)return;nT(this,u0,u1).call(this),clearTimeout(nf(this,uq));let t=this.hasAttribute(nL);([this,this.media].includes(e.target)||t)&&nT(this,u2,u3).call(this)},uz=new WeakSet,uZ=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(nC);[this,this.media].includes(e.target)&&t?nT(this,uX,uJ).call(this):nT(this,u2,u3).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&nT(this,u2,u3).call(this)},uX=new WeakSet,uJ=function(){if(0>nf(this,uK)||this.hasAttribute(nC))return;this.setAttribute(nC,"");let e=new rJ.CustomEvent(rA.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},u0=new WeakSet,u1=function(){if(!this.hasAttribute(nC))return;this.removeAttribute(nC);let e=new rJ.CustomEvent(rA.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},u2=new WeakSet,u3=function(){nT(this,u0,u1).call(this),clearTimeout(nf(this,uq));let e=parseInt(this.autohide);e<0||n_(this,uq,setTimeout(()=>{nT(this,uX,uJ).call(this)},1e3*e))}
49,u4=new WeakMap,u5=new WeakMap,nx.shadowRootOptions={mode:"open"},nx.getTemplateHTML=function(e){return` 50 <style> 51 52 :host([${rT.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([${nA}])) [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([${nA}]) slot[name=media] { 84 display: var(--media-slot-display, none); 85 } 86 87 88 :host([${nA}]) [part~=layer][part~=gesture-layer] { 89 height: 0; 90 display: block; 91 } 92 93 94 :host(:not([${nA}])[${nI}]) ::slotted([slot=gestures-chrome]), 95 :host(:not([${nA}])[${nI}]) 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([${nA}])) *[part~=layer][part~=centered-layer] { 105 align-items: center; 106 justify-content: center; 107 } 108 109 :host(:not([${nA}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]), 110 :host(:not([${nA}])) 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([${nA}])) .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}]):not([hidden]):not([role=dialog])) { 143 opacity: 1; 144 transition: var(--media-control-transition-in, opacity 0.25s); 145 } 146 147 148 :host([${nC}]:not([${rT.MEDIA_PAUSED}]):not([${rT.MEDIA_IS_AIRPLAYING}]):not([${rT.MEDIA_IS_CASTING}]):not([${nA}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${nR}]):not([role=dialog])) { 149 opacity: 0; 150 transition: var(--media-control-transition-out, opacity 1s); 151 } 152 153 :host([${nC}]:not([${nR}]):not([${rT.MEDIA_PAUSED}]):not([${rT.MEDIA_IS_CASTING}]):not([${nA}])) ::slotted([slot=media]) { 154 cursor: none; 155 } 156 157 :host([${nC}][${nL}]:not([${nR}]):not([${rT.MEDIA_PAUSED}]):not([${rT.MEDIA_IS_CASTING}]):not([${nA}])) * { 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([${nA}
168])[${rT.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="${nE.shadowRootOptions.mode}"> 188 ${nE.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 `},rJ.customElements.get("media-container")||rJ.customElements.define("media-container",nx);var nN=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nO=(e,t,i)=>(nN(e,t,"read from private field"),i?i.call(e):t.get(e)),nP=(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)},nU=(e,t,i,a)=>(nN(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);
200class nW{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){nP(this,ce),nP(this,u9,void 0),nP(this,u8,void 0),nP(this,u6,void 0),nP(this,u7,new Set),nU(this,u9,e),nU(this,u8,t),nU(this,u6,new Set(i))}[Symbol.iterator](){return nO(this,ce,ct).values()}get length(){return nO(this,ce,ct).size}get value(){var e;return null!=(e=[...nO(this,ce,ct)].join(" "))?e:""}set value(e){var t;e!==this.value&&(nU(this,u7,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...nO(this,ce,ct)][e]}values(){return nO(this,ce,ct).values()}forEach(e,t){nO(this,ce,ct).forEach(e,t)}add(...e){var t,i;e.forEach(e=>nO(this,u7).add(e)),(""!==this.value||(null==(t=nO(this,u9))?void 0:t.hasAttribute(`${nO(this,u8)}`)))&&(null==(i=nO(this,u9))||i.setAttribute(`${nO(this,u8)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>nO(this,u7).delete(e)),null==(t=nO(this,u9))||t.setAttribute(`${nO(this,u8)}`,`${this.value}`)}contains(e){return nO(this,ce,ct).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}}u9=new WeakMap,u8=new WeakMap,u6=new WeakMap,u7=new WeakMap,ce=new WeakSet,ct=function(){return nO(this,u7).size?nO(this,u7):nO(this,u6)};let nH=(e="")=>{let[t,i,a]=e.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:"cc"===t?rI.CAPTIONS:rI.SUBTITLES,language:i,label:r}},nB=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=nH(e);return{...t,...i}}),n$=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?nH(e):e):"string"==typeof e?nB(e):[e]:[],nV=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,nq=(e=[])=>Array.prototype.map.call(e,nV).join(" "),nK=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=n$(i).map(nK);Array.from(t).filter(e=>a.some(t=>t(e))).forEach(t=>{t.mode=e})},nY=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:nK(t);return Array.from(e.textTracks).filter(i)},nG=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(rT.MEDIA_SUBTITLES_SHOWING)},nj="exitFullscreen"in r0?"exitFullscreen":"webkitExitFullscreen"in r0?"webkitExitFullscreen":"webkitCancelFullScreen"in r0?"webkitCancelFullScreen":void 0,nQ="fullscreenElement"in r0?"fullscreenElement":"webkitFullscreenElement"in r0?"webkitFullscreenElement":void 0,nz="fullscreenEnabled"in r0?"fullscreenEnabled":"webkitFullscreenEnabled"in r0?"webkitFullscreenEnabled":void 0,nZ=()=>{var e;return i||(i=null==(e=null==r0?void 0:r0.createElement)?void 0:e.call(r0,"video"))},nX=async(e=nZ())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([nJ(e,i.signal),n0(e,t)]);return i.abort(),a},nJ=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),n0=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await rW(10)}return e.volume!==t},n1=/.*Version\/.*Safari\/.*/.test(rJ.navigator.userAgent),n2=(e=nZ())=>(!rJ.matchMedia("(display-mode: standalone)").matches||!n1)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),n3=(e=nZ())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[nz])||i&&"webkitSupportsFullscreen"in i})({documentElement:r0,media:e}),n4=n3(),n5=n2(),n9=!!rJ.WebKitPlaybackTargetAvailabilityEvent,n8=!!rJ.chrome,n6=e=>nY(e.media,e=>[rI.SUBTITLES,rI.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),n7=e=>nY(e.media,e=>e.mode===rS.SHOWING&&[rI.SUBTITLES,rI.CAPTIONS].includes(e.kind)),se=(e,t)=>{let i=n6(e),a=n7(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)nF(rS.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=rJ.localStorage.getItem("media-chrome-pref-subtitles-lang"),a=e?[e,...rJ.navigator.languages]:rJ.navigator.languages,r=i.filter(e=>a.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>
200a.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(rS.DISABLED,i,a),nF(rS.SHOWING,i,[{language:n,label:s,kind:o}])}}},st=(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)?si(e,t):Object.entries(e).every(([e,i])=>e in t&&st(i,t[e])))),si=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>st(e,t[i])))},sa=Object.values(rL),sr=nX().then(e=>a=e),sn=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof rJ.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=rJ.customElements.get(t);i&&e instanceof i||(await rJ.customElements.whenDefined(t),rJ.customElements.upgrade(e))}))},ss=new rJ.DOMParser,so={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!==rJ.localStorage.getItem("media-chrome-pref-muted"),r=i.hasAttribute("muted");if(a){t&&rJ.localStorage.removeItem("media-chrome-pref-muted");return}if(r&&!t)return;rJ.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"===rJ.localStorage.getItem("media-chrome-pref-muted");so.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?rJ.localStorage.removeItem("media-chrome-pref-volume"):i.hasAttribute("muted")||a||rJ.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=rJ.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;so.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&&rP(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=[rL.LIVE,rL.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(sa.includes(r))return r===rL.UNKNOWN?a:r;let n=t.duration;return n===1/0?rL.LIVE:Number.isFinite(n)?rL.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=so.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===rL.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(so.mediaStreamType.get(e)!==rL.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=>n6(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>n7(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&&![rI.CAPTIONS,rI.SUBTITLES].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||se(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]=nY(i,{kind:rI.CHAPTERS});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e&&ss.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("-"))&&nt(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(!r0.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 r0.pictureInPictureElement&&r0.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[nQ];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===rD.FULLSCREEN?i:a})(e);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let e=n.shadowRoot;if(!(nQ in e))return nt(n,r);for(;null==e?void 0:e[nQ];){if(e[nQ]===r)return!0;e=null==(t=e[nQ])?void 0:t.shadowRoot}}return!1})(e),set(e,t,i){var a,r;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)?void 0:a.inert)||null==(r=t.media)||r.focus()):(e=>{var t;let{documentElement:i}=e;if(nj){let e=null==(t=null==i?void 0:i[nj])?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&&rJ.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(!n4||!n3(t))return rC.UNSUPPORTED}},mediaPipUnavailable:{get(e){let{media:t}=e;return n5&&n2(t)?(null==t?void 0:t.disablePictureInPicture)?rC.UNAVAILABLE:void 0:rC.UNSUPPORTED}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===a||(null==t?void 0:t.volume)==void 0)return rC.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{null==a&&sr.then(t=>e(t?void 0:rC.UNSUPPORTED))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;return n8&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?rC.UNAVAILABLE:void 0:rC.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)=>n9?(null==t?void 0:t.availability)==="not-available"?rC.UNAVAILABLE:void 0:rC.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:rC.UNAVAILABLE:rC.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?rC.UNAVAILABLE:void 0:rC.UNSUPPORTED},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){let{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},sl={[rg.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]=nY(l,{kind:rI.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}},[rg.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[rg.MEDIA_PLAY_REQUEST](e,t){var i,a,r,n;let s=e.mediaStreamType.get(t)===rL.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)},[rg.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[rg.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[rg.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[rg.MEDIA_LOOP_REQUEST](e,t,{detail:i}){let a=!!i;return e.mediaLoop.set(a,t),{mediaLoop:a}},[rg.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[rg.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[rg.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)},[rg.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,n=n6(t),s=n$(i),o=null==(a=s[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&rJ.localStorage.setItem("media-chrome-pref-subtitles-lang",o),nF(rS.SHOWING,n,s)},[rg.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){let a=n6(t);nF(rS.DISABLED,a,null!=i?i:[])},[rg.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){se(t,i)},[rg.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[rg.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[rg.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[rg.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[rg.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,i){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,i)},[rg.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[rg.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[rg.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[rg.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var sd=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},su=(e,t,i)=>(sd(e,t,"read from private field"),i?i.call(e):t.get(e)),sc=(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)},sh=(e,t,i,a)=>(sd(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sm=(e,t,i)=>(sd(e,t,"access private method"),i);let sp=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],sv="defaultsubtitles",sb="defaultstreamtype",sE="defaultduration",sg="fullscreenelement",sf="hotkeys",sy="keyboardbackwardseekoffset",s_="keyboardforwardseekoffset",sT="keyboarddownvolumestep",sA="keyboardupvolumestep",sk="keysused",sw="lang",sI="loop",sS="liveedgeoffset",sR="noautoseektolive",sC="nodefaultstore",sL="nohotkeys",sD="nomutedpref",sM="nosubtitleslangpref",sx="novolumepref",sN="seektoliveoffset";class sO extends nx{constructor(){super(),sc(this,cu),sc(this,cm),sc(this,cv),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,sc(this,ci,new nW(this,sf)),sc(this,ca,void 0),sc(this,cr,void 0),sc(this,cn,null),sc(this,cs,void 0),sc(this,co,void 0),sc(this,cl,e=>{var t;null==(t=su(this,cr))||t.dispatch(e)}),sc(this,cd,void 0),sc(this,ch,e=>{let{key:t,shiftKey:i}=e;i&&("/"===t||"?"===t)||sp.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener("keyup",su(this,ch))}),this.associateElement(this);let e={};sh(this,cs,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 rJ.CustomEvent(rw[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t})}static get observedAttributes(){return super.observedAttributes.concat(sL,sf,sb,sv,sE,sD,sx,sw,sI,sS,sN,sR)}get mediaStore(){return su(this,cr)}set mediaStore(e){var t,i;(su(this,cr)&&(null==(t=su(this,co))||t.call(this),sh(this,co,void 0)),sh(this,cr,e),su(this,cr)||this.hasAttribute(sC))?sh(this,co,null==(i=su(this,cr))?void 0:i.subscribe(su(this,cs))):sm(this,cu,cc).call(this)}get fullscreenElement(){var e;return null!=(e=su(this,ca))?e:this}set fullscreenElement(e){var t;this.hasAttribute(sg)&&this.removeAttribute(sg),sh(this,ca,e),null==(t=su(this,cr))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return nu(this,sv)}set defaultSubtitles(e){nc(this,sv,e)}get defaultStreamType(){return nh(this,sb)}set defaultStreamType(e){nm(this,sb,e)}get defaultDuration(){return nl(this,sE)}set defaultDuration(e){nd(this,sE,e)}get noHotkeys(){return nu(this,sL)}set noHotkeys(e){nc(this,sL,e)}get keysUsed(){return nh(this,sk)}set keysUsed(e){nm(this,sk,e)}get liveEdgeOffset(){return nl(this,sS)}set liveEdgeOffset(e){nd(this,sS,e)}get noAutoSeekToLive(){return nu(this,sR)}set noAutoSeekToLive(e){nc(this,sR,e)}get noVolumePref(){return nu(this,sx)}set noVolumePref(e){nc(this,sx,e)}get noMutedPref(){return nu(this,sD)}set noMutedPref(e){nc(this,sD,e)}get noSubtitlesLangPref(){return nu(this,sM)}set noSubtitlesLangPref(e){nc(this,sM,e)}get noDefaultStore(){return nu(this,sC)}set noDefaultStore(e){nc(this,sC,e)}get resolvedLang(){return(()=>{let[e]=rB.split("-");return rH[rB]?rB:rH[e]?e:"en"})()}attributeChangedCallback(e,t,i){var a,r,n,s,o,l,d,u,c,h,m,p;if(super.attributeChangedCallback(e,t,i),e===sL)i!==t&&""===i?(this.hasAttribute(sf)&&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===sf)su(this,ci).value=i;else if(e===sv&&i!==t)null==(a=su(this,cr))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(sv)}});else if(e===sb)null==(n=su(this,cr))||n.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(sb))?r:void 0}});else if(e===sS&&i!==t)null==(s=su(this,cr))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(sS)?+this.getAttribute(sS):void 0,seekToLiveOffset:this.hasAttribute(sN)?+this.getAttribute(sN):this.hasAttribute(sS)?+this.getAttribute(sS):void 0}});else if(e===sN&&i!==t)null==(o=su(this,cr))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(sN)?+this.getAttribute(sN):this.hasAttribute(sS)?+this.getAttribute(sS):void 0}});else if(e===sR)null==(l=su(this,cr))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(sR)}});else if(e===sg){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;sh(this,ca,e),null==(u=su(this,cr))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===sw&&i!==t?(rB=i,null==(c=su(this,cr))||c.dispatch({type:"optionschangerequest",detail:{mediaLang:i}})):e===sI&&i!==t?null==(h=su(this,cr))||h.dispatch({type:rg.MEDIA_LOOP_REQUEST,detail:null!=i}):e===sx&&i!==t?null==(m=su(this,cr))||m.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(sx)}}):e===sD&&i!==t&&(null==(p=su(this,cr))||p.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(sD)}}))}connectedCallback(){var e,t,i;this.associateElement(this),su(this,cr)||this.hasAttribute(sC)||sm(this,cu,cc).call(this),null==(e=su(this,cr))||e.dispatch({type:"documentelementchangerequest",detail:r0}),null==(t=su(this,cr))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),su(this,cr)&&!su(this,co)&&sh(this,co,null==(i=su(this,cr))?void 0:i.subscribe(su(this,cs))),void 0!==su(this,cd)&&su(this,cr)&&this.media&&setTimeout(()=>{var e,t,i;(null==(t=null==(e=this.media)?void 0:e.textTracks)?void 0:t.length)&&(null==(i=su(this,cr))||i.dispatch({type:rg.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:su(this,cd)}))},0),this.hasAttribute(sL)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,i,a,r,n;if(null==(e=super.disconnectedCallback)||e.call(this),this.disableHotkeys(),su(this,cr)){let e=su(this,cr).getState();sh(this,cd,!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)),null==(i=su(this,cr))||i.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),null==(a=su(this,cr))||a.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(r=su(this,cr))||r.dispatch({type:rg.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}su(this,co)&&(null==(n=su(this,co))||n.call(this),sh(this,co,void 0)),this.unassociateElement(this),su(this,cn)&&(su(this,cn).remove(),sh(this,cn,null))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=su(this,cr))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=su(this,cr))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){sK(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=sF(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(rg).forEach(t=>{e.addEventListener(t,su(this,cl))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(rg).forEach(t=>{e.removeEventListener(t,su(this,cl))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>-1)&&(t.push(e),su(this,cr)&&Object.entries(su(this,cr).getState()).forEac
200h(([t,i])=>{sK([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",sm(this,cm,cp))}disableHotkeys(){this.removeEventListener("keydown",sm(this,cm,cp)),this.removeEventListener("keyup",su(this,ch))}get hotkeys(){return su(this,ci)}set hotkeys(e){nm(this,sf,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(sk))?void 0:t.split(" "))?i:null==m?void 0:m.keysUsed)?a:[]).map(e=>"Space"===e?" ":e).filter(Boolean).includes(e.key)||su(this,ci).contains(`no${e.key.toLowerCase()}`)||" "===e.key&&su(this,ci).contains("nospace"))&&!(e.shiftKey&&("/"===e.key||"?"===e.key)&&su(this,ci).contains("noshift+/")))switch(e.key){case" ":case"k":u=su(this,cr).getState().mediaPaused?rg.MEDIA_PLAY_REQUEST:rg.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new rJ.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"m":u="off"===this.mediaStore.getState().mediaVolumeLevel?rg.MEDIA_UNMUTE_REQUEST:rg.MEDIA_MUTE_REQUEST,this.dispatchEvent(new rJ.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"f":u=this.mediaStore.getState().mediaIsFullscreen?rg.MEDIA_EXIT_FULLSCREEN_REQUEST:rg.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new rJ.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new rJ.CustomEvent(rg.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{let e=this.hasAttribute(sy)?+this.getAttribute(sy):10;c=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),h=new rJ.CustomEvent(rg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowRight":case"l":{let e=this.hasAttribute(s_)?+this.getAttribute(s_):10;c=Math.max((null!=(n=this.mediaStore.getState().mediaCurrentTime)?n:0)+e,0),h=new rJ.CustomEvent(rg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowUp":{let e=this.hasAttribute(sA)?+this.getAttribute(sA):.025;c=Math.min((null!=(s=this.mediaStore.getState().mediaVolume)?s:1)+e,1),h=new rJ.CustomEvent(rg.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowDown":{let e=this.hasAttribute(sT)?+this.getAttribute(sT):.025;c=Math.max((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)-e,0),h=new rJ.CustomEvent(rg.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 rJ.CustomEvent(rg.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 rJ.CustomEvent(rg.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break;case"/":case"?":e.shiftKey&&sm(this,cv,cb).call(this);break;case"p":u=this.mediaStore.getState().mediaIsPip?rg.MEDIA_EXIT_PIP_REQUEST:rg.MEDIA_ENTER_PIP_REQUEST,h=new rJ.CustomEvent(u,{composed:!0,bubbles:!0}),this.dispatchEvent(h)}}}ci=new WeakMap,ca=new WeakMap,cr=new WeakMap,cn=new WeakMap,cs=new WeakMap,co=new WeakMap,cl=new WeakMap,cd=new WeakMap,cu=new WeakSet,cc=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=so,requestMap:r=sl,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||st(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,v,b,E,g,f,y,T,A,k,w,I;let S=!!o;if(o={...d,...null!=o?o:{},...e},S)return;await sn(...Object.values(e));let R=l.length>0&&0===t&&s,C=d.media!==o.media,L=(null==(i=d.media)?void 0:i.textTracks)!==(null==(r=o.media)?void 0:r.textTracks),D=(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==(v=o.media)?void 0:v.audioTracks),x=(null==(b=d.media)?void 0:b.remote)!==(null==(E=o.media)?void 0:E.remote),N=d.documentElement!==o.documentElement,O=!!d.media&&(C||R),P=!!(null==(g=d.media)?void 0:g.textTracks)&&(L||R),U=!!(null==(f=d.media)?void 0:f.videoRenditions)&&(D||R),W=!!(null==(y=d.media)?void 0:y.audioTracks)&&(M||R),H=!!(null==(T=d.media)?void 0:T.remote)&&(x||R),B=!!d.documentElement&&(N||R),$=O||P||U||W||H||B,V=0===l.length&&1===t&&s,q=!!o.media&&(C||V),K=!!(null==(A=o.media)?void 0:A.textTracks)&&(L||V),F=!!(null==(k=o.media)?void 0:k.videoRenditions)&&(D||V),Y=!!(null==(w=o.media)?void 0:w.audioTracks)&&(M||V),G=!!(null==(I=o.media)?void 0:I.remote)&&(x||V),j=!!o.documentElement&&(N||V),Q=q||K||F||Y||G||j;
200if(!($||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&&O&&(d.media.removeEventListener(t,h),m[e].mediaEvents=void 0),q&&(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),F&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,p),m[e].videoRenditionsEvents=p)}),h=m[e].audioTracksEvents,n.forEach(t=>{var i,a;h&&W&&(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&&B&&(d.documentElement.removeEventListener(t,h),m[e].rootEvents=void 0),j&&(o.documentElement.addEventListener(t,p),m[e].rootEvents=p)});let v=m[e].stateOwnersUpdateHandlers;if(v&&$&&(Array.isArray(v)?v:[v]).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 $&&(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;r[t]&&null==u.mediaErrorCode?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(sv),defaultDuration:this.hasAttribute(sE)?+this.getAttribute(sE):void 0,defaultStreamType:null!=(e=this.getAttribute(sb))?e:void 0,liveEdgeOffset:this.hasAttribute(sS)?+this.getAttribute(sS):void 0,seekToLiveOffset:this.hasAttribute(sN)?+this.getAttribute(sN):this.hasAttribute(sS)?+this.getAttribute(sS):void 0,noAutoSeekToLive:this.hasAttribute(sR),noVolumePref:this.hasAttribute(sx),noMutedPref:this.hasAttribute(sD),noSubtitlesLangPref:this.hasAttribute(sM)}})},ch=new WeakMap,cm=new WeakSet,cp=function(e){var t;let{metaKey:i,altKey:a,key:r,shiftKey:n}=e,s=n&&("/"===r||"?"===r);if(s&&(null==(t=su(this,cn))?void 0:t.open)||i||a||!s&&!sp.includes(r))return void this.removeEventListener("keyup",su(this,ch));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)||su(this,ci).contains(`no${r.toLowerCase()}`)||" "===r&&su(this,ci).contains("nospace")||l||e.preventDefault(),this.addEventListener("keyup",su(this,ch),{once:!0})},cv=new WeakSet,cb=function(){su(this,cn)||(sh(this,cn,r0.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(su(this,cn))),su(this,cn).open=!0};let sP=Object.values(rT),sU=Object.values(ry),sW=e=>{var t,i,a,r;let{observedAttributes:n}=e.constructor;!n&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(rJ.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,rf.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(e=>sP.includes(e)):[]},sH=e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&rJ.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof rJ.customElements.get(e.nodeName.toLowerCase()))&&rJ.customElements.upgrade(e),sU.some(t=>t in e)||!!sW(e).length},sB=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},s$={[rT.MEDIA_SUBTITLES_LIST]:nq,[rT.MEDIA_SUBTITLES_SHOWING]:nq,[rT.MEDIA_SEEKABLE]:sB,[rT.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(sB).join(" "),[rT.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[rT.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(rM).join(" ")},[rT.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(rN).join(" ")}},sV=async(e,t,i)=>{var a,r;if(e.isConnected||await rW(0),"boolean"==typeof i||null==i)return nc(e,t,i);if("number"==typeof i)return nd(e,t,i);if("string"==typeof i)return nm(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);let n=null!=(r=null==(a=s$[t])?void 0:a.call(s$,i))?r:i;return e.setAttribute(t,n)},sq=(e,t)=>{var i;if(null==(i=e.closest)?void 0:i.call(e,'*[slot="media"]'))return;let a=(e,t)=>{var i,a;sH(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:[]].forEac
200h(e=>sq(e,t))},r=null==e?void 0:e.nodeName.toLowerCase();r.includes("-")&&!sH(e)?rJ.customElements.whenDefined(r).then(()=>{a(e,t)}):a(e,t)},sK=(e,t,i)=>{e.forEach(e=>{if(t in e){e[t]=i;return}let a=sW(e),r=t.toLowerCase();a.includes(r)&&sV(e,r,i)})},sF=(e,t,i)=>{sq(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(rg.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(rg.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=[],s=e=>{let a=e.target;"media"!==a.name&&(n.forEach(e=>sq(e,i)),(n=[...a.assignedElements({flatten:!0})]).forEach(e=>sq(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=>sq(e,t)),Array.prototype.forEach.call(r,e=>sq(e,i))):"attributes"===n&&o===rf.MEDIA_CHROME_ATTRIBUTES&&(sH(s)?t(s):i(s))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{sq(e,i),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(rg.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(rg.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};rJ.customElements.get("media-controller")||rJ.customElements.define("media-controller",sO);let sY="placement",sG="bounds";class sj extends rJ.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!nn(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=ni(this,"#"+this.bounds))?e:r8(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;h<0?this.style.setProperty("--media-tooltip-offset-x",`${h}px`):m>0?this.style.setProperty("--media-tooltip-offset-x",`${m}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[sY,sG]}get placement(){return nh(this,sY)}set placement(e){nm(this,sY,e)}get bounds(){return nh(this,sG)}set bounds(e){nm(this,sG,e)}}sj.shadowRootOptions={mode:"open"},sj.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 `},rJ.customElements.get("media-tooltip")||rJ.customElements.define("media-tooltip",sj);var sQ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sz=(e,t,i)=>(sQ(e,t,"read from private field"),i?i.call(e):t.get(e)),sZ=(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)},sX=(e,t,i,a)=>(sQ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let sJ="tooltipplacement",s0="disabled",s1="notooltip";class s2 extends rJ.HTMLElement{constructor(){if(super(),sZ(this,cT),sZ(this,cE,void 0),this.preventClick=!1,this.tooltipEl=null,sZ(this,cg,e=>{this.preventClick||this.handleClick(e),setTimeout(sz(this,cf),0)}),sZ(this,cf,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),sZ(this,cy,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",sz(this,cy))}),sZ(this,c_,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",sz(this,cy)):this.addEventListener("keyup",sz(this,cy),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(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",sJ,rf.MEDIA_CONTROLLER,rT.MEDIA_LANG]}enable(){this.addEventListener("click",sz(this,cg)),this.addEventListener("keydown",sz(this,c_)),this.tabIndex=0}disable(){this.removeEventListener("click",sz(this,cg)),this.removeEventListener("keydown",sz(this,c_)),this.removeEventListener("keyup",sz(this,cy)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rf.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=sz(this,cE))?void 0:a.unassociateElement)||r.call(a,this),sX(this,cE,null)),i&&this.isConnected&&(sX(this,cE,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sz(this,cE))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===sJ&&this.tooltipEl&&i!==t?this.tooltipEl.placement=i:e===rT.MEDIA_LA
309NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),sz(this,cf).call(this)}connectedCallback(){var e,t,i;let{style:a}=ns(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(rf.MEDIA_CONTROLLER);r&&(sX(this,cE,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sz(this,cE))?void 0:t.associateElement)||i.call(t,this)),rJ.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=cT,t=cA,sQ(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=sz(this,cE))?void 0:e.unassociateElement)||t.call(e,this),sX(this,cE,null),this.removeEventListener("mouseenter",sz(this,cf)),this.removeEventListener("focus",sz(this,cf)),this.removeEventListener("click",sz(this,cg))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return nh(this,sJ)}set tooltipPlacement(e){nm(this,sJ,e)}get mediaController(){return nh(this,rf.MEDIA_CONTROLLER)}set mediaController(e){nm(this,rf.MEDIA_CONTROLLER,e)}get disabled(){return nu(this,s0)}set disabled(e){nc(this,s0,e)}get noTooltip(){return nu(this,s1)}set noTooltip(e){nc(this,s1,e)}handleClick(e){}}cE=new WeakMap,cg=new WeakMap,cf=new WeakMap,cy=new WeakMap,c_=new WeakMap,cT=new WeakSet,cA=function(){this.addEventListener("mouseenter",sz(this,cf)),this.addEventListener("focus",sz(this,cf)),this.addEventListener("click",sz(this,cg));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},s2.shadowRootOptions={mode:"open"},s2.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 slot[name="icon"] { 348 display: inline-flex; 349 align-items: center; 350 } 351 352 svg, img, ::slotted(svg), ::slotted(img) { 353 width: var(--media-button-icon-width); 354 height: var(--media-button-icon-height, var(--media-control-height, 24px)); 355 transform: var(--media-button-icon-transform); 356 transition: var(--media-button-icon-transition); 357 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 358 vertical-align: middle; 359 max-width: 100%; 360 max-height: 100%; 361 min-width: 100%; 362 } 363 364 media-tooltip { 365 366 max-width: 0; 367 overflow-x: clip; 368 opacity: 0; 369 transition: opacity .3s, max-width 0s 9s; 370 } 371 372 :host(:hover) media-tooltip, 373 :host(:focus-visible) media-tooltip { 374 max-width: 100vw; 375 opacity: 1; 376 transition: opacity .3s; 377 } 378 379 :host([notooltip]) slot[name="tooltip"] { 380 display: none; 381 } 382 </style> 383
384 ${this.getSlotTemplateHTML(e,t)} 385 386 <slot name="tooltip"> 387 <media-tooltip part="tooltip" aria-hidden="true"> 388 <template shadowrootmode="${sj.shadowRootOptions.mode}"> 389 ${sj.getTemplateHTML({})} 390 </template> 391 <slot name="tooltip-content"> 392 ${this.getTooltipContentHTML(e)} 393 </slot> 394 </media-tooltip> 395 </slot> 396 `},s2.getSlotTemplateHTML=function(e,t){return` 397 <slot></slot> 398 `},s2.getTooltipContentHTML=function(){return""},rJ.customElements.get("media-chrome-button")||rJ.customElements.define("media-chrome-button",s2);let s3=`<svg aria-hidden="true" viewBox="0 0 26 24"> 399 <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"/> 400</svg> 401`,s4=e=>{let t=e.mediaIsAirplaying?r$("stop airplay"):r$("start airplay");e.setAttribute("aria-label",t)};class s5 extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_IS_AIRPLAYING,rT.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),s4(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_IS_AIRPLAYING&&s4(this)}get mediaIsAirplaying(){return nu(this,rT.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){nc(this,rT.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return nh(this,rT.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){nm(this,rT.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new rJ.CustomEvent(rg.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}s5.getSlotTemplateHTML=function(e){return` 402 <style> 403 :host([${rT.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) { 404 display: none !important; 405 } 406 407 408 :host(:not([${rT.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) { 409 display: none !important; 410 } 411 412 :host([${rT.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter], 413 :host(:not([${rT.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] { 414 display: none; 415 } 416 </style> 417 418 <slot name="icon"> 419 <slot name="enter">${s3}</slot> 420 <slot name="exit">${s3}</slot> 421 </slot> 422 `},s5.getTooltipContentHTML=function(){return` 423 <slot name="tooltip-enter">${r$("start airplay")}</slot> 424 <slot name="tooltip-exit">${r$("stop airplay")}</slot> 425 `},rJ.customElements.get("media-airplay-button")||rJ.customElements.define("media-airplay-button",s5);let s9=`<svg aria-hidden="true" viewBox="0 0 26 24"> 426 <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"/> 427</svg>`,s8=`<svg aria-hidden="true" viewBox="0 0 26 24"> 428 <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
4281 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"/> 429</svg>`,s6=e=>{e.setAttribute("aria-checked",nG(e).toString())};class s7 extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_SUBTITLES_LIST,rT.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",r$("closed captions")),s6(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_SUBTITLES_SHOWING&&s6(this)}get mediaSubtitlesList(){return oe(this,rT.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ot(this,rT.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return oe(this,rT.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ot(this,rT.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new rJ.CustomEvent(rg.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}s7.getSlotTemplateHTML=function(e){return` 430 <style> 431 :host([aria-checked="true"]) slot[name=off] { 432 display: none !important; 433 } 434 435 436 :host(:not([aria-checked="true"])) slot[name=on] { 437 display: none !important; 438 } 439 440 :host([aria-checked="true"]) slot[name=tooltip-enable], 441 :host(:not([aria-checked="true"])) slot[name=tooltip-disable] { 442 display: none; 443 } 444 </style> 445 446 <slot name="icon"> 447 <slot name="on">${s9}</slot> 448 <slot name="off">${s8}</slot> 449 </slot> 450 `},s7.getTooltipContentHTML=function(){return` 451 <slot name="tooltip-enable">${r$("Enable captions")}</slot> 452 <slot name="tooltip-disable">${r$("Disable captions")}</slot> 453 `};let oe=(e,t)=>{let i=e.getAttribute(t);return i?nB(i):[]},ot=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=nq(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rJ.customElements.get("media-captions-button")||rJ.customElements.define("media-captions-button",s7);let oi=e=>{let t=e.mediaIsCasting?r$("stop casting"):r$("start casting");e.setAttribute("aria-label",t)};class oa extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_IS_CASTING,rT.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),oi(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_IS_CASTING&&oi(this)}get mediaIsCasting(){return nu(this,rT.MEDIA_IS_CASTING)}set mediaIsCasting(e){nc(this,rT.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return nh(this,rT.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){nm(this,rT.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?rg.MEDIA_EXIT_CAST_REQUEST:rg.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new rJ.CustomEvent(e,{composed:!0,bubbles:!0}))}}oa.getSlotTemplateHTML=function(e){return` 454 <style> 455 :host([${rT.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) { 456 display: none !important; 457 } 458 459 460 :host(:not([${rT.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) { 461 display: none !important; 462 } 463 464 :host([${rT.MEDIA_IS_CASTING}]) slot[name=tooltip-enter], 465 :host(:not([${rT.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] { 466 display: none; 467 } 468 </style> 469 470 <slot name="icon"> 471 <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> 472 <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> 473 </slot> 474 `},oa.getTooltipContentHTML=function(){return` 475 <slot name="tooltip-enter">${r$("Start casting")}</slot> 476 <slot name="tooltip-exit">${r$("Stop casting")}</slot> 477 `},rJ.customElements.get("media-cast-button")||rJ.customElements.define("media-cast-button",oa);var or=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},on=(e,t,i)=>(or(e,t,"read from private field"),i?i.call(e):t.get(e)),os=(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)},oo=(e,t,i,a)=>(or(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),ol=(e,t,i)=>(or(e,t,"access private method"),i);let od="open";class ou extends rJ.HTMLElement{constructor(){super(),os(this,cS),os(this,cC),os(this,cD),os(this,cx),os(this,cO),os(this,cU),os(this,ck,!1),os(this,cw,null),os(this,cI,null)}static get observedAttributes(){return[od,"anchor"]}get open(){return nu(this,od)}set open(e){nc(this,od,e)}handleEvent(e){switch(e.type){case"invoke":ol(this,cx,cN).call(this,e);break;case"focusout":ol(this,cO,cP).call(this,e);break;case"keydown":ol(this,cU,cW).call(this,e)}}connectedCallback(){ol(this,cS,cR).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}disconnectedCallback(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}attributeChangedCallback(e,t,i){ol(this,cS,cR).call(this),e===od&&i!==t&&(this.open?ol(this,cC,cL).call(this):ol(this,cD,cM).call(this))}focus(){oo(this,cw,na());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;
477let i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==i||i.focus()}get keysUsed(){return["Escape","Tab"]}}ck=new WeakMap,cw=new WeakMap,cI=new WeakMap,cS=new WeakSet,cR=function(){if(!on(this,ck)&&(oo(this,ck,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=ns(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},cC=new WeakSet,cL=function(){var e;null==(e=on(this,cI))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},cD=new WeakSet,cM=function(){var e;null==(e=on(this,cI))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},cx=new WeakSet,cN=function(e){oo(this,cI,e.relatedTarget),nt(this,e.relatedTarget)||(this.open=!this.open)},cO=new WeakSet,cP=function(e){var t;!nt(this,e.relatedTarget)&&(null==(t=on(this,cw))||t.focus(),on(this,cI)&&on(this,cI)!==e.relatedTarget&&this.open&&(this.open=!1))},cU=new WeakSet,cW=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=on(this,cw))||n.focus(),this.open=!1))},ou.shadowRootOptions={mode:"open"},ou.getTemplateHTML=function(e){return` 478 <style> 479 :host { 480 font: var(--media-font, 481 var(--media-font-weight, normal) 482 var(--media-font-size, 14px) / 483 var(--media-text-content-height, var(--media-control-height, 24px)) 484 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 485 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 486 display: var(--media-dialog-display, inline-flex); 487 justify-content: center; 488 align-items: center; 489 490 transition-behavior: allow-discrete; 491 visibility: hidden; 492 opacity: 0; 493 transform: translateY(2px) scale(.99); 494 pointer-events: none; 495 } 496 497 :host([open]) { 498 transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out; 499 visibility: visible; 500 opacity: 1; 501 transform: translateY(0) scale(1); 502 pointer-events: auto; 503 } 504 505 #content { 506 display: flex; 507 position: relative; 508 box-sizing: border-box; 509 width: min(320px, 100%); 510 word-wrap: break-word; 511 max-height: 100%; 512 overflow: auto; 513 text-align: center; 514 line-height: 1.4; 515 } 516 </style> 517 ${this.getSlotTemplateHTML(e)} 518 `},ou.getSlotTemplateHTML=function(e){return` 519 <slot id="content"></slot> 520 `},rJ.customElements.get("media-chrome-dialog")||rJ.customElements.define("media-chrome-dialog",ou);var oc=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oh=(e,t,i)=>(oc(e,t,"read from private field"),i?i.call(e):t.get(e)),om=(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)},op=(e,t,i,a)=>(oc(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),ov=(e,t,i)=>(oc(e,t,"access private method"),i);class ob extends rJ.HTMLElement{constructor(){if(super(),om(this,cj),om(this,cz),om(this,cX),om(this,c0),om(this,c2),om(this,c4),om(this,c9),om(this,c6),om(this,cH,void 0),om(this,cB,void 0),om(this,c$,void 0),om(this,cV,void 0),om(this,cq,{}),om(this,cK,[]),om(this,cF,()=>{if(this.range.matches(":focus-visible")){let{style:e}=ns(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),om(this,cY,()=>{let{style:e}=ns(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),om(this,cG,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),op(this,c$,this.shadowRoot.querySelector("#startpoint")),op(this,cV,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",rf.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rf.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=oh(this,cH))?void 0:a.unassociateElement)||r.call(a,this),op(this,cH,null)),i&&this.isConnected&&(op(this,cH,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oh(this,cH))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),ov(this,cz,cZ).call(this)):(this.range.setAttribute(e,i),ov(this,cX,cJ).call(this)))}connectedCallback(){var e,t,i;let{style:a}=ns(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),oh(this,cq).pointer=ns(this.shadowRoot,"#pointer"),oh(this,cq).progress=ns(this.shadowRoot,"#progress"),oh(this,cq).thumb=ns(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),oh(this,cq).activeSegment=ns(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(rf.MEDIA_CONTROLLER);r&&(op(this,cH,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=oh(this,cH))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",oh(this,cF)
520),this.shadowRoot.addEventListener("focusout",oh(this,cY)),ov(this,cz,cZ).call(this),r4(this.container,oh(this,cG))}disconnectedCallback(){var e,t;ov(this,cX,cJ).call(this),null==(t=null==(e=oh(this,cH))?void 0:e.unassociateElement)||t.call(e,this),op(this,cH,null),this.shadowRoot.removeEventListener("focusin",oh(this,cF)),this.shadowRoot.removeEventListener("focusout",oh(this,cY)),r5(this.container,oh(this,cG))}updatePointerBar(e){var t;null==(t=oh(this,cq).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=oh(this,cq).progress)||e.style.setProperty("width",`${i}%`),null==(t=oh(this,cq).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])];op(this,cK,[...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=r0.createElementNS("http://www.w3.org/2000/svg","rect"),c=no(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);c.style.setProperty("x",o),c.style.setProperty("width",d),t.append(u)}}getPointerRatio(e){var t,i,a,r;let n,s,o;return t=e.clientX,i=e.clientY,a=oh(this,c$).getBoundingClientRect(),n=(r=oh(this,cV).getBoundingClientRect()).x-a.x,0==(o=n*n+(s=r.y-a.y)*s)?0:Math.max(0,Math.min(1,((t-a.x)*n+(i-a.y)*s)/o))}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":ov(this,c6,c7).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":ov(this,c2,c3).call(this,e);break;case"pointerdown":ov(this,c0,c1).call(this,e);break;case"pointerup":ov(this,c4,c5).call(this);break;case"pointerleave":ov(this,c9,c8).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}cH=new WeakMap,cB=new WeakMap,c$=new WeakMap,cV=new WeakMap,cq=new WeakMap,cK=new WeakMap,cF=new WeakMap,cY=new WeakMap,cG=new WeakMap,cj=new WeakSet,cQ=function(e){let t=oh(this,cq).activeSegment;if(!t)return;let i=this.getPointerRatio(e),a=oh(this,cK).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))"))},cz=new WeakSet,cZ=function(){!this.hasAttribute("disabled")&&this.isConnected&&(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},cX=new WeakSet,cJ=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),null==(e=rJ.window)||e.removeEventListener("pointerup",this),null==(t=rJ.window)||t.removeEventListener("pointermove",this)},c0=new WeakSet,c1=function(e){var t;op(this,cB,e.composedPath().includes(this.range)),null==(t=rJ.window)||t.addEventListener("pointerup",this,{once:!0})},c2=new WeakSet,c3=function(e){var t;"mouse"!==e.pointerType&&ov(this,c0,c1).call(this,e),this.addEventListener("pointerleave",this,{once:!0}),null==(t=rJ.window)||t.addEventListener("pointermove",this)},c4=new WeakSet,c5=function(){var e;null==(e=rJ.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},c9=new WeakSet,c8=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=rJ.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=oh(this,cq).activeSegment)||t.style.removeProperty("transform")},c6=new WeakSet,c7=function(e){("pen"!==e.pointerType||0!==e.buttons)&&(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),ov(this,cj,cQ).call(this,e),this.dragging&&("mouse"!==e.pointerType||!oh(this,cB))&&
520(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},ob.shadowRootOptions={mode:"open"},ob.getTemplateHTML=function(e){return
vendor: 7,165 bytes, lines 520-756
520` 521 <style> 522 :host { 523 --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 524 --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px)); 525 526 box-shadow: var(--_focus-visible-box-shadow, none); 527 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 528 height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding)); 529 display: inline-flex; 530 align-items: center; 531 532 vertical-align: middle; 533 box-sizing: border-box; 534 position: relative; 535 width: 100px; 536 transition: background .15s linear; 537 cursor: var(--media-cursor, pointer); 538 pointer-events: auto; 539 touch-action: none; 540 } 541 542 543 input[type=range]:focus { 544 outline: 0; 545 } 546 input[type=range]:focus::-webkit-slider-runnable-track { 547 outline: 0; 548 } 549 550 :host(:hover) { 551 background: var(--media-control-hover-background, rgb(50 50 70 / .7)); 552 } 553 554 #leftgap { 555 padding-left: var(--media-range-padding-left, var(--_media-range-padding)); 556 } 557 558 #rightgap { 559 padding-right: var(--media-range-padding-right, var(--_media-range-padding)); 560 } 561 562 #startpoint, 563 #endpoint { 564 position: absolute; 565 } 566 567 #endpoint { 568 right: 0; 569 } 570 571 #container { 572 573 width: var(--media-range-track-width, 100%); 574 transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px)); 575 position: relative; 576 height: 100%; 577 display: flex; 578 align-items: center; 579 min-width: 40px; 580 } 581 582 #range { 583 584 display: var(--media-time-range-hover-display, block); 585 bottom: var(--media-time-range-hover-bottom, 0); 586 height: var(--media-time-range-hover-height, max(100% , 25px)); 587 width: 100%; 588 position: absolute; 589 cursor: var(--media-cursor, pointer); 590 591 -webkit-appearance: none; 592 -webkit-tap-highlight-color: transparent; 593 background: transparent; 594 margin: 0; 595 z-index: 1; 596 } 597 598 @media (hover: hover) { 599 #range { 600 bottom: var(--media-time-range-hover-bottom, 0); 601 height: var(--media-time-range-hover-height, max(100%, 20px)); 602 } 603 } 604 605 606 607 #range::-webkit-slider-thumb { 608 -webkit-appearance: none; 609 background: transparent; 610 width: .1px; 611 height: .1px; 612 } 613 614 615 #range::-moz-range-thumb { 616 background: transparent; 617 border: transparent; 618 width: .1px; 619 height: .1px; 620 } 621 622 #appearance { 623 height: var(--media-range-track-height, 4px); 624 display: flex; 625 flex-direction: column; 626 justify-content: center; 627 width: 100%; 628 position: absolute; 629 630 will-change: transform; 631 } 632 633 #track { 634 background: var(--media-range-track-background, rgb(255 255 255 / .2)); 635 border-radius: var(--media-range-track-border-radius, 1px); 636 border: var(--media-range-track-border, none); 637 outline: var(--media-range-track-outline); 638 outline-offset: var(--media-range-track-outline-offset); 639 backdrop-filter: var(--media-range-track-backdrop-filter); 640 -webkit-backdrop-filter: var(--media-range-track-backdrop-filter); 641 box-shadow: var(--media-range-track-box-shadow, none); 642 position: absolute; 643 width: 100%; 644 height: 100%; 645 overflow: hidden; 646 } 647 648 #progress, 649 #pointer { 650 position: absolute; 651 height: 100%; 652 will-change: width; 653 } 654 655 #progress { 656 background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238))); 657 transition: var(--media-range-track-transition); 658 } 659 660 #pointer { 661 background: var(--media-range-track-pointer-background); 662 border-right: var(--media-range-track-pointer-border-right); 663 transition: visibility .25s, opacity .25s; 664 visibility: hidden; 665 opacity: 0; 666 } 667 668 @media (hover: hover) { 669 :host(:hover) #pointer { 670 transition: visibility .5s, opacity .5s; 671 visibility: visible; 672 opacity: 1; 673 } 674 } 675 676 #thumb, 677 ::slotted([slot=thumb]) { 678 width: var(--media-range-thumb-width, 10px); 679 height: var(--media-range-thumb-height, 10px); 680 transition: var(--media-range-thumb-transition); 681 transform: var(--media-range-thumb-transform, none); 682 opacity: var(--media-range-thumb-opacity, 1); 683 translate: -50%; 684 position: absolute; 685 left: 0; 686 cursor: var(--media-cursor, pointer); 687 } 688 689 #thumb { 690 border-radius: var(--media-range-thumb-border-radius, 10px); 691 background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238))); 692 box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent); 693 border: var(--media-range-thumb-border, none); 694 } 695 696 :host([disabled]) #thumb { 697 background-color: #777; 698 } 699 700 .segments #appearance { 701 height: var(--media-range-segment-hover-height, 7px); 702 } 703 704 #track { 705 clip-path: url(#segments-clipping); 706 } 707 708 #segments { 709 --segments-gap: var(--media-range-segments-gap, 2px); 710 position: absolute; 711 width: 100%; 712 height: 100%; 713 } 714 715 #segments-clipping { 716 transform: translateX(calc(var(--segments-gap) / 2)); 717 } 718 719 #segments-clipping:empty { 720 display: none; 721 } 722 723 #segments-clipping rect { 724 height: var(--media-range-track-height, 4px); 725 y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2); 726 transition: var(--media-range-segment-transition, transform .1s ease-in-out); 727 transform: var(--media-range-segment-transform, scaleY(1)); 728 transform-origin: center; 729 } 730 731 /* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */ 732 #range-label { 733 position: absolute; 734 left: -10000px; 735 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 736 pointer-events: none; 737 } 738 </style> 739 <div id="leftgap"></div> 740 <div id="container"> 741 <div id="startpoint"></div> 742 <div id="endpoint"></div> 743 <div id="appearance"> 744 <div id="track" part="track"> 745 <div id="pointer"></div> 746 <div id="progress" part="progress"></div> 747 </div> 748 <slot name="thumb"> 749 <div id="thumb" part="thumb"></div> 750 </slot> 751 <svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg> 752 </div> 753 <input id="range" type="range" min="0" max="1" step="any" value="0"> 754 <label for="range" id="range-label"></label> 755 756 ${this.getContainerTemplateHTML(
756e)} 757 </div> 758 <div id="rightgap"></div> 759 `},ob.getContainerTemplateHTML=function(e){return""},rJ.customElements.get("media-chrome-range")||rJ.customElements.define("media-chrome-range",ob);var oE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},og=(e,t,i)=>(oE(e,t,"read from private field"),i?i.call(e):t.get(e)),of=(e,t,i,a)=>(oE(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class oy extends rJ.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,he,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rf.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rf.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=og(this,he))?void 0:a.unassociateElement)||r.call(a,this),of(this,he,null)),i&&this.isConnected&&(of(this,he,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=og(this,he))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(rf.MEDIA_CONTROLLER);a&&(of(this,he,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=og(this,he))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=og(this,he))?void 0:e.unassociateElement)||t.call(e,this),of(this,he,null)}}he=new WeakMap,oy.shadowRootOptions={mode:"open"},oy.getTemplateHTML=function(e){return` 760 <style> 761 :host { 762 763 box-sizing: border-box; 764 display: var(--media-control-display, var(--media-control-bar-display, inline-flex)); 765 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 766 --media-loading-indicator-icon-height: 44px; 767 } 768 769 ::slotted(media-time-range), 770 ::slotted(media-volume-range) { 771 min-height: 100%; 772 } 773 774 ::slotted(media-time-range), 775 ::slotted(media-clip-selector) { 776 flex-grow: 1; 777 } 778 779 ::slotted([role="menu"]) { 780 position: absolute; 781 } 782 </style> 783 784 <slot></slot> 785 `},rJ.customElements.get("media-control-bar")||rJ.customElements.define("media-control-bar",oy);var o_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oT=(e,t,i)=>(o_(e,t,"read from private field"),i?i.call(e):t.get(e)),oA=(e,t,i,a)=>(o_(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class ok extends rJ.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,ht,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rf.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rf.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oT(this,ht))?void 0:a.unassociateElement)||r.call(a,this),oA(this,ht,null)),i&&this.isConnected&&(oA(this,ht,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oT(this,ht))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let{style:a}=ns(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(rf.MEDIA_CONTROLLER);r&&(oA(this,ht,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=oT(this,ht))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oT(this,ht))?void 0:e.unassociateElement)||t.call(e,this),oA(this,ht,null)}}ht=new WeakMap,ok.shadowRootOptions={mode:"open"},ok.getTemplateHTML=function(e,t={}){return` 786 <style> 787 :host { 788 font: var(--media-font, 789 var(--media-font-weight, normal) 790 var(--media-font-size, 14px) / 791 var(--media-text-content-height, var(--media-control-height, 24px)) 792 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 793 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 794 background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)))); 795 padding: var(--media-control-padding, 10px); 796 display: inline-flex; 797 justify-content: center; 798 align-items: center; 799 vertical-align: middle; 800 box-sizing: border-box; 801 text-align: center; 802 pointer-events: auto; 803 } 804 805 806 :host(:focus-visible) {
807 box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 808 outline: 0; 809 } 810 811 812 :host(:where(:focus)) { 813 box-shadow: none; 814 outline: 0; 815 } 816 </style> 817 818 ${this.getSlotTemplateHTML(e,t)} 819 `},ok.getSlotTemplateHTML=function(e,t){return` 820 <slot></slot> 821 `},rJ.customElements.get("media-text-display")||rJ.customElements.define("media-text-display",ok);var ow=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oI=(e,t,i)=>(ow(e,t,"read from private field"),i?i.call(e):t.get(e));class oS extends ok{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,hi,void 0),((e,t,i)=>(ow(e,t,"write to private field"),t.set(e,i)))(this,hi,this.shadowRoot.querySelector("slot")),oI(this,hi).textContent=rK(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===rT.MEDIA_DURATION&&(oI(this,hi).textContent=rK(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return nl(this,rT.MEDIA_DURATION)}set mediaDuration(e){nd(this,rT.MEDIA_DURATION,e)}}hi=new WeakMap,oS.getSlotTemplateHTML=function(e,t){return` 822 <slot>${rK(t.mediaDuration)}</slot> 823 `},rJ.customElements.get("media-duration-display")||rJ.customElements.define("media-duration-display",oS);let oR={2:r$("Network Error"),3:r$("Decode Error"),4:r$("Source Not Supported"),5:r$("Encryption
823Error")},oC={2:r$("A network error caused the media download to fail."),3:r$("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:r$("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:r$("The media is encrypted and there are no keys to decrypt it.")},oL=e=>{var t,i;return 1===e.code?null:{title:null!=(t=oR[e.code])?t:`Error ${e.code}`,message:null!=(i=oC[e.code])?i:e.message}};var oD=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function oM(e){var t;let{title:i,message:a}=null!=(t=oL(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 ox=[rT.MEDIA_ERROR_CODE,rT.MEDIA_ERROR_MESSAGE];class oN extends ou{constructor(){super(...arguments),((e,t)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,null)})(this,ha)}static get observedAttributes(){return[...super.observedAttributes,...ox]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!ox.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=r.code&&null!==oL(r),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r),!this.hasAttribute("aria-label"))){let{title:e}=oL(r);e&&this.setAttribute("aria-label",e)}}get mediaError(){var e;return oD(this,e=ha,"read from private field"),e.get(this)}set mediaError(e){var t;oD(this,t=ha,"write to private field"),t.set(this,e)}get mediaErrorCode(){return nl(this,"mediaerrorcode")}set mediaErrorCode(e){nd(this,"mediaerrorcode",e)}get mediaErrorMessage(){return nh(this,"mediaerrormessage")}set mediaErrorMessage(e){nm(this,"mediaerrormessage",e)}}ha=new WeakMap,oN.getSlotTemplateHTML=function(e){return` 824 <style> 825 :host { 826 background: rgb(20 20 30 / .8); 827 } 828 829 #content { 830 display: block; 831 padding: 1.2em 1.5em; 832 } 833 834 h3, 835 p { 836 margin-block: 0 .3em; 837 } 838 </style> 839 <slot name="error-${e.mediaerrorcode}" id="content"> 840 ${oM({code:+e.mediaerrorcode,message:e.mediaerrormessage})} 841 </slot> 842 `},oN.formatErrorMessage=oM,rJ.customElements.get("media-error-dialog")||rJ.customElements.define("media-error-dialog",oN);var oO=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)},oP=(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 oU extends ou{constructor(){super(...arguments),oP(this,hr,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)}),oP(this,hn,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",oO(this,hr)),document.addEventListener("keydown",oO(this,hn)))}disconnectedCallback(){this.removeEventListener("click",oO(this,hr)),document.removeEventListener("keydown",oO(this,hn))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"open"===e&&(this.open?(this.addEventListener("click",oO(this,hr)),document.addEventListener("keydown",oO(this,hn))):(this.removeEventListener("click",oO(this,hr)),document.removeEventListener("keydown",oO(this,hn))))}}hr=new WeakMap,hn=new WeakMap,oU.getSlotTemplateHTML=function(e){let t;return` 843 <style> 844 :host { 845 position: fixed; 846 top: 0; 847 left: 0; 848 z-index: 9999; 849 background: rgb(20 20 30 / .8); 850 backdrop-filter: blur(10px); 851 } 852 853 #content { 854 display: block; 855 width: clamp(400px, 40vw, 700px); 856 max-width: 90vw; 857 text-align: left; 858 } 859 860 h2 { 861 margin: 0 0 1.5rem 0; 862 font-size: 1.5rem; 863 font-weight: 500; 864 text-align: center; 865 } 866 867 .shortcuts-table { 868 width: 100%; 869 border-collapse: collapse; 870 } 871 872 .shortcuts-table tr { 873 border-bottom: 1px solid rgba(255, 255, 255, 0.1); 874 } 875 876 .shortcuts-table tr:last-child { 877 border-bottom: none; 878 } 879 880 .shortcuts-table td { 881 padding: 0.75rem 0.5rem; 882 } 883 884 .shortcuts-table td:first-child { 885 text-align: right; 886 padding-right: 1rem; 887 width: 40%; 888 min-width: 120px; 889 } 890 891 .shortcuts-table td:last-child { 892 padding-left: 1rem; 893 } 894 895 .key { 896 display: inline-block; 897 background: rgba(255, 255, 255, 0.15); 898 border: 1px solid rgba(255, 255, 255, 0.2); 899 border-radius: 4px; 900 padding: 0.25rem 0.5rem; 901 font-family: 'Courier New', monospace; 902 font-size: 0.9rem; 903 font-weight: 500; 904 min-width: 1.5rem; 905 text-align: center; 906 margin: 0 0.2rem; 907 } 908 909 .description { 910 color: rgba(255, 255, 255, 0.9); 911 font-size: 0.95rem; 912 } 913 914 .key-combo { 915 display: flex; 916 align-items: center; 917 justify-content: flex-end; 918 gap: 0.3rem; 919 } 920 921 .key-separator { 922 color: rgba(255, 255, 255, 0.5); 923 font-size: 0.9rem; 924 } 925 </style> 926 <slot id="content"> 927 ${t=[{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` 928 <tr> 929 <td> 930 <div class="key-combo">${i}</div> 931 </td> 932 <td class="description">${t}</td> 933 </tr> 934 `}).join(""),` 935 <h2>Keyboard Shortcuts</h2> 936 <table class="shortcuts-table">${t}</table> 937 `} 938 </slot> 939 `},rJ.customElements.get("media-keyboard-shortcuts-dialog")||rJ.customElements.define("media-keyboard-shortcuts-dialog",oU);var oW=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};let oH=`<svg aria-hidden="true" viewBox="0 0 26 24"> 940 <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/> 941</svg>`,oB=`<svg aria-hidden="true" viewBox="0 0 26 24"> 942 <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/> 943</svg>`,o$=e=>{let t=e.mediaIsFullscreen?r$("exit fullscreen mode"):r$("enter fullscreen mode");e.setAttribute("aria-label",t)};class oV extends s2{constructor(){super(...arguments),((e,t)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,null)})(this,hs)}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_IS_FULLSCREEN,rT.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),o$(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_IS_FULLSCREEN&&o$(this)}get mediaFullscreenUnavailable(){return nh(this,rT.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){nm(this,rT.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return nu(this,rT.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){nc(this,rT.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var t,i;oW(this,t=hs,"write to private field"),t.set(this,e);let a=(oW(this,i=hs,"read from private field"),i.get(this)instanceof PointerEvent),r=this.mediaIsFullscreen?new rJ.CustomEvent(rg.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new rJ.CustomEvent(rg.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}hs=new WeakMap,oV.getSlotTemplateHTML=function(e){return` 944 <style> 945 :host([${rT.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) { 946 display: none !important; 947 } 948 949 950 :host(:not([${rT.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) { 951 display: none !important; 952 } 953 954 :host([${rT.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter], 955 :host(:not([${rT.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] { 956 display: none; 957 } 958 </style> 959 960 <slot name="icon"> 961 <slot name="enter">${oH}</slot> 962 <slot name="exit">${oB}</slot> 963 </slot> 964 `},oV.getTooltipContentHTML=function(){return` 965 <slot name="tooltip-enter">${r$("Enter fullscreen mode")}</slot> 966 <slot name="tooltip-exit">${r$("Exit fullscreen mode")}</slot> 967 `},rJ.customElements.get("media-fullscreen-button")||rJ.customElements.define("media-fullscreen-button",oV);let{MEDIA_TIME_IS_LIVE:oq,MEDIA_PAUSED:oK}=rT,{MEDIA_SEEK_TO_LIVE_REQUEST:oF,MEDIA_PLAY_REQUEST:oY}=rg,oG=e=>{var t;let i=e.mediaPaused||!e.mediaTimeIsLive,a=i?r$("seek to live"):r$("playing live");e.setAttribute("aria-label",a);let r=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');r&&(r.textContent=r$("live")),i?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class oj extends s2{static get observedAttributes(){return[...super.observedAttributes,oq,oK]}connectedCallback(){super.connectedCallback(),oG(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),oG(this)}get mediaPaused(){return nu(this,rT.MEDIA_PAUSED)}set mediaPaused(e){nc(this,rT.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return nu(this,rT.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){nc(this,rT.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new rJ.CustomEvent(oF,{composed:!0,bubbles:!0})),this.hasAttribute(oK)&&this.dispatchEvent(new rJ.CustomEvent(oY,{composed:!0,bubbles:!0})))}}oj.getSlotTemplateHTML=function(e){return` 968 <style> 969 :host { --media-tooltip-display: none; } 970 971 slot[name=indicator] > *, 972 :host ::slotted([slot=indicator]) { 973 974 min-width: auto; 975 fill: var(--media-live-button-icon-color, rgb(140, 140, 140)); 976 color: var(--media-live-button-icon-color, rgb(140, 140, 140)); 977 } 978 979 :host([${oq}]:not([${oK}])) slot[name=indicator] > *, 980 :host([${oq}]:not([${oK}])) ::slotted([slot=indicator]) { 981 fill: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 982 color: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 983 } 984 985 :host([${oq}]:not([${oK}])) { 986 cursor: var(--media-cursor, not-allowed); 987 } 988 989 slot[name=text]{ 990 text-transform: uppercase; 991 } 992 993 </style> 994 995 <slot name="indicator"><svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg></slot> 996 997 <slot name="spacer"> </slot><slot name="text">${r$("live")}</slot> 998 `},rJ.customElements.get("media-live-button")||rJ.customElements.define("media-live-button",oj);var oQ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oz=(e,t,i)=>(oQ(e,t,"read from private field"),i?i.call(e):t.get(e)),oZ=(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)},oX=(e,t,i,a)=>(oQ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let oJ="loadingdelay",o0="noautohide",o1=` 999<svg aria-hidden="true" viewBox="0 0 100 100"> 1000 <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"> 1001 <animateTransform 1002 attributeName="transform" 1003 attributeType="XML" 1004 type="rotate" 1005 dur="1s" 1006 from="0 50 50" 1007 to="360 50 50"
1008 repeatCount="indefinite" /> 1009 </path> 1010</svg> 1011`;class o2 extends rJ.HTMLElement{constructor(){if(super(),oZ(this,ho,void 0),oZ(this,hl,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rf.MEDIA_CONTROLLER,rT.MEDIA_PAUSED,rT.MEDIA_LOADING,oJ]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===oJ&&t!==i?this.loadingDelay=Number(i):e===rf.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oz(this,ho))?void 0:a.unassociateElement)||r.call(a,this),oX(this,ho,null)),i&&this.isConnected&&(oX(this,ho,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oz(this,ho))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(rf.MEDIA_CONTROLLER);a&&(oX(this,ho,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=oz(this,ho))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oz(this,ho))?void 0:e.unassociateElement)||t.call(e,this),oX(this,ho,null)}get loadingDelay(){return oz(this,hl)}set loadingDelay(e){oX(this,hl,e);let{style:t}=ns(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return nu(this,rT.MEDIA_PAUSED)}set mediaPaused(e){nc(this,rT.MEDIA_PAUSED,e)}get mediaLoading(){return nu(this,rT.MEDIA_LOADING)}set mediaLoading(e){nc(this,rT.MEDIA_LOADING,e)}get mediaController(){return nh(this,rf.MEDIA_CONTROLLER)}set mediaController(e){nm(this,rf.MEDIA_CONTROLLER,e)}get noAutohide(){return nu(this,o0)}set noAutohide(e){nc(this,o0,e)}}ho=new WeakMap,hl=new WeakMap,o2.shadowRootOptions={mode:"open"},o2.getTemplateHTML=function(e){return` 1012 <style> 1013 :host { 1014 display: var(--media-control-display, var(--media-loading-indicator-display, inline-block)); 1015 vertical-align: middle; 1016 box-sizing: border-box; 1017 --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms); 1018 } 1019 1020 #status { 1021 color: rgba(0,0,0,0); 1022 width: 0px; 1023 height: 0px; 1024 } 1025 1026 :host slot[name=icon] > *, 1027 :host ::slotted([slot=icon]) { 1028 opacity: var(--media-loading-indicator-opacity, 0); 1029 transition: opacity 0.15s; 1030 } 1031 1032 :host([${rT.MEDIA_LOADING}]:not([${rT.MEDIA_PAUSED}])) slot[name=icon] > *, 1033 :host([${rT.MEDIA_LOADING}]:not([${rT.MEDIA_PAUSED}])) ::slotted([slot=icon]) { 1034 opacity: var(--media-loading-indicator-opacity, 1); 1035 transition: opacity 0.15s var(--_loading-indicator-delay); 1036 } 1037 1038 :host #status { 1039 visibility: var(--media-loading-indicator-opacity, hidden); 1040 transition: visibility 0.15s; 1041 } 1042 1043 :host([${rT.MEDIA_LOADING}]:not([${rT.MEDIA_PAUSED}])) #status { 1044 visibility: var(--media-loading-indicator-opacity, visible); 1045 transition: visibility 0.15s var(--_loading-indicator-delay); 1046 } 1047 1048 svg, img, ::slotted(svg), ::slotted(img) { 1049 width: var(--media-loading-indicator-icon-width); 1050 height: var(--media-loading-indicator-icon-height, 100px); 1051 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1052 vertical-align: middle; 1053 } 1054 </style> 1055 1056 <slot name="icon">${o1}</slot> 1057 <div id="status" role="status" aria-live="polite">${r$("media loading")}</div> 1058 `},rJ.customElements.get("media-loading-indicator")||rJ.customElements.define("media-loading-indicator",o2);let o3=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1059 <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"/> 1060</svg>`,o4=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1061 <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"/> 1062</svg>`,o5=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1063 <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"/> 1064</svg>`,o9=e=>{let t="off"===e.mediaVolumeLevel?r$("unmute"):r$("mute");e.setAttribute("aria-label",t)};class o8 extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),o9(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_VOLUME_LEVEL&&o9(this)}get mediaVolumeLevel(){return nh(this,rT.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){nm(this,rT.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?rg.MEDIA_UNMUTE_REQUEST:rg.MEDIA_MUTE_REQUEST;this.dispatchEvent(new rJ.CustomEvent(e,{composed:!0,bubbles:!0}))}}o8.getSlotTemplateHTML=function(e){return` 1065 <style> 1066 :host(:not([${rT.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]), 1067 :host([${rT.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) { 1068 display: none !important; 1069 } 1070 1071 :host([${rT.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) { 1072 display: none !important; 1073 } 1074 1075 :host([${rT.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) { 1076 display: none !important; 1077 } 1078 1079 :host([${rT.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) { 1080 display: none !important; 1081 } 1082 1083 :host(:not([${rT.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute], 1084 :host([${rT.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] { 1085 display: none; 1086 } 1087 </style> 1088 1089 <slot name="icon"> 1090 <slot name="off">${o3}</slot> 1091 <slot name="low">${o4}</slot> 1092 <slot name="medium">${o4}</slot> 1093 <slot name="high">${o5}</slot> 1094 </slot> 1095 `},o8.getTooltipContentHTML=function(){return` 1096 <slot name="tooltip-mute">${r$("Mute")}</slot> 1097 <slot name="tooltip-unmute">${r$("Unmute")}</slot> 1098 `},rJ.customElements.get("media-mute-button")||rJ.customElements.define("media-mute-button",o8);let o6=`<svg aria-hidden="true" viewBox="0 0 28 24"> 1099 <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"/> 1100</svg>`,o7=e=>{let t=e.mediaIsPip?r$("exit picture in picture mode"):r$("enter picture in picture mode");e.setAttribute("aria-label",t)};class le extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_IS_PIP,rT.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),o7(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_IS_PIP&&o7(this)}get mediaPipUnavailable(){return nh(this,rT.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){nm(this,rT.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return nu(this,rT.MEDIA_IS_PIP)}set mediaIsPip(e){nc(this,rT.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?rg.MEDIA_EXIT_PIP_REQUEST:rg.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new rJ.CustomEvent(e,{composed:!0,bubbles:!0}))}}le.getSlotTemplateHTML=function(e){return` 1101 <style> 1102 :host([${rT.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) { 1103 display: none !important; 1104 } 1105 1106 :host(:not([${rT.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) { 1107 display: none !important; 1108 } 1109 1110 :host([${rT.MEDIA_IS_PIP}]) slot[name=tooltip-enter], 1111 :host(:not([${rT.MEDIA_IS_PIP}])) slot[name=tooltip-exit] { 1112 display: none; 1113 } 1114 </style> 1115 1116 <slot name="icon"> 1117 <slot name="enter">${o6}</slot> 1118 <slot name="exit">${o6}</slot> 1119 </slot> 1120 `},le.getTooltipContentHTML=function(){return` 1121 <slot name="tooltip-enter">${r$("Enter picture in picture mode")}</slot> 1122 <slot name="tooltip-exit">${r$("Exit picture in picture mode")}</slot> 1123 `},rJ.customElements.get("media-pip-button")||rJ.customElements.define("media-pip-button",le);var lt=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let li="rates",la=[1,1.2,1.5,1.7,2];function lr(e){return Math.round(100*e)/100}class ln extends s2{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,hd,new nW(this,li,{defaultValue:la})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${lr(null!=(e=this.mediaPlaybackRate)?e:1)}x`}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_PLAYBACK_RATE,li]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===li&&
1123(lt(this,hd).value=i),e===rT.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=lr(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",r$("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return lt(this,hd)}set rates(e){e?Array.isArray(e)?lt(this,hd).value=e.join(" "):"string"==typeof e&&(lt(this,hd).value=e):lt(this,hd).value=""}get mediaPlaybackRate(){return nl(this,rT.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nd(this,rT.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(lt(this,hd).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 rJ.CustomEvent(rg.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}hd=new WeakMap,ln.getSlotTemplateHTML=function(e){let t=e.mediaplaybackrate?lr(+e.mediaplaybackrate):1;return` 1124 <style> 1125 :host { 1126 min-width: 5ch; 1127 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1128 } 1129 </style> 1130 <slot name="icon">${t}x</slot> 1131 `},ln.getTooltipContentHTML=function(){return r$("Playback rate")},rJ.customElements.get("media-playback-rate-button")||rJ.customElements.define("media-playback-rate-button",ln);let ls=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1132 <path d="m6 21 15-9L6 3v18Z"/> 1133</svg>`,lo=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1134 <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/> 1135</svg>`,ll=e=>{let t=e.mediaPaused?r$("play"):r$("pause");e.setAttribute("aria-label",t)};class ld extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_PAUSED,rT.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),ll(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e===rT.MEDIA_PAUSED||e===rT.MEDIA_LANG)&&ll(this)}get mediaPaused(){return nu(this,rT.MEDIA_PAUSED)}set mediaPaused(e){nc(this,rT.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?rg.MEDIA_PLAY_REQUEST:rg.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new rJ.CustomEvent(e,{composed:!0,bubbles:!0}))}}ld.getSlotTemplateHTML=function(e){return` 1136 <style> 1137 :host([${rT.MEDIA_PAUSED}]) slot[name=pause], 1138 :host(:not([${rT.MEDIA_PAUSED}])) slot[name=play] { 1139 display: none !important; 1140 } 1141 1142 :host([${rT.MEDIA_PAUSED}]) slot[name=tooltip-pause], 1143 :host(:not([${rT.MEDIA_PAUSED}])) slot[name=tooltip-play] { 1144 display: none; 1145 } 1146 </style> 1147 1148 <slot name="icon"> 1149 <slot name="play">${ls}</slot> 1150 <slot name="pause">${lo}</slot> 1151 </slot> 1152 `},ld.getTooltipContentHTML=function(){return` 1153 <slot name="tooltip-play">${r$("Play")}</slot> 1154 <slot name="tooltip-pause">${r$("Pause")}</slot> 1155 `},rJ.customElements.get("media-play-button")||rJ.customElements.define("media-play-button",ld);let lu="placeholdersrc";class lc extends rJ.HTMLElement{static get observedAttributes(){return[lu,"src"]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if("src"===e&&(null==i?this.image.removeAttribute("src"):this.image.setAttribute("src",i)),e===lu)if(null==i)this.image.style.removeProperty("background-image");else{var a;a=this.image,a.style["background-image"]=`url('${i}')`}}get placeholderSrc(){return nh(this,lu)}set placeholderSrc(e){nm(this,"src",e)}get src(){return nh(this,"src")}set src(e){nm(this,"src",e)}}lc.shadowRootOptions={mode:"open"},lc.getTemplateHTML=function(e){return` 1156 <style> 1157 :host { 1158 pointer-events: none; 1159 display: var(--media-poster-image-display, inline-block); 1160 box-sizing: border-box; 1161 } 1162 1163 img { 1164 max-width: 100%; 1165 max-height: 100%; 1166 min-width: 100%; 1167 min-height: 100%; 1168 background-repeat: no-repeat; 1169 background-position: var(--media-poster-image-background-position, var(--media-object-position, center)); 1170 background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain)); 1171 object-fit: var(--media-object-fit, contain); 1172 object-position: var(--media-object-position, center); 1173 } 1174 </style> 1175 1176 <img part="poster img" aria-hidden="true" id="image"/> 1177 `},rJ.customElements.get("media-poster-image")||rJ.customElements.define("media-poster-image",lc);var lh=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};hu=new WeakMap,rJ.customElements.get("media-preview-chapter-display")||rJ.customElements.define("media-preview-chapter-display",class extends ok{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,hu,void 0),((e,t,i)=>(lh(e,t,"write to private field"),t.set(e,i)))(this,hu,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_PREVIEW_CHAPTER,rT.MEDIA_LA
1177NG]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),(e===rT.MEDIA_PREVIEW_CHAPTER||e===rT.MEDIA_LANG)&&i!==t&&null!=i)if((lh(this,hu,"read from private field"),hu.get(this)).textContent=i,""!==i){let e=r$("chapter: {chapterName}",{chapterName:i});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return nh(this,rT.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){nm(this,rT.MEDIA_PREVIEW_CHAPTER,e)}});var lm=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lp=(e,t,i)=>(lm(e,t,"read from private field"),i?i.call(e):t.get(e)),lv=(e,t,i,a)=>(lm(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class lb extends rJ.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,hc,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rf.MEDIA_CONTROLLER,rT.MEDIA_PREVIEW_IMAGE,rT.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(rf.MEDIA_CONTROLLER);a&&(lv(this,hc,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=lp(this,hc))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=lp(this,hc))?void 0:e.unassociateElement)||t.call(e,this),lv(this,hc,null)}attributeChangedCallback(e,t,i){var a,r,n,s,o;[rT.MEDIA_PREVIEW_IMAGE,rT.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===rf.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=lp(this,hc))?void 0:a.unassociateElement)||r.call(a,this),lv(this,hc,null)),i&&this.isConnected&&(lv(this,hc,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=lp(this,hc))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return nh(this,rT.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){nm(this,rT.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(rT.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){e?this.setAttribute(rT.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(rT.MEDIA_PREVIEW_COORDS)}update(){let e,t,i=this.mediaPreviewCoords,a=this.mediaPreviewImage;if(!(i&&a))return;let[r,n,s,o]=i,l=a.split("#")[0],d=getComputedStyle(this),{maxWidth:u,maxHeight:c,minWidth:h,minHeight:m}=d;if("fill"===(d.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain")){let i=parseInt(u)/s,a=parseInt(c)/o,r=parseInt(h)/s,n=parseInt(m)/o;e=i<1?i:Math.max(i,r),t=a<1?a:Math.max(a,n)}else{let i=Math.min(parseInt(u)/s,parseInt(c)/o),a=Math.max(parseInt(h)/s,parseInt(m)/o),r=i<1?i:a>1?a:1;e=r,t=r}let{style:p}=ns(this.shadowRoot,":host"),v=ns(this.shadowRoot,"img").style,b=this.shadowRoot.querySelector("img"),E=1>Math.min(e,t)?"min":"max";p.setProperty(`${E}-width`,"initial","important"),p.setProperty(`${E}-height`,"initial","important"),p.width=`${s*e}px`,p.height=`${o*t}px`;let g=()=>{v.width=`${this.imgWidth*e}px`,v.height=`${this.imgHeight*t}px`,v.display="block"};b.src!==l&&(b.onload=()=>{this.imgWidth=b.naturalWidth,this.imgHeight=b.naturalHeight,g(),b.onload=null},b.src=l,g()),g(),v.transform=`translate(-${r*e}px, -${n*t}px)`}}hc=new WeakMap,lb.shadowRootOptions={mode:"open"},lb.getTemplateHTML=function(e){return` 1178 <style> 1179 :host { 1180 box-sizing: border-box; 1181 display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block)); 1182 overflow: hidden; 1183 } 1184 1185 img { 1186 display: none; 1187 position: relative; 1188 } 1189 </style> 1190 <img crossorigin loading="eager" decoding="async"> 1191 `},rJ.customElements.get("media-preview-thumbnail")||rJ.customElements.define("media-preview-thumbnail",lb);var lE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lg=(e,t,i)=>(lE(e,t,"read from private field"),i?i.call(e):t.get(e));hh=new WeakMap,rJ.customElements.get("media-preview-time-display")||rJ.customElements.define("media-preview-time-display",class extends ok{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,hh,void 0),((e,t,i)=>(lE(e,t,"write to private field"),t.set(e,i)))(this,hh,this.shadowRoot.querySelector("slot")),lg(this,hh).textContent=rK(0)}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_PREVIEW_TIME&&null!=i&&(lg(this,hh).textContent=rK(parseFloat(i)))}get mediaPreviewTime(){return nl(this,rT.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){nd(this,rT.MEDIA_PREVIEW_TIME,e)}});let lf="seekoffset";class ly extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_CURRENT_TIME,lf]}connectedCallback(){super.connectedCallback(),this.seekOffset=nl(this,lf,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",r$("seek back {seekOffset} seconds",{seekOffset:a})),e===lf&&(this.seekOffset=nl(this,lf,30))}get seekOffset(){return nl(this,lf,30)}set seekOffset(e){nd(this,lf,e),this.setAttribute("aria-label",r$("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),r7(ne(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return nl(this,rT.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){nd(this,rT.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new rJ.CustomEvent(rg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}ly.getSlotTemplateHTML=function(e,t){let i;return` 1192 <slot name="icon">${i=t.seekOffset,` 1193 <svg aria-hidden="true" viewBox="0 0 20 24"> 1194 <defs> 1195 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1196 </defs> 1197 <text class="text value" transform="translate(2.18 19.87)">${i}</text> 1198 <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"/> 1199 </svg>`}</slot> 1200 `},ly.getTooltipContentHTML=function(){return r$("Seek backward")},rJ.customElements.get("media-seek-backward-button")||rJ.customElements.define("media-seek-backward-button",ly);let l_="seekoffset";class lT extends s2{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_CURRENT_TIME,l_]}connectedCallback(){super.connectedCallback(),this.seekOffset=nl(this,l_,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",r$("seek forward {seekOffset} seconds",{seekOffset:a})),e===l_&&(this.seekOffset=nl(this,l_,30))}get seekOffset(){return nl(this,l_,30)}set seekOffset(e){nd(this,l_,e),this.setAttribute("aria-label",r$("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),r7(ne(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return nl(this,rT.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){nd(this,rT.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new rJ.CustomEvent(rg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}lT.getSlotTemplateHTML=function(e,t){let i;return` 1201 <slot name="icon">${i=t.seekOffset,` 1202 <svg aria-hidden="true" viewBox="0 0 20 24"> 1203 <defs> 1204 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1205 </defs> 1206 <text class="text value" transform="translate(8.9 19.87)">${i}</text> 1207 <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"/> 1208 </svg>`}</slot> 1209 `},lT.getTooltipContentHTML=function(){return r$("Seek forward")},rJ.customElements.get("media-seek-forward-button")||rJ.customElements.define("media-seek-forward-button",lT);var lA=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lk=(e,t,i)=>(lA(e,t,"read from private field"),i?i.call(e):t.get(e)),lw=(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)},lI=(e,t,i,a)=>(lA(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lS=(e,t,i)=>(lA(e,t,"access private method"),i);let lR={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},lC=[...Object.values(lR),rT.MEDIA_CURRENT_TIME,rT.MEDIA_DURATION,rT.MEDIA_SEEKABLE],lL=["Enter"," "],lD=" / ",lM=(e,{timesSep:t=lD}={})=>{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?rK(0-(s-r)):rK(r);return e.showDuration?`${o}${t}${rK(s)}`:o};class lx extends ok{constructor(){super(),lw(this,hb),lw(this,hg),lw(this,hy),lw(this,hT),lw(this,hm,void 0),lw(this,hp,null),lw(this,hv,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!lL.includes(a)?this.removeEventListener("keyup",lk(this,hp)):this.addEventListener("keyup",lk(this,hp))}),lI(this,hm,this.shadowRoot.querySelector("slot")),lk(this,hm).innerHTML=`${lM(this)}`}static get observedAttributes(){return[...super.observedAttributes,...lC,"disabled"]}connectedCallback(){let{style:e}=ns(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.setAttribute("aria-label",r$("playback time")),lS(this,hy,h_).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),lS(this,hg,hf).call(this),super.disconnectedCallback()}attributeChangedCallback(e,t,i){this.setAttribute("aria-label",r$("playback time")),lC.includes(e)?this.update():"disabled"===e&&i!==t?null==i?lS(this,hy,h_).call(this):lS(this,hT,hA).call(this):e===lR.NO_TOGGLE&&i!==t&&(this.noToggle?lS(this,hT,hA).call(this):lS(this,hy,h_).call(this)),super.attributeChangedCallback(e,t,i)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return nu(this,lR.REMAINING)}set remaining(e){nc(this,lR.REMAINING,e)}get showDuration(){return nu(this,lR.SHOW_DURATION)}set showDuration(e){nc(this,lR.SHOW_DURATION,e)}get noToggle(){return nu(this,lR.NO_TOGGLE)}set noToggle(e){nc(this,lR.NO_TOGGLE,e)}get mediaDuration(){return nl(this,rT.MEDIA_DURATION)}set mediaDuration(e){nd(this,rT.MEDIA_DURATION,e)}get mediaCurrentTime(){return nl(this,rT.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){nd(this,rT.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(rT.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null==e?this.removeAttribute(rT.MEDIA_SEEKABLE):this.setAttribute(rT.MEDIA_SEEKABLE,e.join(":"))}update(){let e=lM(this);(e=>{var t;
1209let 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-description",r$("video not loaded, unknown time."));let n=e.remaining?rq(0-(r-i)):rq(i);if(!e.showDuration)return e.setAttribute("aria-description",n);let s=r$("{currentTime} of {totalTime}",{currentTime:n,totalTime:rq(r)});e.setAttribute("aria-description",s)})(this),e!==lk(this,hm).innerHTML&&(lk(this,hm).innerHTML=e)}}hm=new WeakMap,hp=new WeakMap,hv=new WeakMap,hb=new WeakSet,hE=function(){lk(this,hp)||(lI(this,hp,e=>{let{key:t}=e;lL.includes(t)?this.toggleTimeDisplay():this.removeEventListener("keyup",lk(this,hp))}),this.addEventListener("keydown",lk(this,hv)),this.addEventListener("click",this.toggleTimeDisplay))},hg=new WeakSet,hf=function(){lk(this,hp)&&(this.removeEventListener("keyup",lk(this,hp)),this.removeEventListener("keydown",lk(this,hv)),this.removeEventListener("click",this.toggleTimeDisplay),lI(this,hp,null))},hy=new WeakSet,h_=function(){this.noToggle||this.hasAttribute("disabled")||(this.setAttribute("role","button"),this.enable(),lS(this,hb,hE).call(this))},hT=new WeakSet,hA=function(){this.removeAttribute("role"),this.disable(),lS(this,hg,hf).call(this)},lx.getSlotTemplateHTML=function(e,t){return` 1210 <slot>${lM(t)}</slot> 1211 `},rJ.customElements.get("media-time-display")||rJ.customElements.define("media-time-display",lx);var lN=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lO=(e,t,i)=>(lN(e,t,"read from private field"),i?i.call(e):t.get(e)),lP=(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)},lU=(e,t,i,a)=>(lN(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class lW{constructor(e,t,i){lP(this,hk,void 0),lP(this,hw,void 0),lP(this,hI,void 0),lP(this,hS,void 0),lP(this,hR,void 0),lP(this,hC,void 0),lP(this,hL,void 0),lP(this,hD,void 0),lP(this,hM,0),lP(this,hx,(e=performance.now())=>{lU(this,hM,requestAnimationFrame(lO(this,hx))),lU(this,hS,performance.now()-lO(this,hI));let t=1e3/this.fps;if(lO(this,hS)>t){let i,a;lU(this,hI,e-lO(this,hS)%t);let r=1e3/((e-lO(this,hw))/++(i=this,a=hR,{set _(value){lU(i,a,value,void 0)},get _(){return lO(i,a,void 0)}})._),n=(e-lO(this,hC))/1e3/this.duration,s=lO(this,hL)+n*this.playbackRate;s-lO(this,hk).valueAsNumber>0?lU(this,hD,this.playbackRate/this.duration/r):(lU(this,hD,.995*lO(this,hD)),s=lO(this,hk).valueAsNumber+lO(this,hD)),this.callback(s)}}),lU(this,hk,e),this.callback=t,this.fps=i}start(){0===lO(this,hM)&&(lU(this,hI,performance.now()),lU(this,hw,lO(this,hI)),lU(this,hR,0),lO(this,hx).call(this))}stop(){0!==lO(this,hM)&&(cancelAnimationFrame(lO(this,hM)),lU(this,hM,0))}update({start:e,duration:t,playbackRate:i}){let a=e-lO(this,hk).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),lU(this,hL,e),lU(this,hC,performance.now()),this.duration=t,this.playbackRate=i}}hk=new WeakMap,hw=new WeakMap,hI=new WeakMap,hS=new WeakMap,hR=new WeakMap,hC=new WeakMap,hL=new WeakMap,hD=new WeakMap,hM=new WeakMap,hx=new WeakMap;var lH=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lB=(e,t,i)=>(lH(e,t,"read from private field"),i?i.call(e):t.get(e)),l$=(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)},lV=(e,t,i,a)=>(lH(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lq=(e,t,i)=>(lH(e,t,"access private method"),i);let lK=(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))},lF=(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 lY extends ob{constructor(){super(),l$(this,hF),l$(this,hj),l$(this,hz),l$(this,hX),l$(this,h0),l$(this,h2),l$(this,h4),l$(this,hN,null),l$(this,hO,void 0),l$(this,hP,void 0),l$(this,hU,void 0),l$(this,hW,void 0),l$(this,hH,void 0),l$(this,hB,void 0),l$(this,h$,void 0),l$(this,hV,void 0),l$(this,hq,void 0),l$(this,hK,()=>{lq(this,hF,hY).call(this)?lB(this,hO).start():lB(this,hO).stop()}),l$(this,hG,e=>{!this.dragging&&(rP(e)&&(this.range.valueAsNumber=e),lB(this,hq)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),lV(this,hP,this.shadowRoot.querySelectorAll('[part~="box"]')),lV(this,hW,this.shadowRoot.querySelector('[part~="preview-box"]')),lV(this,hH,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);lV(this,hB,parseInt(e.getPropertyValue("--media-box-padding-left"))),lV(this,h$,parseInt(e.getPropertyValue("--media-box-padding-right"))),lV(this,hO,new lW(this.range,lB(this,hG),60))}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_PAUSED,rT.MEDIA_DURATION,rT.MEDIA_SEEKABLE,rT.MEDIA_CURRENT_TIME,rT.MEDIA_PREVIEW_IMAGE,rT.MEDIA_PREVIEW_TIME,rT.MEDIA_PREVIEW_CHAPTER,rT.MEDIA_BUFFERED,rT.MEDIA_PLAYBACK_RATE,rT.MEDIA_LOADING,rT.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",r$("seek")),lB(this,hK).call(this),lV(this,hN,this.getRootNode()),null==(e=lB(this,hN))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),lB(this,hO).stop(),null==(e=lB(this,hN))||e.removeEventListener("transitionstart",this),lV(this,hN,null)}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!=i){if(e===rT.MEDIA_CURRENT_TIME||e===rT.MEDIA_PAUSED||e===rT.MEDIA_ENDED||e===rT.MEDIA_LOADING||e===rT.MEDIA_DURATION||e===rT.MEDIA_SEEKABLE){let e,t,i,a;lB(this,hO).update({start:lK(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),lB(this,hK).call(this),e=this.range,t=rq(+lF(this)),i=rq(+this.mediaSeekableEnd),a=t&&i?r$("{currentTime} of {totalTime}",{currentTime:t,totalTime:i}):r$("video not loaded, unknown time."),e.setAttribute("aria-valuetext",a)}else e===rT.MEDIA_BUFFERED&&this.updateBufferedBar();(e===rT.MEDIA_DURATION||e===rT.MEDIA_SEEKABLE)&&(this.mediaChapter
1211sCues=lB(this,hV),this.updateBar())}}get mediaChaptersCues(){return lB(this,hV)}set mediaChaptersCues(e){var t;lV(this,hV,e),this.updateSegments(null==(t=lB(this,hV))?void 0:t.map(e=>({start:lK(this,e.startTime),end:lK(this,e.endTime)})))}get mediaPaused(){return nu(this,rT.MEDIA_PAUSED)}set mediaPaused(e){nc(this,rT.MEDIA_PAUSED,e)}get mediaLoading(){return nu(this,rT.MEDIA_LOADING)}set mediaLoading(e){nc(this,rT.MEDIA_LOADING,e)}get mediaDuration(){return nl(this,rT.MEDIA_DURATION)}set mediaDuration(e){nd(this,rT.MEDIA_DURATION,e)}get mediaCurrentTime(){return nl(this,rT.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){nd(this,rT.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return nl(this,rT.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nd(this,rT.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(rT.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(rT.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(rT.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(rT.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null==e?this.removeAttribute(rT.MEDIA_SEEKABLE):this.setAttribute(rT.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 nh(this,rT.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){nm(this,rT.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return nl(this,rT.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){nd(this,rT.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return nu(this,rT.MEDIA_ENDED)}set mediaEnded(e){nc(this,rT.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=lK(this,r)}let{style:a}=ns(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=ns(this.shadowRoot,"#current-rail"),t=ns(this.shadowRoot,'[part~="current-box"]'),i=lq(this,hj,hQ).call(this,lB(this,hH)),a=lq(this,hz,hZ).call(this,i,this.range.valueAsNumber),r=lq(this,hX,hJ).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":lq(this,h4,h5).call(this);break;case"pointermove":lq(this,h0,h1).call(this,e);break;case"pointerup":lB(this,hq)&&lV(this,hq,!1);break;case"pointerdown":lV(this,hq,!0);break;case"pointerleave":lq(this,h2,h3).call(this,null);break;case"transitionstart":nt(e.target,this)&&setTimeout(()=>lB(this,hK).call(this),0)}}}hN=new WeakMap,hO=new WeakMap,hP=new WeakMap,hU=new WeakMap,hW=new WeakMap,hH=new WeakMap,hB=new WeakMap,h$=new WeakMap,hV=new WeakMap,hq=new WeakMap,hK=new WeakMap,hF=new WeakSet,hY=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&nn(this)},hG=new WeakMap,hj=new WeakSet,hQ=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?ni(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}},hz=new WeakSet,hZ=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},hX=new WeakSet,hJ=function(e,t){let{width:i,min:a,max:r}
1211=e.box,n=t*e.range.width;if(n<a+lB(this,hB)){let t=e.range.left-e.bounds.left-lB(this,hB);return`${n-i/2+t}px`}if(n>r-lB(this,h$)){let t=e.bounds.right-e.range.right-lB(this,h$);return`${n+i/2-t-e.range.width}px`}return 0},h0=new WeakSet,h1=function(e){let t=[...lB(this,hP)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void lq(this,h2,h3).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=ns(this.shadowRoot,"#preview-rail"),r=ns(this.shadowRoot,'[part~="preview-box"]'),n=lq(this,hj,hQ).call(this,lB(this,hW)),s=(e.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let o=lq(this,hz,hZ).call(this,n,s),l=lq(this,hX,hJ).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(lB(this,hU))-Math.round(s*i))&&s>.01&&s<.99||(lV(this,hU,s*i),lq(this,h2,h3).call(this,lB(this,hU)))},h2=new WeakSet,h3=function(e){this.dispatchEvent(new rJ.CustomEvent(rg.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},h4=new WeakSet,h5=function(){lB(this,hO).stop();let e=lF(this);this.dispatchEvent(new rJ.CustomEvent(rg.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},lY.shadowRootOptions={mode:"open"},lY.getContainerTemplateHTML=function(e){return` 1212 <style> 1213 :host { 1214 --media-box-border-radius: 4px; 1215 --media-box-padding-left: 10px; 1216 --media-box-padding-right: 10px; 1217 --media-preview-border-radius: var(--media-box-border-radius); 1218 --media-box-arrow-offset: var(--media-box-border-radius); 1219 --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 1220 --_preview-background: var(--media-preview-background, var(--_control-background)); 1221 1222 1223 contain: layout; 1224 } 1225 1226 #buffered { 1227 background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4)); 1228 position: absolute; 1229 height: 100%; 1230 will-change: width; 1231 } 1232 1233 #preview-rail, 1234 #current-rail { 1235 width: 100%; 1236 position: absolute; 1237 left: 0; 1238 bottom: 100%; 1239 pointer-events: none; 1240 will-change: transform; 1241 } 1242 1243 [part~="box"] { 1244 width: min-content; 1245 1246 position: absolute; 1247 bottom: 100%; 1248 flex-direction: column; 1249 align-items: center; 1250 transform: translateX(-50%); 1251 } 1252 1253 [part~="current-box"] { 1254 display: var(--media-current-box-display, var(--media-box-display, flex)); 1255 margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px)); 1256 visibility: hidden; 1257 } 1258 1259 [part~="preview-box"] { 1260 display: var(--media-preview-box-display, var(--media-box-display, flex)); 1261 margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px)); 1262 transition-property: var(--media-preview-transition-property, visibility, opacity); 1263 transition-duration: var(--media-preview-transition-duration-out, .25s); 1264 transition-delay: var(--media-preview-transition-delay-out, 0s); 1265 visibility: hidden; 1266 opacity: 0; 1267 } 1268 1269 :host(:is([${rT.MEDIA_PREVIEW_IMAGE}], [${rT.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] { 1270 transition-duration: var(--media-preview-transition-duration-in, .5s); 1271 transition-delay: var(--media-preview-transition-delay-in, .25s); 1272 visibility: visible; 1273 opacity: 1; 1274 } 1275 1276 @media (hover: hover) { 1277 :host(:is([${rT.MEDIA_PREVIEW_IMAGE}], [${rT.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] { 1278 transition-duration: var(--media-preview-transition-duration-in, .5s); 1279 transition-delay: var(--media-preview-transition-delay-in, .25s); 1280 visibility: visible; 1281 opacity: 1; 1282 } 1283 } 1284 1285 media-preview-thumbnail, 1286 ::slotted(media-preview-thumbnail) { 1287 visibility: hidden; 1288 1289 transition: visibility 0s .25s; 1290 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1291 background: var(--media-preview-thumbnail-background, var(--_preview-background)); 1292 box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2)); 1293 max-width: var(--media-preview-thumbnail-max-width, 180px); 1294 max-height: var(--media-preview-thumbnail-max-height, 160px); 1295 min-width: var(--media-preview-thumbnail-min-width, 120px); 1296 min-height: var(--media-preview-thumbnail-min-height, 80px); 1297 border: var(--media-preview-thumbnail-border); 1298 border-radius: var(--media-preview-thumbnail-border-radius, 1299 var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0); 1300 } 1301 1302 :host([${rT.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail, 1303 :host([${rT.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) { 1304 transition-delay: var(--media-preview-transition-delay-in, .25s); 1305 visibility: visible; 1306 } 1307 1308 @media (hover: hover) { 1309 :host([${rT.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail, 1310 :host([${rT.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) { 1311 transition-delay: var(--media-preview-transition-delay-in, .25s); 1312 visibility: visible; 1313 } 1314 1315 :host([${rT.MEDIA_PREVIEW_TIME}]:hover) { 1316 --media-time-range-hover-display: block; 1317 } 1318 } 1319 1320 media-preview-chapter-display, 1321 ::slotted(media-preview-chapter-display) { 1322 font-size: var(--media-font-size, 13px); 1323 line-height: 17px; 1324 min-width: 0; 1325 visibility: hidden; 1326 1327 transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s; 1328 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1329 background: var(--media-preview-chapter-background, var(--_preview-background)); 1330 border-radius: var(--media-preview-chapter-border-radius, 1331 var(--media-preview-border-radius) var(--media-preview-border-radius) 1332 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1333 padding: var(--media-preview-chapter-padding, 3.5px 9px); 1334 margin: var(--media-preview-chapter-margin, 0 0 5px); 1335 text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1336 } 1337 1338 :host([${rT.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display, 1339 :host([${rT.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) { 1340 transition-delay: var(--media-preview-transition-delay-in, .25s); 1341 border-radius: var(--media-preview-chapter-border-radius, 0); 1342 padding: var(--media-preview-chapter-padding, 3.5px 9px 0); 1343 margin: var(--media-preview-chapter-margin, 0); 1344 min-width: 100%; 1345 } 1346 1347 media-preview-chapter-display[${rT.MEDIA_PREVIEW_CHAPTER}], 1348 ::slotted(media-preview-chapter-display[${rT.MEDIA_PREVIEW_CHAPTER}]) { 1349 visibility: visible; 1350 } 1351 1352 media-preview-chapter-display:not([aria-valuetext]), 1353 ::slotted(media-preview-chapter-display:not([aria-valuetext])) { 1354 display: none; 1355 } 1356 1357 media-preview-time-display, 1358 ::slotted(media-preview-time-display), 1359 media-time-display, 1360 ::slotted(media-time-display) { 1361 font-size: var(--media-font-size, 13px); 1362 line-height: 17px; 1363 min-width: 0; 1364 1365 transition: min-width 0s, border-radius 0s; 1366 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1367 background: var(--media-preview-time-background, var(--_preview-background)); 1368 border-radius: var(--media-preview-time-border-radius, 1369 var(--media-preview-border-radius) var(--media-preview-border-radius) 1370 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1371 padding: var(--media-preview-time-padding, 3.5px 9px); 1372 margin: var(--media-preview-time-margin, 0); 1373 text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1374 transform: translateX(min( 1375 max(calc(50% - var(--_box-width) / 2), 1376 calc(var(--_box-shift, 0))), 1377 calc(var(--_box-width) / 2 - 50%) 1378 )); 1379 } 1380 1381 :host([${rT.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display, 1382 :host([${rT.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) { 1383 transition-delay: var(--media-preview-transition-delay-in, .25s); 1384 border-radius: var(--media-preview-time-border-radius, 1385 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1386 min-width: 100%; 1387 } 1388 1389 :host([${rT.MEDIA_PREVIEW_TIME}]:hover) { 1390 --media-time-range-hover-display: block; 1391 } 1392 1393 [part~="arrow"], 1394 ::slotted([part~="arrow"]) { 1395 display: var(--media-box-arrow-display, inline-block); 1396 transform: translateX(min( 1397 max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)), 1398 calc(var(--_box-shift, 0))), 1399 calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset)) 1400 )); 1401 1402 border-color: transparent; 1403 border-top-color: var(--media-box-arrow-background, var(--_control-background)); 1404 border-width: var(--media-box-arrow-border-width, 1405 var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0); 1406 border-style: solid; 1407 justify-content: center; 1408 height: 0; 1409 } 1410 </style> 1411 <div id="preview-rail"> 1412 <slot name="preview" part="box preview-box">
1413 <media-preview-thumbnail> 1414 <template shadowrootmode="${lb.shadowRootOptions.mode}"> 1415 ${lb.getTemplateHTML({})} 1416 </template> 1417 </media-preview-thumbnail> 1418 <media-preview-chapter-display></media-preview-chapter-display> 1419 <media-preview-time-display></media-preview-time-display> 1420 <slot name="preview-arrow"><div part="arrow"></div></slot> 1421 </slot> 1422 </div> 1423 <div id="current-rail"> 1424 <slot name="current" part="box current-box"> 1425 1426 </slot> 1427 </div> 1428 `},rJ.customElements.get("media-time-range")||rJ.customElements.define("media-time-range",lY);var lG=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};h9=new WeakMap,rJ.customElements.get("media-volume-range")||rJ.customElements.define("media-volume-range",class extends ob{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,h9,()=>{let e=this.range.value,t=new rJ.CustomEvent(rg.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_VOLUME,rT.MEDIA_MUTED,rT.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",r$("volume")),this.range.addEventListener("input",lG(this,h9))}disconnectedCallback(){this.range.removeEventListener("input",lG(this,h9)),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rT.MEDIA_VOLUME||e===rT.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()}}
1428get mediaVolume(){return nl(this,rT.MEDIA_VOLUME,1)}set mediaVolume(e){nd(this,rT.MEDIA_VOLUME,e)}get mediaMuted(){return nu(this,rT.MEDIA_MUTED)}set mediaMuted(e){nc(this,rT.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return nh(this,rT.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){nm(this,rT.MEDIA_VOLUME_UNAVAILABLE,e)}});class lj extends s2{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=r$("Loop"))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return nu(this,rT.MEDIA_LOOP)}set mediaLoop(e){nc(this,rT.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,t=new rJ.CustomEvent(rg.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}lj.getSlotTemplateHTML=function(e){return` 1429 <style> 1430 :host { 1431 min-width: 4ch; 1432 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1433 width: 100%; 1434 display: grid; 1435 grid-template-columns: 1fr auto; 1436 gap: 1rem; 1437 font-weight: var(--media-button-font-weight, normal); 1438 } 1439 1440 #checked-indicator { 1441 display: none; 1442 } 1443 1444 :host([${rT.MEDIA_LOOP}]) #checked-indicator { 1445 display: block; 1446 } 1447 </style> 1448 1449 <span id="icon"> 1450 </span> 1451 1452 <div id="checked-indicator"> 1453 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 1454 <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"/> 1455 </svg> 1456 </div> 1457 `},lj.getTooltipContentHTML=function(){return r$("Loop")},rJ.customElements.get("media-loop-button")||rJ.customElements.define("media-loop-button",lj);var lQ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lz=(e,t,i)=>(lQ(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)},lX=(e,t,i,a)=>(lQ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let lJ={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 l8&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof l8?a.element[a.attributeName]=t:a.value=t}}}};class l0 extends rJ.DocumentFragment{constructor(e,t,i=lJ){var a;super(),lZ(this,h8,void 0),lZ(this,h6,void 0),this.append(e.content.cloneNode(!0)),lX(this,h8,l1(this)),lX(this,h6,i),null==(a=i.createCallback)||a.call(i,this,lz(this,h8),t),i.processCallback(this,lz(this,h8),t)}update(e){lz(this,h6).processCallback(this,lz(this,h8),e)}}h8=new WeakMap,h6=new WeakMap;let l1=(e,t=[])=>{let i,a;for(let r of e.attributes||[])if(r.value.includes("{{")){let n=new l9;for([i,a]of l3(r.value))if(i){let i=new l8(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 l3(n))if(i){let i=new l6(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(r instanceof HTMLTemplateElement){let i=new l7(e,r);s.push(i),t.push([i.expression,i])}r.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else l1(r,t);return t},l2={},l3=e=>{let t="",i=0,a=l2[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]),l2[e]=a};class l4{get value(){return""}set value(e){}toString(){return this.value}}let l5=new WeakMap;class l9{constructor(){lZ(this,h7,[])}[Symbol.iterator](){return lz(this,h7).values()}get length(){return lz(this,h7).length}item(e){return lz(this,h7)[e]}append(...e){for(let t of e)t instanceof l8&&l5.set(t,this),lz(this,h7).push(t)}toString(){return lz(this,h7).join("")}}h7=new WeakMap;class l8 extends l4{constructor(e,t,i){super(),lZ(this,mr),lZ(this,me,""),lZ(this,mt,void 0),lZ(this,mi,void 0),lZ(this,ma,void 0),lX(this,mt,e),lX(this,mi,t),lX(this,ma,i)}get attributeName(){return lz(this,mi)}get attributeNamespace(){return lz(this,ma)}
1457get element(){return lz(this,mt)}get value(){return lz(this,me)}set value(e){lz(this,me)!==e&&(lX(this,me,e),lz(this,mr,mn)&&1!==lz(this,mr,mn).length?lz(this,mt).setAttributeNS(lz(this,ma),lz(this,mi),lz(this,mr,mn).toString()):null==e?lz(this,mt).removeAttributeNS(lz(this,ma),lz(this,mi)):lz(this,mt).setAttributeNS(lz(this,ma),lz(this,mi),e))}get booleanValue(){return lz(this,mt).hasAttributeNS(lz(this,ma),lz(this,mi))}set booleanValue(e){if(lz(this,mr,mn)&&1!==lz(this,mr,mn).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}me=new WeakMap,mt=new WeakMap,mi=new WeakMap,ma=new WeakMap,mr=new WeakSet,mn=function(){return l5.get(this)};class l6 extends l4{constructor(e,t){super(),lZ(this,ms,void 0),lZ(this,mo,void 0),lX(this,ms,e),lX(this,mo,t?[...t]:[new Text])}get replacementNodes(){return lz(this,mo)}get parentNode(){return lz(this,ms)}get nextSibling(){return lz(this,mo)[lz(this,mo).length-1].nextSibling}get previousSibling(){return lz(this,mo)[0].previousSibling}get value(){return lz(this,mo).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),lX(this,mo,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}(lz(this,mo)[0].parentNode,lz(this,mo),t,this.nextSibling))}}ms=new WeakMap,mo=new WeakMap;class l7 extends l6{constructor(e,t){const i=t.getAttribute("directive")||t.getAttribute("type");let 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 de={string:e=>String(e)};class dt{constructor(e){this.template=e,this.state=void 0}}let di=new WeakMap,da=new WeakMap,dr={partial:(e,t)=>{t[e.expression]=new dt(e.template)},if:(e,t)=>{var i;if(dd(e.expression,t))if(di.get(e)!==e.template){di.set(e,e.template);let i=new l0(e.template,t,ds);e.replace(i),da.set(e,i)}else null==(i=da.get(e))||i.update(t);else e.replace(""),di.delete(e),da.delete(e)}},dn=Object.keys(dr),ds={processCallback(e,t,i){var a,r;if(i)for(let[e,n]of t){if(n instanceof l7){if(!n.directive){let e=dn.find(e=>n.template.hasAttribute(e));e&&(n.directive=e,n.expression=n.template.getAttribute(e))}null==(a=dr[n.directive])||a.call(dr,n,i);continue}let t=dd(e,i);if(t instanceof dt){di.get(n)!==t.template?(di.set(n,t.template),n.value=t=new l0(t.template,t.state,ds),da.set(n,t)):null==(r=da.get(n))||r.update(t.state);continue}t?(n instanceof l8&&n.attributeName.startsWith("aria-")&&(t=String(t)),n instanceof l8?"boolean"==typeof t?n.booleanValue=t:"function"==typeof t?n.element[n.attributeName]=t:n.value=t:(n.value=t,di.delete(n),da.delete(n))):n instanceof l8?n.value=void 0:(n.value=void 0,di.delete(n),da.delete(n))}}},dl={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
1457e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=de[t])?void 0:i.call(de,e)}};function dd(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 du(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return du(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]=dh(d,t))}return i}if(1===d.length)return dc(d[0])?dh(d[0].token,t):du(e);if(2===d.length){let i=dl[null==(o=d[0])?void 0:o.token];return i&&dc(d[1])?i(dh(d[1].token,t)):du(e)}if(3===d.length){let i=null==(l=d[1])?void 0:l.token,a=dl[i];if(!a||!dc(d[0])||!dc(d[2]))return du(e);let r=dh(d[0].token,t);return a(r,"|"===i?d[2].token:dh(d[2].token,t))}}function du(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function dc({type:e}){return["number","boolean","string","param"].includes(e)}function dh(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):rU(e)?parseFloat(e):t[e]}var dm=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dp=(e,t,i)=>(dm(e,t,"read from private field"),i?i.call(e):t.get(e)),dv=(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)=>(dm(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dE=(e,t,i)=>(dm(e,t,"access private method"),i);let dg={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},df=r0.createElement("template");df.innerHTML=` 1458 <style> 1459 :host { 1460 display: inline-block; 1461 line-height: 0; 1462 } 1463 1464 media-controller { 1465 width: 100%; 1466 height: 100%; 1467 } 1468 1469 media-captions-button:not([mediasubtitleslist]), 1470 media-captions-menu:not([mediasubtitleslist]), 1471 media-captions-menu-button:not([mediasubtitleslist]), 1472 media-audio-track-menu[mediaaudiotrackunavailable], 1473 media-audio-track-menu-button[mediaaudiotrackunavailable], 1474 media-rendition-menu[mediarenditionunavailable], 1475 media-rendition-menu-button[mediarenditionunavailable], 1476 media-volume-range[mediavolumeunavailable], 1477 media-airplay-button[mediaairplayunavailable], 1478 media-fullscreen-button[mediafullscreenunavailable], 1479 media-cast-button[mediacastunavailable], 1480 media-pip-button[mediapipunavailable] { 1481 display: none; 1482 } 1483 </style> 1484`;class dy extends rJ.HTMLElement{constructor(){super(),dv(this,mh),dv(this,mp),dv(this,ml,void 0),dv(this,md,void 0),dv(this,mu,void 0),dv(this,mc,void 0),dv(this,mb,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer()),db(this,mc,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&&!!(dg[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()})),db(this,mb,this.render.bind(this)),dE(this,mh,mm).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=dp(this,ml))?e:this.constructor.template}set template(e){null===e?this.removeAttribute("template"):"string"==typeof e?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(db(this,ml,e),db(this,mu,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})=>dg[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(let e of a){let t=null!=(i=dg[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(rU(a)&&(a=parseFloat(a)),r[t]=""===a||a):r[t]=!1}return r}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&dE(this,mp,mv).call(this)}connectedCallback(){this.addEventListener(rA.BREAKPOINTS_COMPUTED,dp(this,mb)),dp(this,mc).observe(this,{attributes:!0}),dp(this,mc).observe(this.renderRoot,{attributes:!0,subtree:!0}),dE(this,mp,mv).call(this)}disconnectedCallback(){this.removeEventListener(rA.BREAKPOINTS_COMPUTED,dp(this,mb)),dp(this,mc).disconnect()}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==dp(this,md)&&(db(this,md,this.template),this.renderer=new l0(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(df.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}async function d_(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 dT(e){return e.split("-")[0]}ml=new WeakMap,md=new WeakMap,mu=new WeakMap,mc=new WeakMap,mh=new WeakSet,mm=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},mp=new WeakSet,mv=function(){var e;let t=this.getAttribute("template");if(!t||t===dp(this,mu))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){db(this,mu,t),db(this,ml,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)&&(db(this,mu,t),d_(t).then(e=>{let t=r0.createElement("template");t.innerHTML=e,db(this,ml,t),this.createRenderer()}).catch(console.error))},mb=new WeakMap,dy.observedAttributes=["template"],dy.processor=ds,rJ.customElements.get("media-theme")||rJ.customElements.define("media-theme",dy);
1484class dA extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}}class dk extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}}var dw=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dI=(e,t,i)=>(dw(e,t,"read from private field"),i?i.call(e):t.get(e)),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)},dR=(e,t,i,a)=>(dw(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dC=(e,t,i)=>(dw(e,t,"access private method"),i);function dL({type:e,text:t,value:i,checked:a}){let r=r0.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=r0.createElement("span");return n.textContent=t,r.append(n),r}function dD(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 dM="style",dx="hidden",dN="disabled";class dO extends rJ.HTMLElement{constructor(){if(super(),dS(this,mk),dS(this,mI),dS(this,mC),dS(this,mD),dS(this,mx),dS(this,mO),dS(this,mH),dS(this,m$),dS(this,mq),dS(this,mF),dS(this,mG),dS(this,mQ),dS(this,mZ),dS(this,mJ),dS(this,m1),dS(this,m3),dS(this,m5),dS(this,m8),dS(this,mE,null),dS(this,mg,null),dS(this,mf,null),dS(this,my,new Set),dS(this,m_,void 0),dS(this,mT,!1),dS(this,mA,null),dS(this,mR,()=>{let e=dI(this,my),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}));dR(this,my,t)}),dS(this,mU,()=>{dC(this,mH,mB).call(this),dC(this,m$,mV).call(this,!1)}),dS(this,mW,()=>{dC(this,mH,mB).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),dR(this,m_,new MutationObserver(dI(this,mR)))}static get observedAttributes(){return[dN,dx,dM,"anchor",rf.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":dC(this,mk,mw).call(this,e);break;case"invoke":dC(this,mD,mM).call(this,e);break;case"click":dC(this,mq,mK).call(this,e);break;case"toggle":dC(this,mG,mj).call(this,e);break;case"focusout":dC(this,mZ,mX).call(this,e);break;case"keydown":dC(this,mJ,m0).call(this,e)}}connectedCallback(){var e,t;dI(this,m_).observe(this.defaultSlot,{childList:!0}),dR(this,mA,no(this.shadowRoot,":host")),dC(this,mC,mL).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),dR(this,mE,r6(this)),null==(t=null==(e=dI(this,mE))?void 0:e.associateElement)||t.call(e,this),this.hidden||(r4(dU(this),dI(this,mU)),r4(this,dI(this,mW))),dC(this,mI,mS).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){var e,t;dI(this,m_).disconnect(),r5(dU(this),dI(this,mU)),r5(this,dI(this,mW)),this.disable(),null==(t=null==(e=dI(this,mE))?void 0:e.unassociateElement)||t.call(e,this),dR(this,mE,null),dR(this,mg,null),dR(this,mf,null),this.shadowRoot.removeEventListener("slotchange",this)}attributeChangedCallback(e,t,i){var a,r,n,s;e===dx&&i!==t?(dI(this,mT)||dR(this,mT,!0),this.hidden?dC(this,mO,mP).call(this):dC(this,mx,mN).call(this),this.dispatchEvent(new dk({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===rf.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=dI(this,mE))?void 0:a.unassociateElement)||r.call(a,this),dR(this,mE,null)),i&&this.isConnected&&(dR(this,mE,r6(this)),null==(s=null==(n=dI(this,mE))?void 0:n.associateElement)||s.call(n,this))):e===dN&&i!==t?null==i?this.enable():this.disable():e===dM&&i!==t&&dC(this,mC,mL).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}
1484set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=nr(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(dP)}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&&dC(this,m8,m6).call(this,t)}focus(){if(dR(this,mg,na()),this.items.length){dC(this,m5,m9).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=dC(this,m1,m2).call(this,e);i&&(dC(this,m8,m6).call(this,i,"checkbox"===i.type),dI(this,mf)&&!this.hidden&&(null==(t=dI(this,mg))||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=dC(this,m1,m2).call(this,e))?t:dC(this,m3,m4).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),dC(this,m5,m9).call(this,r[s]),r[s].focus()}}function dP(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function dU(e){var t;return null!=(t=e.getAttribute("bounds")?ni(e,`#${e.getAttribute("bounds")}`):r8(e)||e.parentElement)?t:e}mE=new WeakMap,mg=new WeakMap,mf=new WeakMap,my=new WeakMap,m_=new WeakMap,mT=new WeakMap,mA=new WeakMap,mk=new WeakSet,mw=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)&&dC(this,mI,mS).call(this),t.name||dI(this,mR).call(this)},mI=new WeakSet,mS=function(){let e=this.shadowRoot.querySelector('slot[name="header"]');e.hidden=0===this.shadowRoot.querySelector('slot[name="title"]').assignedNodes().length&&0===e.assignedNodes().length},mR=new WeakMap,mC=new WeakSet,mL=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")},mD=new WeakSet,mM=function(e){dR(this,mf,e.relatedTarget),nt(this,e.relatedTarget)||(this.hidden=!this.hidden)},mx=new WeakSet,mN=function(){var e;null==(e=dI(this,mf))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),r4(dU(this),dI(this,mU)),r4(this,dI(this,mW))},mO=new WeakSet,mP=function(){var e;null==(e=dI(this,mf))||e.setAttribute("aria-expanded","false"),r5(dU(this),dI(this,mU)),r5(this,dI(this,mW))},mU=new WeakMap,mW=new WeakMap,mH=new WeakSet,mB=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(dT(i))?"y":"x")?"y":"x",n="y"===r?"height":"width",s=dT(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}){var i,a,r;let n,s;return{anchor:(i=e,a=t.offsetParent,n=i.getBoundingClientRect(),s=null!=(r=null==a?void 0:a.getBoundingClientRect())?r:{x:0,y:0},{x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}),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=dU(this).getBoundingClientRect(),r=a.width-t-e,n=a.height-i-this.offsetHeight,{style:s}=dI(this,mA);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`)},m$=new WeakSet,mV=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=dI(this,mA);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`),dC(this,mH,mB).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),dC(this,mH,mB).call(this);a.removeProperty("--media-menu-transition-in")},mq=new WeakSet,mK=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(dI(this,mF,mY))){null==(t=dI(this,mg))||t.focu
1484s(),this.hidden=!0;return}let i=dC(this,m1,m2).call(this,e);!i||i.hasAttribute("disabled")||(dC(this,m5,m9).call(this,i),this.handleSelect(e))},mF=new WeakSet,mY=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"]'))},mG=new WeakSet,mj=function(e){if(e.target===this)return;dC(this,mQ,mz).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 dA({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);dC(this,m$,mV).call(this,!0)},mQ=new WeakSet,mz=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},mZ=new WeakSet,mX=function(e){var t;nt(this,e.relatedTarget)||(dI(this,mT)&&(null==(t=dI(this,mg))||t.focus()),dI(this,mf)&&dI(this,mf)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},mJ=new WeakSet,m0=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(dI(this,mT)){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=dI(this,mg))||n.focus(),dI(this,mT)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},m1=new WeakSet,m2=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},m3=new WeakSet,m4=function(){return this.items.find(e=>0===e.tabIndex)},m5=new WeakSet,m9=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},m8=new WeakSet,m6=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}))},dO.shadowRootOptions={mode:"open"},dO.getTemplateHTML=function(e){return` 1485 <style> 1486 :host { 1487 font: var(--media-font, 1488 var(--media-font-weight, normal) 1489 var(--media-font-size, 14px) / 1490 var(--media-text-content-height, var(--media-control-height, 24px)) 1491 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 1492 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 1493 --_menu-bg: rgb(20 20 30 / .8); 1494 background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg)))); 1495 border-radius: var(--media-menu-border-radius); 1496 border: var(--media-menu-border, none); 1497 display: var(--media-menu-display, inline-flex) !important; 1498 1499 transition: var(--media-menu-transition-in, 1500 visibility 0s, 1501 opacity .2s ease-out, 1502 transform .15s ease-out, 1503 left .2s ease-in-out, 1504 min-width .2s ease-in-out, 1505 min-height .2s ease-in-out 1506 ) !important; 1507 1508 visibility: var(--media-menu-visibility, visible); 1509 opacity: var(--media-menu-opacity, 1); 1510 max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px)); 1511 transform: var(--media-menu-transform-in, translateY(0) scale(1)); 1512 flex-direction: column; 1513 1514 min-height: 0; 1515 position: relative; 1516 bottom: var(--_menu-bottom); 1517 box-sizing: border-box; 1518 } 1519 1520 @-moz-document url-prefix() { 1521 :host{ 1522 --_menu-bg: rgb(20 20 30); 1523 } 1524 } 1525 1526 :host([hidden]) { 1527 transition: var(--media-menu-transition-out, 1528 visibility .15s ease-in, 1529 opacity .15s ease-in, 1530 transform .15s ease-in 1531 ) !important; 1532 visibility: var(--media-menu-hidden-visibility, hidden); 1533 opacity: var(--media-menu-hidden-opacity, 0); 1534 max-height: var(--media-menu-hidden-max-height, 1535 var(--media-menu-max-height, var(--_menu-max-height, 300px))); 1536 transform: var(--media-menu-transform-out, translateY(2px) scale(.99)); 1537 pointer-events: none; 1538 } 1539 1540 :host([slot="submenu"]) { 1541 background: none; 1542 width: 100%; 1543 min-height: 100%; 1544 position: absolute; 1545 bottom: 0; 1546 right: -100%; 1547 } 1548 1549 #container { 1550 display: flex; 1551 flex-direction: column; 1552 min-height: 0; 1553 transition: transform .2s ease-out; 1554 transform: translate(0, 0); 1555 } 1556 1557 #container.has-expanded { 1558 transition: transform .2s ease-in; 1559 transform: translate(-100%, 0); 1560 } 1561 1562 button { 1563 background: none; 1564 color: inherit; 1565 border: none; 1566 padding: 0; 1567 font: inherit; 1568 outline: inherit; 1569 display: inline-flex; 1570 align-items: center; 1571 } 1572 1573 slot[name="header"][hidden] { 1574 display: none; 1575 } 1576 1577 slot[name="header"] > *, 1578 slot[name="header"]::slotted(*) { 1579 padding: .4em .7em; 1580 border-bottom: 1px solid rgb(255 255 255 / .25); 1581 cursor: var(--media-cursor, default); 1582 } 1583 1584 slot[name="header"] > button[part~="back"], 1585 slot[name="header"]::slotted(button[part~="back"]) { 1586 cursor: var(--media-cursor, pointer); 1587 } 1588 1589 svg[part~="back"] { 1590 height: var(--media-menu-icon-height, var(--media-control-height, 24px)); 1591 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1592 display: block; 1593 margin-right: .5ch; 1594 } 1595 1596 slot:not([name]) { 1597 gap: var(--media-menu-gap); 1598 flex-direction: var(--media-menu-flex-direction, column); 1599 overflow: var(--media-menu-overflow, hidden auto); 1600 display: flex; 1601 min-height: 0; 1602 } 1603 1604 :host([role="menu"]) slot:not([name]) { 1605 padding-block: .4em; 1606 } 1607 1608 slot:not([name])::slotted([role="menu"]) { 1609 background: none; 1610 } 1611 1612 media-chrome-menu-item > span { 1613 margin-right: .5ch; 1614 max-width: var(--media-menu-item-max-width); 1615 text-overflow: ellipsis; 1616 overflow: hidden; 1617 } 1618 </style> 1619 <style id="layout-row" media="width:0"> 1620 1621 slot[name="header"] > *, 1622 slot[name="header"]::slotted(*) { 1623 padding: .4em .5em; 1624 } 1625 1626 slot:not([name]) { 1627 gap: var(--media-menu-gap, .25em); 1628 flex-direction: var(--media-menu-flex-direction, row); 1629 padding-inline: .5em; 1630 } 1631 1632 media-chrome-menu-item { 1633 padding: .3em .5em; 1634 } 1635 1636 media-chrome-menu-item[aria-checked="true"] { 1637 background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2)); 1638 } 1639 1640 1641 media-chrome-menu-item::part(checked-indicator) { 1642 display: var(--media-menu-item-checked-indicator-display, none); 1643 } 1644 </style> 1645 <div id="container" part="container"> 1646 <slot name="header" hidden> 1647 <button part="back button" aria-label="Back to previous menu"> 1648 <slot name="back-icon"> 1649 <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator"> 1650 <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"/> 1651 </svg> 1652 </slot> 1653 <slot name="title"></slot> 1654 </button> 1655 </slot> 1656 <slot></slot> 1657 </div> 1658 <slot name="checked-indicator" hidden></slot> 1659 `},rJ.customElements.get("media-chrome-menu")||rJ.customElements.define("media-chrome-menu",dO);var dW=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dH=(e,t,i)=>(dW(e,t,"read from private field"),i?i.call(e):t.get(e)),dB=(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)},d$=(e,t,i,a)=>(dW(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dV=(e,t,i)=>(dW(e,t,"access private method"),i);let dq="type",dK="value",dF="checked",dY="disabled";class dG extends rJ.HTMLElement{constructor(){if(super(),dB(this,pt),dB(this,pa),dB(this,pn),dB(this,pu),dB(this,m7,!1),dB(this,pe,void 0),dB(this,po,()=>{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=r0.createElement("span");n.textContent=null!=r?r:"",i.replaceChildren(n)}),dB(this,pl,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.handleClick(e):this.removeEventListener("keyup",dH(this,pl))}),dB(this,pd,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",dH(this,pl)):this.addEventListener("keyup",dH(this,pl),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=r9(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[dq,dY,dF,dK]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),dj(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
1659se"),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":dV(this,pt,pi).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":dH(this,pd).call(this,e);break;case"keyup":dH(this,pl).call(this,e)}}attributeChangedCallback(e,t,i){e===dF&&dj(this)&&!dH(this,m7)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===dq&&i!==t?this.role="menuitem"+i:e===dY&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(dY)||this.enable(),this.role="menuitem"+this.type,d$(this,pe,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)),dV(this,pu,pc).call(this),this.submenuElement&&dV(this,pa,pr).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){this.disable(),dV(this,pu,pc).call(this),d$(this,pe,null),this.shadowRoot.removeEventListener("slotchange",this)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=nr(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(dq))?e:""}set type(e){this.setAttribute(dq,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(dK))?e:this.text}set value(e){this.setAttribute(dK,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(dj(this))return"true"===this.getAttribute("aria-checked")}set checked(e){dj(this)&&(d$(this,m7,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!dj(this)&&this.invokeTargetElement&&nt(this,e.target)&&this.invokeTargetElement.dispatchEvent(new dA({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function dj(e){return"radio"===e.type||"checkbox"===e.type}m7=new WeakMap,pe=new WeakMap,pt=new WeakSet,pi=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?dV(this,pa,pr).call(this):dV(this,pn,ps).call(this))},pa=new WeakSet,pr=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",dH(this,po)),this.submenuElement.addEventListener("addmenuitem",dH(this,po)),this.submenuElement.addEventListener("removemenuitem",dH(this,po)),dH(this,po).call(this)},pn=new WeakSet,ps=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",dH(this,po)),this.submenuElement.removeEventListener("addmenuitem",dH(this,po)),this.submenuElement.removeEventListener("removemenuitem",dH(this,po)),dH(this,po).call(this)},po=new WeakMap,pl=new WeakMap,pd=new WeakMap,pu=new WeakSet,pc=function(){var e;
1659let t=null==(e=dH(this,pe))?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")},dG.shadowRootOptions={mode:"open"},dG.getTemplateHTML=function(e){return` 1660 <style> 1661 :host { 1662 transition: var(--media-menu-item-transition, 1663 background .15s linear, 1664 opacity .2s ease-in-out 1665 ); 1666 outline: var(--media-menu-item-outline, 0); 1667 outline-offset: var(--media-menu-item-outline-offset, -1px); 1668 cursor: var(--media-cursor, pointer); 1669 display: flex; 1670 align-items: center; 1671 align-self: stretch; 1672 justify-self: stretch; 1673 white-space: nowrap; 1674 white-space-collapse: collapse; 1675 text-wrap: nowrap; 1676 padding: .4em .8em .4em 1em; 1677 } 1678 1679 :host(:focus-visible) { 1680 box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 1681 outline: var(--media-menu-item-hover-outline, 0); 1682 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1683 } 1684 1685 :host(:hover) { 1686 cursor: var(--media-cursor, pointer); 1687 background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5)); 1688 outline: var(--media-menu-item-hover-outline); 1689 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1690 } 1691 1692 :host([aria-checked="true"]) { 1693 background: var(--media-menu-item-checked-background); 1694 } 1695 1696 :host([hidden]) { 1697 display: none; 1698 } 1699 1700 :host([disabled]) { 1701 pointer-events: none; 1702 color: rgba(255, 255, 255, .3); 1703 } 1704 1705 slot:not([name]) { 1706 width: 100%; 1707 } 1708 1709 slot:not([name="submenu"]) { 1710 display: inline-flex; 1711 align-items: center; 1712 transition: inherit; 1713 opacity: var(--media-menu-item-opacity, 1); 1714 } 1715 1716 slot[name="description"] { 1717 justify-content: end; 1718 } 1719 1720 slot[name="description"] > span { 1721 display: inline-block; 1722 margin-inline: 1em .2em; 1723 max-width: var(--media-menu-item-description-max-width, 100px); 1724 text-overflow: ellipsis; 1725 overflow: hidden; 1726 font-size: .8em; 1727 font-weight: 400; 1728 text-align: right; 1729 position: relative; 1730 top: .04em; 1731 } 1732 1733 slot[name="checked-indicator"] { 1734 display: none; 1735 } 1736 1737 :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] { 1738 display: var(--media-menu-item-checked-indicator-display, inline-block); 1739 } 1740 1741 1742 svg, img, ::slotted(svg), ::slotted(img) { 1743 height: var(--media-menu-item-icon-height, var(--media-control-height, 24px)); 1744 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1745 display: block; 1746 } 1747 1748 1749 [part~="indicator"], 1750 ::slotted([part~="indicator"]) { 1751 fill: var(--media-menu-item-indicator-fill, 1752 var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)))); 1753 height: var(--media-menu-item-indicator-height, 1.25em); 1754 margin-right: .5ch; 1755 } 1756 1757 [part~="checked-indicator"] { 1758 visibility: hidden; 1759 } 1760 1761 :host([aria-checked="true"]) [part~="checked-indicator"] { 1762 visibility: visible; 1763 } 1764 </style> 1765 <slot name="checked-indicator"> 1766 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 1767 <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"/> 1768 </svg> 1769 </slot> 1770 <slot name="prefix"></slot> 1771 <slot></slot> 1772 <slot name="description"></slot> 1773 <slot name="suffix"> 1774 ${this.getSuffixSlotInnerHTML(e)} 1775 </slot> 1776 <slot name="submenu"></slot> 1777 `},dG.getSuffixSlotInnerHTML=function(e){return""},rJ.customElements.get("media-chrome-menu-item")||rJ.customElements.define("media-chrome-menu-item",dG);class dQ extends dO{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r8(this).querySelector("media-settings-menu-button")}}dQ.getTemplateHTML=function(e){return` 1778 ${dO.getTemplateHTML(e)} 1779 <style> 1780 :host { 1781 --_menu-bg: rgb(20 20 30 / .8); 1782 background: var(--media-settings-menu-background, 1783 var(--media-menu-background, 1784 var(--media-control-background, 1785 var(--media-secondary-color, var(--_menu-bg))))); 1786 min-width: var(--media-settings-menu-min-width, 170px); 1787 border-radius: 2px 2px 0 0; 1788 overflow: hidden; 1789 } 1790 1791 @-moz-document url-prefix() { 1792 :host{ 1793 --_menu-bg: rgb(20 20 30); 1794 } 1795 } 1796 1797 :host([role="menu"]) { 1798 1799 justify-content: end; 1800 } 1801 1802 slot:not([name]) { 1803 justify-content: var(--media-settings-menu-justify-content); 1804 flex-direction: var(--media-settings-menu-flex-direction, column); 1805 overflow: visible; 1806 } 1807 1808 #container.has-expanded { 1809 --media-settings-menu-item-opacity: 0; 1810 } 1811 </style> 1812 `},rJ.customElements.get("media-settings-menu")||rJ.customElements.define("media-settings-menu",dQ);class dz extends dG{}dz.shadowRootOptions={mode:"open"},dz.getTemplateHTML=function(e){return` 1813 ${dG.getTemplateHTML.call(this,e)} 1814 <style> 1815 slot:not([name="submenu"]) { 1816 opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity)); 1817 } 1818 1819 :host([aria-expanded="true"]:hover) { 1820 background: transparent; 1821 } 1822 </style> 1823 `},dz.getSuffixSlotInnerHTML=function(e){return` 1824 <svg aria-hidden="true" viewBox="0 0 20 24"> 1825 <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"/> 1826 </svg> 1827 `},rJ.customElements.get("media-settings-menu-item")||rJ.customElements.define("media-settings-menu-item",dz);class dZ extends s2{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=nr(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new dA({relatedTarget:this}))}}rJ.customElements.get("media-chrome-menu-button")||rJ.customElements.define("media-chrome-menu-button",dZ);class dX extends dZ{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",r$("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:r8(this).querySelector("media-settings-menu")}}dX.getSlotTemplateHTML=function(){return` 1828 <style> 1829 :host([aria-expanded="true"]) slot[name=tooltip] { 1830 display: none; 1831 } 1832 </style> 1833 <slot name="icon"> 1834 <svg aria-hidden="true" viewBox="0 0 24 24"> 1835 <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"/> 1836 </svg> 1837 </slot> 1838 `},dX.getTooltipContentHTML=function(){return r$("Settings")},rJ.customElements.get("media-settings-menu-button")||rJ.customElements.define("media-settings-menu-button",dX);var dJ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d0=(e,t,i)=>(dJ(e,t,"read from private field"),i?i.call(e):t.get(e)),d1=(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)},d2=(e,t,i,a)=>(dJ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),d3=(e,t,i)=>(dJ(e,t,"access private method"),i);
1838ph=new WeakMap,pm=new WeakMap,pp=new WeakSet,pv=function(){if(d0(this,pm)===JSON.stringify(this.mediaAudioTrackList))return;d2(this,pm,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e.sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0})),e)){let e=dL({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});e.prepend(dD(this,"checked-indicator")),this.defaultSlot.append(e)}},pb=new WeakSet,pE=function(){if(null==this.value)return;let e=new rJ.CustomEvent(rg.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rJ.customElements.get("media-audio-track-menu")||rJ.customElements.define("media-audio-track-menu",class extends dO{constructor(){super(...arguments),d1(this,pp),d1(this,pb),d1(this,ph,[]),d1(this,pm,void 0)}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_AUDIO_TRACK_LIST,rT.MEDIA_AUDIO_TRACK_ENABLED,rT.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rT.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===rT.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;d2(this,ph,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(rO)),d3(this,pp,pv).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",d3(this,pb,pE))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",d3(this,pb,pE))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=r8(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return d0(this,ph)}set mediaAudioTrackList(e){d2(this,ph,e),d3(this,pp,pv).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=nh(this,rT.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){nm(this,rT.MEDIA_AUDIO_TRACK_ENABLED,e)}});let d4=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1839 <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/> 1840 <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"/> 1841</svg>`,d5=e=>{let t=r$("Audio");e.setAttribute("aria-label",t)};class d9 extends dZ{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_AUDIO_TRACK_ENABLED,rT.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),d5(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_LANG&&d5(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=r8(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=nh(this,rT.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){nm(this,rT.MEDIA_AUDIO_TRACK_ENABLED,e)}}d9.getSlotTemplateHTML=function(){return` 1842 <style> 1843 :host([aria-expanded="true"]) slot[name=tooltip] { 1844 display: none; 1845 } 1846 </style> 1847 <slot name="icon">${d4}</slot> 1848 `},d9.getTooltipContentHTML=function(){return r$("Audio")},rJ.customElements.get("media-audio-track-menu-button")||rJ.customElements.define("media-audio-track-menu-button",d9);var d8=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d6=(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)},d7=(e,t,i)=>(d8(e,t,"access private method"),i);let ue=` 1849 <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator"> 1850 <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
18500 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"/> 1851 </svg>`;class ut extends dO{constructor(){super(...arguments),d6(this,pf),d6(this,p_),d6(this,pg,void 0)}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_SUBTITLES_LIST,rT.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_SUBTITLES_LIST&&t!==i?d7(this,pf,py).call(this):e===rT.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i||"",d7(this,pf,py).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",d7(this,p_,pT))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",d7(this,p_,pT))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r8(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return ui(this,rT.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ua(this,rT.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ui(this,rT.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ua(this,rT.MEDIA_SUBTITLES_SHOWING,e)}}pg=new WeakMap,pf=new WeakSet,py=function(){var e,t,i,a;let r=(d8(this,t=pg,"read from private field"),t.get(this)!==JSON.stringify(this.mediaSubtitlesList)),n=this.value!==this.getAttribute(rT.MEDIA_SUBTITLES_SHOWING);if(!r&&!n)return;i=pg,a=JSON.stringify(this.mediaSubtitlesList),d8(this,i,"write to private field"),i.set(this,a),this.defaultSlot.textContent="";let s=!this.value,o=dL({type:"radio",text:this.formatMenuItemText(r$("Off")),value:"off",checked:s});for(let t of(o.prepend(dD(this,"checked-indicator")),this.defaultSlot.append(o),this.mediaSubtitlesList)){let i=dL({type:"radio",text:this.formatMenuItemText(t.label,t),value:nV(t),checked:this.value==nV(t)});i.prepend(dD(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(dD(this,"captions-indicator")),this.defaultSlot.append(i)}},p_=new WeakSet,pT=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(rT.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new rJ.CustomEvent(rg.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new rJ.CustomEvent(rg.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},ut.getTemplateHTML=function(e){return` 1852 ${dO.getTemplateHTML(e)} 1853 <slot name="captions-indicator" hidden>${ue}</slot> 1854 `};let ui=(e,t)=>{let i=e.getAttribute(t);return i?nB(i):[]},ua=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=nq(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rJ.customElements.get("media-captions-menu")||rJ.customElements.define("media-captions-menu",ut);let ur=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1855 <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"/> 1856</svg>`,un=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1857 <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
18571 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"/> 1858</svg>`,us=e=>{e.setAttribute("data-captions-enabled",nG(e).toString())},uo=e=>{e.setAttribute("aria-label",r$("closed captions"))};class ul extends dZ{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_SUBTITLES_LIST,rT.MEDIA_SUBTITLES_SHOWING,rT.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),uo(this),us(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_SUBTITLES_SHOWING?us(this):e===rT.MEDIA_LANG&&uo(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=r8(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return ud(this,rT.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){uu(this,rT.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ud(this,rT.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){uu(this,rT.MEDIA_SUBTITLES_SHOWING,e)}}ul.getSlotTemplateHTML=function(){return` 1859 <style> 1860 :host([data-captions-enabled="true"]) slot[name=off] { 1861 display: none !important; 1862 } 1863 1864 1865 :host(:not([data-captions-enabled="true"])) slot[name=on] { 1866 display: none !important; 1867 } 1868 1869 :host([aria-expanded="true"]) slot[name=tooltip] { 1870 display: none; 1871 } 1872 </style> 1873 1874 <slot name="icon"> 1875 <slot name="on">${ur}</slot> 1876 <slot name="off">${un}</slot> 1877 </slot> 1878 `},ul.getTooltipContentHTML=function(){return r$("Captions")};let ud=(e,t)=>{let i=e.getAttribute(t);return i?nB(i):[]},uu=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=nq(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rJ.customElements.get("media-captions-menu-button")||rJ.customElements.define("media-captions-menu-button",ul);var uc=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},uh=(e,t,i)=>(uc(e,t,"read from private field"),i?i.call(e):t.get(e)),um=(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)},up=(e,t,i)=>(uc(e,t,"access private method"),i);let uv="rates";pA=new WeakMap,pk=new WeakSet,pw=function(){this.defaultSlot.textContent="";let e=lr(this.mediaPlaybackRate),t=new Set(Array.from(uh(this,pA)).map(e=>lr(Number(e))));for(let i of(e>0&&!t.has(e)&&t.add(e),Array.from(t).sort((e,t)=>e-t))){let t=dL({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i.toString(),checked:e===i});t.prepend(dD(this,"checked-indicator")),this.defaultSlot.append(t)}},pI=new WeakSet,pS=function(){if(!this.value)return;let e=new rJ.CustomEvent(rg.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rJ.customElements.get("media-playback-rate-menu")||rJ.customElements.define("media-playback-rate-menu",class extends dO{constructor(){super(),um(this,pk),um(this,pI),um(this,pA,new nW(this,uv,{defaultValue:la})),up(this,pk,pw).call(this)}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_PLAYBACK_RATE,uv]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rT.MEDIA_PLAYBACK_RATE&&t!=i?(this.value=i,up(this,pk,pw).call(this)):e===uv&&t!=i&&(uh(this,pA).value=i,up(this,pk,pw).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",up(this,pI,pS))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",up(this,pI,pS))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r8(this).querySelector("media-playback-rate-menu-button")}get rates(){return uh(this,pA)}set rates(e){e?Array.isArray(e)?uh(this,pA).value=e.join(" "):"str
1878ing"==typeof e&&(uh(this,pA).value=e):uh(this,pA).value="",up(this,pk,pw).call(this)}get mediaPlaybackRate(){return nl(this,rT.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nd(this,rT.MEDIA_PLAYBACK_RATE,e)}});class ub extends dZ{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${lr(null!=(e=this.mediaPlaybackRate)?e:1)}x`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rT.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=lr(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",r$("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:r8(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return nl(this,rT.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nd(this,rT.MEDIA_PLAYBACK_RATE,e)}}ub.getSlotTemplateHTML=function(e){let t=e.mediaplaybackrate?lr(+e.mediaplaybackrate):1;return` 1879 <style> 1880 :host { 1881 min-width: 5ch; 1882 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1883 } 1884 1885 :host([aria-expanded="true"]) slot { 1886 display: block; 1887 } 1888 1889 :host([aria-expanded="true"]) slot[name=tooltip] { 1890 display: none; 1891 } 1892 </style> 1893 <slot name="icon">${t}x</slot> 1894 `},ub.getTooltipContentHTML=function(){return r$("Playback rate")},rJ.customElements.get("media-playback-rate-menu-button")||rJ.customElements.define("media-playback-rate-menu-button",ub);var uE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ug=(e,t,i)=>(uE(e,t,"read from private field"),i?i.call(e):t.get(e)),uf=(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)},uy=(e,t,i,a)=>(uE(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),u_=(e,t,i)=>(uE(e,t,"access private method"),i);pR=new WeakMap,pC=new WeakMap,pL=new WeakSet,pD=function(){let e,t=!this.mediaRenditionSelected;if(ug(this,pC).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&ug(this,pC).mediaHeight===this.mediaHeight&&ug(this,pC).mediaWidth===this.mediaWidth&&ug(this,pC).isAuto===t)return;ug(this,pC).mediaRenditionList=JSON.stringify(this.mediaRenditionList),ug(this,pC).mediaHeight=this.mediaHeight,ug(this,pC).mediaWidth=this.mediaWidth,ug(this,pC).isAuto=t;let i=this.mediaRenditionList.sort(this.compareRendition.bind(this)),a=i.find(e=>e.id===this.mediaRenditionSelected);for(let e of i)e.selected=e===a;for(let e of(this.defaultSlot.textContent="",i)){let i=dL({type:"radio",text:this.formatRendition(e,{showBitrate:this.showRenditionBitrate(e)}),value:`${e.id}`,checked:e.selected&&!t});i.prepend(dD(this,"checked-indicator")),this.defaultSlot.append(i)}let r=a&&this.showRenditionBitrate(a);t&&(a?e=this.formatMenuItemText(`${r$("Auto")} \u2022 ${this.formatRendition(a,{showBitrate:r})}`,a):this.mediaHeight>0&&this.mediaWidth>0&&(e=this.formatMenuItemText(`${r$("Auto")} (${Math.min(this.mediaWidth,this.mediaHeight)}p)`))),e||(e=this.formatMenuItemText(r$("Auto")));let n=dL({type:"radio",text:e,value:"auto",checked:t});n.dataset.description=e,n.prepend(dD(this,"checked-indicator")),this.defaultSlot.append(n)},pM=new WeakSet,px=function(){if(null==this.value)return;let e=new rJ.CustomEvent(rg.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rJ.customElements.get("media-rendition-menu")||rJ.customElements.define("media-rendition-menu",class extends dO{constructor(){super(...arguments),uf(this,pL),uf(this,pM),uf(this,pR,[]),uf(this,pC,{})}static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_RENDITION_LIST,rT.MEDIA_RENDITION_SELECTED,rT.MEDIA_RENDITION_UNAVAILABLE,rT.MEDIA_HEIGHT,rT.MEDIA_WIDTH]}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),t!==i)switch(e){case rT.MEDIA_RENDITION_SELECTED:this.value=null!=i?i:"auto",u_(this,pL,pD).call(this);break;case rT.MEDIA_RENDITION_LIST:uy(this,pR,null==i?void 0:i.split(/\s+/).map(rx)),u_(this,pL,pD).call(this);break;case rT.MEDIA_HEIGHT:case rT.MEDIA_WIDTH:u_(this,pL,pD).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",u_(this,pM,px))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",u_(this,pM,px))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r8(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return ug(this,pR)}set mediaRenditionList(e){uy(this,pR,e),u_(this,pL,pD).call(this)}get mediaRenditionSelected(){return nh(this,rT.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){nm(this,rT.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return nl(this,rT.MEDIA_HEIGHT)}set mediaHeight(e){nd(this,rT.MEDIA_HEIGHT,e)}get mediaWidth(){return nl(this,rT.MEDIA_WIDTH)}set mediaWidth(e){nd(this,rT.MEDIA_WIDTH,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)}});let uT=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1895 <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" /> 1896</svg>`;class uA extends dZ{static get observedAttributes(){return[...super.observedAttributes,rT.MEDIA_RENDITION_SELECTED,rT.MEDIA_RENDITION_UNAVAILABLE,rT.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",r$("qual
1896ity"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:r8(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return nh(this,rT.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){nm(this,rT.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return nl(this,rT.MEDIA_HEIGHT)}set mediaHeight(e){nd(this,rT.MEDIA_HEIGHT,e)}}uA.getSlotTemplateHTML=function(){return` 1897 <style> 1898 :host([aria-expanded="true"]) slot[name=tooltip] { 1899 display: none; 1900 } 1901 </style> 1902 <slot name="icon">${uT}</slot> 1903 `},uA.getTooltipContentHTML=function(){return r$("Quality")},rJ.customElements.get("media-rendition-menu-button")||rJ.customElements.define("media-rendition-menu-button",uA);var uk=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},uw=(e,t,i)=>(uk(e,t,"read from private field"),i?i.call(e):t.get(e)),uI=(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)},uS=(e,t,i,a)=>(uk(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),uR=(e,t,i)=>(uk(e,t,"access private method"),i);class uC extends dO{constructor(){super(),uI(this,pO),uI(this,pU),uI(this,pH),uI(this,p$),uI(this,pK),uI(this,pN,!1),uI(this,pq,e=>{let t=e.target,i=(null==t?void 0:t.nodeName)==="VIDEO",a=uR(this,p$,pV).call(this,t);(i||a)&&(uw(this,pN)?uR(this,pU,pW).call(this):uR(this,pK,pF).call(this,e))}),uI(this,pY,e=>{let t=e.target,i=this.contains(t),a=2===e.button,r=(null==t?void 0:t.nodeName)==="VIDEO",n=uR(this,p$,pV).call(this,t);i||a&&(r||n)||uR(this,pU,pW).call(this)}),uI(this,pG,e=>{"Escape"===e.key&&uR(this,pU,pW).call(this)}),uI(this,pj,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)}uR(this,pU,pW).call(this)}),this.setAttribute("noautohide",""),uR(this,pO,pP).call(this)}connectedCallback(){super.connectedCallback(),r8(this).addEventListener("contextmenu",uw(this,pq)),this.addEventListener("click",uw(this,pj))}disconnectedCallback(){super.disconnectedCallback(),r8(this).removeEventListener("contextmenu",uw(this,pq)),this.removeEventListener("click",uw(this,pj)),document.removeEventListener("mousedown",uw(this,pY)),document.removeEventListener("keydown",uw(this,pG))}}pN=new WeakMap,pO=new WeakSet,pP=function(){this.hidden=!uw(this,pN)},pU=new WeakSet,pW=function(){uS(this,pN,!1),uR(this,pO,pP).call(this)},pH=new WeakSet,pB=function(){document.querySelectorAll("media-context-menu").forEach(e=>{e!==this&&uR(e,pU,pW).call(e)})},p$=new WeakSet,pV=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")))},pq=new WeakMap,pK=new WeakSet,pF=function(e){e.preventDefault(),uR(this,pH,pB).call(this),uS(this,pN,!0),this.style.position="fixed",this.style.left=`${e.clientX}px`,this.style.top=`${e.clientY}px`,uR(this,pO,pP).call(this),document.addEventListener("mousedown",uw(this,pY),{once:!0}),document.addEventListener("keydown",uw(this,pG),{once:!0})},pY=new WeakMap,pG=new WeakMap,pj=new WeakMap,uC.getTemplateHTML=function(e){return` 1904 ${dO.getTemplateHTML(e)} 1905 <style> 1906 :host { 1907 --_menu-bg: rgb(20 20 30 / .8); 1908 background: var(--media-settings-menu-background, 1909 var(--media-menu-background, 1910 var(--media-control-background, 1911 var(--media-secondary-color, var(--_menu-bg))))); 1912 min-width: var(--media-settings-menu-min-width, 170px); 1913 border-radius: 2px; 1914 overflow: hidden; 1915 } 1916 </style> 1917 `},rJ.customElements.get("media-context-menu")||rJ.customElements.define("media-context-menu",uC);class uL extends dG{}uL.shadowRootOptions={mode:"open"},uL.getTemplateHTML=function(e){return` 1918 ${dG.getTemplateHTML.call(this,e)} 1919 <style> 1920 ::slotted(*) { 1921 color: var(--media-text-color, white); 1922 text-decoration: none; 1923 border: none; 1924 background: none; 1925 cursor: pointer; 1926 padding: 0; 1927 min-height: var(--media-control-height, 24px); 1928 } 1929 </style> 1930 `},rJ.customElements.get("media-context-menu-item")||rJ.customElements.define("media-context-menu-item",uL);var uD=e=>{throw TypeError(e)},uM=(e,t,i)=>t.has(e)||uD("Cannot "+i),ux=(e,t,i)=>(uM(e,t,"read from private field"),i?i.call(e):t.get(e)),uN=(e,t,i)=>t.has(e)?uD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),uO=(e,t,i,a)=>(uM(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),uP=(e,t,i)=>(uM(e,t,"access private method"),i),uU=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};"u"<typeof DocumentFragment&&(globalThis.DocumentFragment=class extends uU{});var uW,uH,uB,u$,uV,uq,uK,uF,uY,uG,uj,uQ,uz,uZ,uX,uJ,u0,u1,u2,u3,u4,u5,u9,u8,u6,u7,ce,ct,ci,ca,cr,cn,
1930cs,co,cl,cd,cu,cc,ch,cm,cp,cv,cb,cE,cg,cf,cy,c_,cT,cA,ck,cw,cI,cS,cR,cC,cL,cD,cM,cx,cN,cO,cP,cU,cW,cH,cB,c$,cV,cq,cK,cF,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,hb,hE,hg,hf,hy,h_,hT,hA,hk,hw,hI,hS,hR,hC,hL,hD,hM,hx,hN,hO,hP,hU,hW,hH,hB,h$,hV,hq,hK,hF,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,mb,mE,mg,mf,my,m_,mT,mA,mk,mw,mI,mS,mR,mC,mL,mD,mM,mx,mN,mO,mP,mU,mW,mH,mB,m$,mV,mq,mK,mF,mY,mG,mj,mQ,mz,mZ,mX,mJ,m0,m1,m2,m3,m4,m5,m9,m8,m6,m7,pe,pt,pi,pa,pr,pn,ps,po,pl,pd,pu,pc,ph,pm,pp,pv,pb,pE,pg,pf,py,p_,pT,pA,pk,pw,pI,pS,pR,pC,pL,pD,pM,px,pN,pO,pP,pU,pW,pH,pB,p$,pV,pq,pK,pF,pY,pG,pj,pQ,pz=class extends uU{},pZ=class{constructor(e,t={}){uN(this,pQ),uO(this,pQ,null==t?void 0:t.detail)}get detail(){return ux(this,pQ)}initCustomEvent(){}};pQ=new WeakMap;var pX={document:{createElement:function(e,t){return new pz}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(pz)},CustomEvent:pZ,EventTarget:uU,HTMLElement:pz,HTMLVideoElement:class extends uU{}},pJ="u"<typeof window||void 0===globalThis.customElements,p0=pJ?pX:globalThis,p1=pJ?pX.document:globalThis.document;function p2(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function p3(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function p4(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function p5(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 p9,p8,p6,p7=(e,t)=>!!e&&!!t&&(!!e.contains(t)||p7(e,t.getRootNode().host)),ve="mux.com",vt=(()=>{try{return"3.13.0"}catch{}return"UNKNOWN"})(),vi=e=>{if(e){if([tF.LIVE,tF.ON_DEMAND].includes(e))return e;if(null!=e&&e.includes("live"))return tF.LIVE}},va={crossorigin:"crossOrigin",playsinline:"playsInline"},vr=class{constructor(e,t){uN(this,p9),uN(this,p8),uN(this,p6,[]),uO(this,p9,e),uO(this,p8,t)}[Symbol.iterator](){return ux(this,p6).values()}get length(){return ux(this,p6).length}get value(){var e;return null!=(e=ux(this,p6).join(" "))?e:""}set value(e){var t;e!==this.value&&(uO(this,p6,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return ux(this,p6)[e]}values(){return ux(this,p6).values()}keys(){return ux(this,p6).keys()}forEach(e){ux(this,p6).forEach(e)}add(...e){var t,i;e.forEach(e=>{this.contains(e)||ux(this,p6).push(e)}),(""!==this.value||null!=(t=ux(this,p9))&&t.hasAttribute(`${ux(this,p8)}`))&&null!=(i=ux(this,p9))&&i.setAttribute(`${ux(this,p8)}`,`${this.value}`)}remove(...e){var t;e.forEach(e=>{ux(this,p6).splice(ux(this,p6).indexOf(e),1)}),null==(t=ux(this,p9))||t.setAttribute(`${ux(this,p8)}`,`${this.value}`)}contains(e){return ux(this,p6).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)}};p9=new WeakMap,p8=new WeakMap,p6=new WeakMap;var vn=`[mux-player ${vt}]`;function vs(...e){console.warn(vn,...e)}function vo(...e){console.error(vn,...e)}function vl(e){var t;let i=null!=(t=e.message)?t:"";e.context&&(i+=` ${e.context}`),e.file&&(i+=` ${t7("Read more: ")} 1931https://github.com/muxinc/elements/blob/main/errors/${e.file}`),vs(i)}var vd={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},vu={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},vc=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}}),vh=[...Object.values(vd).filter(e=>vd.PLAYSINLINE!==e),...Object.values(vu)];function vm(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}var vp=class extends p0.HTMLElement{static get observedAttributes(){return vh}constructor(){super()}attributeChangedCallback(e,t,i){var a,r;switch(e){case vu.MUTED:this.media&&(this.media.muted=null!=i,this.media.defaultMuted=null!=i);return;case vu.VOLUME:{let e=null!=(a=p4(i))?a:1;this.media&&(this.media.volume=e);return}case vu.PLAYBACKRATE:{let e=null!=(r=p4(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}
1931get 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:vc}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:vc}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=p4(this.getAttribute(vu.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(vu.PLAYBACKRATE,`${e}`):this.removeAttribute(vu.PLAYBACKRATE)}get crossOrigin(){return vm(this,vd.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(vd.CROSSORIGIN,`${e}`)}get autoplay(){return null!=vm(this,vd.AUTOPLAY)}set autoplay(e){e?this.setAttribute(vd.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(vd.AUTOPLAY)}get loop(){return null!=vm(this,vd.LOOP)}set loop(e){e?this.setAttribute(vd.LOOP,""):this.removeAttribute(vd.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!=vm(this,vd.MUTED)}set defaultMuted(e){e?this.setAttribute(vd.MUTED,""):this.removeAttribute(vd.MUTED)}get playsInline(){return null!=vm(this,vd.PLAYSINLINE)}set playsInline(e){vo("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(vd.PRELOAD,e):this.removeAttribute(vd.PRELOAD)}},vv=`:host { 1932 --media-control-display: var(--controls); 1933 --media-loading-indicator-display: var(--loading-indicator); 1934 --media-dialog-display: var(--dialog); 1935 --media-play-button-display: var(--play-button); 1936 --media-live-button-display: var(--live-button); 1937 --media-seek-backward-button-display: var(--seek-backward-button); 1938 --media-seek-forward-button-display: var(--seek-forward-button); 1939 --media-mute-button-display: var(--mute-button); 1940 --media-captions-button-display: var(--captions-button); 1941 --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display)); 1942 --media-rendition-menu-button-display: var(--rendition-menu-button); 1943 --media-audio-track-menu-button-display: var(--audio-track-menu-button); 1944 --media-airplay-button-display: var(--airplay-button); 1945 --media-pip-button-display: var(--pip-button); 1946 --media-fullscreen-button-display: var(--fullscreen-button); 1947 --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display)); 1948 --media-playback-rate-button-display: var(--playback-rate-button); 1949 --media-playback-rate-menu-button-display: var(--playback-rate-menu-button); 1950 --media-volume-range-display: var(--volume-range); 1951 --media-time-range-display: var(--time-range); 1952 --media-time-display-display: var(--time-display); 1953 --media-duration-display-display: var(--duration-display); 1954 --media-title-display-display: var(--title-display); 1955 1956 display: inline-block; 1957 line-height: 0; 1958 width: 100%; 1959} 1960 1961a { 1962 color: #fff; 1963 font-size: 0.9em; 1964 text-decoration: underline; 1965} 1966 1967media-theme { 1968 display: inline-block; 1969 line-height: 0; 1970 width: 100%; 1971 height: 100%; 1972 direction: ltr; 1973} 1974 1975media-poster-image { 1976 display: inline-block; 1977 line-height: 0; 1978 width: 100%; 1979 height: 100%; 1980} 1981 1982media-poster-image:not([src]):not([placeholdersrc]) { 1983 display: none; 1984} 1985 1986::part(top), 1987[part~='top'] { 1988 --media-control-display: var(--controls, var(--top-controls)); 1989 --media-play-button-display: var(--play-button, var(--top-play-button)); 1990 --media-live-button-display: var(--live-button, var(--top-live-button)); 1991 --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button)); 1992 --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button)); 1993 --media-mute-button-display: var(--mute-button, var(--top-mute-button)); 1994 --media-captions-button-display: var(--captions-button, var(--top-captions-button)); 1995 --media-captions-menu-button-display: var( 1996 --captions-menu-button, 1997 var(--media-captions-button-display, var(--top-captions-menu-button)) 1998 ); 1999 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button)); 2000 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button)); 2001 --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button)); 2002 --media-pip-button-display: var(--pip-button, var(--top-pip-button)); 2003 --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button)); 2004 --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display))); 2005 --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button)); 2006 --media-playback-rate-menu-button-display: var( 2007 --captions-menu-button, 2008 var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button)) 2009 ); 2010 --media-volume-range-display: var(--volume-range, var(--top-volume-range)); 2011 --media-time-range-display: var(--time-range, var(--top-time-range)); 2012 --media-time-display-display: var(--time-display, var(--top-time-display)); 2013 --media-duration-display-display: var(--duration-display, var(--top-duration-display)); 2014 --media-title-display-display: var(--title-display, var(--top-title-display)); 2015} 2016 2017::part(center), 2018[part~='center'] {
2019 --media-control-display: var(--controls, var(--center-controls)); 2020 --media-play-button-display: var(--play-button, var(--center-play-button)); 2021 --media-live-button-display: var(--live-button, var(--center-live-button)); 2022 --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button)); 2023 --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button)); 2024 --media-mute-button-display: var(--mute-button, var(--center-mute-button)); 2025 --media-captions-button-display: var(--captions-button, var(--center-captions-button)); 2026 --media-captions-menu-button-display: var( 2027 --captions-menu-button, 2028 var(--media-captions-button-display, var(--center-captions-menu-button)) 2029 ); 2030 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button)); 2031 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button)); 2032 --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button)); 2033 --media-pip-button-display: var(--pip-button, var(--center-pip-button)); 2034 --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button)); 2035 --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display))); 2036 --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button)); 2037 --media-playback-rate-menu-button-display: var( 2038 --playback-rate-menu-button, 2039 var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button)) 2040 ); 2041 --media-volume-range-display: var(--volume-range, var(--center-volume-range)); 2042 --media-time-range-display: var(--time-range, var(--center-time-range)); 2043 --media-time-display-display: var(--time-display, var(--center-time-display)); 2044 --media-duration-display-display: var(--duration-display, var(--center-duration-display)); 2045} 2046 2047::part(bottom), 2048[part~='bottom'] { 2049 --media-control-display: var(--controls, var(--bottom-controls)); 2050 --media-play-button-display: var(--play-button, var(--bottom-play-button)); 2051 --media-live-button-display: var(--live-button, var(--bottom-live-button)); 2052 --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button)); 2053 --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button)); 2054 --media-mute-button-display: var(--mute-button, var(--bottom-mute-button)); 2055 --media-captions-button-display: var(--captions-button, var(--bottom-captions-button)); 2056 --media-captions-menu-button-display: var( 2057 --captions-menu-button, 2058 var(--media-captions-button-display, var(--bottom-captions-menu-button)) 2059 ); 2060 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button)); 2061 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button)); 2062 --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button)); 2063 --media-pip-button-display: var(--pip-button, var(--bottom-pip-button)); 2064 --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button)); 2065 --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display))); 2066 --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button)); 2067 --media-playback-rate-menu-button-display: var( 2068 --playback-rate-menu-button, 2069 var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button)) 2070 ); 2071 --media-volume-range-display: var(--volume-range, var(--bottom-volume-range)); 2072 --media-time-range-display: var(--time-range, var(--bottom-time-range)); 2073 --media-time-display-display: var(--time-display, var(--bottom-time-display)); 2074 --media-duration-display-display: var(--duration-display, var(--bottom-duration-display)); 2075 --media-title-display-display: var(--title-display, var(--bottom-title-display)); 2076} 2077 2078:host([no-tooltips]) { 2079 --media-tooltip-display: none; 2080} 2081`,vb=new WeakMap,vE=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let i=vb.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=vb.get(this.element);
2081e&&e.delete(this.type)}}static for(t){vb.has(t.element)||vb.set(t.element,new Map);let i=t.attributeName.slice(2),a=vb.get(t.element);return a&&a.has(i)?a.get(i):new e(t.element,i)}},vg=new Map,vf=new WeakMap,vy=new WeakMap,v_=class{constructor(e,t,i){this.strings=e,this.values=t,this.processor=i,this.stringsKey=this.strings.join("\x01")}get template(){if(vg.has(this.stringsKey))return vg.get(this.stringsKey);{let e=p1.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,i,a)=>e+i+(a<t?`{{ ${a} }}`:""),""),vg.set(this.stringsKey,e),e}}renderInto(e){var t;let i=this.template;if(vf.get(e)!==i){vf.set(e,i);let t=new l0(i,this.values,this.processor);vy.set(e,t),e instanceof l6?e.replace(...t.children):e.appendChild(t);return}let a=vy.get(e);null==(t=null==a?void 0:a.update)||t.call(a,this.values)}},vT={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 l8&&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 l8){let i=e.attributeNamespace;return t!==e.element.hasAttributeNS(i,e.attributeName)&&(e.booleanValue=t),!0}return!1}(e,t)||e instanceof l8&&e.attributeName.startsWith("on")&&(vE.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),1)||!1===t&&e instanceof l6&&(e.replace(""),1)||t instanceof v_&&e instanceof l6&&(t.renderInto(e),1)||t instanceof DocumentFragment&&e instanceof l6&&(t.childNodes.length&&e.replace(...t.childNodes),1)||function(e,t){if(e instanceof l8){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 vA(e,...t){return new v_(e,t,vT)}var vk=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(", "),vw=e=>e.charAt(0).toUpperCase()+e.slice(1),vI=(e,t)=>{let i=(e=>{if(e.muxCode){if(e.muxCode===tB.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(e.muxCode===tB.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([tB.NETWORK_TOKEN_AUD_MISMATCH,tB.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode))return"403-incorrect-aud-value.md";if(e.muxCode===tB.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(e.muxCode===tB.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(e.muxCode===tB.NETWORK_NOT_FOUND)return"404-not-found.md";if(e.muxCode===tB.NETWORK_NOT_READY)return"412-not-playable.md"}if(e.code){if(e.code===tV.MEDIA_ERR_NETWORK)return"";if(e.code===tV.MEDIA_ERR_DECODE)return"media-decode-error.md";if(e.code===tV.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(e);return{message:e.message,context:e.context,file:i}},vS
vendor: 8,830 bytes, lines 2081-2381
2081=`<template id="media-theme-gerwig"> 2082 <style> 2083 @keyframes pre-play-hide { 2084 0% { 2085 transform: scale(1); 2086 opacity: 1; 2087 } 2088 2089 30% { 2090 transform: scale(0.7); 2091 } 2092 2093 100% { 2094 transform: scale(1.5); 2095 opacity: 0; 2096 } 2097 } 2098 2099 :host { 2100 --_primary-color: var(--media-primary-color, #fff); 2101 --_secondary-color: var(--media-secondary-color, transparent); 2102 --_accent-color: var(--media-accent-color, #fa50b5); 2103 --_text-color: var(--media-text-color, #000); 2104 2105 --media-icon-color: var(--_primary-color); 2106 --media-control-background: var(--_secondary-color); 2107 --media-control-hover-background: var(--_accent-color); 2108 --media-time-buffered-color: rgba(255, 255, 255, 0.4); 2109 --media-preview-time-text-shadow: none; 2110 --media-control-height: 14px; 2111 --media-control-padding: 6px; 2112 --media-tooltip-container-margin: 6px; 2113 --media-tooltip-distance: 18px; 2114 2115 color: var(--_primary-color); 2116 display: inline-block; 2117 width: 100%; 2118 height: 100%; 2119 } 2120 2121 :host([audio]) { 2122 --_secondary-color: var(--media-secondary-color, black); 2123 --media-preview-time-text-shadow: none; 2124 } 2125 2126 :host([audio]) ::slotted([slot='media']) { 2127 height: 0px; 2128 } 2129 2130 :host([audio]) media-loading-indicator { 2131 display: none; 2132 } 2133 2134 :host([audio]) media-controller { 2135 background: transparent; 2136 } 2137 2138 :host([audio]) media-controller::part(vertical-layer) { 2139 background: transparent; 2140 } 2141 2142 :host([audio]) media-control-bar { 2143 width: 100%; 2144 background-color: var(--media-control-background); 2145 } 2146 2147 /* 2148 * 0.433s is the transition duration for VTT Regions. 2149 * Borrowed here, so the captions don't move too fast. 2150 */ 2151 media-controller { 2152 --media-webkit-text-track-transform: translateY(0) scale(0.98); 2153 --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s; 2154 } 2155 media-controller:is([mediapaused], :not([userinactive])) { 2156 --media-webkit-text-track-transform: translateY(-50px) scale(0.98); 2157 --media-webkit-text-track-transition: transform 0.15s ease; 2158 } 2159 2160 /* 2161 * CSS specific to iOS devices. 2162 * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757 2163 */ 2164 @supports (-webkit-touch-callout: none) { 2165 /* Disable subtitle adjusting for iOS Safari */ 2166 media-controller[mediaisfullscreen] { 2167 --media-webkit-text-track-transform: unset; 2168 --media-webkit-text-track-transition: unset; 2169 } 2170 } 2171 2172 media-time-range { 2173 --media-box-padding-left: 6px; 2174 --media-box-padding-right: 6px; 2175 --media-range-bar-color: var(--_accent-color); 2176 --media-time-range-buffered-color: var(--_primary-color); 2177 --media-range-track-color: transparent; 2178 --media-range-track-background: rgba(255, 255, 255, 0.4); 2179 --media-range-thumb-background: radial-gradient( 2180 circle, 2181 #000 0%, 2182 #000 25%, 2183 var(--_accent-color) 25%, 2184 var(--_accent-color) 2185 ); 2186 --media-range-thumb-width: 12px; 2187 --media-range-thumb-height: 12px; 2188 --media-range-thumb-transform: scale(0); 2189 --media-range-thumb-transition: transform 0.3s; 2190 --media-range-thumb-opacity: 1; 2191 --media-preview-background: var(--_primary-color); 2192 --media-box-arrow-background: var(--_primary-color); 2193 --media-preview-thumbnail-border: 5px solid var(--_primary-color); 2194 --media-preview-border-radius: 5px; 2195 --media-text-color: var(--_text-color); 2196 --media-control-hover-background: transparent; 2197 --media-preview-chapter-text-shadow: none; 2198 color: var(--_accent-color); 2199 padding: 0 6px; 2200 } 2201 2202 :host([audio]) media-time-range { 2203 --media-preview-time-padding: 1.5px 6px; 2204 --media-preview-box-margin: 0 0 -5px; 2205 } 2206 2207 media-time-range:hover { 2208 --media-range-thumb-transform: scale(1); 2209 } 2210 2211 media-preview-thumbnail { 2212 border-bottom-width: 0; 2213 } 2214 2215 [part~='menu'] { 2216 border-radius: 2px; 2217 border: 1px solid rgba(0, 0, 0, 0.1); 2218 bottom: 50px; 2219 padding: 2.5px 10px; 2220 } 2221 2222 [part~='menu']::part(indicator) { 2223 fill: var(--_accent-color); 2224 } 2225 2226 [part~='menu']::part(menu-item) { 2227 box-sizing: border-box; 2228 display: flex; 2229 align-items: center; 2230 padding: 6px 10px; 2231 min-height: 34px; 2232 } 2233 2234 [part~='menu']::part(checked) { 2235 font-weight: 700; 2236 } 2237 2238 media-captions-menu, 2239 media-rendition-menu, 2240 media-audio-track-menu, 2241 media-playback-rate-menu { 2242 position: absolute; /* ensure they don't take up space in DOM on load */ 2243 --media-menu-background: var(--_primary-color); 2244 --media-menu-item-checked-background: transparent; 2245 --media-text-color: var(--_text-color); 2246 --media-menu-item-hover-background: transparent; 2247 --media-menu-item-hover-outline: var(--_accent-color) solid 1px; 2248 } 2249 2250 media-rendition-menu { 2251 min-width: 140px; 2252 } 2253 2254 /* The icon is a circle so make it 16px high instead of 14px for more balance. */ 2255 media-audio-track-menu-button { 2256 --media-control-padding: 5px; 2257 --media-control-height: 16px; 2258 } 2259 2260 media-playback-rate-menu-button { 2261 --media-control-padding: 6px 3px; 2262 min-width: 4.4ch; 2263 } 2264 2265 media-playback-rate-menu { 2266 --media-menu-flex-direction: row; 2267 --media-menu-item-checked-background: var(--_accent-color); 2268 --media-menu-item-checked-indicator-display: none; 2269 margin-right: 6px; 2270 padding: 0; 2271 --media-menu-gap: 0.25em; 2272 } 2273 2274 media-playback-rate-menu[part~='menu']::part(menu-item) { 2275 padding: 6px 6px 6px 8px; 2276 } 2277 2278 media-playback-rate-menu[part~='menu']::part(checked) { 2279 color: #fff; 2280 } 2281 2282 :host(:not([audio])) media-time-range { 2283 /* Adding px is required here for calc() */ 2284 --media-range-padding: 0px; 2285 background: transparent; 2286 z-index: 10; 2287 height: 10px; 2288 bottom: -3px; 2289 width: 100%; 2290 } 2291 2292 media-control-bar :is([role='button'], [role='switch'], button) { 2293 line-height: 0; 2294 } 2295 2296 media-control-bar :is([part*='button'], [part*='range'], [part*='display']) { 2297 border-radius: 3px; 2298 } 2299 2300 .spacer { 2301 flex-grow: 1; 2302 background-color: var(--media-control-background, rgba(20, 20, 30, 0.7)); 2303 } 2304 2305 media-control-bar[slot~='top-chrome'] { 2306 min-height: 42px; 2307 pointer-events: none; 2308 } 2309 2310 media-control-bar { 2311 --gradient-steps: 2312 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%, 2313 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%, 2314 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%, 2315 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%; 2316 } 2317 2318 :host([title]) media-control-bar[slot='top-chrome']::before, 2319 :host([videotitle]) media-control-bar[slot='top-chrome']::before { 2320 content: ''; 2321 position: absolute; 2322 width: 100%; 2323 padding-bottom: min(100px, 25%); 2324 background: linear-gradient(to top, var(--gradient-steps)); 2325 opacity: 0.8; 2326 pointer-events: none; 2327 } 2328 2329 :host(:not([audio])) media-control-bar[part~='bottom']::before { 2330 content: ''; 2331 position: absolute; 2332 width: 100%; 2333 bottom: 0; 2334 left: 0; 2335 padding-bottom: min(100px, 25%); 2336 background: linear-gradient(to bottom, var(--gradient-steps)); 2337 opacity: 0.8; 2338 z-index: 1; 2339 pointer-events: none; 2340 } 2341 2342 media-control-bar[part~='bottom'] > * { 2343 z-index: 20; 2344 } 2345 2346 media-control-bar[part~='bottom'] { 2347 padding: 6px 6px; 2348 } 2349 2350 media-control-bar[slot~='top-chrome'] > * { 2351 --media-control-background: transparent; 2352 --media-control-hover-background: transparent; 2353 position: relative; 2354 } 2355 2356 media-controller::part(vertical-layer) { 2357 transition: background-color 1s; 2358 } 2359 2360 media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) { 2361 background-color: var(--controls-backdrop-color, var(--controls, transparent)); 2362 transition: background-color 0.25s; 2363 } 2364 2365 .center-controls { 2366 --media-button-icon-width: 100%; 2367 --media-button-icon-height: auto; 2368 --media-tooltip-display: none; 2369 pointer-events: none; 2370 width: 100%; 2371 display: flex; 2372 flex-flow: row; 2373 align-items: center; 2374 justify-content: center; 2375 paint-order: stroke; 2376 stroke: rgba(102, 102, 102, 1); 2377 stroke-width: 0.3px; 2378 text-shadow: 2379 0 0 2px rgb(0 0 0 / 0.25), 2380 0 0 6px rgb(0 0 0 / 0.25); 2381
2381} 2382 2383 .center-controls media-play-button { 2384 --media-control-background: transparent; 2385 --media-control-hover-background: transparent; 2386 --media-control-padding: 0; 2387 width: 40px; 2388 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 2388-3213
2388; 2389 } 2390 2391 [breakpointsm] .center-controls media-play-button { 2392 width: 90px; 2393 height: 90px; 2394 border-radius: 50%; 2395 transition: background 0.4s; 2396 padding: 24px; 2397 --media-control-background: #000; 2398 --media-control-hover-background: var(--_accent-color); 2399 } 2400 2401 .center-controls media-seek-backward-button, 2402 .center-controls media-seek-forward-button { 2403 --media-control-background: transparent; 2404 --media-control-hover-background: transparent; 2405 padding: 0; 2406 margin: 0 20px; 2407 width: max(33px, min(8%, 40px)); 2408 text-shadow: 2409 0 0 2px rgb(0 0 0 / 0.25), 2410 0 0 6px rgb(0 0 0 / 0.25); 2411 } 2412 2413 [breakpointsm]:not([audio]) .center-controls.pre-playback { 2414 display: grid; 2415 align-items: initial; 2416 justify-content: initial; 2417 height: 100%; 2418 overflow: hidden; 2419 } 2420 2421 [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button { 2422 place-self: var(--_pre-playback-place, center); 2423 grid-area: 1 / 1; 2424 margin: 16px; 2425 } 2426 2427 /* Show and hide controls or pre-playback state */ 2428 2429 [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio]) 2430 .center-controls.pre-playback 2431 media-play-button { 2432 /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */ 2433 animation: 0.3s linear pre-play-hide; 2434 opacity: 0; 2435 pointer-events: none; 2436 } 2437 2438 .autoplay-unmute { 2439 --media-control-hover-background: transparent; 2440 width: 100%; 2441 display: flex; 2442 align-items: center; 2443 justify-content: center; 2444 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25)); 2445 } 2446 2447 .autoplay-unmute-btn { 2448 --media-control-height: 16px; 2449 border-radius: 8px; 2450 background: #000; 2451 color: var(--_primary-color); 2452 display: flex; 2453 align-items: center; 2454 padding: 8px 16px; 2455 font-size: 18px; 2456 font-weight: 500; 2457 cursor: pointer; 2458 } 2459 2460 .autoplay-unmute-btn:hover { 2461 background: var(--_accent-color); 2462 } 2463 2464 [breakpointsm] .autoplay-unmute-btn { 2465 --media-control-height: 30px; 2466 padding: 14px 24px; 2467 font-size: 26px; 2468 } 2469 2470 .autoplay-unmute-btn svg { 2471 margin: 0 6px 0 0; 2472 } 2473 2474 [breakpointsm] .autoplay-unmute-btn svg { 2475 margin: 0 10px 0 0; 2476 } 2477 2478 media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) { 2479 display: none; 2480 } 2481 2482 media-error-dialog:not([mediaerrorcode]) { 2483 opacity: 0; 2484 } 2485 2486 media-loading-indicator { 2487 --media-loading-icon-width: 100%; 2488 --media-button-icon-height: auto; 2489 display: var(--media-control-display, var(--media-loading-indicator-display, flex)); 2490 pointer-events: none; 2491 position: absolute; 2492 width: min(15%, 150px); 2493 flex-flow: row; 2494 align-items: center; 2495 justify-content: center; 2496 } 2497 2498 /* Intentionally don't target the div for transition but the children 2499 of the div. Prevents messing with media-chrome's autohide feature. */ 2500 media-loading-indicator + div * { 2501 transition: opacity 0.15s; 2502 opacity: 1; 2503 } 2504 2505 media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * { 2506 opacity: 0; 2507 transition-delay: 400ms; 2508 } 2509 2510 media-volume-range { 2511 width: min(100%, 100px); 2512 --media-range-padding-left: 10px; 2513 --media-range-padding-right: 10px; 2514 --media-range-thumb-width: 12px; 2515 --media-range-thumb-height: 12px; 2516 --media-range-thumb-background: radial-gradient( 2517 circle, 2518 #000 0%, 2519 #000 25%, 2520 var(--_primary-color) 25%, 2521 var(--_primary-color) 2522 ); 2523 --media-control-hover-background: none; 2524 } 2525 2526 media-time-display { 2527 white-space: nowrap; 2528 } 2529 2530 /* Generic style for explicitly disabled controls */ 2531 media-control-bar[part~='bottom'] [disabled], 2532 media-control-bar[part~='bottom'] [aria-disabled='true'] { 2533 opacity: 60%; 2534 cursor: not-allowed; 2535 } 2536 2537 media-text-display { 2538 --media-font-size: 16px; 2539 --media-control-padding: 14px; 2540 font-weight: 500; 2541 } 2542 2543 media-play-button.animated *:is(g, path) { 2544 transition: all 0.3s; 2545 } 2546 2547 media-play-button.animated[mediapaused] .pause-icon-pt1 { 2548 opacity: 0; 2549 } 2550 2551 media-play-button.animated[mediapaused] .pause-icon-pt2 { 2552 transform-origin: center center; 2553 transform: scaleY(0); 2554 } 2555 2556 media-play-button.animated[mediapaused] .play-icon { 2557 clip-path: inset(0 0 0 0); 2558 } 2559 2560 media-play-button.animated:not([mediapaused]) .play-icon { 2561 clip-path: inset(0 0 0 100%); 2562 } 2563 2564 media-seek-forward-button, 2565 media-seek-backward-button { 2566 --media-font-weight: 400; 2567 } 2568 2569 .mute-icon { 2570 display: inline-block; 2571 } 2572 2573 .mute-icon :is(path, g) { 2574 transition: opacity 0.5s; 2575 } 2576 2577 .muted { 2578 opacity: 0; 2579 } 2580 2581 media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high), 2582 media-mute-button[mediavolumelevel='medium'] :is(.volume-high) { 2583 opacity: 0; 2584 } 2585 2586 media-mute-button[mediavolumelevel='off'] .unmuted { 2587 opacity: 0; 2588 } 2589 2590 media-mute-button[mediavolumelevel='off'] .muted { 2591 opacity: 1; 2592 } 2593 2594 /** 2595 * Our defaults for these buttons are to hide them at small sizes 2596 * users can override this with CSS 2597 */ 2598 media-controller:not([breakpointsm]):not([audio]) { 2599 --bottom-play-button: none; 2600 --bottom-seek-backward-button: none; 2601 --bottom-seek-forward-button: none; 2602 --bottom-time-display: none; 2603 --bottom-playback-rate-menu-button: none; 2604 --bottom-pip-button: none; 2605 } 2606 2607 [part='mux-badge'] { 2608 position: absolute; 2609 bottom: 10px; 2610 right: 10px; 2611 z-index: 2; 2612 opacity: 0.6; 2613 transition: 2614 opacity 0.2s ease-in-out, 2615 bottom 0.2s ease-in-out; 2616 } 2617 2618 [part='mux-badge']:hover { 2619 opacity: 1; 2620 } 2621 2622 [part='mux-badge'] a { 2623 font-size: 14px; 2624 font-family: var(--_font-family); 2625 color: var(--_primary-color); 2626 text-decoration: none; 2627 display: flex; 2628 align-items: center; 2629 gap: 5px; 2630 } 2631 2632 [part='mux-badge'] .mux-badge-text { 2633 transition: opacity 0.5s ease-in-out; 2634 opacity: 0; 2635 } 2636 2637 [part='mux-badge'] .mux-badge-logo { 2638 width: 40px; 2639 height: auto; 2640 display: inline-block; 2641 } 2642 2643 [part='mux-badge'] .mux-badge-logo svg { 2644 width: 100%; 2645 height: 100%; 2646 fill: white; 2647 } 2648 2649 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'], 2650 media-controller:not([userinactive]) [part='mux-badge'], 2651 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 2652 transition: bottom 0.1s ease-in-out; 2653 } 2654 2655 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 2656 transition: bottom 0.2s ease-in-out 0.62s; 2657 } 2658 2659 media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text, 2660 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text { 2661 opacity: 1; 2662 } 2663 2664 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text { 2665 opacity: 0; 2666 } 2667 2668 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 2669 bottom: 10px; 2670 } 2671 2672 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] { 2673 bottom: 10px; 2674 } 2675 2676 media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'], 2677 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 2678 bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2); 2679 } 2680 </style> 2681 2682 <template partial="TitleDisplay"> 2683 <template if="videotitle"> 2684 <template if="videotitle != true"> 2685 <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display> 2686 </template> 2687 </template> 2688 <template if="!videotitle"> 2689 <template if="title"> 2690 <media-text-display part="top title display" class="title-display">{{title}}</media-text-display> 2691 </template> 2692 </template> 2693 </template> 2694 2695 <template partial="PlayButton"> 2696 <media-play-button 2697 part="{{section ?? 'bottom'}} play button" 2698 disabled="{{disabled}}" 2699 aria-disabled="{{disabled}}" 2700 class="animated" 2701 > 2702 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon"> 2703 <g class="play-icon"> 2704 <path 2705 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" 2706 /> 2707 </g> 2708 <g class="pause-icon"> 2709 <path 2710 class="pause-icon-pt1" 2711 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" 2712 /> 2713 <path 2714 class="pause-icon-pt2" 2715 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" 2716 /> 2717 </g> 2718 </svg> 2719 </media-play-button> 2720 </template> 2721 2722 <template partial="PrePlayButton"> 2723 <media-play-button 2724 part="{{section ?? 'center'}} play button pre-play" 2725 disabled="{{disabled}}" 2726 aria-disabled="{{disabled}}" 2727 > 2728 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)"> 2729 <path 2730 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" 2731 /> 2732 </svg> 2733 </media-play-button> 2734 </template> 2735 2736 <template partial="SeekBackwardButton"> 2737 <media-seek-backward-button 2738 seekoffset="{{backwardseekoffset}}" 2739 part="{{section ?? 'bottom'}} seek-backward button" 2740 disabled="{{disabled}}" 2741 aria-disabled="{{disabled}}" 2742 > 2743 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 2744 <path 2745 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" 2746 /> 2747 <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 2748 {{backwardseekoffset}} 2749 </text> 2750 </svg> 2751 </media-seek-backward-button> 2752 </template> 2753 2754 <template partial="SeekForwardButton"> 2755 <media-seek-forward-button 2756 seekoffset="{{forwardseekoffset}}" 2757 part="{{section ?? 'bottom'}} seek-forward button" 2758 disabled="{{disabled}}" 2759 aria-disabled="{{disabled}}" 2760 > 2761 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 2762 <g> 2763 <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 2764 {{forwardseekoffset}} 2765 </text> 2766 <path 2767 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" 2768 /> 2769 </g> 2770 </svg> 2771 </media-seek-forward-button> 2772 </template> 2773 2774 <template partial="MuteButton"> 2775 <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2776 <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true"> 2777 <g class="unmuted"> 2778 <path 2779 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" 2780 /> 2781 <path 2782 class="volume-low" 2783 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" 2784 /> 2785 <path 2786 class="volume-medium" 2787 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" 2788 /> 2789 <path 2790 class="volume-high" 2791 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" 2792 /> 2793 </g> 2794 <g class="muted"> 2795 <path 2796 fill-rule="evenodd" 2797 clip-rule="evenodd" 2798 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" 2799 /> 2800 <path 2801 fill-rule="evenodd" 2802 clip-rule="evenodd" 2803 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" 2804 /> 2805 </g> 2806 </svg> 2807 </media-mute-button> 2808 </template> 2809 2810 <template partial="PipButton"> 2811 <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2812 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 2813 <path 2814 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" 2815 /> 2816 <path 2817 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" 2818 /> 2819 </svg> 2820 </media-pip-button> 2821 </template> 2822 2823 <template partial="CaptionsMenu"> 2824 <media-captions-menu-button part="bottom captions button"> 2825 <svg aria-hidden="true" viewBox="0 0 18 14" slot="on"> 2826 <path 2827 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" 2828 /> 2829 </svg> 2830 <svg aria-hidden="true" viewBox="0 0 18 14" slot="off"> 2831 <path 2832 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" 2833 /> 2834 <path 2835 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" 2836 /> 2837 <path 2838 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" 2839 /> 2840 </svg> 2841 </media-captions-menu-button> 2842 <media-captions-menu 2843 hidden 2844 anchor="auto" 2845 part="bottom captions menu" 2846 disabled="{{disabled}}" 2847 aria-disabled="{{disabled}}" 2848 exportparts="menu-item" 2849 > 2850 <div slot="checked-indicator"> 2851 <style> 2852 .indicator { 2853 position: relative; 2854 top: 1px; 2855 width: 0.9em; 2856 height: auto; 2857 fill: var(--_accent-color); 2858 margin-right: 5px; 2859 } 2860 2861 [aria-checked='false'] .indicator { 2862 display: none; 2863 } 2864 </style> 2865 <svg viewBox="0 0 14 18" class="indicator"> 2866 <path 2867 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" 2868 fill-rule="evenodd" 2869 /> 2870 </svg></div 2871 ></media-captions-menu> 2872 </template> 2873 2874 <template partial="AirplayButton"> 2875 <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2876 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 2877 <path 2878 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" 2879 /> 2880 <path 2881 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" 2882 /> 2883 </svg> 2884 </media-airplay-button> 2885 </template> 2886 2887 <template partial="FullscreenButton"> 2888 <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2889 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 2890 <path 2891 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" 2892 /> 2893 <path 2894 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" 2895 /> 2896 <path 2897 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" 2898 /> 2899 <path 2900 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" 2901 /> 2902 </svg> 2903 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 2904 <path 2905 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" 2906 /> 2907 <path 2908 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" 2909 /> 2910 <path 2911 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" 2912 /> 2913 <path 2914 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" 2915 /> 2916 </svg> 2917 </media-fullscreen-button> 2918 </template> 2919 2920 <template partial="CastButton"> 2921 <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2922 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 2923 <path 2924 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" 2925 /> 2926 </svg> 2927 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 2928 <path 2929 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" 2930 /> 2931 <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" /> 2932 </svg> 2933 </media-cast-button> 2934 </template> 2935 2936 <template partial="LiveButton"> 2937 <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2938 <span slot="text">Live</span> 2939 </media-live-button> 2940 </template> 2941 2942 <template partial="PlaybackRateMenu"> 2943 <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button> 2944 <media-playback-rate-menu 2945 hidden 2946 anchor="auto" 2947 rates="{{playbackrates}}" 2948 exportparts="menu-item" 2949 part="bottom playback-rate menu" 2950 disabled="{{disabled}}" 2951 aria-disabled="{{disabled}}" 2952 ></media-playback-rate-menu> 2953 </template> 2954 2955 <template partial="VolumeRange"> 2956 <media-volume-range 2957 part="bottom volume range" 2958 disabled="{{disabled}}" 2959 aria-disabled="{{disabled}}" 2960 ></media-volume-range> 2961 </template> 2962 2963 <template partial="TimeDisplay"> 2964 <media-time-display 2965 remaining="{{defaultshowremainingtime}}" 2966 showduration="{{!hideduration}}" 2967 part="bottom time display" 2968 disabled="{{disabled}}" 2969 aria-disabled="{{disabled}}" 2970 ></media-time-display> 2971 </template> 2972 2973 <template partial="TimeRange"> 2974 <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}" exportparts="thumb"> 2975 <media-preview-thumbnail slot="preview"></media-preview-thumbnail> 2976 <media-preview-chapter-display slot="preview"></media-preview-chapter-display> 2977 <media-preview-time-display slot="preview"></media-preview-time-display> 2978 <div slot="preview" part="arrow"></div> 2979 </media-time-range> 2980 </template> 2981 2982 <template partial="AudioTrackMenu"> 2983 <media-audio-track-menu-button part="bottom audio-track button"> 2984 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16"> 2985 <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" /> 2986 <path 2987 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" 2988 /> 2989 </svg> 2990 </media-audio-track-menu-button> 2991 <media-audio-track-menu 2992 hidden 2993 anchor="auto" 2994 part="bottom audio-track menu" 2995 disabled="{{disabled}}" 2996 aria-disabled="{{disabled}}" 2997 exportparts="menu-item" 2998 > 2999 <div slot="checked-indicator"> 3000 <style> 3001 .indicator { 3002 position: relative; 3003 top: 1px; 3004 width: 0.9em; 3005 height: auto; 3006 fill: var(--_accent-color); 3007 margin-right: 5px; 3008 } 3009 3010 [aria-checked='false'] .indicator { 3011 display: none; 3012 } 3013 </style> 3014 <svg viewBox="0 0 14 18" class="indicator"> 3015 <path 3016 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" 3017 fill-rule="evenodd" 3018 /> 3019 </svg> 3020 </div> 3021 </media-audio-track-menu> 3022 </template> 3023 3024 <template partial="RenditionMenu"> 3025 <media-rendition-menu-button part="bottom rendition button"> 3026 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14"> 3027 <path 3028 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" 3029 /> 3030 </svg> 3031 </media-rendition-menu-button> 3032 <media-rendition-menu 3033 hidden 3034 anchor="auto" 3035 part="bottom rendition menu" 3036 disabled="{{disabled}}" 3037 aria-disabled="{{disabled}}" 3038 > 3039 <div slot="checked-indicator"> 3040 <style> 3041 .indicator { 3042 position: relative; 3043 top: 1px; 3044 width: 0.9em; 3045 height: auto; 3046 fill: var(--_accent-color); 3047 margin-right: 5px; 3048 } 3049 3050 [aria-checked='false'] .indicator { 3051 opacity: 0; 3052 } 3053 </style> 3054 <svg viewBox="0 0 14 18" class="indicator"> 3055 <path 3056 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" 3057 fill-rule="evenodd" 3058 /> 3059 </svg> 3060 </div> 3061 </media-rendition-menu> 3062 </template> 3063 3064 <template partial="MuxBadge"> 3065 <div part="mux-badge"> 3066 <a href="https://www.mux.com/player" target="_blank"> 3067 <span class="mux-badge-text">Powered by</span> 3068 <div class="mux-badge-logo"> 3069 <svg 3070 viewBox="0 0 1600 500" 3071 style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2" 3072 > 3073 <g> 3074 <path 3075 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" 3076 style="fill-rule: nonzero" 3077 ></path> 3078 <path 3079 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" 3080 style="fill-rule: nonzero" 3081 ></path> 3082 <path 3083 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" 3084 style="fill-rule: nonzero" 3085 ></path> 3086 </g> 3087 </svg> 3088 </div> 3089 </a> 3090 </div> 3091 </template> 3092 3093 <media-controller 3094 part="controller" 3095 defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}" 3096 breakpoints="sm:470" 3097 gesturesdisabled="{{disabled}}" 3098 hotkeys="{{hotkeys}}" 3099 nohotkeys="{{nohotkeys}}" 3100 novolumepref="{{novolumepref}}" 3101 audio="{{audio}}" 3102 noautoseektolive="{{noautoseektolive}}" 3103 defaultsubtitles="{{defaultsubtitles}}" 3104 defaultduration="{{defaultduration ?? false}}" 3105 keyboardforwardseekoffset="{{forwardseekoffset}}" 3106 keyboardbackwardseekoffset="{{backwardseekoffset}}" 3107 exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer" 3108 style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}" 3109 > 3110 <slot name="media" slot="media"></slot> 3111 <slot name="poster" slot="poster"></slot> 3112 3113 <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator> 3114 3115 <template if="!audio"> 3116 <media-error-dialog slot="dialog" noautohide></media-error-dialog> 3117 <!-- Pre-playback UI --> 3118 <!-- same for both on-demand and live --> 3119 <div slot="centered-chrome" class="center-controls pre-playback"> 3120 <template if="!breakpointsm">{{>PlayButton section="center"}}</template> 3121 <template if="breakpointsm">{{>PrePlayButton section="center"}}</template> 3122 </div> 3123 3124 <!-- Mux Badge --> 3125 <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template> 3126 3127 <!-- Autoplay centered unmute button --> 3128 <!-- 3129 todo: figure out how show this with available state variables 3130 needs to show when: 3131 - autoplay is enabled 3132 - playback has been successful 3133 - audio is muted 3134 - in place / instead of the pre-plaback play button 3135 - not to show again after user has interacted with this button 3136 - OR user has interacted with the mute button in the control bar 3137 --> 3138 <!-- 3139 There should be a >MuteButton to the left of the "Unmute" text, but a templating bug 3140 makes it appear even if commented out in the markup, add it back when code is un-commented 3141 --> 3142 <!-- <div slot="centered-chrome" class="autoplay-unmute"> 3143 <div role="button" class="autoplay-unmute-btn">Unmute</div> 3144 </div> --> 3145 3146 <template if="streamtype == 'on-demand'"> 3147 <template if="breakpointsm"> 3148 <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar> 3149 </template> 3150 {{>TimeRange}} 3151 <media-control-bar part="control-bar bottom"> 3152 {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}} 3153 {{>VolumeRange}} 3154 <div class="spacer"></div> 3155 {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} 3156 {{>CastButton}} {{>PipButton}} {{>FullscreenButton}} 3157 </media-control-bar> 3158 </template> 3159 3160 <template if="streamtype == 'live'"> 3161 <media-control-bar part="control-bar top" slot="top-chrome"> 3162 {{>LiveButton}} 3163 <template if="breakpointsm"> {{>TitleDisplay}} </template> 3164 </media-control-bar> 3165 <template if="targetlivewindow > 0">{{>TimeRange}}</template> 3166 <media-control-bar part="control-bar bottom"> 3167 {{>PlayButton}} 3168 <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template> 3169 {{>MuteButton}} {{>VolumeRange}} 3170 <div class="spacer"></div> 3171 {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} 3172 {{>FullscreenButton}} 3173 </media-control-bar> 3174 </template> 3175 </template> 3176 3177 <template if="audio"> 3178 <template if="streamtype == 'on-demand'"> 3179 <template if="title"> 3180 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 3181 </template> 3182 <media-control-bar part="control-bar bottom"> 3183 {{>PlayButton}} 3184 <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 3185 {{>MuteButton}} 3186 <template if="breakpointsm">{{>VolumeRange}}</template> 3187 {{>TimeDisplay}} {{>TimeRange}} 3188 <template if="breakpointsm">{{>PlaybackRateMenu}}</template> 3189 {{>AirplayButton}} {{>CastButton}} 3190 </media-control-bar> 3191 </template> 3192 3193 <template if="streamtype == 'live'"> 3194 <template if="title"> 3195 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 3196 </template> 3197 <media-control-bar part="control-bar bottom"> 3198 {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}} 3199 <template if="breakpointsm"> 3200 {{>VolumeRange}} 3201 <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 3202 </template> 3203 <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template> 3204 <template if="!targetlivewindow"><div class="spacer"></div></template> 3205 {{>AirplayButton}} {{>CastButton}} 3206 </media-control-bar> 3207 </template> 3208 </template> 3209 3210 <slot></slot> 3211 </media-controller> 3212</template> 3213`
3213,vR=p1.createElement("template");"innerHTML"in vR&&(vR.innerHTML=vS);var vC,vL,vD=class extends dy{};vD.template=null==(vL=null==(vC=vR.content)?void 0:vC.children)?void 0:vL[0],p0.customElements.get("media-theme-gerwig")||p0.customElements.define("media-theme-gerwig",vD);var vM={SRC:"src",POSTER:"poster"},vx={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"},vN=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"],vO=oN.formatErrorMessage;function vP(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)}oN.formatErrorMessage=e=>{var t,i;if(e instanceof tV){let a=((e,t=!1)=>({title:((e,t=!1)=>{var i,a;if(e.muxCode){let r=vw(null!=(i=e.errorCategory)?i:"video"),n=t$(null!=(a=e.errorCategory)?a:tH.VIDEO);if(e.muxCode===tB.NETWORK_OFFLINE)return t7("Your device appears to be offline",t);if(e.muxCode===tB.NETWORK_TOKEN_EXPIRED)return t7("{category} URL has expired",t).format({category:r});if([tB.NETWORK_TOKEN_SUB_MISMATCH,tB.NETWORK_TOKEN_AUD_MISMATCH,tB.NETWORK_TOKEN_AUD_MISSING,tB.NETWORK_TOKEN_MALFORMED].includes(e.muxCode))return t7("{category} URL is formatted incorrectly",t).format({category:r});if(e.muxCode===tB.NETWORK_TOKEN_MISSING)return t7("Invalid {categoryName} URL",t).format({categoryName:n});if(e.muxCode===tB.NETWORK_NOT_FOUND)return t7("{category} does not exist",t).format({category:r});if(e.muxCode===tB.NETWORK_NOT_READY){let i="live"===e.streamType?"Live stream":"Video";return t7("{mediaType} is not currently available",t).format({mediaType:i})}}if(e.code){if(e.code===tV.MEDIA_ERR_NETWORK)return t7("Network Error",t);if(e.code===tV.MEDIA_ERR_DECODE)return t7("Media Error",t);if(e.code===tV.MEDIA_ERR_SRC_NOT_SUPPORTED)return t7("Source Not Supported",t)}return t7("Error",t)})(e,t).toString(),message:((e,t=!1)=>{var i,a;if(e.muxCode){let r=vw(null!=(i=e.errorCategory)?i:"video"),n=t$(null!=(a=e.errorCategory)?a:tH.VIDEO);return e.muxCode===tB.NETWORK_OFFLINE?t7("Check your internet connection and try reloading this video.",t):e.muxCode===tB.NETWORK_TOKEN_EXPIRED?t7("The videoâs secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:n}):e.muxCode===tB.NETWORK_TOKEN_SUB_MISMATCH?t7("The videoâs playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:n}):e.muxCode===tB.NETWORK_TOKEN_MALFORMED?t7("{category} URL is formatted incorrectly",t).format({category:r}):[tB.NETWORK_TOKEN_AUD_MISMATCH,tB.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode)?t7("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:n}):[tB.NETWORK_TOKEN_MISSING,tB.NETWORK_INVALID_URL].includes(e.muxCode)?t7("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:n}):e.muxCode===tB.NETWORK_NOT_FOUND?"":e.message}return e.code&&(e.code===tV.MEDIA_ERR_NETWORK||e.code===tV.MEDIA_ERR_DECODE||e.code===tV.MEDIA_ERR_SRC_NOT_SUPPORTED),e.message})(e,t).toString()}))(e,!1);return` 3214 ${null!=a&&a.title?`<h3>${a.title}</h3>`:""} 3215 ${null!=a&&a.message||null!=a&&a.linkUrl?`<p> 3216 ${null==a?void 0:a.message} 3217 ${null!=a&&a.linkUrl?`<a 3218 href="${a.linkUrl}" 3219 target="_blank" 3220 rel="external noopener" 3221 aria-label="${null!=(t=a.linkText)?t:""} ${t7("(opens in a new window)")}" 3222 >${null!=(i=a.linkText)?i:a.linkUrl}</a 3223 >`:""} 3224 </p>`:""} 3225 `}return vO(e)};var vU,vW,vH,vB,v$,vV,vq,vK,vF,vY,vG,vj,vQ,vz,vZ,vX,vJ,v0,v1,v2,v3,v4=Object.values(aK),v5=Object.values(vM),v9=Object.values(vx),v8="mux-player",v6={isDialogOpen:!1},v7={redundant_streams:!0},be=class extends vp{constructor(){super(),uN(this,vQ),uN(this,vU),uN(this,vW,!1),uN(this,vH,{}),uN(this,vB,!0),uN(this,v$,new vr(this,"hotkeys")),uN(this,vV),uN(this,vq,()=>uP(this,vQ,vJ).call(this)),uN(this,vK,()=>uP(this,vQ,vJ).call(this)),uN(this,vF,()=>uP(this,vQ,vJ).call(this)),uN(this,vY),uN(this,vG,{...v6,onCloseErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&uP(this,vQ,vX).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&(p7(this,p1.activeElement)||e.preventDefault())}}),uN(this,vj,e=>{var t;let i=null==(t=this.media)?void 0:t.error;if(!(i instanceof tV)){let{message:e,code:t}=null!=i?i:{};i=new tV(e,t)}if(!(null!=i&&i.fatal)){vs(i),i.data&&vs(`${i.name} data:`,i.data);return}let a=vI(i,!1);a.message&&vl(a),vo(i),i.data&&vo(`${i.name} data:`,i.data),uP(this,vQ,vX).call(this,{isDialogOpen:!0})}),uO(this,vU,iz()),this.attachShadow({mode:"open"}),uP(this,vQ,vZ).call(this),this.isConnected&&uP(this,vQ,vz).call(this)}static get NAME(){return v8}static get VERSION(){return vt}static get observedAttributes(){var e;return[...null!=(e=vp.observedAttributes)?e:[],...v5,...v4,...v9]}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(){uP(this,vQ,vz).call(this);let e=this.media;e&&(e.metadata=vP(this))}disconnectedCallback(){var e,t,i,a,r,n,s,o;null==(e=ux(this,vV))||e.disconnect(),null==(t=this.media)||t.removeEventListener("streamtypechange",ux(this,vq)),null==(i=this.media)||i.removeEventListener("loadstart",ux(this,vK)),this.removeEventListener("error",ux(this,vj)),this.media&&(this.media.errorTranslator=void 0),null==(r=null==(a=this.media)?void 0:a.textTracks)||r.removeEventListener("addtrack",ux(this,vF)),null==(s=null==(n=this.media)?void 0:n.textTracks)||s.removeEventListener("removetrack",ux(this,vF)),null==(o=ux(this,vY))||o.call(this),uO(this,vY,void 0),uO(this,vW,!1)}attributeChangedCallback(e,t,i){var a;switch(uP(this,vQ,vz).call(this),super.attributeChangedCallback(e,t,i),e){case vx.HOTKEYS:ux(this,v$).value=i;break;case vx.THUMBNAIL_TIME:null!=i&&this.tokens.thumbnail&&vs(t7("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case vx.THUMBNAIL_TOKEN:if(i){let e=t6(i);if(e){let{aud:t}=e,i=iS.THUMBNAIL;t!==i&&vs(t7("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"thumbnail"}))}}break;case vx.STORYBOARD_TOKEN:if(i){let e=t6(i);if(e){let{aud:t}=e,i=iS.STORYBOARD;t!==i&&vs(t7("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"storyboard"}))}}break;case vx.DRM_TOKEN:if(i){let e=t6(i);if(e){let{aud:t}=e,i=iS.DRM;t!==i&&vs(t7("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"drm"}))}}break;case aK.PLAYBACK_ID:null!=i&&i.includes("?token")&&vo(t7("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break;case aK.STREAM_TYPE:i&&![tF.LIVE,tF.ON_DEMAND,tF.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?1/0:0:vl({file:"invalid-stream-type.md",message:t7("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===tF.LIVE?null==this.getAttribute(vx.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=NaN;break;case vx.FULLSCREEN_ELEMENT:if(null!=i||i!==t){let e=p1.getElementById(i),t=null==e?void 0:e.querySelector("mux-player");this.mediaController&&e&&t&&(this.mediaController.fullscreenElement=e)}break;case aK.CAP_RENDITION_TO_PLAYER_SIZE:(null==i||i!==t)&&(this.capRenditionToPlayerSize=null!=i||void 0)}[aK.PLAYBACK_ID,vM.SRC,vx.PLAYBACK_TOKEN].includes(e)&&t!==i&&uO(this,vG,{...ux(this,vG),...v6}),uP(this,vQ,vJ).call(this,{[null!=(a=va[e])?a:p3(e)]:i})}async requestFullscreen(e){var t;if(!(!this.mediaController||this.mediaController.hasAttribute(rT.MEDIA_IS_FULLSCREEN)))return null==(t=this.mediaController)||t.dispatchEvent(new p0.CustomEvent(rg.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>
3225{var i;null==(i=this.mediaController)||i.addEventListener(rA.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}async exitFullscreen(){var e;if(!(!this.mediaController||!this.mediaController.hasAttribute(rT.MEDIA_IS_FULLSCREEN)))return null==(e=this.mediaController)||e.dispatchEvent(new p0.CustomEvent(rg.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(rA.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var e;return null!=(e=this.getAttribute(aK.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tj.includes(e)?this.setAttribute(aK.PREFER_CMCD,e):vs(`Invalid value for preferCmcd. Must be one of ${tj.join()}`):this.removeAttribute(aK.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(rT.MEDIA_HAS_PLAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(rT.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(vx.THEME))?e:"gerwig"}set theme(e){this.setAttribute(vx.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let i of e.getAttributeNames()){if(vN.includes(i))continue;let a=e.getAttribute(i);t[p3(i)]=""===a||a}return t}set themeProps(e){var t,i;uP(this,vQ,vz).call(this);let a={...this.themeProps,...e};for(let r in a){if(vN.includes(r))continue;let a=null==e?void 0:e[r];"boolean"==typeof a||null==a?null==(t=this.mediaTheme)||t.toggleAttribute(p2(r),!!a):null==(i=this.mediaTheme)||i.setAttribute(p2(r),a)}}get playbackId(){var e;return null!=(e=this.getAttribute(aK.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(aK.PLAYBACK_ID,e):this.removeAttribute(aK.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=bt(this,vM.SRC))?e:void 0:null!=(t=this.getAttribute(vM.SRC))?t:void 0}set src(e){e?this.setAttribute(vM.SRC,e):this.removeAttribute(vM.SRC)}get poster(){var e;let t=this.getAttribute(vM.POSTER);if(null!=t)return t;let{tokens:i}=this;return i.playback&&!i.thumbnail?void vs("Missing expected thumbnail token. No poster image will be shown"):this.playbackId&&!this.audio?((e,{token:t,customDomain:i=ve,thumbnailTime:a,programTime:r}={})=>{var n;let s=null==t?a:void 0,{aud:o}=null!=(n=t6(t))?n:{};if(!(t&&"t"!==o))return`https://image.${i}/${e}/thumbnail.webp${p5({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(vM.POSTER,e):this.removeAttribute(vM.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(vx.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(vx.STORYBOARD_SRC,e):this.removeAttribute(vx.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;return this.storyboardSrc&&!e.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[tF.LIVE,tF.UNKNOWN].includes(this.streamType)||e.playback&&!e.storyboard?void 0:((e,{token:t,customDomain:i=ve,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=null!=(n=t6(t))?n:{};if(!(t&&"s"!==s))return`https://image.${i}/${e}/storyboard.vtt${p5({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(vx.AUDIO)}set audio(e){e?this.setAttribute(vx.AUDIO,""):this.removeAttribute(vx.AUDIO)}get hotkeys(){return ux(this,v$)}get nohotkeys(){return this.hasAttribute(vx.NOHOTKEYS)}set nohotkeys(e){e?this.setAttribute(vx.NOHOTKEYS,""):this.removeAttribute(vx.NOHOTKEYS)}get thumbnailTime(){return p4(this.getAttribute(vx.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(vx.THUMBNAIL_TIME,`${e}`)}get videoTitle(){var e,t;return null!=(t=null!=(e=this.getAttribute(vx.VIDEO_TITLE))?e:this.getAttribute(vx.TITLE))?t:""}set videoTitle(e){e!==this.videoTitle&&(e?this.setAttribute(vx.VIDEO_TITLE,e):this.removeAttribute(vx.VIDEO_TITLE))}get placeholder(){var e;return null!=(e=bt(this,vx.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(vx.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let i=this.getAttribute(vx.PRIMARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=p0.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim()))return i}set primaryColor(e){this.setAttribute(vx.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let i=this.getAttribute(vx.SECONDARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=p0.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim()))return i}set secondaryColor(e){this.setAttribute(vx.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let i=this.getAttribute(vx.ACCENT_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=p0.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim()))return i}set accentColor(e){this.setAttribute(vx.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(vx.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(vx.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(vx.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(vx.PLAYBACK_RATES))return this.getAttribute(vx.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>
3225e-t)}set playbackRates(e){e?this.setAttribute(vx.PLAYBACK_RATES,e.join(" ")):this.removeAttribute(vx.PLAYBACK_RATES)}get forwardSeekOffset(){var e;return null!=(e=p4(this.getAttribute(vx.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(vx.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=p4(this.getAttribute(vx.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(vx.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(vx.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(vx.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(vx.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return p4(this.getAttribute(vx.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(vx.DEFAULT_DURATION):this.setAttribute(vx.DEFAULT_DURATION,`${e}`)}get playerInitTime(){return this.hasAttribute(aK.PLAYER_INIT_TIME)?p4(this.getAttribute(aK.PLAYER_INIT_TIME)):ux(this,vU)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aK.PLAYER_INIT_TIME):this.setAttribute(aK.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(aK.PLAYER_SOFTWARE_NAME))?e:v8}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(aK.PLAYER_SOFTWARE_VERSION))?e:vt}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aK.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aK.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aK.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aK.MAX_RESOLUTION,e):this.removeAttribute(aK.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aK.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aK.MIN_RESOLUTION,e):this.removeAttribute(aK.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(aK.MAX_AUTO_RESOLUTION):this.setAttribute(aK.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(aK.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aK.RENDITION_ORDER,e):this.removeAttribute(aK.RENDITION_ORDER))}get programStartTime(){return p4(this.getAttribute(aK.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(aK.PROGRAM_START_TIME):this.setAttribute(aK.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return p4(this.getAttribute(aK.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(aK.PROGRAM_END_TIME):this.setAttribute(aK.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){return p4(this.getAttribute(aK.ASSET_START_TIME))}set assetStartTime(e){null==e?this.removeAttribute(aK.ASSET_START_TIME):this.setAttribute(aK.ASSET_START_TIME,`${e}`)}get assetEndTime(){return p4(this.getAttribute(aK.ASSET_END_TIME))}set assetEndTime(e){null==e?this.removeAttribute(aK.ASSET_END_TIME):this.setAttribute(aK.ASSET_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(vx.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(vx.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,i])=>(e[t]=i,e),{}):v7}set extraSourceParams(e){null==e?this.removeAttribute(vx.EXTRA_SOURCE_PARAMS):this.setAttribute(vx.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(aK.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aK.CUSTOM_DOMAIN,e):this.removeAttribute(aK.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=bt(this,aK.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(aK.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(vx.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(vx.NO_VOLUME_PREF,""):this.removeAttribute(vx.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(vx.NO_MUTED_PREF)}set noMutedPref(e){e?this.setAttribute(vx.NO_MUTED_PREF,""):this.removeAttribute(vx.NO_MUTED_PREF)}get debug(){return null!=bt(this,aK.DEBUG)}set debug(e){e?this.setAttribute(aK.DEBUG,""):this.removeAttribute(aK.DEBUG)}get disableTracking(){return null!=bt(this,aK.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(aK.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=bt(this,aK.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(aK.DISABLE_COOKIES,""):this.removeAttribute(aK.DISABLE_COOKIES)}get streamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(aK.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?i:tF.UNKNOWN}set streamType(e){this.setAttribute(aK.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(vx.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(vx.DEFAULT_STREAM_TYPE))?i:tF.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(vx.DEFAULT_STREAM_TYPE,e):this.removeAttribute(vx.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(vx.TARGET_LIVE_WINDOW)?+this.getAttribute(vx.TARGET_LIVE_WINDOW):null!=(t=null==(e=this.media)?void 0:e.targetLiveWindow)?t:NaN}
3225set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(null==e?this.removeAttribute(vx.TARGET_LIVE_WINDOW):this.setAttribute(vx.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return p4(bt(this,aK.START_TIME))}set startTime(e){this.setAttribute(aK.START_TIME,`${e}`)}get initialBandwidthEstimateKbps(){return p4(bt(this,aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS))}set initialBandwidthEstimateKbps(e){null==e?this.removeAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS,`${e}`)}get initialEstimateSegments(){return p4(bt(this,aK.INITIAL_ESTIMATE_SEGMENTS))}set initialEstimateSegments(e){null==e?this.removeAttribute(aK.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(aK.INITIAL_ESTIMATE_SEGMENTS,`${e}`)}get minPreloadSegments(){return p4(bt(this,aK.MIN_PRELOAD_SEGMENTS))}set minPreloadSegments(e){null==e?this.removeAttribute(aK.MIN_PRELOAD_SEGMENTS):this.setAttribute(aK.MIN_PRELOAD_SEGMENTS,`${e}`)}get preferPlayback(){let e=this.getAttribute(aK.PREFER_PLAYBACK);if(e===tY.MSE||e===tY.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tY.MSE||e===tY.NATIVE?this.setAttribute(aK.PREFER_PLAYBACK,e):this.removeAttribute(aK.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){(uP(this,vQ,vz).call(this),this.media)?this.media.metadata={...vP(this),...e}:vo("underlying media element missing when trying to set metadata. metadata will not be set.")}get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){(uP(this,vQ,vz).call(this),this.media)?this.media._hlsConfig=e:vo("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.")}async addCuePoints(e){var t;return(uP(this,vQ,vz).call(this),this.media)?null==(t=this.media)?void 0:t.addCuePoints(e):void vo("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(uP(this,vQ,vz).call(this),this.media)?null==(t=this.media)?void 0:t.addChapters(e):void vo("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(vx.PLAYBACK_TOKEN),t=this.getAttribute(vx.DRM_TOKEN),i=this.getAttribute(vx.THUMBNAIL_TOKEN),a=this.getAttribute(vx.STORYBOARD_TOKEN);return{...ux(this,vH),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=i?{thumbnail:i}:{},...null!=a?{storyboard:a}:{}}}set tokens(e){uO(this,vH,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(vx.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(vx.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(vx.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(vx.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(vx.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(vx.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(vx.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(vx.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,i,a){var r;let n=null==(r=this.media)?void 0:r.nativeEl;if(n)return is(n,e,t,i,a)}removeTextTrack(e){var t;let i=null==(t=this.media)?void 0:t.nativeEl;if(i)return io(i,e)}get textTracks(){var e;return null==(e=this.media)?void 0:e.textTracks}get castReceiver(){var e;return null!=(e=this.getAttribute(vx.CAST_RECEIVER))?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(vx.CAST_RECEIVER,e):this.removeAttribute(vx.CAST_RECEIVER))}get castCustomData(){var e;return null==(e=this.media)?void 0:e.castCustomData}set castCustomData(e){this.media?this.media.castCustomData=e:vo("underlying media element missing when trying to set castCustomData. castCustomData will not be set.")}get noTooltips(){return this.hasAttribute(vx.NO_TOOLTIPS)}set noTooltips(e){e?this.setAttribute(vx.NO_TOOLTIPS,""):this.removeAttribute(vx.NO_TOOLTIPS)}get proudlyDisplayMuxBadge(){return this.hasAttribute(vx.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(e){e?this.setAttribute(vx.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(vx.PROUDLY_DISPLAY_MUX_BADGE)}get capRenditionToPlayerSize(){var e;return null==(e=this.media)?void 0:e.capRenditionToPlayerSize}set capRenditionToPlayerSize(e){this.media?this.media.capRenditionToPlayerSize=e:vo("underlying media element missing when trying to set capRenditionToPlayerSize")}};function bt(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}vU=new WeakMap,vW=new WeakMap,vH=new WeakMap,vB=new WeakMap,v$=new WeakMap,vV=new WeakMap,vq=new WeakMap,vK=new WeakMap,vF=new WeakMap,vY=ne
3225w WeakMap,vG=new WeakMap,vj=new WeakMap,vQ=new WeakSet,vz=function(){var e,t,i,a;if(!ux(this,vW)){uO(this,vW,!0),uP(this,vQ,vJ).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof p0.HTMLElement))throw""}catch{vo("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{vo("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof sO))throw""}catch{vo("<media-controller> failed to upgrade!")}uP(this,vQ,v0).call(this),uP(this,vQ,v1).call(this),uP(this,vQ,v2).call(this),uO(this,vB,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nC))||t),uP(this,vQ,v3).call(this),null==(i=this.media)||i.addEventListener("streamtypechange",ux(this,vq)),null==(a=this.media)||a.addEventListener("loadstart",ux(this,vK))}},vZ=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{}},vX=function(e){Object.assign(ux(this,vG),e),uP(this,vQ,vJ).call(this)},vJ=function(e={}){var t,i,a,r,n,s,o,l,d,u,c,h,m,p,v,b,E,g,f,y,T,A,k,w,I,S,R,C,L,D,M,x,N,O,P,U,W,H,B,$,V,q,K,F,Y,G,j,Q,z,Z;let X,J,ee,et;t={...ux(this,vG),...e},X={src:!this.playbackId&&this.src,playbackId:this.playbackId,hasSrc:!!this.playbackId||!!this.src||!!this.currentSrc,poster:this.poster,storyboard:(null==(i=this.media)?void 0:i.currentSrc)&&this.storyboard,storyboardSrc:this.getAttribute(vx.STORYBOARD_SRC),fullscreenElement:this.getAttribute(vx.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=p0.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(vx.NOHOTKEYS),hotKeys:this.getAttribute(vx.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,initialBandwidthEstimateKbps:this.initialBandwidthEstimateKbps,initialEstimateSegments:this.initialEstimateSegments,minPreloadSegments:this.minPreloadSegments,preferPlayback:this.preferPlayback,audio:this.audio,defaultStreamType:this.defaultStreamType,targetLiveWindow:this.getAttribute(aK.TARGET_LIVE_WINDOW),streamType:vi(this.getAttribute(aK.STREAM_TYPE)),primaryColor:this.getAttribute(vx.PRIMARY_COLOR),secondaryColor:this.getAttribute(vx.SECONDARY_COLOR),accentColor:this.getAttribute(vx.ACCENT_COLOR),forwardSeekOffset:this.forwardSeekOffset,backwardSeekOffset:this.backwardSeekOffset,defaultHiddenCaptions:this.defaultHiddenCaptions,defaultDuration:this.defaultDuration,defaultShowRemainingTime:this.defaultShowRemainingTime,hideDuration:(J=null==(n=this.mediaController)?void 0:n.querySelector("media-time-display"))&&"none"===getComputedStyle(J).getPropertyValue("--media-duration-display-display").trim(),playbackRates:this.getAttribute(vx.PLAYBACK_RATES),customDomain:null!=(a=this.getAttribute(aK.CUSTOM_DOMAIN))?a:void 0,title:this.getAttribute(vx.TITLE),videoTitle:null!=(r=this.getAttribute(vx.VIDEO_TITLE))?r:this.getAttribute(vx.TITLE),novolumepref:this.hasAttribute(vx.NO_VOLUME_PREF),nomutedpref:this.hasAttribute(vx.NO_MUTED_PREF),proudlyDisplayMuxBadge:this.hasAttribute(vx.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:this.castReceiver,disablePseudoEnded:this.hasAttribute(vx.DISABLE_PSEUDO_ENDED),capRenditionToPlayerSize:this.capRenditionToPlayerSize,...t,extraSourceParams:this.extraSourceParams},s=vA` 3226 <style> 3227 ${(e=>{let{tokens:t}=e;return t.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""})(X)} 3228 ${vv} 3229 </style> 3230 ${l=X,vA` 3231 <media-theme 3232 template="${l.themeTemplate||!1}" 3233 defaultstreamtype="${null!=(d=l.defaultStreamType)&&d}" 3234 hotkeys="${ee=l.hotKeys?`${l.hotKeys}`:"","live"===vi(l.streamType)&&(ee+=" noarrowleft noarrowright"),ee||!1}" 3235 nohotkeys="${l.noHotKeys||!l.hasSrc||!1}" 3236 noautoseektolive="${!!(null!=(u=l.streamType)&&u.includes(tF.LIVE))&&0!==l.targetLiveWindow}" 3237 novolumepref="${l.novolumepref||!1}" 3238 nomutedpref="${l.nomutedpref||!1}" 3239 disabled="${!l.hasSrc||l.isDialogOpen}" 3240 audio="${null!=(c=l.audio)&&c}" 3241 style="${null!=(Z={"--media-primary-color":l.primaryColor,"--media-secondary-color":l.secondaryColor,"--media-accent-color":l.accentColor}
3241,et="",Object.entries(Z).forEach(([e,t])=>{null!=t&&(et+=`${p2(e)}: ${t}; `)}),h=et?et.trim():void 0)&&h}" 3242 defaultsubtitles="${!l.defaultHiddenCaptions}" 3243 forwardseekoffset="${null!=(m=l.forwardSeekOffset)&&m}" 3244 backwardseekoffset="${null!=(p=l.backwardSeekOffset)&&p}" 3245 playbackrates="${null!=(v=l.playbackRates)&&v}" 3246 defaultshowremainingtime="${null!=(b=l.defaultShowRemainingTime)&&b}" 3247 defaultduration="${null!=(E=l.defaultDuration)&&E}" 3248 hideduration="${null!=(g=l.hideDuration)&&g}" 3249 title="${null!=(f=l.title)&&f}" 3250 videotitle="${null!=(y=l.videoTitle)&&y}" 3251 proudlydisplaymuxbadge="${null!=(T=l.proudlyDisplayMuxBadge)&&T}" 3252 exportparts="${vk}" 3253 onclose="${l.onCloseErrorDialog}" 3254 onfocusin="${l.onFocusInErrorDialog}" 3255 > 3256 <mux-video 3257 slot="media" 3258 inert="${null!=(A=l.noHotKeys)&&A}" 3259 target-live-window="${null!=(k=l.targetLiveWindow)&&k}" 3260 stream-type="${null!=(w=vi(l.streamType))&&w}" 3261 crossorigin="${null!=(I=l.crossOrigin)?I:""}" 3262 playsinline 3263 autoplay="${null!=(S=l.autoplay)&&S}" 3264 muted="${null!=(R=l.muted)&&R}" 3265 loop="${null!=(C=l.loop)&&C}" 3266 preload="${null!=(L=l.preload)&&L}" 3267 debug="${null!=(D=l.debug)&&D}" 3268 prefer-cmcd="${null!=(M=l.preferCmcd)&&M}" 3269 disable-tracking="${null!=(x=l.disableTracking)&&x}" 3270 disable-cookies="${null!=(N=l.disableCookies)&&N}" 3271 prefer-playback="${null!=(O=l.preferPlayback)&&O}" 3272 start-time="${null!=l.startTime&&l.startTime}" 3273 initial-bandwidth-estimate-kbps="${null!=l.initialBandwidthEstimateKbps&&l.initialBandwidthEstimateKbps}" 3274 initial-estimate-segments="${null!=l.initialEstimateSegments&&l.initialEstimateSegments}" 3275 min-preload-segments="${null!=l.minPreloadSegments&&l.minPreloadSegments}" 3276 beacon-collection-domain="${null!=(P=l.beaconCollectionDomain)&&P}" 3277 player-init-time="${null!=(U=l.playerInitTime)&&U}" 3278 player-software-name="${null!=(W=l.playerSoftwareName)&&W}" 3279 player-software-version="${null!=(H=l.playerSoftwareVersion)&&H}" 3280 env-key="${null!=(B=l.envKey)&&B}" 3281 custom-domain="${null!=($=l.customDomain)&&$}" 3282 src="${l.src?l.src:!!l.playbackId&&iX(l)}" 3283 cast-src="${l.src?l.src:!!l.playbackId&&iX(l)}" 3284 cast-receiver="${null!=(V=l.castReceiver)&&V}" 3285 drm-token="${null!=(K=null==(q=l.tokens)?void 0:q.drm)&&K}" 3286 playback-token="${null!=(Y=null==(F=l.tokens)?void 0:F.playback)&&Y}" 3287 exportparts="video" 3288 disable-pseudo-ended="${null!=(G=l.disablePseudoEnded)&&G}" 3289 max-auto-resolution="${null!=(j=l.maxAutoResolution)&&j}" 3290 cap-rendition-to-player-size="${null!=(Q=l.capRenditionToPlayerSize)&&Q}" 3291 > 3292 ${l.storyboard?vA`<track label="thumbnails" default kind="metadata" src="${l.storyboard}" />`:vA``} 3293 <slot></slot> 3294 </mux-video> 3295 <slot name="poster" slot="poster"> 3296 <media-poster-image 3297 part="poster" 3298 exportparts="poster, img" 3299 src="${!!l.poster&&l.poster}" 3300 placeholdersrc="${null!=(z=l.placeholder)&&z}" 3301 ></media-poster-image> 3302 </slot> 3303 </media-theme> 3304`} 3305`,o=this.shadowRoot,s.renderInto(o)},v0=function(){let e=e=>{var t,i;if(!(null!=e&&e.startsWith("theme-")))return;let a=e.replace(/^theme-/,"");if(vN.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)};uO(this,vV,new MutationObserver(t=>{for(let{attributeName:i}of t)e(i)})),ux(this,vV).observe(this,{attributes:!0}),this.getAttributeNames().forEach(e)},v1=function(){this.addEventListener("error",ux(this,vj)),this.media&&(this.media.errorTranslator=(e={})=>{var t,i,a;if(!((null==(t=this.media)?void 0:t.error)instanceof tV))return e;let r=vI(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}})},v2=function(){var e,t,i,a;null==(t=null==(e=this.media)?void 0:e.textTracks)||t.addEventListener("addtrack",ux(this,vF)),null==(a=null==(i=this.media)?void 0:i.textTracks)||a.addEventListener("removetrack",ux(this,vF))},v3=function(){var e,t;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===tF.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(e,t,i=!1)=>
3305{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(` 3306`).length,r=-3;this.streamType===tF.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(nC))&&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,ux(this,vB))};o(),null==(e=this.textTracks)||e.addEventListener("change",o),null==(t=this.textTracks)||t.addEventListener("addtrack",o);let l=()=>{var e,t;let a=null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nC))||t;ux(this,vB)!==a&&(uO(this,vB,a),n(i,ux(this,vB)))};this.addEventListener("userinactivechange",l),uO(this,vY,()=>{var e,t;null==i||i.removeEventListener("cuechange",s),null==(e=this.textTracks)||e.removeEventListener("change",o),null==(t=this.textTracks)||t.removeEventListener("addtrack",o),this.removeEventListener("userinactivechange",l)})};var bi=e=>{throw TypeError(e)},ba=(e,t,i)=>t.has(e)||bi("Cannot "+i),br=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};"u"<typeof DocumentFragment&&(globalThis.DocumentFragment=class extends br{});var bn,bs=class extends br{},bo=class{constructor(e,t={}){((e,t)=>t.has(e)?bi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,void 0))(this,bn),((e,t,i)=>(ba(e,t,"write to private field"),t.set(e,i)))(this,bn,null==t?void 0:t.detail)}get detail(){let e;return ba(this,e=bn,"read from private field"),e.get(this)}initCustomEvent(){}};bn=new WeakMap;var bl={document:{createElement:function(e,t){return new bs}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(bs)},CustomEvent:bo,EventTarget:br,HTMLElement:bs,HTMLVideoElement:class extends br{}},bd="u"<typeof window||void 0===globalThis.customElements,bu=bd?bl:globalThis;bd&&bl.document,bu.customElements.get("mux-player")||(bu.customElements.define("mux-player",be),bu.MuxPlayerElement=be);var bc=parseInt(r.default.version)>=19,bh={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"};function bm(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}var bp=Object.prototype.hasOwnProperty,bv=(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(!bp.call(t,i[a])||!Object.is(e[i[a]],t[i[a]]))return!1;return!0})(t,e[i]),bb=(e,t,i)=>{e[i]=t},bE=(e,t,i,a=bb,n=bv)=>(0,r.useEffect)(()=>{let r=null==i?void 0:i.current;r&&n(r,t,e)&&a(r,t,e)},[null==i?void 0:i.current,t]),bg=(()=>{try{return"3.13.0"}catch{}return"UNKNOWN"})(),bf=(e,t,i)=>(0,r.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]),by=r.default.forwardRef(({children:e,...t},i)=>r.default.createElement("mux-player",{suppressHydrationWarning:!0,...((e={})=>{let{ref:t,...i}=e;return Object.entries(i).reduce((e,[t,i])=>{let a=((e,t)=>{if(!(!bc&&"boolean"==typeof t&&!t)){let i,a;if(i=e,null!=(a=bh)&&i in a)return bh[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=bc||"boolean"!=typeof i?i:"";return e[a]=r,e},{})})(t),ref:i},e)),b_="mux-player-react",bT=r.default.forwardRef((e,t)=>{var i;let a=(0,r.useRef)(null),n=function(...e){return r.useCallback(function(...e){return t=>{let i=!1,a=e.map(e=>{let a=bm(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():bm(e[t],null)}}}}(...e),e)}(a,t),[s]=((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:v,onPlaying:b,onTimeUpdate:E,onPause:g,onSeeking:f,onSeeked:y,onStalled:T,onSuspend:A,onEnded:k,onError:w,onCuePointChange:I,onChapterChange:S,metadata:R,tokens:C,paused:L,playbackId:D,playbackRates:M,currentTime:x,themeProps:N,extraSourceParams:O,castCustomData:P,_hlsConfig:U,...W}=t;return bE("tokens",C,e),bE("playbackId",D,e),bE("playbackRates",M,e),bE("metadata",R,e),bE("extraSourceParams",O,e),bE("_hlsConfig",U,e),bE("themeProps",N,e),bE("castCustomData",P,e),bE("paused",L,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,i)=>(!e.hasAttribute("autoplay")||!!e.hasPlayed)&&bv(e,t,i)),bE("currentTime",x,e,(e,t)=>{null!=t&&(e.currentTime=t)}),bf("abort",e,i),bf("canplay",e,a),bf("canplaythrough",e,r),bf("emptied",e,n),bf("loadstart",e,s),bf("loadeddata",e,o),bf("loadedmetadata",e,l),bf("progress",e,d),bf("durationchange",e,u),bf("volumechange",e,c),bf("ratechange",e,h),bf("resize",e,m),bf("waiting",e,p),bf("play",e,v),bf("playing",e,b),bf("timeupdate",e,E),bf("pause",e,g),bf("seeking",e,f),bf("seeked",e,y),bf("stalled",e,T),bf("suspend",e,A),bf("ended",e,k),bf("error",e,w),bf("cuepointchange",e,I),bf("chapterchange",e,S),[W]})(a,e),[o]=(0,r.useState)(null!=(i=e.playerInitTime)?i:iz());return r.default.createElement(by,{ref:n,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:b_,playerSoftwareVersion:bg,playerInitTime:o,...s})});e.s(["default",0,bT,"playerSoftwareName",0,b_,"playerSoftwareVersion",0,bg],68399)}]);
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.