/**
 * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.
 * Original file: /npm/media-chrome@4.16.1/dist/menu/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
const t="mediashowsubtitlesrequest",e="mediadisablesubtitlesrequest",n="mediaplaybackraterequest",i="mediarenditionrequest",a="mediaaudiotrackrequest",s={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},o=Object.entries({MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"}),r=o.reduce(((t,[e,n])=>(t[e]=n.toLowerCase(),t)),{}),l=o.reduce(((t,[e,n])=>(t[e]=n.toLowerCase(),t)),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(l).reduce(((t,[e,n])=>{const i=r[e];return i&&(t[n]=i),t}),{userinactivechange:"userinactive"}),Object.entries(r).reduce(((t,[e,n])=>{const i=l[e];return i&&(t[n]=i),t}),{userinactive:"userinactivechange"});const d="subtitles",h="captions";class c{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class u extends c{}class m extends u{constructor(){super(...arguments),this.role=null}}const p={createElement:function(){return new v.HTMLElement},createElementNS:function(){return new v.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:t=>!1},v={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:p,Node:u,Element:m,HTMLElement:class extends m{constructor(){super(...arguments),this.innerHTML=""}get content(){return new v.DocumentFragment}},DocumentFragment:class extends c{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:t=>null,setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:t=>({matches:!1,media:t}),DOMParser:class{parseFromString(t,e){return{body:{textContent:t}}}}},b="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"undefined"==typeof window||void 0===window.customElements,g=Object.keys(v).every((t=>t in globalThis)),f=b&&!g?v:globalThis,E=b&&!g?p:globalThis.document;function k({anchor:t,floating:e,placement:n}){const i=function({anchor:t,floating:e}){return{anchor:y(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}({anchor:t,floating:e}),{x:a,y:s}=function({anchor:t,floating:e},n){const i="x"===function(t){return["top","bottom"].includes(A(t))?"y":"x"}(n)?"y":"x",a="y"===i?"height":"width",s=A(n),o=t.x+t.width/2-e.width/2,r=t.y+t.height/2-e.height/2,l=t[a]/2-e[a]/2;let d;switch(s){case"top":d={x:o,y:t.y-e.height};break;case"bottom":d={x:o,y:t.y+t.height};break;case"right":d={x:t.x+t.width,y:r};break;case"left":d={x:t.x-e.width,y:r};break;default:d={x:t.x,y:t.y}}switch(n.split("-")[1]){case"start":d[i]-=l;break;case"end":d[i]+=l}return d}(i,n);return{x:a,y:s}}function y(t,e){var n;const i=t.getBoundingClientRect(),a=null!=(n=null==e?void 0:e.getBoundingClientRect())?n:{x:0,y:0};return{x:i.x-a.x,y:i.y-a.y,width:i.width,height:i.height}}function A(t){return t.split("-")[0]}const w=new WeakMap,T=t=>{let e=w.get(t);return e||w.set(t,e=new Set),e},S=new f.ResizeObserver((t=>{for(const e of t)for(const t of T(e.target))t(e)}));function I(t,e){T(t).add(e),S.observe(t)}function x(t,e){const n=T(t);n.delete(e),n.size||S.unobserve(t)}class L extends Event{constructor({action:t="auto",relatedTarget:e,...n}){super("invoke",n),this.action=t,this.relatedTarget=e}}class M extends Event{constructor({newState:t,oldState:e,...n}){super("toggle",n),this.newState=t,this.oldState=e}}function _(t){const e={};for(const n of t)e[n.name]=n.value;return e}function C(t){var e;return null!=(e=R(t))?e:N(t,"media-controller")}function R(t){var e;const{MEDIA_CONTROLLER:n}=s,i=t.getAttribute(n);if(i)return null==(e=H(t))?void 0:e.getElementById(i)}const D=(t,e)=>!(!t||!e)&&(!!(null==t?void 0:t.contains(e))||D(t,e.getRootNode().host)),N=(t,e)=>{if(!t)return null;const n=t.closest(e);return n||N(t.getRootNode().host,e)};function O(t=document){var e;const n=null==t?void 0:t.activeElement;return n?null!=(e=O(n.shadowRoot))?e:n:null}function H(t){var e;const n=null==(e=null==t?void 0:t.getRootNode)?void 0:e.call(t);return n instanceof ShadowRoot||n instanceof Document?n:null}function W(t,e){var n,i;const a=null!=(n=t.querySelectorAll("style:not([media])"))?n:[],s=null==a?void 0:a[a.length-1];return(null==s?void 0:s.sheet)?(null==s||s.sheet.insertRule(`${e}{}`,s.sheet.cssRules.length),null==(i=s.sheet.cssRules)?void 0:i[s.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function P(t,e,n=Number.NaN){const i=t.getAttribute(e);return null!=i?+i:n}function B(t,e,n){const i=+n;null==n||Number.isNaN(i)?t.hasAttribute(e)&&t.removeAttribute(e):P(t,e,void 0)!==i&&t.setAttribute(e,`${i}`)}function U(t,e){return t.hasAttribute(e)}function $(t,e,n){null!=n?U(t,e)!=n&&t.toggleAttribute(e,n):t.hasAttribute(e)&&t.removeAttribute(e)}function q(t,e,n=null){var i;return null!=(i=t.getAttribute(e))?i:n}function V(t,e,n){if(null==n)return void(t.hasAttribute(e)&&t.removeAttribute(e));const i=`${n}`;q(t,e,void 0)!==i&&t.setAttribute(e,i)}var K,G,Z,Y,j,z,F,J,Q,X,tt,et,nt,it,at,st,ot,rt,lt,dt,ht,ct,ut,mt,pt,vt,bt,gt,ft,Et,kt,yt,At,wt,Tt,St,It,xt,Lt,Mt,_t,Ct,Rt,Dt,Nt,Ot,Ht=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Wt=(t,e,n)=>(Ht(t,e,"read from private field"),n?n.call(t):e.get(t)),Pt=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Bt=(t,e,n,i)=>(Ht(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Ut=(t,e,n)=>(Ht(t,e,"access private method"),n);function $t({type:t,text:e,value:n,checked:i}){const a=E.createElement("media-chrome-menu-item");a.type=null!=t?t:"",a.part.add("menu-item"),t&&a.part.add(t),a.value=n,a.checked=i;const s=E.createElement("span");return s.textContent=e,a.append(s),a}function qt(t,e){let n=t.querySelector(`:scope > [slot="${e}"]`);if("SLOT"==(null==n?void 0:n.nodeName)&&(n=n.assignedElements({flatten:!0})[0]),n)return n=n.cloneNode(!0),n;const i=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return i?i.cloneNode(!0):""}const Vt="style",Kt="hidden",Gt="disabled",Zt="anchor";class Yt extends f.HTMLElement{constructor(){if(super(),Pt(this,J),Pt(this,X),Pt(this,nt),Pt(this,at),Pt(this,ot),Pt(this,lt),Pt(this,ut),Pt(this,pt),Pt(this,bt),Pt(this,ft),Pt(this,kt),Pt(this,At),Pt(this,Tt),Pt(this,It),Pt(this,Lt),Pt(this,_t),Pt(this,Rt),Pt(this,Nt),Pt(this,K,null),Pt(this,G,null),Pt(this,Z,null),Pt(this,Y,new Set),Pt(this,j,void 0),Pt(this,z,!1),Pt(this,F,null),Pt(this,et,(()=>{const t=Wt(this,Y),e=new Set(this.items);for(const n of t)e.has(n)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:n}));for(const n of e)t.has(n)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:n}));Bt(this,Y,e)})),Pt(this,ht,(()=>{Ut(this,ut,mt).call(this),Ut(this,pt,vt).call(this,!1)})),Pt(this,ct,(()=>{Ut(this,ut,mt).call(this)})),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const t=_(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),Bt(this,j,new MutationObserver(Wt(this,et))),Wt(this,j).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[Gt,Kt,Vt,Zt,s.MEDIA_CONTROLLER]}static formatMenuItemText(t,e){return t}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(t){switch(t.type){case"slotchange":Ut(this,J,Q).call(this,t);break;case"invoke":Ut(this,at,st).call(this,t);break;case"click":Ut(this,bt,gt).call(this,t);break;case"toggle":Ut(this,kt,yt).call(this,t);break;case"focusout":Ut(this,Tt,St).call(this,t);break;case"keydown":Ut(this,It,xt).call(this,t)}}connectedCallback(){var t,e;Bt(this,F,W(this.shadowRoot,":host")),Ut(this,nt,it).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Bt(this,K,R(this)),null==(e=null==(t=Wt(this,K))?void 0:t.associateElement)||e.call(t,this),this.hidden||(I(zt(this),Wt(this,ht)),I(this,Wt(this,ct))),Ut(this,X,tt).call(this)}disconnectedCallback(){var t,e;x(zt(this),Wt(this,ht)),x(this,Wt(this,ct)),this.disable(),null==(e=null==(t=Wt(this,K))?void 0:t.unassociateElement)||e.call(t,this),Bt(this,K,null)}attributeChangedCallback(t,e,n){var i,a,o,r;t===Kt&&n!==e?(Wt(this,z)||Bt(this,z,!0),this.hidden?Ut(this,lt,dt).call(this):Ut(this,ot,rt).call(this),this.dispatchEvent(new M({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):t===s.MEDIA_CONTROLLER?(e&&(null==(a=null==(i=Wt(this,K))?void 0:i.unassociateElement)||a.call(i,this),Bt(this,K,null)),n&&this.isConnected&&(Bt(this,K,R(this)),null==(r=null==(o=Wt(this,K))?void 0:o.associateElement)||r.call(o,this))):t===Gt&&n!==e?null==n?this.enable():this.disable():t===Vt&&n!==e&&Ut(this,nt,it).call(this)}formatMenuItemText(t,e){return this.constructor.formatMenuItemText(t,e)}get anchor(){return this.getAttribute("anchor")}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){var t;return this.anchor?null==(t=H(this))?void 0:t.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(jt)}get radioGroupItems(){return this.items.filter((t=>"menuitemradio"===t.role))}get checkedItems(){return this.items.filter((t=>t.checked))}get value(){var t,e;return null!=(e=null==(t=this.checkedItems[0])?void 0:t.value)?e:""}set value(t){const e=this.items.find((e=>e.value===t));e&&Ut(this,Nt,Ot).call(this,e)}focus(){if(Bt(this,G,O()),this.items.length)return Ut(this,Rt,Dt).call(this,this.items[0]),void this.items[0].focus();const t=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==t||t.focus()}handleSelect(t){var e;const n=Ut(this,Lt,Mt).call(this,t);n&&(Ut(this,Nt,Ot).call(this,n,"checkbox"===n.type),Wt(this,Z)&&!this.hidden&&(null==(e=Wt(this,G))||e.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(t){var e,n;const{key:i}=t,a=this.items,s=null!=(n=null!=(e=Ut(this,Lt,Mt).call(this,t))?e:Ut(this,_t,Ct).call(this))?n:a[0],o=a.indexOf(s);let r=Math.max(0,o);"ArrowDown"===i?r++:"ArrowUp"===i?r--:"Home"===t.key?r=0:"End"===t.key&&(r=a.length-1),r<0&&(r=a.length-1),r>a.length-1&&(r=0),Ut(this,Rt,Dt).call(this,a[r]),a[r].focus()}}function jt(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==t?void 0:t.role)}function zt(t){var e;return null!=(e=t.getAttribute("bounds")?N(t,`#${t.getAttribute("bounds")}`):C(t)||t.parentElement)?e:t}K=new WeakMap,G=new WeakMap,Z=new WeakMap,Y=new WeakMap,j=new WeakMap,z=new WeakMap,F=new WeakMap,J=new WeakSet,Q=function(t){const e=t.target;for(const t of e.assignedNodes({flatten:!0}))3===t.nodeType&&""===t.textContent.trim()&&t.remove();["header","title"].includes(e.name)&&Ut(this,X,tt).call(this),e.name||Wt(this,et).call(this)},X=new WeakSet,tt=function(){const t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=0===e.assignedNodes().length&&0===t.assignedNodes().length},et=new WeakMap,nt=new WeakSet,it=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),n=null==(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:t.trim();e.setAttribute("media","row"===n?"":"width:0")},at=new WeakSet,st=function(t){Bt(this,Z,t.relatedTarget),D(this,t.relatedTarget)||(this.hidden=!this.hidden)},ot=new WeakSet,rt=function(){var t;null==(t=Wt(this,Z))||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",(()=>this.focus()),{once:!0}),I(zt(this),Wt(this,ht)),I(this,Wt(this,ct))},lt=new WeakSet,dt=function(){var t;null==(t=Wt(this,Z))||t.setAttribute("aria-expanded","false"),x(zt(this),Wt(this,ht)),x(this,Wt(this,ct))},ht=new WeakMap,ct=new WeakMap,ut=new WeakSet,mt=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor)return;if(this.hidden||!this.anchorElement)return;const{x:e,y:n}=k({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=t||(t=this.offsetWidth);const i=zt(this).getBoundingClientRect(),a=i.width-e-t,s=i.height-n-this.offsetHeight,{style:o}=Wt(this,F);o.setProperty("position","absolute"),o.setProperty("right",`${Math.max(0,a)}px`),o.setProperty("--_menu-bottom",`${s}px`);const r=getComputedStyle(this),l=o.getPropertyValue("--_menu-bottom")===r.bottom?s:parseFloat(r.bottom),d=i.height-l-parseFloat(r.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},pt=new WeakSet,vt=function(t){const e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),n=null==e?void 0:e.querySelector('[role="menu"]'),{style:i}=Wt(this,F);if(t||i.setProperty("--media-menu-transition-in","none"),n){const t=n.offsetHeight,i=Math.max(n.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${i}px`),this.style.setProperty("min-height",`${t}px`),Ut(this,ut,mt).call(this,i)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),Ut(this,ut,mt).call(this);i.removeProperty("--media-menu-transition-in")},bt=new WeakSet,gt=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(Wt(this,ft,Et)))return null==(e=Wt(this,G))||e.focus(),void(this.hidden=!0);const n=Ut(this,Lt,Mt).call(this,t);n&&!n.hasAttribute("disabled")&&(Ut(this,Rt,Dt).call(this,n),this.handleSelect(t))},ft=new WeakSet,Et=function(){var t;return null==(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:t.find((t=>t.matches('button[part~="back"]')))},kt=new WeakSet,yt=function(t){if(t.target===this)return;Ut(this,At,wt).call(this);const e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const n of e)n.invokeTargetElement!=t.target&&("open"!=t.newState||"true"!=n.getAttribute("aria-expanded")||n.invokeTargetElement.hidden||n.invokeTargetElement.dispatchEvent(new L({relatedTarget:n})));for(const t of e)t.setAttribute("aria-expanded",`${!t.submenuElement.hidden}`);Ut(this,pt,vt).call(this,!0)},At=new WeakSet,wt=function(){const t=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!t)},Tt=new WeakSet,St=function(t){var e;D(this,t.relatedTarget)||(Wt(this,z)&&(null==(e=Wt(this,G))||e.focus()),Wt(this,Z)&&Wt(this,Z)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))},It=new WeakSet,xt=function(t){var e,n,i,a,s;const{key:o,ctrlKey:r,altKey:l,metaKey:d}=t;if(!(r||l||d)&&this.keysUsed.includes(o))if(t.preventDefault(),t.stopPropagation(),"Tab"===o){if(Wt(this,z))return void(this.hidden=!0);t.shiftKey?null==(n=null==(e=this.previousElementSibling)?void 0:e.focus)||n.call(e):null==(a=null==(i=this.nextElementSibling)?void 0:i.focus)||a.call(i),this.blur()}else"Escape"===o?(null==(s=Wt(this,G))||s.focus(),Wt(this,z)&&(this.hidden=!0)):"Enter"===o||" "===o?this.handleSelect(t):this.handleMove(t)},Lt=new WeakSet,Mt=function(t){return t.composedPath().find((t=>["menuitemradio","menuitemcheckbox"].includes(t.role)))},_t=new WeakSet,Ct=function(){return this.items.find((t=>0===t.tabIndex))},Rt=new WeakSet,Dt=function(t){for(const e of this.items)e.tabIndex=e===t?0:-1},Nt=new WeakSet,Ot=function(t,e){const n=[...this.checkedItems];"radio"===t.type&&this.radioGroupItems.forEach((t=>t.checked=!1)),t.checked=!e||!t.checked,this.checkedItems.some(((t,e)=>t!=n[e]))&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},Yt.shadowRootOptions={mode:"open"},Yt.getTemplateHTML=function(t){return'\n    <style>\n      :host {\n        font: var(--media-font,\n          var(--media-font-weight, normal)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        --_menu-bg: rgb(20 20 30 / .8);\n        background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));\n        border-radius: var(--media-menu-border-radius);\n        border: var(--media-menu-border, none);\n        display: var(--media-menu-display, inline-flex) !important;\n        \n        transition: var(--media-menu-transition-in,\n          visibility 0s,\n          opacity .2s ease-out,\n          transform .15s ease-out,\n          left .2s ease-in-out,\n          min-width .2s ease-in-out,\n          min-height .2s ease-in-out\n        ) !important;\n        \n        visibility: var(--media-menu-visibility, visible);\n        opacity: var(--media-menu-opacity, 1);\n        max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));\n        transform: var(--media-menu-transform-in, translateY(0) scale(1));\n        flex-direction: column;\n        \n        min-height: 0;\n        position: relative;\n        bottom: var(--_menu-bottom);\n        box-sizing: border-box;\n      } \n\n      @-moz-document url-prefix() {\n        :host{\n          --_menu-bg: rgb(20 20 30);\n        }\n      }\n\n      :host([hidden]) {\n        transition: var(--media-menu-transition-out,\n          visibility .15s ease-in,\n          opacity .15s ease-in,\n          transform .15s ease-in\n        ) !important;\n        visibility: var(--media-menu-hidden-visibility, hidden);\n        opacity: var(--media-menu-hidden-opacity, 0);\n        max-height: var(--media-menu-hidden-max-height,\n          var(--media-menu-max-height, var(--_menu-max-height, 300px)));\n        transform: var(--media-menu-transform-out, translateY(2px) scale(.99));\n        pointer-events: none;\n      }\n\n      :host([slot="submenu"]) {\n        background: none;\n        width: 100%;\n        min-height: 100%;\n        position: absolute;\n        bottom: 0;\n        right: -100%;\n      }\n\n      #container {\n        display: flex;\n        flex-direction: column;\n        min-height: 0;\n        transition: transform .2s ease-out;\n        transform: translate(0, 0);\n      }\n\n      #container.has-expanded {\n        transition: transform .2s ease-in;\n        transform: translate(-100%, 0);\n      }\n\n      button {\n        background: none;\n        color: inherit;\n        border: none;\n        padding: 0;\n        font: inherit;\n        outline: inherit;\n        display: inline-flex;\n        align-items: center;\n      }\n\n      slot[name="header"][hidden] {\n        display: none;\n      }\n\n      slot[name="header"] > *,\n      slot[name="header"]::slotted(*) {\n        padding: .4em .7em;\n        border-bottom: 1px solid rgb(255 255 255 / .25);\n        cursor: var(--media-cursor, default);\n      }\n\n      slot[name="header"] > button[part~="back"],\n      slot[name="header"]::slotted(button[part~="back"]) {\n        cursor: var(--media-cursor, pointer);\n      }\n\n      svg[part~="back"] {\n        height: var(--media-menu-icon-height, var(--media-control-height, 24px));\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        display: block;\n        margin-right: .5ch;\n      }\n\n      slot:not([name]) {\n        gap: var(--media-menu-gap);\n        flex-direction: var(--media-menu-flex-direction, column);\n        overflow: var(--media-menu-overflow, hidden auto);\n        display: flex;\n        min-height: 0;\n      }\n\n      :host([role="menu"]) slot:not([name]) {\n        padding-block: .4em;\n      }\n\n      slot:not([name])::slotted([role="menu"]) {\n        background: none;\n      }\n\n      media-chrome-menu-item > span {\n        margin-right: .5ch;\n        max-width: var(--media-menu-item-max-width);\n        text-overflow: ellipsis;\n        overflow: hidden;\n      }\n    </style>\n    <style id="layout-row" media="width:0">\n\n      slot[name="header"] > *,\n      slot[name="header"]::slotted(*) {\n        padding: .4em .5em;\n      }\n\n      slot:not([name]) {\n        gap: var(--media-menu-gap, .25em);\n        flex-direction: var(--media-menu-flex-direction, row);\n        padding-inline: .5em;\n      }\n\n      media-chrome-menu-item {\n        padding: .3em .5em;\n      }\n\n      media-chrome-menu-item[aria-checked="true"] {\n        background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));\n      }\n\n      \n      media-chrome-menu-item::part(checked-indicator) {\n        display: var(--media-menu-item-checked-indicator-display, none);\n      }\n    </style>\n    <div id="container" part="container">\n      <slot name="header" hidden>\n        <button part="back button" aria-label="Back to previous menu">\n          <slot name="back-icon">\n            <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">\n              <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"/>\n            </svg>\n          </slot>\n          <slot name="title"></slot>\n        </button>\n      </slot>\n      <slot></slot>\n    </div>\n    <slot name="checked-indicator" hidden></slot>\n  '},f.customElements.get("media-chrome-menu")||f.customElements.define("media-chrome-menu",Yt);var Ft,Jt,Qt,Xt,te,ee,ne,ie,ae,se,oe,re,le,de,he,ce=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ue=(t,e,n)=>(ce(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},pe=(t,e,n,i)=>(ce(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),ve=(t,e,n)=>(ce(t,e,"access private method"),n);const be="type",ge="value",fe="checked",Ee="disabled";class ke extends f.HTMLElement{constructor(){if(super(),me(this,Qt),me(this,te),me(this,ne),me(this,se),me(this,re),me(this,de),me(this,Ft,!1),me(this,Jt,void 0),me(this,ae,(()=>{var t,e;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const n=this.shadowRoot.querySelector('slot[name="description"]'),i=null==(t=this.submenuElement.checkedItems)?void 0:t[0],a=null!=(e=null==i?void 0:i.dataset.description)?e:null==i?void 0:i.text,s=E.createElement("span");s.textContent=null!=a?a:"",n.replaceChildren(s)})),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const t=_(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[be,Ee,fe,ge]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),ye(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(t){switch(t.type){case"slotchange":ve(this,Qt,Xt).call(this,t);break;case"click":this.handleClick(t);break;case"keydown":ve(this,re,le).call(this,t);break;case"keyup":ve(this,se,oe).call(this,t)}}attributeChangedCallback(t,e,n){t===fe&&ye(this)&&!ue(this,Ft)?this.setAttribute("aria-checked",null!=n?"true":"false"):t===be&&n!==e?this.role="menuitem"+n:t===Ee&&n!==e&&(null==n?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Ee)||this.enable(),this.role="menuitem"+this.type,pe(this,Jt,Ae(this,this.parentNode)),ve(this,de,he).call(this),this.submenuElement&&ve(this,te,ee).call(this)}disconnectedCallback(){this.disable(),ve(this,de,he).call(this),pe(this,Jt,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(t){this.setAttribute("invoketarget",`${t}`)}get invokeTargetElement(){var t;return this.invokeTarget?null==(t=H(this))?void 0:t.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var t;return null!=(t=this.getAttribute(be))?t:""}set type(t){this.setAttribute(be,`${t}`)}get value(){var t;return null!=(t=this.getAttribute(ge))?t:this.text}set value(t){this.setAttribute(ge,t)}get text(){var t;return(null!=(t=this.textContent)?t:"").trim()}get checked(){if(ye(this))return"true"===this.getAttribute("aria-checked")}set checked(t){ye(this)&&(pe(this,Ft,!0),this.setAttribute("aria-checked",t?"true":"false"),t?this.part.add("checked"):this.part.remove("checked"))}handleClick(t){ye(this)||this.invokeTargetElement&&D(this,t.target)&&this.invokeTargetElement.dispatchEvent(new L({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function ye(t){return"radio"===t.type||"checkbox"===t.type}function Ae(t,e){if(!t)return null;const{host:n}=t.getRootNode();return!e&&n?Ae(t,n):(null==e?void 0:e.items)?e:Ae(e,null==e?void 0:e.parentNode)}Ft=new WeakMap,Jt=new WeakMap,Qt=new WeakSet,Xt=function(t){const e=t.target;if(!(null==e?void 0:e.name))for(const t of e.assignedNodes({flatten:!0}))t instanceof Text&&""===t.textContent.trim()&&t.remove();"submenu"===e.name&&(this.submenuElement?ve(this,te,ee).call(this):ve(this,ne,ie).call(this))},te=new WeakSet,ee=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",ue(this,ae)),this.submenuElement.addEventListener("addmenuitem",ue(this,ae)),this.submenuElement.addEventListener("removemenuitem",ue(this,ae)),ue(this,ae).call(this)},ne=new WeakSet,ie=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",ue(this,ae)),this.submenuElement.removeEventListener("addmenuitem",ue(this,ae)),this.submenuElement.removeEventListener("removemenuitem",ue(this,ae)),ue(this,ae).call(this)},ae=new WeakMap,se=new WeakSet,oe=function(t){const{key:e}=t;this.keysUsed.includes(e)?this.handleClick(t):this.removeEventListener("keyup",ve(this,se,oe))},re=new WeakSet,le=function(t){const{metaKey:e,altKey:n,key:i}=t;e||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",ve(this,se,oe)):this.addEventListener("keyup",ve(this,se,oe),{once:!0})},de=new WeakSet,he=function(){var t;const e=null==(t=ue(this,Jt))?void 0:t.radioGroupItems;if(!e)return;let n=e.filter((t=>"true"===t.getAttribute("aria-checked"))).pop();n||(n=e[0]);for(const t of e)t.setAttribute("aria-checked","false");null==n||n.setAttribute("aria-checked","true")},ke.shadowRootOptions={mode:"open"},ke.getTemplateHTML=function(t){return`\n    <style>\n      :host {\n        transition: var(--media-menu-item-transition,\n          background .15s linear,\n          opacity .2s ease-in-out\n        );\n        outline: var(--media-menu-item-outline, 0);\n        outline-offset: var(--media-menu-item-outline-offset, -1px);\n        cursor: var(--media-cursor, pointer);\n        display: flex;\n        align-items: center;\n        align-self: stretch;\n        justify-self: stretch;\n        white-space: nowrap;\n        white-space-collapse: collapse;\n        text-wrap: nowrap;\n        padding: .4em .8em .4em 1em;\n      }\n\n      :host(:focus-visible) {\n        box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        outline: var(--media-menu-item-hover-outline, 0);\n        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));\n      }\n\n      :host(:hover) {\n        cursor: var(--media-cursor, pointer);\n        background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));\n        outline: var(--media-menu-item-hover-outline);\n        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));\n      }\n\n      :host([aria-checked="true"]) {\n        background: var(--media-menu-item-checked-background);\n      }\n\n      :host([hidden]) {\n        display: none;\n      }\n\n      :host([disabled]) {\n        pointer-events: none;\n        color: rgba(255, 255, 255, .3);\n      }\n\n      slot:not([name]) {\n        width: 100%;\n      }\n\n      slot:not([name="submenu"]) {\n        display: inline-flex;\n        align-items: center;\n        transition: inherit;\n        opacity: var(--media-menu-item-opacity, 1);\n      }\n\n      slot[name="description"] {\n        justify-content: end;\n      }\n\n      slot[name="description"] > span {\n        display: inline-block;\n        margin-inline: 1em .2em;\n        max-width: var(--media-menu-item-description-max-width, 100px);\n        text-overflow: ellipsis;\n        overflow: hidden;\n        font-size: .8em;\n        font-weight: 400;\n        text-align: right;\n        position: relative;\n        top: .04em;\n      }\n\n      slot[name="checked-indicator"] {\n        display: none;\n      }\n\n      :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {\n        display: var(--media-menu-item-checked-indicator-display, inline-block);\n      }\n\n      \n      svg, img, ::slotted(svg), ::slotted(img) {\n        height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        display: block;\n      }\n\n      \n      [part~="indicator"],\n      ::slotted([part~="indicator"]) {\n        fill: var(--media-menu-item-indicator-fill,\n          var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));\n        height: var(--media-menu-item-indicator-height, 1.25em);\n        margin-right: .5ch;\n      }\n\n      [part~="checked-indicator"] {\n        visibility: hidden;\n      }\n\n      :host([aria-checked="true"]) [part~="checked-indicator"] {\n        visibility: visible;\n      }\n    </style>\n    <slot name="checked-indicator">\n      <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">\n        <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"/>\n      </svg>\n    </slot>\n    <slot name="prefix"></slot>\n    <slot></slot>\n    <slot name="description"></slot>\n    <slot name="suffix">\n      ${this.getSuffixSlotInnerHTML(t)}\n    </slot>\n    <slot name="submenu"></slot>\n  `},ke.getSuffixSlotInnerHTML=function(t){return""},f.customElements.get("media-chrome-menu-item")||f.customElements.define("media-chrome-menu-item",ke);class we extends Yt{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:C(this).querySelector("media-settings-menu-button")}}we.getTemplateHTML=function(t){return`\n    ${Yt.getTemplateHTML(t)}\n    <style>\n      :host {\n        --_menu-bg: rgb(20 20 30 / .8);\n        background: var(--media-settings-menu-background,\n            var(--media-menu-background,\n              var(--media-control-background,\n                var(--media-secondary-color, var(--_menu-bg)))));\n        min-width: var(--media-settings-menu-min-width, 170px);\n        border-radius: 2px 2px 0 0;\n        overflow: hidden;\n      }\n\n      @-moz-document url-prefix() {\n        :host{\n          --_menu-bg: rgb(20 20 30);\n        }\n      }\n\n      :host([role="menu"]) {\n        \n        justify-content: end;\n      }\n\n      slot:not([name]) {\n        justify-content: var(--media-settings-menu-justify-content);\n        flex-direction: var(--media-settings-menu-flex-direction, column);\n        overflow: visible;\n      }\n\n      #container.has-expanded {\n        --media-settings-menu-item-opacity: 0;\n      }\n    </style>\n  `},f.customElements.get("media-settings-menu")||f.customElements.define("media-settings-menu",we);class Te extends ke{}Te.shadowRootOptions={mode:"open"},Te.getTemplateHTML=function(t){return`\n    ${ke.getTemplateHTML.call(this,t)}\n    <style>\n      slot:not([name="submenu"]) {\n        opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));\n      }\n\n      :host([aria-expanded="true"]:hover) {\n        background: transparent;\n      }\n    </style>\n  `},Te.getSuffixSlotInnerHTML=function(t){return'\n    <svg aria-hidden="true" viewBox="0 0 20 24">\n      <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"/>\n    </svg>\n  '},f.customElements.get("media-settings-menu-item")||f.customElements.define("media-settings-menu-item",Te);const Se="placement",Ie="bounds";class xe extends f.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var t;if(!function(t,{depth:e=3,checkOpacity:n=!0,checkVisibilityCSS:i=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:n,checkVisibilityCSS:i});let a=t;for(;a&&e>0;){const t=getComputedStyle(a);if(n&&"0"===t.opacity||i&&"hidden"===t.visibility||"none"===t.display)return!1;a=a.parentElement,e--}return!0}(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const e=this.placement;if("left"===e||"right"===e)return void this.style.removeProperty("--media-tooltip-offset-x");const n=getComputedStyle(this),i=null!=(t=N(this,"#"+this.bounds))?t:C(this);if(!i)return;const{x:a,width:s}=i.getBoundingClientRect(),{x:o,width:r}=this.getBoundingClientRect(),l=o+r,d=a+s,h=n.getPropertyValue("--media-tooltip-offset-x"),c=h?parseFloat(h.replace("px","")):0,u=n.getPropertyValue("--media-tooltip-container-margin"),m=u?parseFloat(u.replace("px","")):0,p=o-a+c-m,v=l-d+c+m;p<0?this.style.setProperty("--media-tooltip-offset-x",`${p}px`):v>0?this.style.setProperty("--media-tooltip-offset-x",`${v}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const t=_(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const t=this.placement;delete this.placement,this.placement=t}}static get observedAttributes(){return[Se,Ie]}get placement(){return q(this,Se)}set placement(t){V(this,Se,t)}get bounds(){return q(this,Ie)}set bounds(t){V(this,Ie,t)}}xe.shadowRootOptions={mode:"open"},xe.getTemplateHTML=function(t){return'\n    <style>\n      :host {\n        --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));\n        --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));\n        --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);\n        --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);\n        --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));\n        position: relative;\n        pointer-events: none;\n        display: var(--media-tooltip-display, inline-flex);\n        justify-content: center;\n        align-items: center;\n        box-sizing: border-box;\n        z-index: var(--media-tooltip-z-index, 1);\n        background: var(--_tooltip-background);\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        font: var(--media-font,\n          var(--media-font-weight, 400)\n          var(--media-font-size, 13px) /\n          var(--media-text-content-height, var(--media-control-height, 18px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        padding: var(--media-tooltip-padding, .35em .7em);\n        border: var(--media-tooltip-border, none);\n        border-radius: var(--media-tooltip-border-radius, 5px);\n        filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));\n        white-space: var(--media-tooltip-white-space, nowrap);\n      }\n\n      :host([hidden]) {\n        display: none;\n      }\n\n      img, svg {\n        display: inline-block;\n      }\n\n      #arrow {\n        position: absolute;\n        width: 0px;\n        height: 0px;\n        border-style: solid;\n        display: var(--media-tooltip-arrow-display, block);\n      }\n\n      :host(:not([placement])),\n      :host([placement="top"]) {\n        position: absolute;\n        bottom: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);\n      }\n      :host(:not([placement])) #arrow,\n      :host([placement="top"]) #arrow {\n        top: 100%;\n        left: 50%;\n        border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);\n        border-color: var(--_tooltip-arrow-background) transparent transparent transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="right"]) {\n        position: absolute;\n        left: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="right"]) #arrow {\n        top: 50%;\n        right: 100%;\n        border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;\n        border-color: transparent var(--_tooltip-arrow-background) transparent transparent;\n        transform: translate(0, -50%);\n      }\n\n      :host([placement="bottom"]) {\n        position: absolute;\n        top: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);\n      }\n      :host([placement="bottom"]) #arrow {\n        bottom: 100%;\n        left: 50%;\n        border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);\n        border-color: transparent transparent var(--_tooltip-arrow-background) transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="left"]) {\n        position: absolute;\n        right: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="left"]) #arrow {\n        top: 50%;\n        left: 100%;\n        border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);\n        border-color: transparent transparent transparent var(--_tooltip-arrow-background);\n        transform: translate(0, -50%);\n      }\n      \n      :host([placement="none"]) #arrow {\n        display: none;\n      }\n    </style>\n    <slot></slot>\n    <div id="arrow"></div>\n  '},f.customElements.get("media-tooltip")||f.customElements.define("media-tooltip",xe);var Le,Me,_e,Ce,Re,De,Ne,Oe=xe,He=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},We=(t,e,n)=>(He(t,e,"read from private field"),n?n.call(t):e.get(t)),Pe=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Be=(t,e,n,i)=>(He(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);const Ue="tooltipplacement",$e="disabled",qe="notooltip";class Ve extends f.HTMLElement{constructor(){if(super(),Pe(this,De),Pe(this,Le,void 0),this.preventClick=!1,this.tooltipEl=null,Pe(this,Me,(t=>{this.preventClick||this.handleClick(t),setTimeout(We(this,_e),0)})),Pe(this,_e,(()=>{var t,e;null==(e=null==(t=this.tooltipEl)?void 0:t.updateXOffset)||e.call(t)})),Pe(this,Ce,(t=>{const{key:e}=t;this.keysUsed.includes(e)?this.preventClick||this.handleClick(t):this.removeEventListener("keyup",We(this,Ce))})),Pe(this,Re,(t=>{const{metaKey:e,altKey:n,key:i}=t;e||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",We(this,Ce)):this.addEventListener("keyup",We(this,Ce),{once:!0})})),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const t=_(this.attributes),e=this.constructor.getTemplateHTML(t);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(e):this.shadowRoot.innerHTML=e}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",Ue,s.MEDIA_CONTROLLER,r.MEDIA_LANG]}enable(){this.addEventListener("click",We(this,Me)),this.addEventListener("keydown",We(this,Re)),this.tabIndex=0}disable(){this.removeEventListener("click",We(this,Me)),this.removeEventListener("keydown",We(this,Re)),this.removeEventListener("keyup",We(this,Ce)),this.tabIndex=-1}attributeChangedCallback(t,e,n){var i,a,o,l,d;t===s.MEDIA_CONTROLLER?(e&&(null==(a=null==(i=We(this,Le))?void 0:i.unassociateElement)||a.call(i,this),Be(this,Le,null)),n&&this.isConnected&&(Be(this,Le,null==(o=this.getRootNode())?void 0:o.getElementById(n)),null==(d=null==(l=We(this,Le))?void 0:l.associateElement)||d.call(l,this))):"disabled"===t&&n!==e?null==n?this.enable():this.disable():t===Ue&&this.tooltipEl&&n!==e?this.tooltipEl.placement=n:t===r.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),We(this,_e).call(this)}connectedCallback(){var t,e,n;const{style:i}=function(t,e){const n=function(t,e){var n,i;let a;for(a of null!=(n=t.querySelectorAll("style:not([media])"))?n:[]){let t;try{t=null==(i=a.sheet)?void 0:i.cssRules}catch{continue}for(const n of null!=t?t:[])if(e(n.selectorText))return n}}(t,(t=>t===e));return n||W(t,e)}(this.shadowRoot,":host");i.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const a=this.getAttribute(s.MEDIA_CONTROLLER);a&&(Be(this,Le,null==(t=this.getRootNode())?void 0:t.getElementById(a)),null==(n=null==(e=We(this,Le))?void 0:e.associateElement)||n.call(e,this)),f.customElements.whenDefined("media-tooltip").then((()=>{return(t=this,e=De,n=Ne,He(t,e,"access private method"),n).call(this);var t,e,n}))}disconnectedCallback(){var t,e;this.disable(),null==(e=null==(t=We(this,Le))?void 0:t.unassociateElement)||e.call(t,this),Be(this,Le,null),this.removeEventListener("mouseenter",We(this,_e)),this.removeEventListener("focus",We(this,_e)),this.removeEventListener("click",We(this,Me))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return q(this,Ue)}set tooltipPlacement(t){V(this,Ue,t)}get mediaController(){return q(this,s.MEDIA_CONTROLLER)}set mediaController(t){V(this,s.MEDIA_CONTROLLER,t)}get disabled(){return U(this,$e)}set disabled(t){$(this,$e,t)}get noTooltip(){return U(this,qe)}set noTooltip(t){$(this,qe,t)}handleClick(t){}}Le=new WeakMap,Me=new WeakMap,_e=new WeakMap,Ce=new WeakMap,Re=new WeakMap,De=new WeakSet,Ne=function(){this.addEventListener("mouseenter",We(this,_e)),this.addEventListener("focus",We(this,_e)),this.addEventListener("click",We(this,Me));const t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)},Ve.shadowRootOptions={mode:"open"},Ve.getTemplateHTML=function(t,e={}){return`\n    <style>\n      :host {\n        position: relative;\n        font: var(--media-font,\n          var(--media-font-weight, bold)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        padding: var(--media-button-padding, var(--media-control-padding, 10px));\n        justify-content: var(--media-button-justify-content, center);\n        display: inline-flex;\n        align-items: center;\n        vertical-align: middle;\n        box-sizing: border-box;\n        transition: background .15s linear;\n        pointer-events: auto;\n        cursor: var(--media-cursor, pointer);\n        -webkit-tap-highlight-color: transparent;\n      }\n\n      \n      :host(:focus-visible) {\n        box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        outline: 0;\n      }\n      \n      :host(:where(:focus)) {\n        box-shadow: none;\n        outline: 0;\n      }\n\n      :host(:hover) {\n        background: var(--media-control-hover-background, rgba(50 50 70 / .7));\n      }\n\n      svg, img, ::slotted(svg), ::slotted(img) {\n        width: var(--media-button-icon-width);\n        height: var(--media-button-icon-height, var(--media-control-height, 24px));\n        transform: var(--media-button-icon-transform);\n        transition: var(--media-button-icon-transition);\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        vertical-align: middle;\n        max-width: 100%;\n        max-height: 100%;\n        min-width: 100%;\n      }\n\n      media-tooltip {\n        \n        max-width: 0;\n        overflow-x: clip;\n        opacity: 0;\n        transition: opacity .3s, max-width 0s 9s;\n      }\n\n      :host(:hover) media-tooltip,\n      :host(:focus-visible) media-tooltip {\n        max-width: 100vw;\n        opacity: 1;\n        transition: opacity .3s;\n      }\n\n      :host([notooltip]) slot[name="tooltip"] {\n        display: none;\n      }\n    </style>\n\n    ${this.getSlotTemplateHTML(t,e)}\n\n    <slot name="tooltip">\n      <media-tooltip part="tooltip" aria-hidden="true">\n        <template shadowrootmode="${Oe.shadowRootOptions.mode}">\n          ${Oe.getTemplateHTML({})}\n        </template>\n        <slot name="tooltip-content">\n          ${this.getTooltipContentHTML(t)}\n        </slot>\n      </media-tooltip>\n    </slot>\n  `},Ve.getSlotTemplateHTML=function(t,e){return"\n    <slot></slot>\n  "},Ve.getTooltipContentHTML=function(){return""},f.customElements.get("media-chrome-button")||f.customElements.define("media-chrome-button",Ve);class Ke extends Ve{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(t){this.setAttribute("invoketarget",`${t}`)}get invokeTargetElement(){var t;return this.invokeTarget?null==(t=H(this))?void 0:t.querySelector(`#${this.invokeTarget}`):null}handleClick(){var t;null==(t=this.invokeTargetElement)||t.dispatchEvent(new L({relatedTarget:this}))}}f.customElements.get("media-chrome-menu-button")||f.customElements.define("media-chrome-menu-button",Ke);var Ge;const Ze={en:{"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."}};let Ye=(null==(Ge=globalThis.navigator)?void 0:Ge.language)||"en";const je=(t,e={})=>(t=>{var e,n,i;const[a]=Ye.split("-");return(null==(e=Ze[Ye])?void 0:e[t])||(null==(n=Ze[a])?void 0:n[t])||(null==(i=Ze.en)?void 0:i[t])||t})(t).replace(/\{(\w+)\}/g,((t,n)=>n in e?String(e[n]):`{${n}}`));class ze extends Ke{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",je("settings"))}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:C(this).querySelector("media-settings-menu")}}function Fe(t){if(t){const[e,n,i]=t.split(":");return{id:e,width:+n,height:+i}}}function Je(t){if(t){const[e,n,i,a]=t.split(":");return{id:e,kind:n,language:i,label:a}}}ze.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon">\n      <svg aria-hidden="true" viewBox="0 0 24 24">\n        <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"/>\n      </svg>\n    </slot>\n  '},ze.getTooltipContentHTML=function(){return je("Settings")},f.customElements.get("media-settings-menu-button")||f.customElements.define("media-settings-menu-button",ze);var Qe,Xe,tn,en,nn,an,sn=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},on=(t,e,n)=>(sn(t,e,"read from private field"),n?n.call(t):e.get(t)),rn=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ln=(t,e,n,i)=>(sn(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),dn=(t,e,n)=>(sn(t,e,"access private method"),n);class hn extends Yt{constructor(){super(...arguments),rn(this,tn),rn(this,nn),rn(this,Qe,[]),rn(this,Xe,void 0)}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_AUDIO_TRACK_LIST,r.MEDIA_AUDIO_TRACK_ENABLED,r.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(t,e,n){var i;super.attributeChangedCallback(t,e,n),t===r.MEDIA_AUDIO_TRACK_ENABLED&&e!==n?this.value=n:t===r.MEDIA_AUDIO_TRACK_LIST&&e!==n&&(ln(this,Qe,null==(i=null!=n?n:"")?void 0:i.split(/\s+/).map(Je)),dn(this,tn,en).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dn(this,nn,an))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dn(this,nn,an))}get anchorElement(){var t;return"auto"!==this.anchor?super.anchorElement:null==(t=C(this))?void 0:t.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return on(this,Qe)}set mediaAudioTrackList(t){ln(this,Qe,t),dn(this,tn,en).call(this)}get mediaAudioTrackEnabled(){var t;return null!=(t=q(this,r.MEDIA_AUDIO_TRACK_ENABLED))?t:""}set mediaAudioTrackEnabled(t){V(this,r.MEDIA_AUDIO_TRACK_ENABLED,t)}}Qe=new WeakMap,Xe=new WeakMap,tn=new WeakSet,en=function(){if(on(this,Xe)===JSON.stringify(this.mediaAudioTrackList))return;ln(this,Xe,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort(((t,e)=>t.id.localeCompare(e.id,void 0,{numeric:!0})));for(const e of t){const t=$t({type:"radio",text:this.formatMenuItemText(e.label,e),value:`${e.id}`,checked:e.enabled});t.prepend(qt(this,"checked-indicator")),this.defaultSlot.append(t)}},nn=new WeakSet,an=function(){if(null==this.value)return;const t=new f.CustomEvent(a,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},f.customElements.get("media-audio-track-menu")||f.customElements.define("media-audio-track-menu",hn);const cn=t=>{const e=je("Audio");t.setAttribute("aria-label",e)};class un extends Ke{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_AUDIO_TRACK_ENABLED,r.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),cn(this)}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),t===r.MEDIA_LANG&&cn(this)}get invokeTargetElement(){var t;return null!=this.invokeTarget?super.invokeTargetElement:null==(t=C(this))?void 0:t.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var t;return null!=(t=q(this,r.MEDIA_AUDIO_TRACK_ENABLED))?t:""}set mediaAudioTrackEnabled(t){V(this,r.MEDIA_AUDIO_TRACK_ENABLED,t)}}un.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>\n  <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"/>\n</svg></slot>\n  '},un.getTooltipContentHTML=function(){return je("Audio")},f.customElements.get("media-audio-track-menu-button")||f.customElements.define("media-audio-track-menu-button",un);const mn=(t="",e={})=>((t="")=>t.split(/\s+/))(t).map((t=>{const n=((t="")=>{const[e,n,i]=t.split(":"),a=i?decodeURIComponent(i):void 0;return{kind:"cc"===e?h:d,language:n,label:a}})(t);return{...e,...n}})),pn=({kind:t,label:e,language:n}={kind:"subtitles"})=>e?`${"captions"===t?"cc":"sb"}:${n}:${encodeURIComponent(e)}`:n,vn=(t=[])=>Array.prototype.map.call(t,pn).join(" ");var bn,gn,fn,En,kn,yn=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},An=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},wn=(t,e,n)=>(yn(t,e,"access private method"),n);class Tn extends Yt{constructor(){super(...arguments),An(this,gn),An(this,En),An(this,bn,void 0)}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_SUBTITLES_LIST,r.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),t===r.MEDIA_SUBTITLES_LIST&&e!==n?wn(this,gn,fn).call(this):t===r.MEDIA_SUBTITLES_SHOWING&&e!==n&&(this.value=n||"",wn(this,gn,fn).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",wn(this,En,kn))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",wn(this,En,kn))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:C(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return Sn(this,r.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(t){In(this,r.MEDIA_SUBTITLES_LIST,t)}get mediaSubtitlesShowing(){return Sn(this,r.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(t){In(this,r.MEDIA_SUBTITLES_SHOWING,t)}}bn=new WeakMap,gn=new WeakSet,fn=function(){var t;const e=(yn(n=this,i=bn,"read from private field"),(a?a.call(n):i.get(n))!==JSON.stringify(this.mediaSubtitlesList));var n,i,a;const s=this.value!==this.getAttribute(r.MEDIA_SUBTITLES_SHOWING);if(!e&&!s)return;((t,e,n,i)=>{yn(t,e,"write to private field"),i?i.call(t,n):e.set(t,n)})(this,bn,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const o=!this.value,l=$t({type:"radio",text:this.formatMenuItemText(je("Off")),value:"off",checked:o});l.prepend(qt(this,"checked-indicator")),this.defaultSlot.append(l);const d=this.mediaSubtitlesList;for(const e of d){const n=$t({type:"radio",text:this.formatMenuItemText(e.label,e),value:pn(e),checked:this.value==pn(e)});n.prepend(qt(this,"checked-indicator"));"captions"===(null!=(t=e.kind)?t:"subs")&&n.append(qt(this,"captions-indicator")),this.defaultSlot.append(n)}},En=new WeakSet,kn=function(){const n=this.mediaSubtitlesShowing,i=this.getAttribute(r.MEDIA_SUBTITLES_SHOWING),a=this.value!==i;if((null==n?void 0:n.length)&&a&&this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0,detail:n})),!this.value||!a)return;const s=new f.CustomEvent(t,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(s)},Tn.getTemplateHTML=function(t){return`\n    ${Yt.getTemplateHTML(t)}\n    <slot name="captions-indicator" hidden>\n  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">\n    <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"/>\n  </svg></slot>\n  `};const Sn=(t,e)=>{const n=t.getAttribute(e);return n?mn(n):[]},In=(t,e,n)=>{if(!(null==n?void 0:n.length))return void t.removeAttribute(e);const i=vn(n);t.getAttribute(e)!==i&&t.setAttribute(e,i)};f.customElements.get("media-captions-menu")||f.customElements.define("media-captions-menu",Tn);const xn=t=>{t.setAttribute("data-captions-enabled",(t=>{var e;return!!(null==(e=t.mediaSubtitlesShowing)?void 0:e.length)||t.hasAttribute(r.MEDIA_SUBTITLES_SHOWING)})(t).toString())},Ln=t=>{t.setAttribute("aria-label",je("closed captions"))};class Mn extends Ke{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_SUBTITLES_LIST,r.MEDIA_SUBTITLES_SHOWING,r.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),Ln(this),xn(this)}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),t===r.MEDIA_SUBTITLES_SHOWING?xn(this):t===r.MEDIA_LANG&&Ln(this)}get invokeTargetElement(){var t;return null!=this.invokeTarget?super.invokeTargetElement:null==(t=C(this))?void 0:t.querySelector("media-captions-menu")}get mediaSubtitlesList(){return _n(this,r.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(t){Cn(this,r.MEDIA_SUBTITLES_LIST,t)}get mediaSubtitlesShowing(){return _n(this,r.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(t){Cn(this,r.MEDIA_SUBTITLES_SHOWING,t)}}Mn.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([data-captions-enabled="true"]) slot[name=off] {\n        display: none !important;\n      }\n\n      \n      :host(:not([data-captions-enabled="true"])) slot[name=on] {\n        display: none !important;\n      }\n\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="on"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <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"/>\n</svg></slot>\n      <slot name="off"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>\n</svg></slot>\n    </slot>\n  '},Mn.getTooltipContentHTML=function(){return je("Captions")};const _n=(t,e)=>{const n=t.getAttribute(e);return n?mn(n):[]},Cn=(t,e,n)=>{if(!(null==n?void 0:n.length))return void t.removeAttribute(e);const i=vn(n);t.getAttribute(e)!==i&&t.setAttribute(e,i)};f.customElements.get("media-captions-menu-button")||f.customElements.define("media-captions-menu-button",Mn);var Rn,Dn,Nn,On,Hn,Wn,Pn=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Bn=(t,e,n)=>(Pn(t,e,"read from private field"),n?n.call(t):e.get(t)),Un=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},$n=(t,e,n,i)=>(Pn(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);class qn{constructor(t,e,{defaultValue:n}={defaultValue:void 0}){Un(this,Hn),Un(this,Rn,void 0),Un(this,Dn,void 0),Un(this,Nn,void 0),Un(this,On,new Set),$n(this,Rn,t),$n(this,Dn,e),$n(this,Nn,new Set(n))}[Symbol.iterator](){return Bn(this,Hn,Wn).values()}get length(){return Bn(this,Hn,Wn).size}get value(){var t;return null!=(t=[...Bn(this,Hn,Wn)].join(" "))?t:""}set value(t){var e;t!==this.value&&($n(this,On,new Set),this.add(...null!=(e=null==t?void 0:t.split(" "))?e:[]))}toString(){return this.value}item(t){return[...Bn(this,Hn,Wn)][t]}values(){return Bn(this,Hn,Wn).values()}forEach(t,e){Bn(this,Hn,Wn).forEach(t,e)}add(...t){var e,n;t.forEach((t=>Bn(this,On).add(t))),(""!==this.value||(null==(e=Bn(this,Rn))?void 0:e.hasAttribute(`${Bn(this,Dn)}`)))&&(null==(n=Bn(this,Rn))||n.setAttribute(`${Bn(this,Dn)}`,`${this.value}`))}remove(...t){var e;t.forEach((t=>Bn(this,On).delete(t))),null==(e=Bn(this,Rn))||e.setAttribute(`${Bn(this,Dn)}`,`${this.value}`)}contains(t){return Bn(this,Hn,Wn).has(t)}toggle(t,e){return void 0!==e?e?(this.add(t),!0):(this.remove(t),!1):this.contains(t)?(this.remove(t),!1):(this.add(t),!0)}replace(t,e){return this.remove(t),this.add(e),t===e}}Rn=new WeakMap,Dn=new WeakMap,Nn=new WeakMap,On=new WeakMap,Hn=new WeakSet,Wn=function(){return Bn(this,On).size?Bn(this,On):Bn(this,Nn)};var Vn,Kn=(t,e,n)=>(((t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)})(t,e,"read from private field"),n?n.call(t):e.get(t));const Gn="rates",Zn=[1,1.2,1.5,1.7,2];class Yn extends Ve{constructor(){var t;super(),((t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)})(this,Vn,new qn(this,Gn,{defaultValue:Zn})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(t=this.mediaPlaybackRate)?t:1}x`}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PLAYBACK_RATE,Gn]}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),t===Gn&&(Kn(this,Vn).value=n),t===r.MEDIA_PLAYBACK_RATE){const t=n?+n:Number.NaN,e=Number.isNaN(t)?1:t;this.container.innerHTML=`${e}x`,this.setAttribute("aria-label",je("Playback rate {playbackRate}",{playbackRate:e}))}}get rates(){return Kn(this,Vn)}set rates(t){t?Array.isArray(t)?Kn(this,Vn).value=t.join(" "):"string"==typeof t&&(Kn(this,Vn).value=t):Kn(this,Vn).value=""}get mediaPlaybackRate(){return P(this,r.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(t){B(this,r.MEDIA_PLAYBACK_RATE,t)}handleClick(){var t,e;const i=Array.from(Kn(this,Vn).values(),(t=>+t)).sort(((t,e)=>t-e)),a=null!=(e=null!=(t=i.find((t=>t>this.mediaPlaybackRate)))?t:i[0])?e:1,s=new f.CustomEvent(n,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(s)}}Vn=new WeakMap,Yn.getSlotTemplateHTML=function(t){return`\n    <style>\n      :host {\n        min-width: 5ch;\n        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n      }\n    </style>\n    <slot name="icon">${t.mediaplaybackrate||1}x</slot>\n  `},Yn.getTooltipContentHTML=function(){return je("Playback rate")},f.customElements.get("media-playback-rate-button")||f.customElements.define("media-playback-rate-button",Yn);var jn,zn,Fn,Jn,Qn,Xn=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},ti=(t,e,n)=>(Xn(t,e,"read from private field"),n?n.call(t):e.get(t)),ei=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},ni=(t,e,n)=>(Xn(t,e,"access private method"),n);const ii="rates";class ai extends Yt{constructor(){super(),ei(this,zn),ei(this,Jn),ei(this,jn,new qn(this,ii,{defaultValue:Zn})),ni(this,zn,Fn).call(this)}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PLAYBACK_RATE,ii]}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),t===r.MEDIA_PLAYBACK_RATE&&e!=n?(this.value=n,ni(this,zn,Fn).call(this)):t===ii&&e!=n&&(ti(this,jn).value=n,ni(this,zn,Fn).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ni(this,Jn,Qn))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ni(this,Jn,Qn))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:C(this).querySelector("media-playback-rate-menu-button")}get rates(){return ti(this,jn)}set rates(t){t?Array.isArray(t)?ti(this,jn).value=t.join(" "):"string"==typeof t&&(ti(this,jn).value=t):ti(this,jn).value="",ni(this,zn,Fn).call(this)}get mediaPlaybackRate(){return P(this,r.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(t){B(this,r.MEDIA_PLAYBACK_RATE,t)}}jn=new WeakMap,zn=new WeakSet,Fn=function(){this.defaultSlot.textContent="";const t=this.mediaPlaybackRate,e=new Set(Array.from(ti(this,jn)).map((t=>Number(t))));t>0&&!e.has(t)&&e.add(t);const n=Array.from(e).sort(((t,e)=>t-e));for(const e of n){const n=$t({type:"radio",text:this.formatMenuItemText(`${e}x`,e),value:e.toString(),checked:t===e});n.prepend(qt(this,"checked-indicator")),this.defaultSlot.append(n)}},Jn=new WeakSet,Qn=function(){if(!this.value)return;const t=new f.CustomEvent(n,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},f.customElements.get("media-playback-rate-menu")||f.customElements.define("media-playback-rate-menu",ai);class si extends Ke{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PLAYBACK_RATE]}constructor(){var t;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(t=this.mediaPlaybackRate)?t:1}x`}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),t===r.MEDIA_PLAYBACK_RATE){const t=n?+n:Number.NaN,e=Number.isNaN(t)?1:t;this.container.innerHTML=`${e}x`,this.setAttribute("aria-label",je("Playback rate {playbackRate}",{playbackRate:e}))}}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:C(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return P(this,r.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(t){B(this,r.MEDIA_PLAYBACK_RATE,t)}}si.getSlotTemplateHTML=function(t){return`\n    <style>\n      :host {\n        min-width: 5ch;\n        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n      }\n      \n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon">${t.mediaplaybackrate||1}x</slot>\n  `},si.getTooltipContentHTML=function(){return je("Playback rate")},f.customElements.get("media-playback-rate-menu-button")||f.customElements.define("media-playback-rate-menu-button",si);var oi,ri,li,di,hi,ci,ui=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},mi=(t,e,n)=>(ui(t,e,"read from private field"),n?n.call(t):e.get(t)),pi=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},vi=(t,e,n,i)=>(ui(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),bi=(t,e,n)=>(ui(t,e,"access private method"),n);class gi extends Yt{constructor(){super(...arguments),pi(this,li),pi(this,hi),pi(this,oi,[]),pi(this,ri,{})}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_RENDITION_LIST,r.MEDIA_RENDITION_SELECTED,r.MEDIA_RENDITION_UNAVAILABLE,r.MEDIA_HEIGHT]}static formatMenuItemText(t,e){return super.formatMenuItemText(t,e)}static formatRendition(t,{showBitrate:e=!1}={}){const n=`${Math.min(t.width,t.height)}p`;if(e&&t.bitrate){const e=t.bitrate/1e6;return`${n} (${`${e.toFixed(e<1?1:0)} Mbps`})`}return this.formatMenuItemText(n,t)}static compareRendition(t,e){var n,i;return e.height===t.height?(null!=(n=e.bitrate)?n:0)-(null!=(i=t.bitrate)?i:0):e.height-t.height}attributeChangedCallback(t,e,n){var i;super.attributeChangedCallback(t,e,n),t===r.MEDIA_RENDITION_SELECTED&&e!==n?(this.value=null!=n?n:"auto",bi(this,li,di).call(this)):t===r.MEDIA_RENDITION_LIST&&e!==n?(vi(this,oi,null==(i=n)?void 0:i.split(/\s+/).map(Fe)),bi(this,li,di).call(this)):t===r.MEDIA_HEIGHT&&e!==n&&bi(this,li,di).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",bi(this,hi,ci))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",bi(this,hi,ci))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:C(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return mi(this,oi)}set mediaRenditionList(t){vi(this,oi,t),bi(this,li,di).call(this)}get mediaRenditionSelected(){return q(this,r.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(t){V(this,r.MEDIA_RENDITION_SELECTED,t)}get mediaHeight(){return P(this,r.MEDIA_HEIGHT)}set mediaHeight(t){B(this,r.MEDIA_HEIGHT,t)}compareRendition(t,e){return this.constructor.compareRendition(t,e)}formatMenuItemText(t,e){return this.constructor.formatMenuItemText(t,e)}formatRendition(t,e){return this.constructor.formatRendition(t,e)}showRenditionBitrate(t){return this.mediaRenditionList.some((e=>e!==t&&e.height===t.height&&e.bitrate!==t.bitrate))}}oi=new WeakMap,ri=new WeakMap,li=new WeakSet,di=function(){if(mi(this,ri).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&mi(this,ri).mediaHeight===this.mediaHeight)return;mi(this,ri).mediaRenditionList=JSON.stringify(this.mediaRenditionList),mi(this,ri).mediaHeight=this.mediaHeight;const t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),e=t.find((t=>t.id===this.mediaRenditionSelected));for(const n of t)n.selected=n===e;this.defaultSlot.textContent="";const n=!this.mediaRenditionSelected;for(const e of t){const t=$t({type:"radio",text:this.formatRendition(e,{showBitrate:this.showRenditionBitrate(e)}),value:`${e.id}`,checked:e.selected&&!n});t.prepend(qt(this,"checked-indicator")),this.defaultSlot.append(t)}const i=e&&this.showRenditionBitrate(e),a=n?e?this.formatMenuItemText(`${je("Auto")} • ${this.formatRendition(e,{showBitrate:i})}`,e):this.formatMenuItemText(`${je("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(je("Auto")),s=$t({type:"radio",text:a,value:"auto",checked:n});s.dataset.description=a,s.prepend(qt(this,"checked-indicator")),this.defaultSlot.append(s)},hi=new WeakSet,ci=function(){if(null==this.value)return;const t=new f.CustomEvent(i,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},f.customElements.get("media-rendition-menu")||f.customElements.define("media-rendition-menu",gi);class fi extends Ke{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_RENDITION_SELECTED,r.MEDIA_RENDITION_UNAVAILABLE,r.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",je("quality"))}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:C(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return q(this,r.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(t){V(this,r.MEDIA_RENDITION_SELECTED,t)}get mediaHeight(){return P(this,r.MEDIA_HEIGHT)}set mediaHeight(t){B(this,r.MEDIA_HEIGHT,t)}}fi.getSlotTemplateHTML=function(){return'\n    <style>\n      :host([aria-expanded="true"]) slot[name=tooltip] {\n        display: none;\n      }\n    </style>\n    <slot name="icon"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <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" />\n</svg></slot>\n  '},fi.getTooltipContentHTML=function(){return je("Quality")},f.customElements.get("media-rendition-menu-button")||f.customElements.define("media-rendition-menu-button",fi);var Ei,ki,yi,Ai,wi,Ti,Si,Ii,xi,Li,Mi,_i,Ci,Ri,Di,Ni=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Oi=(t,e,n)=>(Ni(t,e,"read from private field"),n?n.call(t):e.get(t)),Hi=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Wi=(t,e,n,i)=>(Ni(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Pi=(t,e,n)=>(Ni(t,e,"access private method"),n);class Bi extends Yt{constructor(){super(),Hi(this,ki),Hi(this,Ai),Hi(this,Ti),Hi(this,Ii),Hi(this,Mi),Hi(this,Ei,!1),Hi(this,Li,(t=>{const e=t.target,n="VIDEO"===(null==e?void 0:e.nodeName),i=Pi(this,Ii,xi).call(this,e);(n||i)&&(Oi(this,Ei)?Pi(this,Ai,wi).call(this):Pi(this,Mi,_i).call(this,t))})),Hi(this,Ci,(t=>{const e=t.target,n=this.contains(e),i=2===t.button,a="VIDEO"===(null==e?void 0:e.nodeName),s=Pi(this,Ii,xi).call(this,e);if(n)return;i&&(a||s)||Pi(this,Ai,wi).call(this)})),Hi(this,Ri,(t=>{"Escape"===t.key&&Pi(this,Ai,wi).call(this)})),Hi(this,Di,(t=>{var e,n;const i=t.target;if(null==(e=i.matches)?void 0:e.call(i,'button[invoke="copy"]')){const t=null==(n=i.closest("media-context-menu-item"))?void 0:n.querySelector('input[slot="copy"]');t&&navigator.clipboard.writeText(t.value)}Pi(this,Ai,wi).call(this)})),this.setAttribute("noautohide",""),Pi(this,ki,yi).call(this)}connectedCallback(){super.connectedCallback(),C(this).addEventListener("contextmenu",Oi(this,Li)),this.addEventListener("click",Oi(this,Di))}disconnectedCallback(){super.disconnectedCallback(),C(this).removeEventListener("contextmenu",Oi(this,Li)),this.removeEventListener("click",Oi(this,Di)),document.removeEventListener("mousedown",Oi(this,Ci)),document.removeEventListener("keydown",Oi(this,Ri))}}Ei=new WeakMap,ki=new WeakSet,yi=function(){this.hidden=!Oi(this,Ei)},Ai=new WeakSet,wi=function(){Wi(this,Ei,!1),Pi(this,ki,yi).call(this)},Ti=new WeakSet,Si=function(){document.querySelectorAll("media-context-menu").forEach((t=>{var e;t!==this&&Pi(e=t,Ai,wi).call(e)}))},Ii=new WeakSet,xi=function(t){if(!t)return!1;if(t.hasAttribute("slot")&&"media"===t.getAttribute("slot"))return!0;if(t.nodeName.includes("-")&&t.tagName.includes("-")){return t.hasAttribute("src")||t.hasAttribute("poster")||t.hasAttribute("preload")||t.hasAttribute("playsinline")}return!1},Li=new WeakMap,Mi=new WeakSet,_i=function(t){t.preventDefault(),Pi(this,Ti,Si).call(this),Wi(this,Ei,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,Pi(this,ki,yi).call(this),document.addEventListener("mousedown",Oi(this,Ci),{once:!0}),document.addEventListener("keydown",Oi(this,Ri),{once:!0})},Ci=new WeakMap,Ri=new WeakMap,Di=new WeakMap,Bi.getTemplateHTML=function(t){return`\n      ${Yt.getTemplateHTML(t)}\n      <style>\n        :host {\n          --_menu-bg: rgb(20 20 30 / .8);\n          background: var(--media-settings-menu-background,\n            var(--media-menu-background,\n              var(--media-control-background,\n                var(--media-secondary-color, var(--_menu-bg)))));\n          min-width: var(--media-settings-menu-min-width, 170px);\n          border-radius: 2px;\n          overflow: hidden;\n        }\n      </style>\n    `},f.customElements.get("media-context-menu")||f.customElements.define("media-context-menu",Bi);class Ui extends ke{}Ui.shadowRootOptions={mode:"open"},Ui.getTemplateHTML=function(t){return`\n    ${ke.getTemplateHTML.call(this,t)}\n    <style>\n        ::slotted(*) {\n            color: var(--media-text-color, white);\n            text-decoration: none;\n            border: none;\n            background: none;\n            cursor: pointer;\n            padding: 0;\n            min-height: var(--media-control-height, 24px);\n        }\n    </style>\n  `},f.customElements.get("media-context-menu-item")||f.customElements.define("media-context-menu-item",Ui);export{hn as MediaAudioTrackMenu,un as MediaAudioTrackMenuButton,Tn as MediaCaptionsMenu,Mn as MediaCaptionsMenuButton,Yt as MediaChromeMenu,Ke as MediaChromeMenuButton,ke as MediaChromeMenuItem,Bi as MediaContextMenu,Ui as MediaContextMenuItem,ai as MediaPlaybackRateMenu,si as MediaPlaybackRateMenuButton,gi as MediaRenditionMenu,fi as MediaRenditionMenuButton,we as MediaSettingsMenu,ze as MediaSettingsMenuButton,Te as MediaSettingsMenuItem};export default null;
//# sourceMappingURL=/sm/b0c464ecaa906899b2a5dcfd84b39329b57e59181430cbee01830b359189d674.map