PageSourceSearch

https://www.paulmitchell.com/cdn/shop/t/424/assets/vendor-media-ch…?v=109692911807411676851783361503

js paulmitchell.com collected 2026-09-24 09:48:55 UTC 191,155 bytes, 8 lines download raw bytes

1/**
2 * Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2.
3 * Original file: /npm/[email protected]/dist/index.js
4 *
5 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 */
7const e={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},t={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},i={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_P
7LAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_CHAPTERS_CUES:"mediaChaptersCues"},n=Object.entries(i),a=n.reduce(((e,[t,i])=>(e[t]=`${i.toLowerCase()}`,e)),{}),s=n.reduce(((e,[t,i])=>(e[t]=`${i.toLowerCase()}`,e)),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),r=Object.entries(s).reduce(((e,[t,i])=>{const n=a[t];return n&&(e[i]=n),e}),{userinactivechange:"userinactive"}),o=Object.entries(a).reduce(((e,[t,i])=>{const n=s[t];return n&&(e[i]=n),e}),{userinactive:"userinactivechange"}),l={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},d={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"},c={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},h={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},u={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},m={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};var v=Object.freeze({__proto__:null,AttributeToStateChangeEventMap:o,AvailabilityStates:h,MediaStateChangeEvents:s,MediaStateReceiverAttributes:t,MediaUIAttributes:a,MediaUIEvents:e,MediaUIProps:i,PointerTypes:c,ReadyStates:{HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},StateChangeEventToAttributeMap:r,StreamTypes:u,TextTrackKinds:l,TextTrackModes:d,VolumeLevels:{HIGH:"high",MEDIUM:"medium",LOW:"low",OFF:"off"},WebkitPresentationModes:m});const E={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:e=1}={})=>`current playback rate ${e}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading",SETTINGS:()=>"settings",AUDIO_TRACKS:()=>"audio tracks",QUALITY:()=>"quality"},p={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",ENTER_AIRPLAY:()=>"start airplay",EXIT_AIRPLAY:()=>"stop airplay",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:e=30}={})=>`seek forward ${e} seconds`,SEEK_BACK_N_SECS:({seekOffset:e=30}={})=>`seek back ${e} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"};var b={...E,...p};function g(e){if(e){const{id:t,width:i,height:n}=e;return[t,i,n].filter((e=>null!=e)).join(":")}}function A(e){if(e){const[t,i,n]=e.split(":");return{id:t,width:i,height:n}}}function f(e){if(e){const{id:t,kind:i,language:n,label:a}=e;return[t,i,n,a].filter((e=>null!=e)).join(":")}}function I(e){if(e){const[t,i,n,a]=e.split(":");return{id:t,kind:i,language:n,label:a}}}const k=e=>new Promise((t=>setTimeout(t,e))),y=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],_=e=>{if("number"!=typeof(t=e)||Number.isNaN(t)||!Number.isFinite(t))return"";var t;const i=Math.abs(e),n=i!==e,a=new Date(0,0,0,0,0,i,0),s=[a.getHours(),a.getMinutes(),a.getSeconds()].map(((e,t)=>e&&((e,t)=>`${e} ${1===e?y[t].singular:y[t].plural}`)(e,t))).filter((e=>e)).join(", ");return`${s}${n?" remaining":""}`};function T(e,t){let i=!1;e<0&&(i=!0,e=0-e),e=e<0?0:e;let n=Math.floor(e%60),a=Math.floor(e/60%60),s=Math.floor(e/3600);const r=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(s=a=n="0"),s=s>0||o>
70?s+":":"",a=((s||r>=10)&&a<10?"0"+a:a)+":",n=n<10?"0"+n:n,(i?"-":"")+s+a+n}const w=Object.freeze({length:0,start(e){const 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){const 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}});var S=Object.freeze({__proto__:null,emptyTimeRanges:w,formatAsTimePhrase:_,formatTime:T,serializeTimeRanges:function(e=w){return Array.from(e).map(((t,i)=>[Number(e.start(i).toFixed(3)),Number(e.end(i).toFixed(3))].join(":"))).join(" ")}});class M{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class L extends M{}const C={createElement:function(){return new R.HTMLElement},createElementNS:function(){return new R.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},R={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:C,Node:L,HTMLElement:class extends L{},DocumentFragment:class extends M{},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})},D="undefined"==typeof window||void 0===window.customElements,x=Object.keys(R).every((e=>e in globalThis)),N=D&&!x?R:globalThis,U=D&&!x?C:globalThis.document,P=new WeakMap,O=e=>{let t=P.get(e);return t||P.set(e,t=new Set),t},W=new N.ResizeObserver((e=>{for(let t of e)for(let e of O(t.target))e(t)}));function B(e,t){O(e).add(t),W.observe(e)}function V(e,t){const i=O(e);i.delete(t),i.size||W.unobserve(e)}function H(e){var t;return null!=(t=$(e))?t:F(e,"media-controller")}function $(e){var i;const{MEDIA_CONTROLLER:n}=t,a=e.getAttribute(n);if(a)return null==(i=j(e))?void 0:i.getElementById(a)}const G=(e,t,i=".value")=>{const n=e.querySelector(i);n&&(n.textContent=t)},K=(e,t)=>((e,t)=>{const i=`slot[name="${t}"]`,n=e.shadowRoot.querySelector(i);return n?n.children:[]})(e,t)[0],q=(e,t)=>!(!e||!t)&&(!!(null==e?void 0:e.contains(t))||q(e,t.getRootNode().host)),F=(e,t)=>{if(!e)return null;const i=e.closest(t);return i||F(e.getRootNode().host,t)};function Q(e=document){var t;const i=null==e?void 0:e.activeElement;return i?null!=(t=Q(i.shadowRoot))?t:i:null}function j(e){var t;const i=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);return i instanceof ShadowRoot||i instanceof Document?i:null}function Y(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Z(e,t){const i=function(e,t){var i;let n;for(n of e.querySelectorAll("style")){let e;try{e=null==(i=n.sheet)?void 0:i.cssRules}catch{continue}for(let i of null!=e?e:[])if(t(i.selectorText))return i}}(e,(e=>e===t));return i||z(e,t)}function z(e,t){var i,n;const a=null!=(i=e.querySelectorAll("style"))?i:[],s=null==a?void 0:a[a.length-1];return(null==s?void 0:s.sheet)?(null==s||s.sheet.insertRule(`${t}{}`,s.sheet.cssRules.length),null==(n=s.sheet.cssRules)?void 0:n[s.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function X(e,t,i=Number.NaN){const n=e.getAttribute(t);return null!=n?+n:i}function J(e,t,i){const n=+i;null==i||Number.isNaN(n)?e.hasAttribute(t)&&e.removeAttribute(t):X(e,t,void 0)!==n&&e.setAttribute(t,`${n}`)}function ee(e,t){return e.hasAttribute(t)}function te(e,t,i){null!=i?ee(e,t)!=i&&e.toggleAttribute(t,i):e.hasAttribute(t)&&e.removeAttribute(t)}function ie(e,t,i=null){var n;return null!=(n=e.getAttribute(t))?n:i}function ne(e,t,i){if(null==i)return void(e.hasAttribute(t)&&e.removeAttribute(t));const n=`${i}`;ie(e,t,void 0)!==n&&e.setAttribute(t,n)}var ae,se=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},re=(e,t,i)=>(se(e,t,"read from private field"),i?i.call(e):t.get(e)),oe=(e,t,i,n)=>(se(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);const le=U.createElement("template");le.innerHTML="\n<style>\n  :host {\n    display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));\n    box-sizing: border-box;\n  }\n</style>\n";class de extends N.HTMLElement{constructor(e={}){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,ae,void 0),!this.shadowRoot){const t=this.attachShadow({mode:"open"}),i=le.content.cloneNode(!0);this.nativeEl=i;let n=e.slotTemplate;n||(n=U.createElement("template"),n.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(n.content.cloneNode(!0)),t.appendChild(i)}}static get observedAttributes(){return[t.MEDIA_CONTROLLER,a.MEDIA_PAUSED]}attributeChangedCallback(e,i,n){var a,s,r,o,l;e===t.MEDIA_CONTROLLER&&(i&&(null==(s=null==(a=re(this,ae))?void 0:a.unassociateElement)||s.call(a,this),oe(this,ae,null)),n&&this.isConnected&&(oe(this,ae,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(l=null==(o=re(this,ae))?void 0:o.associateElement)||l.call(o,this)))}connectedCallback(){var e,i,n,a;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),oe(this,ae,function(e){var i;const n=e.getAttribute(t.MEDIA_CONTROLLER);if(n)return null==(i=e.getRootNode())?void 0:i.getElementById(n);return F(e,"media-controller")}(this)),this.getAttribute(t.MEDIA_CONTROLLER)&&(null==(i=null==(e=re(this,ae))?void 0:e.associateElement)||i.call(e,this)),null==(n=re(this,ae))||n.addEventListener("pointerdown",this),null==(a=re(this,ae))||a.addEventListener("click",this)}disconnectedCallback(){var e,i,n,a;this.getAttribute(t.MEDIA_CONTROLLER)&&(null==(i=null==(e=re(this,ae))?void 0:e.unassociateElement)||i.call(e,this)),null==(n=re(this,ae))||n.removeEventListener("pointerdown",this),null==(a=re(this,ae))||a.removeEventListener("click",this),oe(this,ae,null)}handleEvent(e){var t;const 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){const{clientX:t,clientY:i}=e,{left:n,top:a,width:s,height:r}=this.getBoundingClientRect(),o=t-n,l=i-a;if(o<0||l<0||o>s||l>r||0===s&&0===r)return;const{pointerType:d=this._pointerType}=e;if(this._pointerType=void 0,d===c.TOUCH)return void this.handleTap(e);if(d===c.MOUSE)return void this.handleMouseClick(e)}}get mediaPaused(){return ee(this,a.MEDIA_PAUSED)}set mediaPaused(e){te(this,a.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(t){const i=this.mediaPaused?e.MEDIA_PLAY_REQUEST:e.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new N.CustomEvent(i,{composed:!0,bubbles:!0}))}}ae=new WeakMap,N.customElements.get("media-gesture-receiver")||N.customElements.define("media-gesture-receiver",de);var ce,he,ue,me,ve,Ee,pe,be,ge,Ae,fe,Ie,ke=de,ye=Object.defineProperty,_e=(e,t,i)=>(((e,t,i)=>{t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i),i),Te=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},we=(e,t,i)=>(Te(e,t,"read from private field"),i?i.call(e):t.get(e)),Se=(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)},Me=(e,t,i,n)=>(Te(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),Le=(e,t,i)=>(Te(e,t,"access private method"),i);const Ce={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},Re=U.createElement("template");Re.innerHTML=`\n  <style>\n    \n    :host([${a.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {\n      outline: none;\n    }\n\n    :host {\n      box-sizing: border-box;\n      position: relative;\n      display: inline-block;\n      line-height: 0;\n      background-color: var(--media-background-color, #000);\n    }\n\n    :host(:not([${Ce.AUDIO}])) [part~=layer]:not([part~=media-layer]) {\n      position: absolute;\n      top: 0;\n      left: 0;\n      bottom: 0;\n      right: 0;\n      display: flex;\n      flex-flow: column nowrap;\n      align-items: start;\n      pointer-events: none;\n      background: none;\n    }\n\n    slot[name=media] {\n      display: var(--media-slot-display, contents);\n    }\n\n    \n    :host([${Ce.AUDIO}]) slot[name=media] {\n      display: var(--media-slot-display, none);\n    }\n\n    \n    :host([${Ce.AUDIO}]) [part~=layer][part~=gesture-layer] {\n      height: 0;\n      display: block;\n    }\n\n    \n    :host(:not([${Ce.AUDIO}])[${Ce.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),\n    :host(:not([${Ce.AUDIO}])[${Ce.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {\n      display: none;\n    }\n\n    \n    ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([hidden])) {\n      pointer-events: auto;\n    }\n\n    :host(:not([${Ce.AUDIO}])) *[part~=layer][part~=centered-layer] {\n      align-items: center;\n      justify-content: center;\n    }\n\n    :host(:not([${Ce.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),\n    :host(:not([${Ce.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {\n      align-self: stretch;\n      flex-grow: 1;\n    }\n\n    slot[name=middle-chrome] {\n      display: inline;\n      flex-grow: 1;\n      pointer-events: none;\n      background: none;\n    }\n\n    \n    ::slotted([slot=media]),\n    ::slotted([slot=poster]) {\n      width: 100%;\n      height: 100%;\n    }\n\n    \n    :host(:not([${Ce.AUDIO}])) .spacer {\n      flex-grow: 1;\n    }\n\n    \n    :host(:-webkit-full-screen) {\n      \n      width: 100% !important;\n      height: 100% !important;\n    }\n\n    \n    ::slotted(:not([slot=media]):not([slot=poster]):not([${Ce.NO_AUTOHIDE}]):not([hidden])) {\n      opacity: 1;\n      transition: opacity 0.25s;\n    }\n\n    \n    :host([${Ce.USER_INACTIVE}]:not([${a.MEDIA_PAUSED}]):not([${a.MEDIA_IS_AIRPLAYING}
7]):not([${a.MEDIA_IS_CASTING}]):not([${Ce.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${Ce.NO_AUTOHIDE}])) {\n      opacity: 0;\n      transition: opacity 1s;\n    }\n\n    :host([${Ce.USER_INACTIVE}]:not([${a.MEDIA_PAUSED}]):not([${a.MEDIA_IS_CASTING}]):not([${Ce.AUDIO}])) ::slotted([slot=media]) {\n      cursor: none;\n    }\n\n    ::slotted(media-control-bar)  {\n      align-self: stretch;\n    }\n\n    \n    :host(:not([${Ce.AUDIO}])[${a.MEDIA_HAS_PLAYED}]) slot[name=poster] {\n      display: none;\n    }\n\n    ::slotted([role="menu"]) {\n      align-self: end;\n    }\n\n    ::slotted([role="dialog"]) {\n      align-self: center;\n    }\n  </style>\n\n  <slot name="media" part="layer media-layer"></slot>\n  <slot name="poster" part="layer poster-layer"></slot>\n  <slot name="gestures-chrome" part="layer gesture-layer">\n    <media-gesture-receiver slot="gestures-chrome"></media-gesture-receiver>\n  </slot>\n  <span part="layer vertical-layer">\n    <slot name="top-chrome" part="top chrome"></slot>\n    <slot name="middle-chrome" part="middle chrome"></slot>\n    <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>\n    \n    <slot part="bottom chrome"></slot>\n  </span>\n`;const De=Object.values(a),xe="sm:384 md:576 lg:768 xl:960";function Ne(e){!function(e,t){var i;if(!e.isConnected)return;const n=null!=(i=e.getAttribute(Ce.BREAKPOINTS))?i:xe,a=function(e){const t=e.split(/\s+/);return Object.fromEntries(t.map((e=>e.split(":"))))}(n),r=function(e,t){return Object.keys(e).filter((i=>t>=e[i]))}(a,t);let o=!1;if(Object.keys(a).forEach((t=>{r.includes(t)?e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),o=!0):e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),o=!0)})),o){const t=new CustomEvent(s.BREAKPOINTS_CHANGE,{detail:r});e.dispatchEvent(t)}}(e.target,e.contentRect.width)}class Ue extends N.HTMLElement{constructor(){super(),Se(this,ue),Se(this,ve),Se(this,pe),Se(this,ge),Se(this,fe),Se(this,ce,0),Se(this,he,void 0),_e(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Re.content.cloneNode(!0)));new MutationObserver((e=>{const t=this.media;for(let i of e)"childList"===i.type&&(i.removedNodes.forEach((e=>{if("media"==e.slot&&i.target==this){let n=i.previousSibling&&i.previousSibling.previousElementSibling;if(n&&t){let t="media"!==n.slot;for(;null!==(n=n.previousSibling);)"media"==n.slot&&(t=!1);t&&this.mediaUnsetCallback(e)}else this.mediaUnsetCallback(e)}})),t&&i.addedNodes.forEach((e=>{e===t&&this.handleMediaUpdated(t)})))})).observe(this,{childList:!0,subtree:!0});let e=!1;B(this,(t=>{e||(setTimeout((()=>{Ne(t),e=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(s.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}),0),e=!0)}));let t=this.querySelector(":scope > slot[slot=media]");t&&t.addEventListener("slotchange",(()=>{t.assignedElements({flatten:!0}).length?this.handleMediaUpdated(this.media):we(this,he)&&this.mediaUnsetCallback(we(this,he))}))}static get observedAttributes(){return[Ce.AUTOHIDE,Ce.GESTURES_DISABLED].concat(De).filter((e=>![a.MEDIA_RENDITION_LIST,a.MEDIA_AUDIO_TRACK_LIST,a.MEDIA_CHAPTERS_CUES].includes(e)))}attributeChangedCallback(e,t,i){e.toLowerCase()==Ce.AUTOHIDE&&(this.autohide=i)}get media(){let e=this.querySelector(":scope > [slot=media]");return"SLOT"==(null==e?void 0:e.nodeName)&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Me(this,he,e),e.localName.includes("-")&&await N.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;const t=null!=this.getAttribute(Ce.AUDIO)?E.AUDIO_PLAYER():E.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(Ce.USER_INACTIVE,""),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=N.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;this.media&&this.mediaUnsetCallback(this.media),null==(e=N.window)||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Me(this,he,null)}handleEvent(e){switch(e.type){case"pointerdown":Me(this,ce,e.timeStamp);break;case"pointermove":Le(this,ue,me).call(this,e);break;case"pointerup":Le(this,ve,Ee).call(this,e);break;case"mouseleave":Le(this,pe,be).call(this);break;case"mouseup":this.removeAttribute(Ce.KEYBOARD_CONTROL);break;case"keyup":Le(this,fe,Ie).call(this),this.setAttribute(Ce.KEYBOARD_CONTROL,"")}}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return void 0===this._autohide?2:this._autohide}}
7ce=new WeakMap,he=new WeakMap,ue=new WeakSet,me=function(e){if("mouse"!==e.pointerType){const t=250;if(e.timeStamp-we(this,ce)<t)return}Le(this,ge,Ae).call(this),clearTimeout(this._inactiveTimeout),[this,this.media].includes(e.target)&&Le(this,fe,Ie).call(this)},ve=new WeakSet,Ee=function(e){if("touch"===e.pointerType){const t=!this.hasAttribute(Ce.USER_INACTIVE);[this,this.media].includes(e.target)&&t?Le(this,pe,be).call(this):Le(this,fe,Ie).call(this)}else e.composedPath().some((e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName)))&&Le(this,fe,Ie).call(this)},pe=new WeakSet,be=function(){if(this.autohide<0)return;if(this.hasAttribute(Ce.USER_INACTIVE))return;this.setAttribute(Ce.USER_INACTIVE,"");const e=new N.CustomEvent(s.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},ge=new WeakSet,Ae=function(){if(!this.hasAttribute(Ce.USER_INACTIVE))return;this.removeAttribute(Ce.USER_INACTIVE);const e=new N.CustomEvent(s.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},fe=new WeakSet,Ie=function(){Le(this,ge,Ae).call(this),clearTimeout(this._inactiveTimeout),this.autohide<0||(this._inactiveTimeout=setTimeout((()=>{Le(this,pe,be).call(this)}),1e3*this.autohide))},N.customElements.get("media-container")||N.customElements.define("media-container",Ue);var Pe,Oe,We,Be,Ve,He,$e=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Ge=(e,t,i)=>($e(e,t,"read from private field"),i?i.call(e):t.get(e)),Ke=(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)},qe=(e,t,i,n)=>($e(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);class Fe{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){Ke(this,Ve),Ke(this,Pe,void 0),Ke(this,Oe,void 0),Ke(this,We,void 0),Ke(this,Be,new Set),qe(this,Pe,e),qe(this,Oe,t),qe(this,We,new Set(i))}[Symbol.iterator](){return Ge(this,Ve,He).values()}get length(){return Ge(this,Ve,He).size}get value(){var e;return null!=(e=[...Ge(this,Ve,He)].join(" "))?e:""}set value(e){var t;e!==this.value&&(qe(this,Be,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...Ge(this,Ve,He)][e]}values(){return Ge(this,Ve,He).values()}forEach(e){Ge(this,Ve,He).forEach(e)}add(...e){var t,i;e.forEach((e=>Ge(this,Be).add(e))),(""!==this.value||(null==(t=Ge(this,Pe))?void 0:t.hasAttribute(`${Ge(this,Oe)}`)))&&(null==(i=Ge(this,Pe))||i.setAttribute(`${Ge(this,Oe)}`,`${this.value}`))}remove(...e){var t;e.forEach((e=>Ge(this,Be).delete(e))),null==(t=Ge(this,Pe))||t.setAttribute(`${Ge(this,Oe)}`,`${this.value}`)}contains(e){return Ge(this,Ve,He).has(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){return this.remove(e),this.add(t),e===t}}Pe=new WeakMap,Oe=new WeakMap,We=new WeakMap,Be=new WeakMap,Ve=new WeakSet,He=function(){return Ge(this,Be).size?Ge(this,Be):Ge(this,We)};const Qe=(e="")=>{let[t,i,n]=e.split(":");return t="cc"===t?"captions":"subtitles",{kind:t,language:i,label:n?decodeURIComponent(n):void 0}},je=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map((e=>{const i=Qe(e);return{...t,...i}})),Ye=e=>e?Array.isArray(e)?e.map((e=>"string"==typeof e?Qe(e):e)):"string"==typeof e?je(e):[e]:[],Ze=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,ze=(e=[])=>Array.prototype.map.call(e,Ze).join(" "),Xe=e=>{const t=Object.entries(e).map((([e,t])=>((e,t)=>i=>i[e]===t)(e,t)));return e=>t.every((t=>t(e)))},Je=(e,t=[],i=[])=>{const n=Ye(i).map(Xe);Array.from(t).filter((e=>n.some((t=>t(e))))).forEach((t=>{t.mode=e}))},et=(e,t=(()=>!0))=>{if(!(null==e?void 0:e.textTracks))return[];const i="function"==typeof t?t:Xe(t);return Array.from(e.textTracks).filter(i)},tt=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(a.MEDIA_SUBTITLES_SHOWING)},it={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};let nt;void 0===U.fullscreenElement&&(it.enter="webkitRequestFullScreen",it.exit=null!=U.webkitExitFullscreen?"webkitExitFullscreen":"webkitCancelFullScreen",it.rootEvents=["webkitfullscreenchange"],it.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],it.element="webkitFullscreenElement",it.error="webkitfullscreenerror",it.enabled="webkitFullscreenEnabled");const at=()=>{var e,t;return nt||(nt=null==(t=null==(e=U)?void 0:e.createElement)?void 0:t.call(e,"video"),nt)},st=/.*Version\/.*Safari\/.*/.test(N.navigator.userAgent),rt=(e=at())=>(!N.matchMedia("(display-mode: standalone)").matches||!st)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),ot=(e=at())=>{let t=U[it.enabled];return!t&&e&&(t="webkitSupportsFullscreen"in e),t},lt=ot(),dt=rt(),ct=!!N.WebKitPlaybackTargetAvailabilityEvent,ht=!!N.chrome,ut=e=>et(e.media,(e=>[l.SUBTITLES,l.CAPTIONS].includes(e.kind))).sort(((e,t)=>e.kind>=t.kind?1:-1)),mt=e=>et(e.media,(e=>e.mode===d.SHOWING&&[l.SUBTITLES,l.CAPTIONS].includes(e.kind))),vt=(e,t)=>{const i=ut(e),n=mt(e),a=!!n.length;if(i.length)if(!1===t||a&&!0!==t)Je(d.DISABLED,i,n);else if(!0===t||!a&&!1!==t){let t=i[0];const{options:a}=e;if(!(null==a?void 0:a.noSubtitlesLangPref)){const e=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),n=e?[e,...globalThis.navigator.languages]:globalThis.navigator.languages,a=i.filter((e=>n.some((t=>e.language.toLowerCase().startsWith(t.split("-")[0]))))).sort(((e,t)=>n.findIndex((t=>e.language.toLowerCase().startsWith(t.split("-")[0])))-n.findIndex((e=>t.language.toLowerCase().startsWith(e.split("-")[0])))));a[0]&&(t=a[0])}const{language:s,label:r,kind:o}=t;Je(d.DISABLED,i,n),Je(d.SHOWING,i,[{language:s,label:r,kind:o}])}},Et=(e,t)=>
7e===t||typeof e==typeof t&&(!("number"!=typeof e||!Number.isNaN(e)||!Number.isNaN(t))||"object"==typeof e&&(Array.isArray(e)?pt(e,t):Object.entries(e).every((([e,i])=>e in t&&Et(i,t[e]))))),pt=(e,t)=>{const i=Array.isArray(e),n=Array.isArray(t);return i===n&&(!i&&!n||e.length===t.length&&e.every(((e,i)=>Et(e,t[i]))))},bt=Object.values(u);let gt;const At=(async(e=at())=>{if(!e)return!1;const t=e.volume;return e.volume=t/2+.1,await k(0),e.volume!==t})().then((e=>(gt=e,gt))),ft={mediaPaused:{get(e){var t;const{media:i}=e;return null==(t=null==i?void 0:i.paused)||t},set(e,t){var i;const{media:n}=t;n&&(e?n.pause():null==(i=n.play())||i.catch((()=>{})))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(e,t){const{media:i}=e;return!!i&&(t?"playing"===t.type:!i.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(e){var t;const{media:i}=e;return null!=(t=null==i?void 0:i.ended)&&t},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(e){var t;const{media:i}=e;return null!=(t=null==i?void 0:i.playbackRate)?t:1},set(e,t){const{media:i}=t;i&&Number.isFinite(+e)&&(i.playbackRate=+e)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(e){var t;const{media:i}=e;return null!=(t=null==i?void 0:i.muted)&&t},set(e,t){const{media:i}=t;i&&(i.muted=e)},mediaEvents:["volumechange"]},mediaVolume:{get(e){var t;const{media:i}=e;return null!=(t=null==i?void 0:i.volume)?t:1},set(e,t){const{media:i}=t;if(i){try{null==e?N.localStorage.removeItem("media-chrome-pref-volume"):N.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(e){}Number.isFinite(+e)&&(i.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{const{options:{noVolumePref:i}}=t;if(!i)try{const i=N.localStorage.getItem("media-chrome-pref-volume");if(null==i)return;ft.mediaVolume.set(+i,t),e(i)}catch(e){console.debug("Error getting volume pref",e)}}]},mediaVolumeLevel:{get(e){const{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;const{media:i}=e;return null!=(t=null==i?void 0:i.currentTime)?t:0},set(e,t){const{media:i}=t;i&&0!==i.readyState&&(i.currentTime=e)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(e){const{media:t,options:{defaultDuration:i}={}}=e;return!i||t&&t.duration&&!Number.isNaN(t.duration)&&Number.isFinite(t.duration)?Number.isFinite(null==t?void 0:t.duration)?t.duration:Number.NaN:i},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(e){const{media:t}=e;return(null==t?void 0:t.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(e){var t;const{media:i}=e;if(!(null==(t=null==i?void 0:i.seekable)?void 0:t.length))return;const n=i.seekable.start(0),a=i.seekable.end(i.seekable.length-1);return n||a?[Number(n.toFixed(3)),Number(a.toFixed(3))]:void 0},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(e){var t;const{media:i}=e,n=null!=(t=null==i?void 0:i.buffered)?t:[];return Array.from(n).map(((e,t)=>[Number(n.start(t).toFixed(3)),Number(n.end(t).toFixed(3))]))},mediaEvents:["progress","emptied"]},mediaStreamType:{get(e){const{media:t,options:{defaultStreamType:i}={}}=e,n=[u.LIVE,u.ON_DEMAND].includes(i)?i:void 0;if(!t)return n;const{streamType:a}=t;if(bt.includes(a))return a===u.UNKNOWN?n:a;const s=t.duration;return s===1/0?u.LIVE:Number.isFinite(s)?u.ON_DEMAND:n},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){const{media:t}=e;if(!t)return Number.NaN;const{targetLiveWindow:i}=t,n=ft.mediaStreamType.get(e);return null!=i&&!Number.isNaN(i)||n!==u.LIVE?i:0},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(e){const{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(!(ft.mediaStreamType.get(e)===u.LIVE))return!1;const n=t.seekable;if(!n)return!0;
7if(!n.length)return!1;const a=n.end(n.length-1)-i;return t.currentTime>=a},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get:e=>ut(e).map((({kind:e,label:t,language:i})=>({kind:e,label:t,language:i}))),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>mt(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,n;const{media:a,options:s}=t;if(!a)return;const r=e=>{var i;if(!s.defaultSubtitles)return;e&&![l.CAPTIONS,l.SUBTITLES].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||vt(t,!0)};return null==(i=a.textTracks)||i.addEventListener("addtrack",r),null==(n=a.textTracks)||n.addEventListener("removetrack",r),r(),()=>{var e,t;null==(e=a.textTracks)||e.removeEventListener("addtrack",r),null==(t=a.textTracks)||t.removeEventListener("removetrack",r)}}]},mediaChaptersCues:{get(e){var t;const{media:i}=e;if(!i)return[];const[n]=et(i,{kind:l.CHAPTERS});return Array.from(null!=(t=null==n?void 0:n.cues)?t:[]).map((({text:e,startTime:t,endTime:i})=>({text:e,startTime:t,endTime:i})))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{const{media:i}=t;if(!i)return;const n=i.querySelector('track[kind="chapters"][default][src]');return null==n||n.addEventListener("load",e),()=>{null==n||n.removeEventListener("load",e)}}]},mediaIsPip:{get(e){var t,i;const{media:n,documentElement:a}=e;if(!n||!a)return!1;if(!a.pictureInPictureElement)return!1;if(a.pictureInPictureElement===n)return!0;if(a.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=n.localName)?void 0:t.includes("-"))&&q(n,a.pictureInPictureElement);if(a.pictureInPictureElement.localName.includes("-")){let e=a.pictureInPictureElement.shadowRoot;for(;null==e?void 0:e.pictureInPictureElement;){if(e.pictureInPictureElement===n)return!0;e=null==(i=e.pictureInPictureElement)?void 0:i.shadowRoot}}return!1},set(e,t){const{media:i}=t;if(i)if(e){if(!U.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");const 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)throw t;if(i.src){if(0!==i.readyState||"none"!==i.preload)throw t;{const t=()=>{i.removeEventListener("loadedmetadata",n),i.preload="none"},n=()=>{i.requestPictureInPicture().catch(e),t()};i.addEventListener("loadedmetadata",n),i.preload="metadata",setTimeout((()=>{0===i.readyState&&e(),t()}),1e3)}}else console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.")}))}else U.pictureInPictureElement&&U.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(e){var t;const{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,n;const{media:a}=e;return null==(n=null==(i=null==a?void 0:a.videoRenditions)?void 0:i[null==(t=a.videoRenditions)?void 0:t.selectedIndex])?void 0:n.id},set(e,t){const{media:i}=t;if(!(null==i?void 0:i.videoRenditions))return void console.warn("MediaController: Rendition selection not supported by this media.");const n=e,a=Array.prototype.findIndex.call(i.videoRenditions,(e=>e.id==n));i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(e){var t;const{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;const{media:n}=e;return null==(i=[...null!=(t=null==n?void 0:n.audioTracks)?t:[]].find((e=>e.enabled)))?void 0:i.id},set(e,t){const{media:i}=t;if(!(null==i?void 0:i.audioTracks))return void console.warn("MediaChrome: Audio track selection not supported by this media.");const n=e;for(let e of i.audioTracks)e.enabled=n==e.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(e){var t;const{media:i,documentElement:n,fullscreenElement:a=i}=e;if(!i||!n)return!1;if(!n[it.element])return"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&(i.webkitDisplayingFullscreen&&i.webkitPresentationMode===m.FULLSCREEN);if(n[it.element]===a)return!0;
7if(n[it.element].localName.includes("-")){let e=n[it.element].shadowRoot;if(!(it.element in e))return q(n[it.element],a);for(;null==e?void 0:e[it.element];){if(e[it.element]===a)return!0;e=null==(t=e[it.element])?void 0:t.shadowRoot}}return!1},set(e,t){var i,n;const{media:a,fullscreenElement:s,documentElement:r}=t;if(e||!(null==r?void 0:r[it.exit]))if(null==s?void 0:s[it.enter]){const e=null==(n=s[it.enter])?void 0:n.call(s);e instanceof Promise&&e.catch((()=>{}))}else(null==a?void 0:a.webkitEnterFullscreen)?a.webkitEnterFullscreen():(null==a?void 0:a.requestFullscreen)&&a.requestFullscreen();else{const e=null==(i=null==r?void 0:r[it.exit])?void 0:i.call(r);e instanceof Promise&&e.catch((()=>{}))}},rootEvents:it.rootEvents,mediaEvents:it.mediaEvents},mediaIsCasting:{get(e){var t;const{media:i}=e;return!(!(null==i?void 0:i.remote)||"disconnected"===(null==(t=i.remote)?void 0:t.state))&&!!i.remote.state},set(e,t){var i,n;const{media:a}=t;a&&(e&&"disconnected"!==(null==(i=a.remote)?void 0:i.state)||(e||"connected"===(null==(n=a.remote)?void 0:n.state))&&("function"==typeof a.remote.prompt?a.remote.prompt().catch((()=>{})):console.warn("MediaChrome: Casting is not supported in this environment")))},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get:()=>!1,set(e,t){const{media:i}=t;i&&(i.webkitShowPlaybackTargetPicker&&N.WebKitPlaybackTargetAvailabilityEvent?i.webkitShowPlaybackTargetPicker():console.warn("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment"))},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(e){const{media:t}=e;if(!lt||!ot(t))return h.UNSUPPORTED}},mediaPipUnavailable:{get(e){const{media:t}=e;if(!dt||!rt(t))return h.UNSUPPORTED}},mediaVolumeUnavailable:{get(e){const{media:t}=e;if(!1===gt||null==(null==t?void 0:t.volume))return h.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{null==gt&&At.then((t=>e(t?void 0:h.UNSUPPORTED)))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;const{media:n}=e;return ht&&(null==(i=null==n?void 0:n.remote)?void 0:i.state)?null!=t&&"available"!==t?h.UNAVAILABLE:void 0:h.UNSUPPORTED},stateOwnersUpdateHandlers:[(e,t)=>{var i;const{media:n}=t;if(!n)return;return n.disableRemotePlayback||n.hasAttribute("disableremoteplayback")||null==(i=null==n?void 0:n.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==n?void 0:n.remote)||e.cancelWatchAvailability().catch((()=>{}))}}]},mediaAirplayUnavailable:{get:(e,t)=>ct?"not-available"===(null==t?void 0:t.availability)?h.UNAVAILABLE:void 0:h.UNSUPPORTED,mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(e,t)=>{var i;const{media:n}=t;if(!n)return;return n.disableRemotePlayback||n.hasAttribute("disableremoteplayback")||null==(i=null==n?void 0:n.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==n?void 0:n.remote)||e.cancelWatchAvailability().catch((()=>{}))}}]},mediaRenditionUnavailable:{get(e){var t;const{media:i}=e;return(null==i?void 0:i.videoRenditions)?(null==(t=i.videoRenditions)?void 0:t.length)?void 0:h.UNAVAILABLE:h.UNSUPPORTED},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(e){var t,i;const{media:n}=e;return(null==n?void 0:n.audioTracks)?(null!=(i=null==(t=n.audioTracks)?void 0:t.length)?i:0)<=1?h.UNAVAILABLE:void 0:h.UNSUPPORTED},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]}},It={[e.MEDIA_PREVIEW_REQUEST](e,t,{detail:i}){var n,a,s;const{media:r}=t,o=null!=i?i:void 0;let d,c;if(r&&null!=o){const[e]=et(r,{kind:l.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(n=null==e?void 0:e.cues)?n:[],((e,t,i)=>0===t?e.endTime>
7o:t===i.length-1?e.startTime<=o:e.startTime<=o&&e.endTime>o));if(t){const e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(a=null==r?void 0:r.querySelector('track[label="thumbnails"]'))?void 0:a.src,i=new URL(t.text,e);c=new URLSearchParams(i.hash).get("#xywh").split(",").map((e=>+e)),d=i.href}}const h=e.mediaDuration.get(t);let u=null==(s=e.mediaChaptersCues.get(t).find(((e,t,i)=>t===i.length-1&&h===e.endTime?e.startTime<=o&&e.endTime>=o:e.startTime<=o&&e.endTime>o)))?void 0:s.text;return null!=i&&null==u&&(u=""),{mediaPreviewTime:o,mediaPreviewImage:d,mediaPreviewCoords:c,mediaPreviewChapter:u}},[e.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[e.MEDIA_PLAY_REQUEST](e,t){var i;if(e.mediaStreamType.get(t)===u.LIVE){const n=!(e.mediaTargetLiveWindow.get(t)>0),a=null==(i=e.mediaSeekable.get(t))?void 0:i[1];n&&a&&e.mediaCurrentTime.set(a,t)}e.mediaPaused.set(!1,t)},[e.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){const n=i;e.mediaPlaybackRate.set(n,t)},[e.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[e.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[e.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){const n=i;n&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(n,t)},[e.MEDIA_SEEK_REQUEST](e,t,{detail:i}){const n=i;e.mediaCurrentTime.set(n,t)},[e.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var i;const n=null==(i=e.mediaSeekable.get(t))?void 0:i[1];Number.isNaN(Number(n))&&e.mediaCurrentTime.set(n,t)},[e.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var n;const{options:a}=t,s=ut(t),r=Ye(i),o=null==(n=r[0])?void 0:n.language;o&&!a.noSubtitlesLangPref&&N.localStorage.setItem("media-chrome-pref-subtitles-lang",o),Je(d.SHOWING,s,r)},[e.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){const n=ut(t);Je(d.DISABLED,n,null!=i?i:[])},[e.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){vt(t,i)},[e.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){const n=i;e.mediaRenditionSelected.set(n,t)},[e.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){const n=i;e.mediaAudioTrackEnabled.set(n,t)},[e.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[e.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[e.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t)},[e.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[e.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[e.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[e.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var kt,yt,_t,Tt,wt,St,Mt,Lt,Ct,Rt,Dt,xt,Nt=({media:e,fullscreenElement:t,documentElement:i,stateMediator:n=ft,requestMap:a=It,options:s={},monitorStateOwnersOnlyWithSubscriptions:r=!0})=>{const o=[],l={options:{...s}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const c=e=>{null!=e&&(Et(e,d)||(d=Object.freeze({...d,...e}),o.forEach((e=>e(d)))))},h=()=>{const e=Object.entries(n).reduce(((e,[t,{get:i}])=>(e[t]=i(l),e)),{});c(e)},u={};let m;const v=async(e,t)=>{var i,a,s,d,v,E,p,b,g,A,f,I,k,y,_,T;const w=!!m;if(m={...l,...null!=m?m:{},...e},w)return;await(async(...e)=>{await Promise.all(e.filter((e=>e)).map((async e=>{if(!("localName"in e&&e instanceof N.HTMLElement))return;const t=e.localName;if(!t.includes("-"))return;const i=N.customElements.get(t);i&&e instanceof i||(await N.customElements.whenDefined(t),N.customElements.upgrade(e))})))})(...Object.values(e));const S=o.length>0&&0===t&&r,M=l.media!==m.media,L=(null==(i=l.media)?void 0:i.textTracks)!==(null==(a=m.media)?void 0:a.textTracks),C=(null==(s=l.media)?void 0:s.videoRenditions)!==(null==(d=m.media)?void 0:d.videoRenditions),R=(null==(v=l.media)?void 0:v.audioTracks)!==(null==(E=m.media)?void 0:E.audioTracks),D=(null==(p=l.media)?void 0:p.remote)!==(null==(b=m.media)?void 0:b.remote),x=l.documentElement!==m.documentElement,U=!!l.media&&(M||S),P=!!(null==(g=l.media)?void 0:g.textTracks)&&(L||S),O=!!(null==(A=l.media)?void 0:A.videoRenditions)&&(C||S),W=!!(null==(f=l.media)?void 0:f.audioTracks)&&(R||S),B=!!(null==(I=l.media)?void 0:I.remote)&&(D||S),V=!!l.documentElement&&(x||S),H=U||P||O||W||B||V,$=0===o.length&&1===t&&r,G=!!m.media&&(M||$),K=!!(null==(k=m.media)?void 0:k.textTracks)&&(L||$),q=!!(null==(y=m.media)?void 0:y.videoRenditions)&&(C||$),F=!!(null==(_=m.media)?void 0:_.audioTracks)&&(R||$),Q=!!(null==(T=m.media)?void 0:T.remote)&&(D||$),j=!!m.documentElement&&(x||$),Y=G||K||q||F||Q||j;if(!(H||Y))return Object.entries(m).forEach((([e,t])=>{l[e]=t})),h(),void(m=void 0);
7Object.entries(n).forEach((([e,{get:t,mediaEvents:i=[],textTracksEvents:n=[],videoRenditionsEvents:a=[],audioTracksEvents:s=[],remoteEvents:r=[],rootEvents:o=[],stateOwnersUpdateHandlers:d=[]}])=>{u[e]||(u[e]={});const h=i=>{const n=t(l,i);c({[e]:n})};let v;v=u[e].mediaEvents,i.forEach((t=>{v&&U&&(l.media.removeEventListener(t,v),u[e].mediaEvents=void 0),G&&(m.media.addEventListener(t,h),u[e].mediaEvents=h)})),v=u[e].textTracksEvents,n.forEach((t=>{var i,n;v&&P&&(null==(i=l.media.textTracks)||i.removeEventListener(t,v),u[e].textTracksEvents=void 0),K&&(null==(n=m.media.textTracks)||n.addEventListener(t,h),u[e].textTracksEvents=h)})),v=u[e].videoRenditionsEvents,a.forEach((t=>{var i,n;v&&O&&(null==(i=l.media.videoRenditions)||i.removeEventListener(t,v),u[e].videoRenditionsEvents=void 0),q&&(null==(n=m.media.videoRenditions)||n.addEventListener(t,h),u[e].videoRenditionsEvents=h)})),v=u[e].audioTracksEvents,s.forEach((t=>{var i,n;v&&W&&(null==(i=l.media.audioTracks)||i.removeEventListener(t,v),u[e].audioTracksEvents=void 0),F&&(null==(n=m.media.audioTracks)||n.addEventListener(t,h),u[e].audioTracksEvents=h)})),v=u[e].remoteEvents,r.forEach((t=>{var i,n;v&&B&&(null==(i=l.media.remote)||i.removeEventListener(t,v),u[e].remoteEvents=void 0),Q&&(null==(n=m.media.remote)||n.addEventListener(t,h),u[e].remoteEvents=h)})),v=u[e].rootEvents,o.forEach((t=>{v&&V&&(l.documentElement.removeEventListener(t,v),u[e].rootEvents=void 0),j&&(m.documentElement.addEventListener(t,h),u[e].rootEvents=h)}));const E=u[e].stateOwnersUpdateHandlers;d.forEach((t=>{E&&H&&E(),Y&&(u[e].stateOwnersUpdateHandlers=t(h,m))}))})),Object.entries(m).forEach((([e,t])=>{l[e]=t})),h(),m=void 0};return v({media:e,fullscreenElement:t,documentElement:i,options:s}),{dispatch(e){const{type:t,detail:i}=e;a[t]?c(a[t](n,l,e)):"mediaelementchangerequest"===t?v({media:i}):"fullscreenelementchangerequest"===t?v({fullscreenElement:i}):"documentelementchangerequest"===t?v({documentElement:i}):"optionschangerequest"===t&&Object.entries(null!=i?i:{}).forEach((([e,t])=>{l.options[e]=t}))},getState:()=>d,subscribe:e=>(v({},o.length+1),o.push(e),e(d),()=>{const t=o.indexOf(e);t>=0&&(v({},o.length-1),o.splice(t,1))})}},Ut=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Pt=(e,t,i)=>(Ut(e,t,"read from private field"),i?i.call(e):t.get(e)),Ot=(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)},Wt=(e,t,i,n)=>(Ut(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),Bt=(e,t,i)=>(Ut(e,t,"access private method"),i);const Vt=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],Ht="defaultsubtitles",$t="defaultstreamtype",Gt="defaultduration",Kt="fullscreenelement",qt="hotkeys",Ft="keysused",Qt="liveedgeoffset",jt="nohotkeys",Yt="novolumepref",Zt="nosubtitleslangpref",zt="nodefaultstore",Xt="keyboardforwardseekoffset",Jt="keyboardbackwardseekoffset";class ei extends Ue{constructor(){super(),Ot(this,Mt),Ot(this,Ct),Ot(this,Dt),Ot(this,kt,new Fe(this,qt)),Ot(this,yt,void 0),Ot(this,_t,void 0),Ot(this,Tt,void 0),Ot(this,wt,void 0),Ot(this,St,(e=>{var t;null==(t=Pt(this,_t))||t.dispatch(e)})),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this);let e={};Wt(this,Tt,(t=>{Object.entries(t).forEach((([t,i])=>{if(t in e&&e[t]===i)return;this.propagateMediaState(t,i);const n=t.toLowerCase(),a=new N.CustomEvent(o[n],{composed:!0,detail:i});this.dispatchEvent(a)}
7)),e=t})),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(jt,qt,$t,Ht,Gt)}get mediaStore(){return Pt(this,_t)}set mediaStore(e){var t,i;Pt(this,_t)&&(null==(t=Pt(this,wt))||t.call(this),Wt(this,wt,void 0)),Wt(this,_t,e),Pt(this,_t)||this.hasAttribute(zt)?Wt(this,wt,null==(i=Pt(this,_t))?void 0:i.subscribe(Pt(this,Tt))):Bt(this,Mt,Lt).call(this)}get fullscreenElement(){var e;return null!=(e=Pt(this,yt))?e:this}set fullscreenElement(e){var t;this.hasAttribute(Kt)&&this.removeAttribute(Kt),Wt(this,yt,e),null==(t=Pt(this,_t))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}attributeChangedCallback(e,t,i){var n,a,s,r,o,l;if(super.attributeChangedCallback(e,t,i),e===jt)i!==t&&""===i?(this.hasAttribute(qt)&&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===qt)Pt(this,kt).value=i;else if(e===Ht&&i!==t)null==(n=Pt(this,_t))||n.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(Ht)}});else if(e===$t)null==(s=Pt(this,_t))||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(a=this.getAttribute($t))?a:void 0}});else if(e===Qt)null==(r=Pt(this,_t))||r.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(Qt)?+this.getAttribute(Qt):void 0}});else if(e===Kt){const e=i?null==(o=this.getRootNode())?void 0:o.getElementById(i):void 0;Wt(this,yt,e),null==(l=Pt(this,_t))||l.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}}connectedCallback(){var e,t;Pt(this,_t)||this.hasAttribute(zt)||Bt(this,Mt,Lt).call(this),null==(e=Pt(this,_t))||e.dispatch({type:"documentelementchangerequest",detail:U}),super.connectedCallback(),Pt(this,_t)&&!Pt(this,wt)&&Wt(this,wt,null==(t=Pt(this,_t))?void 0:t.subscribe(Pt(this,Tt))),this.enableHotkeys()}disconnectedCallback(){var t,i,n,a;null==(t=super.disconnectedCallback)||t.call(this),Pt(this,_t)&&(null==(i=Pt(this,_t))||i.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(n=Pt(this,_t))||n.dispatch({type:e.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),Pt(this,wt)&&(null==(a=Pt(this,wt))||a.call(this),Wt(this,wt,void 0))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=Pt(this,_t))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=Pt(this,_t))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){li(this.mediaStateReceivers,e,t)}associateElement(t){if(!t)return;const{associatedElementSubscriptions:i}=this;if(i.has(t))return;const n=this.registerMediaStateReceiver.bind(this),a=this.unregisterMediaStateReceiver.bind(this),s=di(t,n,a);Object.values(e).forEach((e=>{t.addEventListener(e,Pt(this,St))})),i.set(t,s)}unassociateElement(t){if(!t)return;const{associatedElementSubscriptions:i}=this;if(!i.has(t))return;i.get(t)(),i.delete(t),Object.values(e).forEach((e=>{t.removeEventListener(e,Pt(this,St))}))}registerMediaStateReceiver(e){if(!e)return;const t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Pt(this,_t)&&Object.entries(Pt(this,_t).getState()).forEach((([t,i])=>{li([e],t,i)})))}unregisterMediaStateReceiver(e){const t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",Bt(this,Dt,xt))}disableHotkeys(){this.removeEventListener("keydown",Bt(this,Dt,xt)),this.removeEventListener("keyup",Bt(this,Ct,Rt))}get hotkeys(){return Pt(this,kt)}keyboardShortcutHandler(t){var i,n,a,s,r,o;if((null!=(s=null!=(a=null==(i=t.target.getAttribute(Ft))?void 0:i.split(" "))?a:null==(n=t.target)?void 0:n.keysUsed)?s:[]).map((e=>"Space"===e?" ":e)).filter(Boolean).includes(t.key))return;let l,d,c;if(!(Pt(this,kt).contains(`no${t.key.toLowerCase()}`)||" "===t.key&&Pt(this,kt).contains("nospace")))switch(t.key){case" ":case"k":l=Pt(this,_t).getState().mediaPaused?e.MEDIA_PLAY_REQUEST:e.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new N.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"m":l="off"===this.mediaStore.getState().mediaVolumeLevel?e.MEDIA_UNMUTE_REQUEST:e.MEDIA_MUTE_REQUEST,this.dispatchEvent(new N.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"f":l=this.mediaStore.getState().mediaIsFullscreen?e.MEDIA_EXIT_FULLSCREEN_REQUEST:e.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new N.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new N.CustomEvent(e.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{const t=this.hasAttribute(Jt)?+this.getAttribute(Jt):10;d=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-t,0),c=new N.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:d}),this.dispatchEvent(c);break}case"ArrowRight":{const t=this.hasAttribute(Xt)?+this.getAttribute(Xt):10;d=Math.max((null!=(o=this.mediaStore.getState().mediaCurrentTime)?o:0)+t,0),c=new N.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:d}),this.dispatchEvent(c);break}}}}kt=new WeakMap,yt=new WeakMap,_t=new WeakMap,Tt=new WeakMap,wt=new WeakMap,St=new WeakMap,Mt=new WeakSet,Lt=function(){var e;this.mediaStore=Nt({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(Ht),defaultDuration:this.hasAttribute(Gt)?+this.getAttribute(Gt):void 0,defaultStreamType:null!=(e=this.getAttribute($t))?e:void 0,liveEdgeOffset:this.hasAttribute(Qt)?+this.getAttribute(Qt):void 0,noVolumePref:this.hasAttribute(Yt),noSubtitlesLangPref:this.hasAttribute(Zt)}})},Ct=new WeakSet,Rt=function(e){const{key:t}=e;Vt.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener("keyup",Bt(this,Ct,Rt))},Dt=new WeakSet,xt=function(e){const{metaKey:t,altKey:i,key:n}=e;t||i||!Vt.includes(n)?this.removeEventListener("keyup",Bt(this,Ct,Rt)):([" ","ArrowLeft","ArrowRight"].includes(n)&&!(Pt(this,kt).contains(`no${n.toLowerCase()}
7`)||" "===n&&Pt(this,kt).contains("nospace"))&&e.preventDefault(),this.addEventListener("keyup",Bt(this,Ct,Rt),{once:!0}))};const ti=Object.values(a),ii=Object.values(i),ni=e=>{var i,n,a,s;let{observedAttributes:r}=e.constructor;!r&&(null==(i=e.nodeName)?void 0:i.includes("-"))&&(N.customElements.upgrade(e),({observedAttributes:r}=e.constructor));const o=null==(s=null==(a=null==(n=null==e?void 0:e.getAttribute)?void 0:n.call(e,t.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:s.call(a,/\s+/);return Array.isArray(r||o)?(r||o).filter((e=>ti.includes(e))):[]},ai=e=>(e=>{var t,i;return!(null==(t=e.nodeName)?void 0:t.includes("-"))||!N.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())||e instanceof N.customElements.get(e.nodeName.toLowerCase())||N.customElements.upgrade(e),ii.some((t=>t in e))})(e)||!!ni(e).length,si=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},ri={[a.MEDIA_SUBTITLES_LIST]:ze,[a.MEDIA_SUBTITLES_SHOWING]:ze,[a.MEDIA_SEEKABLE]:si,[a.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(si).join(" "),[a.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[a.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(g).join(" ")},[a.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(f).join(" ")}},oi=(e,t)=>{if((e=>{var t;return!!(null==(t=e.closest)?void 0:t.call(e,'*[slot="media"]'))})(e))return;const i=(e,t)=>{var i,n;ai(e)&&t(e);const{children:a=[]}=null!=e?e:{};[...a,...null!=(n=null==(i=null==e?void 0:e.shadowRoot)?void 0:i.children)?n:[]].forEach((e=>oi(e,t)))},n=null==e?void 0:e.nodeName.toLowerCase();!n.includes("-")||ai(e)?i(e,t):N.customElements.whenDefined(n).then((()=>{i(e,t)}))},li=(e,t,i)=>{e.forEach((e=>{if(t in e)return void(e[t]=i);const n=ni(e),a=t.toLowerCase();n.includes(a)&&(async(e,t,i)=>{var n,a;if(e.isConnected||await k(0),"boolean"==typeof i||null==i)return te(e,t,i);if("number"==typeof i)return J(e,t,i);if("string"==typeof i)return ne(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);const s=null!=(a=null==(n=ri[t])?void 0:n.call(ri,i))?a:i;e.setAttribute(t,s)})(e,a,i)}))},di=(i,n,a)=>{oi(i,n);const s=e=>{var t;const i=null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target;n(i)},r=e=>{var t;const i=null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target;a(i)};i.addEventListener(e.REGISTER_MEDIA_STATE_RECEIVER,s),i.addEventListener(e.UNREGISTER_MEDIA_STATE_RECEIVER,r);let o=[];const l=e=>{const t=e.target;"media"!==t.name&&(o.forEach((e=>oi(e,a))),o=[...t.assignedElements({flatten:!0})],o.forEach((e=>oi(e,n))))};i.addEventListener("slotchange",l);const d=new MutationObserver((e=>{e.forEach((e=>{const{addedNodes:i=[],removedNodes:s=[],type:r,target:o,attributeName:l}=e;"childList"===r?(Array.prototype.forEach.call(i,(e=>oi(e,n))),Array.prototype.forEach.call(s,(e=>oi(e,a)))):"attributes"===r&&l===t.MEDIA_CHROME_ATTRIBUTES&&(ai(o)?n(o):a(o))}))}));d.observe(i,{childList:!0,attributes:!0,subtree:!0});return()=>{oi(i,a),i.removeEventListener("slotchange",l),d.disconnect(),i.removeEventListener(e.REGISTER_MEDIA_STATE_RECEIVER,s),i.removeEventListener(e.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};N.customElements.get("media-controller")||N.customElements.define("media-controller",ei);var ci,hi,ui,mi,vi=ei,Ei=Object.defineProperty,pi=(e,t,i)=>(((e,t,i)=>{t in e?Ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i),i),bi=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},gi=(e,t,i)=>(bi(e,t,"read from private field"),i?i.call(e):t.get(e)),Ai=(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)},fi=(e,t,i,n)=>(bi(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);const Ii=U.createElement("template");Ii.innerHTML="\n<style>\n  :host {\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;
7\n    align-items: center;\n    vertical-align: middle;\n    box-sizing: border-box;\n    transition: background .15s linear;\n    pointer-events: auto;\n    cursor: pointer;\n    -webkit-tap-highlight-color: transparent;\n  }\n\n  \n  :host(:focus-visible) {\n    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</style>\n";class ki extends N.HTMLElement{constructor(e={}){if(super(),Ai(this,ci,void 0),pi(this,"preventClick",!1),Ai(this,hi,(e=>{this.preventClick||this.handleClick(e)})),Ai(this,ui,(e=>{const{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",gi(this,ui))})),Ai(this,mi,(e=>{const{metaKey:t,altKey:i,key:n}=e;t||i||!this.keysUsed.includes(n)?this.removeEventListener("keyup",gi(this,ui)):this.addEventListener("keyup",gi(this,ui),{once:!0})})),!this.shadowRoot){this.attachShadow({mode:"open"});const t=Ii.content.cloneNode(!0);this.nativeEl=t;let i=e.slotTemplate;i||(i=U.createElement("template"),i.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(i.content.cloneNode(!0)),this.shadowRoot.appendChild(t)}}static get observedAttributes(){return["disabled",t.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",gi(this,hi)),this.addEventListener("keydown",gi(this,mi)),this.tabIndex=0}disable(){this.removeEventListener("click",gi(this,hi)),this.removeEventListener("keydown",gi(this,mi)),this.removeEventListener("keyup",gi(this,ui)),this.tabIndex=-1}attributeChangedCallback(e,i,n){var a,s,r,o,l;e===t.MEDIA_CONTROLLER?(i&&(null==(s=null==(a=gi(this,ci))?void 0:a.unassociateElement)||s.call(a,this),fi(this,ci,null)),n&&this.isConnected&&(fi(this,ci,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(l=null==(o=gi(this,ci))?void 0:o.associateElement)||l.call(o,this))):"disabled"===e&&n!==i&&(null==n?this.enable():this.disable())}connectedCallback(){var e,i,n;const{style:a}=Z(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");const s=this.getAttribute(t.MEDIA_CONTROLLER);s&&(fi(this,ci,null==(e=this.getRootNode())?void 0:e.getElementById(s)),null==(n=null==(i=gi(this,ci))?void 0:i.associateElement)||n.call(i,this))}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=gi(this,ci))?void 0:e.unassociateElement)||t.call(e,this),fi(this,ci,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}}ci=new WeakMap,hi=new WeakMap,ui=new WeakMap,mi=new WeakMap,N.customElements.get("media-chrome-button")||N.customElements.define("media-chrome-button",ki);var yi=ki;const _i='<svg aria-hidden="true" viewBox="0 0 26 24">\n  <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"/>\n</svg>\n',Ti=U.createElement("template");Ti.innerHTML=`\n  <style>\n  :host([${a.MEDIA_IS_AIRPLAYING}]) slot:not([name=exit]):not([name=icon]) {\n    display: none !important;\n  }\n\n  \n  :host(:not([${a.MEDIA_IS_AIRPLAYING}])) slot:not([name=enter]):not([name=icon]) {\n    display: none !important;\n  }\n  </style>\n\n  <slot name="icon">\n    <slot name="enter">${_i}</slot>\n    <slot name="exit">${_i}</slot>\n  </slot>\n`;const wi=e=>
7{const t=e.mediaIsAirplaying?p.EXIT_AIRPLAY():p.ENTER_AIRPLAY();e.setAttribute("aria-label",t)};class Si extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_IS_AIRPLAYING,a.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Ti,...e})}connectedCallback(){super.connectedCallback(),wi(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_IS_AIRPLAYING&&wi(this)}get mediaIsAirplaying(){return ee(this,a.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){te(this,a.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return ie(this,a.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){ne(this,a.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const t=new N.CustomEvent(e.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(t)}}N.customElements.get("media-airplay-button")||N.customElements.define("media-airplay-button",Si);var Mi=Si;function Li({anchor:e,floating:t,placement:i}){let n=function({anchor:e,floating:t}){return{anchor:Ci(e,t.offsetParent),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:e,floating:t}),{x:a,y:s}=function({anchor:e,floating:t},i){const n="x"===function(e){return["top","bottom"].includes(Ri(e))?"y":"x"}(i)?"y":"x",a="y"===n?"height":"width",s=Ri(i),r=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l=e[a]/2-t[a]/2;let d;switch(s){case"top":d={x:r,y:e.y-t.height};break;case"bottom":d={x:r,y:e.y+e.height};break;case"right":d={x:e.x+e.width,y:o};break;case"left":d={x:e.x-t.width,y:o};break;default:d={x:e.x,y:e.y}}switch(i.split("-")[1]){case"start":d[n]-=l;break;case"end":d[n]+=l}return d}(n,i);return{x:a,y:s}}function Ci(e,t){let i=e.getBoundingClientRect(),n=t.getBoundingClientRect();return{x:i.x-n.x,y:i.y-n.y,width:i.width,height:i.height}}function Ri(e){return e.split("-")[0]}var Di=Object.defineProperty,xi=(e,t,i)=>(((e,t,i)=>{t in e?Di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i),i);
7class Ni extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),xi(this,"action"),xi(this,"relatedTarget"),this.action=e,this.relatedTarget=t}}class Ui extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),xi(this,"newState"),xi(this,"oldState"),this.newState=e,this.oldState=t}}var Pi,Oi,Wi,Bi,Vi,Hi,$i,Gi,Ki,qi,Fi,Qi,ji,Yi,Zi,zi,Xi,Ji,en,tn,nn,an,sn,rn,on,ln,dn,cn,hn,un,mn,vn,En,pn,bn,gn,An,fn,In,kn,yn,_n,Tn,wn,Sn,Mn=Object.defineProperty,Ln=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Cn=(e,t,i)=>(Ln(e,t,"read from private field"),i?i.call(e):t.get(e)),Rn=(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)},Dn=(e,t,i,n)=>(Ln(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),xn=(e,t,i)=>(Ln(e,t,"access private method"),i);function Nn({type:e,text:t,value:i,checked:n}){const a=U.createElement("media-chrome-menu-item");a.type=null!=e?e:"",a.part.add("menu-item"),e&&a.part.add(e),a.value=i,a.checked=n;const s=U.createElement("span");return s.textContent=t,a.append(s),a}function Un(e,t){let i=e.querySelector(`:scope > [slot="${t}"]`);if("SLOT"==(null==i?void 0:i.nodeName)&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;let n=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return n?n.cloneNode(!0):""}const Pn=U.createElement("template");Pn.innerHTML='\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      background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));\n      border-radius: var(--media-menu-border-radius);\n      border: var(--media-menu-border, none);\n      display: var(--media-menu-display, inline-flex);\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      box-sizing: border-box;\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    slot[name="header"] {\n      display: flex;\n      padding: .4em .7em;\n      border-bottom: 1px solid rgb(255 255 255 / .25);\n      cursor: default;\n    }\n\n    slot[name="header"][hidden] {\n      display: none;\n    }\n\n    button[part~="back"] {\n      background: none;\n      color: inherit;\n      border: none;\n      padding: 0;\n      font: inherit;\n      cursor: pointer;\n      outline: inherit;\n      display: inline-flex;\n      align-items: center;\n      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    }
7\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      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">\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';const On="style",Wn="hidden",Bn="disabled",Vn="anchor";class Hn extends N.HTMLElement{constructor(){super(),Rn(this,Ki),Rn(this,Qi),Rn(this,Yi),Rn(this,zi),Rn(this,Ji),Rn(this,an),Rn(this,rn),Rn(this,ln),Rn(this,cn),Rn(this,un),Rn(this,vn),Rn(this,pn),Rn(this,gn),Rn(this,fn),Rn(this,kn),Rn(this,_n),Rn(this,wn),Rn(this,Pi,void 0),Rn(this,Oi,void 0),Rn(this,Wi,void 0),Rn(this,Bi,""),Rn(this,Vi,null),Rn(this,Hi,new Set),Rn(this,$i,void 0),Rn(this,Gi,!1),Rn(this,Fi,(()=>{const e=Cn(this,Hi),t=new Set(this.items);for(const i of e)t.has(i)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:i}));for(const i of t)e.has(i)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:i}));Dn(this,Hi,t)})),Rn(this,tn,(()=>{xn(this,an,sn).call(this,!1),xn(this,rn,on).call(this,!1)})),Rn(this,nn,(()=>{xn(this,an,sn).call(this,!1)})),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),Dn(this,$i,new MutationObserver(Cn(this,Fi))),Cn(this,$i).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[Bn,Wn,On,Vn,t.MEDIA_CONTROLLER]}static formatMenuItemText(e){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":xn(this,Ki,qi).call(this,e);break;case"invoke":xn(this,Yi,Zi).call(this,e);break;case"click":xn(this,ln,dn).call(this,e);break;case"toggle":xn(this,un,mn).call(this,e);break;case"focusout":xn(this,pn,bn).call(this,e);break;case"keydown":xn(this,gn,An).call(this,e)}}connectedCallback(){var e,t;xn(this,Qi,ji).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Dn(this,Pi,$(this)),null==(t=null==(e=Cn(this,Pi))?void 0:e.associateElement)||t.call(e,this),this.hidden||(B(Kn(this),Cn(this,tn)),B(this,Cn(this,nn)))}disconnectedCallback(){var e,t;V(Kn(this),Cn(this,tn)),V(this,Cn(this,nn)),this.disable(),null==(t=null==(e=Cn(this,Pi))?void 0:e.unassociateElement)||t.call(e,this),Dn(this,Pi,null)}attributeChangedCallback(e,i,n){var a,s,r,o;e===Wn&&n!==i?(Cn(this,Gi)||Dn(this,Gi,!0),this.hidden?xn(this,Ji,en).call(this):xn(this,zi,Xi).call(this),this.dispatchEvent(new 
7Ui({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===t.MEDIA_CONTROLLER?(i&&(null==(s=null==(a=Cn(this,Pi))?void 0:a.unassociateElement)||s.call(a,this),Dn(this,Pi,null)),n&&this.isConnected&&(Dn(this,Pi,$(this)),null==(o=null==(r=Cn(this,Pi))?void 0:r.associateElement)||o.call(r,this))):e===Bn&&n!==i?null==n?this.enable():this.disable():e===On&&n!==i&&xn(this,Qi,ji).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=j(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(Gn)}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){const t=this.items.find((t=>t.value===e));t&&xn(this,wn,Sn).call(this,t)}focus(){if(Dn(this,Oi,Q()),this.items.length)return xn(this,_n,Tn).call(this,this.items[0]),void this.items[0].focus();const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}handleSelect(e){var t;const i=xn(this,fn,In).call(this,e);i&&(xn(this,wn,Sn).call(this,i,"checkbox"===i.type),Cn(this,Wi)&&!this.hidden&&(null==(t=Cn(this,Oi))||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,i;const{key:n}=e,a=this.items,s=null!=(i=null!=(t=xn(this,fn,In).call(this,e))?t:xn(this,kn,yn).call(this))?i:a[0],r=a.indexOf(s);let o=Math.max(0,r);"ArrowDown"===n?o++:"ArrowUp"===n?o--:"Home"===e.key?o=0:"End"===e.key&&(o=a.length-1),o<0&&(o=a.length-1),o>a.length-1&&(o=0),xn(this,_n,Tn).call(this,a[o]),a[o].focus()}}var $n;function Gn(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function Kn(e){var t;return null!=(t=e.getAttribute("bounds")?F(e,`#${e.getAttribute("bounds")}`):H(e)||e.parentElement)?t:e}Pi=new WeakMap,Oi=new WeakMap,Wi=new WeakMap,Bi=new WeakMap,Vi=new WeakMap,Hi=new WeakMap,$i=new WeakMap,Gi=new WeakMap,Ki=new WeakSet,qi=function(e){const t=e.target;for(let e of t.assignedNodes({flatten:!0}))3===e.nodeType&&""===e.textContent.trim()&&e.remove();if(["header","title"].includes(t.name)){this.shadowRoot.querySelector('slot[name="header"]').hidden=0===t.assignedNodes().length}t.name||Cn(this,Fi).call(this)},Fi=new WeakMap,Qi=new WeakSet,ji=function(){var e;const 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")},Yi=new WeakSet,Zi=function(e){Dn(this,Wi,e.relatedTarget),q(this,e.relatedTarget)||(this.hidden=!this.hidden)},zi=new WeakSet,Xi=function(){var e;null==(e=Cn(this,Wi))||e.setAttribute("aria-expanded","true"),requestAnimationFrame((()=>xn(this,an,sn).call(this,!1))),this.addEventListener("transitionend",(()=>this.focus()),{once:!0}),B(Kn(this),Cn(this,tn)),B(this,Cn(this,nn))},Ji=new WeakSet,en=function(){var e;null==(e=Cn(this,Wi))||e.setAttribute("aria-expanded","false"),V(Kn(this),Cn(this,tn)),V(this,Cn(this,nn))},tn=new WeakMap,nn=new WeakMap,an=new WeakSet,sn=function(e,t){if(this.hasAttribute("mediacontroller")&&!this.anchor)return;if(this.hidden||!this.anchorElement)return;const{x:i,y:n}=Li({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=t||(t=this.offsetWidth);const a=Kn(this).getBoundingClientRect(),s=this.anchorElement.getBoundingClientRect(),r=a.width-i-t,o=a.height-n-this.offsetHeight,l=a.height-s.height,{style:d}=Z(this.shadowRoot,":host");e||d.setProperty("--media-menu-transition-in","none"),d.setProperty("position","absolute"),d.setProperty("right",`${Math.max(0,r)}px`),d.setProperty("bottom",`${o}px`),d.setProperty("--_menu-max-height",`${l}px`),d.removeProperty("--media-menu-transition-in")},rn=new WeakSet,on=function(e){const t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:n}=Z(this.shadowRoot,":host");if(e||n.setProperty("--media-menu-transition-in","none"),i){const n=i.offsetHeight,a=Math.max(i.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${n}px`),xn(this,an,sn).call(this,e,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),xn(this,an,sn).call(this,e);n.removeProperty("--media-menu-transition-in")},ln=new WeakSet,dn=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(Cn(this,cn,hn)))return null==(t=Cn(this,Oi))||t.focu
7s(),void(this.hidden=!0);const i=xn(this,fn,In).call(this,e);i&&!i.hasAttribute("disabled")&&(xn(this,_n,Tn).call(this,i),this.handleSelect(e))},cn=new WeakSet,hn=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find((e=>e.part.contains("back")&&e.part.contains("button")))},un=new WeakSet,mn=function(e){if(e.target===this)return;xn(this,vn,En).call(this);const t=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const i of t)i.invokeTargetElement!=e.target&&("open"!=e.newState||"true"!=i.getAttribute("aria-expanded")||i.invokeTargetElement.hidden||i.invokeTargetElement.dispatchEvent(new Ni({relatedTarget:i})));for(const e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);xn(this,rn,on).call(this,!0)},vn=new WeakSet,En=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},pn=new WeakSet,bn=function(e){var t;q(this,e.relatedTarget)||(Cn(this,Gi)&&(null==(t=Cn(this,Oi))||t.focus()),Cn(this,Wi)&&Cn(this,Wi)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},gn=new WeakSet,An=function(e){var t,i,n,a,s;const{key:r,ctrlKey:o,altKey:l,metaKey:d}=e;if(!(o||l||d)&&this.keysUsed.includes(r))if(e.preventDefault(),e.stopPropagation(),"Tab"===r){if(Cn(this,Gi))return void(this.hidden=!0);e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(a=null==(n=this.nextElementSibling)?void 0:n.focus)||a.call(n),this.blur()}else"Escape"===r?(null==(s=Cn(this,Oi))||s.focus(),Cn(this,Gi)&&(this.hidden=!0)):"Enter"===r||" "===r?this.handleSelect(e):this.handleMove(e)},fn=new WeakSet,In=function(e){return e.composedPath().find((e=>["menuitemradio","menuitemcheckbox"].includes(e.role)))},kn=new WeakSet,yn=function(){return this.items.find((e=>0===e.tabIndex))},_n=new WeakSet,Tn=function(e){for(const t of this.items)t.tabIndex=t===e?0:-1},wn=new WeakSet,Sn=function(e,t){const i=[...this.checkedItems];"radio"===e.type&&this.radioGroupItems.forEach((e=>e.checked=!1)),e.checked=!t||!e.checked,this.checkedItems.some(((e,t)=>e!=i[t]))&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},((e,t,i)=>{t in e?Mn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(Hn,"symbol"!=typeof($n="template")?$n+"":$n,Pn),N.customElements.get("media-chrome-menu")||N.customElements.define("media-chrome-menu",Hn);var qn,Fn,Qn,jn,Yn,Zn,zn=Hn,Xn=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Jn=(e,t,i)=>(Xn(e,t,"read from private field"),i?i.call(e):t.get(e)),ea=(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)},ta=(e,t,i,n)=>(Xn(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),ia=(e,t,i)=>(Xn(e,t,"access private method"),i);class na extends Hn{constructor(){super(...arguments),ea(this,Qn),ea(this,Yn),ea(this,qn,[]),ea(this,Fn,void 0)}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_AUDIO_TRACK_LIST,a.MEDIA_AUDIO_TRACK_ENABLED,a.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){var n;super.attributeChangedCallback(e,t,i),e===a.MEDIA_AUDIO_TRACK_ENABLED&&t!==i?this.value=i:e===a.MEDIA_AUDIO_TRACK_LIST&&t!==i&&(ta(this,qn,null==(n=i)?void 0:n.split(/\s+/).map(I)),ia(this,Qn,jn).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ia(this,Yn,Zn))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ia(this,Yn,Zn))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:H(this).querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return Jn(this,qn)}set mediaAudioTrackList(e){ta(this,qn,e),ia(this,Qn,jn).call(this)}get mediaAudioTrackEnabled(){return ie(this,a.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){ne(this,a.MEDIA_AUDIO_TRACK_ENABLED,e)}}qn=new WeakMap,Fn=new WeakMap,Qn=new WeakSet,jn=function(){if(Jn(this,Fn)===JSON.stringify(this.mediaAudioTrackList))return;ta(this,Fn,JSON.stringify(this.mediaAudioTrackList));const e=this.mediaAudioTrackList;this.defaultSlot.textContent="";for(const t of e){const e=Nn({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});
7e.prepend(Un(this,"checked-indicator")),this.defaultSlot.append(e)}},Yn=new WeakSet,Zn=function(){if(null==this.value)return;const t=new N.CustomEvent(e.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},N.customElements.get("media-audio-track-menu")||N.customElements.define("media-audio-track-menu",na);var aa=na;class sa extends ki{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=j(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){this.invokeTargetElement.dispatchEvent(new Ni({relatedTarget:this}))}}N.customElements.get("media-chrome-menu-button")||N.customElements.define("media-chrome-menu-button",sa);const ra=U.createElement("template");ra.innerHTML='\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';class oa extends sa{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_AUDIO_TRACK_ENABLED,a.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:ra})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",E.AUDIO_TRACKS())}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:H(this).querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){return ie(this,a.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){ne(this,a.MEDIA_AUDIO_TRACK_ENABLED,e)}}N.customElements.get("media-audio-track-menu-button")||N.customElements.define("media-audio-track-menu-button",oa);var la=oa;const da=U.createElement("template");da.innerHTML='\n  <style>\n    :host([aria-checked="true"]) slot[name=off] {\n      display: none !important;\n    }\n\n    \n    :host(:not([aria-checked="true"])) slot[name=on] {\n      display: none !important;\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';const ca=e=>{e.setAttribute("aria-checked",tt(e))};class ha extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_SUBTITLES_LIST,a.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:da,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",E.CLOSED_CAPTIONS()),ca(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_SUBTITLES_SHOWING&&ca(this)}get mediaSubtitlesList(){return ua(this,a.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ma(this,a.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ua(this,a.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ma(this,a.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new N.CustomEvent(e.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}const ua=(e,t)=>{const i=e.getAttribute(t);return i?je(i):[]},ma=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);const n=ze(i);e.getAttribute(t)!==n&&e.setAttribute(t,n)};N.customElements.get("media-captions-button")||N.customElements.define("media-captions-button",ha);var va,Ea,pa,ba,ga,Aa=ha,fa=Object.defineProperty,Ia=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ka=(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)},ya=(e,t,i)=>(Ia(e,t,"access private method"),i);const _a=U.createElement("template");
7_a.innerHTML=Hn.template.innerHTML+'\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>';class Ta extends Hn{constructor(){super(...arguments),ka(this,Ea),ka(this,ba),ka(this,va,void 0)}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_SUBTITLES_LIST,a.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_SUBTITLES_LIST&&t!==i?ya(this,Ea,pa).call(this):e===a.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ya(this,ba,ga))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ya(this,ba,ga))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:H(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return wa(this,a.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Sa(this,a.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return wa(this,a.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Sa(this,a.MEDIA_SUBTITLES_SHOWING,e)}}va=new WeakMap,Ea=new WeakSet,pa=function(){var e;if(((e,t,i)=>(Ia(e,t,"read from private field"),i?i.call(e):t.get(e)))(this,va)===JSON.stringify(this.mediaSubtitlesList))return;((e,t,i,n)=>{Ia(e,t,"write to private field"),n?n.call(e,i):t.set(e,i)})(this,va,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const t=!this.value,i=Nn({type:"radio",text:this.formatMenuItemText("Off"),value:"off",checked:t});i.prepend(Un(this,"checked-indicator")),this.defaultSlot.append(i);const n=this.mediaSubtitlesList;for(const t of n){const i=Nn({type:"radio",text:this.formatMenuItemText(t.label,t),value:Ze(t),checked:this.value==Ze(t)});i.prepend(Un(this,"checked-indicator"));"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(Un(this,"captions-indicator")),this.defaultSlot.append(i)}},ba=new WeakSet,ga=function(){const t=this.mediaSubtitlesShowing,i=this.getAttribute(a.MEDIA_SUBTITLES_SHOWING),n=this.value!==i;if((null==t?void 0:t.length)&&n&&this.dispatchEvent(new N.CustomEvent(e.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!n)return;const s=new N.CustomEvent(e.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(s)},((e,t,i)=>{((e,t,i)=>{t in e?fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i)})(Ta,"template",_a);const wa=(e,t)=>{const i=e.getAttribute(t);return i?je(i):[]},Sa=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);const n=ze(i);e.getAttribute(t)!==n&&e.setAttribute(t,n)};N.customElements.get("media-captions-menu")||N.customElements.define("media-captions-menu",Ta);var Ma=Ta;const La=U.createElement("template");La.innerHTML='\n  <style>\n    :host([aria-checked="true"]) slot[name=off] {\n      display: none !important;\n    }\n\n    \n    :host(:not([aria-checked="true"])) slot[name=on] {\n      display: none !important;\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 
70 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';const Ca=e=>{e.setAttribute("aria-checked",tt(e))};class Ra extends sa{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_SUBTITLES_LIST,a.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:La,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",E.CLOSED_CAPTIONS()),Ca(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_SUBTITLES_SHOWING&&Ca(this)}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:H(this).querySelector("media-captions-menu")}get mediaSubtitlesList(){return Da(this,a.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){xa(this,a.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Da(this,a.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){xa(this,a.MEDIA_SUBTITLES_SHOWING,e)}}const Da=(e,t)=>{const i=e.getAttribute(t);return i?je(i):[]},xa=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);const n=ze(i);e.getAttribute(t)!==n&&e.setAttribute(t,n)};N.customElements.get("media-captions-menu-button")||N.customElements.define("media-captions-menu-button",Ra);var Na=Ra;const Ua=U.createElement("template");Ua.innerHTML=`\n  <style>\n  :host([${a.MEDIA_IS_CASTING}]) slot:not([name=exit]):not([name=icon]) {\n    display: none !important;\n  }\n\n  \n  :host(:not([${a.MEDIA_IS_CASTING}])) slot:not([name=enter]):not([name=icon]) {\n    display: none !important;\n  }\n  </style>\n\n  <slot name="icon">\n    <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>\n    <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>\n  </slot>\n`;const Pa=e=>
7{const t=e.mediaIsCasting?p.EXIT_CAST():p.ENTER_CAST();e.setAttribute("aria-label",t)};class Oa extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_IS_CASTING,a.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Ua,...e})}connectedCallback(){super.connectedCallback(),Pa(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_IS_CASTING&&Pa(this)}get mediaIsCasting(){return ee(this,a.MEDIA_IS_CASTING)}set mediaIsCasting(e){te(this,a.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ie(this,a.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){ne(this,a.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const t=this.mediaIsCasting?e.MEDIA_EXIT_CAST_REQUEST:e.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new N.CustomEvent(t,{composed:!0,bubbles:!0}))}}N.customElements.get("media-cast-button")||N.customElements.define("media-cast-button",Oa);var Wa,Ba,Va,Ha,$a,Ga,Ka,qa,Fa,Qa,ja,Ya,Za=Oa,za=Object.defineProperty,Xa=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Ja=(e,t,i)=>(Xa(e,t,"read from private field"),i?i.call(e):t.get(e)),es=(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)},ts=(e,t,i,n)=>(Xa(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),is=(e,t,i)=>(Xa(e,t,"access private method"),i);const ns=U.createElement("template");
7ns.innerHTML="\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      background: var(--media-dialog-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .8))));\n      border-radius: var(--media-dialog-border-radius);\n      border: var(--media-dialog-border, none);\n      display: var(--media-dialog-display, inline-flex);\n      transition: var(--media-dialog-transition-in,\n        visibility 0s,\n        opacity .2s ease-out,\n        transform .15s ease-out\n      ) !important;\n      \n      visibility: var(--media-dialog-visibility, visible);\n      opacity: var(--media-dialog-opacity, 1);\n      transform: var(--media-dialog-transform-in, translateY(0) scale(1));\n    }\n\n    :host([hidden]) {\n      transition: var(--media-dialog-transition-out,\n        visibility .15s ease-in,\n        opacity .15s ease-in,\n        transform .15s ease-in\n      ) !important;\n      visibility: var(--media-dialog-hidden-visibility, hidden);\n      opacity: var(--media-dialog-hidden-opacity, 0);\n      transform: var(--media-dialog-transform-out, translateY(2px) scale(.99));\n      pointer-events: none;\n    }\n  </style>\n  <slot></slot>\n";const as="hidden",ss="anchor";class rs extends N.HTMLElement{constructor(){super(),es(this,Va),es(this,$a),es(this,Ka),es(this,Fa),es(this,ja),es(this,Wa,void 0),es(this,Ba,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[as,ss]}handleEvent(e){switch(e.type){case"invoke":is(this,Ka,qa).call(this,e);break;case"focusout":is(this,Fa,Qa).call(this,e);break;case"keydown":is(this,ja,Ya).call(this,e)}}connectedCallback(){this.role||(this.role="dialog")}attributeChangedCallback(e,t,i){e===as&&i!==t&&(this.hidden?is(this,$a,Ga).call(this):is(this,Va,Ha).call(this))}focus(){ts(this,Wa,Q());const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}get keysUsed(){return["Escape","Tab"]}}Wa=new WeakMap,Ba=new WeakMap,Va=new WeakSet,Ha=function(){var e;null==(e=Ja(this,Ba))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",(()=>this.focus()),{once:!0})},$a=new WeakSet,Ga=function(){var e;null==(e=Ja(this,Ba))||e.setAttribute("aria-expanded","false")},Ka=new WeakSet,qa=function(e){ts(this,Ba,e.relatedTarget),q(this,e.relatedTarget)||(this.hidden=!this.hidden)},Fa=new WeakSet,Qa=function(e){var t;q(this,e.relatedTarget)||(null==(t=Ja(this,Wa))||t.focus(),Ja(this,Ba)&&Ja(this,Ba)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},ja=new WeakSet,Ya=function(e){var t,i,n,a,s;const{key:r,ctrlKey:o,altKey:l,metaKey:d}=e;o||l||d||this.keysUsed.includes(r)&&(e.preventDefault(),e.stopPropagation(),"Tab"===r?(e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(a=null==(n=this.nextElementSibling)?void 0:n.focus)||a.call(n),this.blur()):"Escape"===r&&(null==(s=Ja(this,Wa))||s.focus(),this.hidden=!0))},((e,t,i)=>{((e,t,i)=>{t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i)})(rs,"template",ns),N.customElements.get("media-chrome-dialog")||N.customElements.define("media-chrome-dialog",rs);var os,ls,ds,cs,hs,us,ms,vs,Es,ps,bs,gs,As,fs,Is,ks=rs,ys=Object.defineProperty,_s=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Ts=(e,t,i)=>(_s(e,t,"read from private field"),i?i.call(e):t.get(e)),ws=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},Ss=(e,t,i,n)=>(_s(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),Ms=(e,t,i)=>(_s(e,t,"access private method"),i);const Ls=U.createElement("template");Ls.innerHTML='\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: 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: 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    }
7\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"></slot>\n  <slot name="submenu"></slot>\n';const Cs="type",Rs="value",Ds="checked",xs="disabled";class Ns extends N.HTMLElement{constructor(){super(),ws(this,ds),ws(this,hs),ws(this,ms),ws(this,ps),ws(this,gs),ws(this,fs),ws(this,os,!1),ws(this,ls,void 0),ws(this,Es,(()=>{var e,t;this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const i=this.shadowRoot.querySelector('slot[name="description"]'),n=null==(t=null==(e=this.submenuElement.checkedItems)?void 0:e[0])?void 0:t.text,a=U.createElement("span");a.textContent=null!=n?n:"",i.replaceChildren(a)})),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))),this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[Cs,xs,Ds,Rs]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),Us(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":Ms(this,ds,cs).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":Ms(this,gs,As).call(this,e);break;case"keyup":Ms(this,ps,bs).call(this,e)}}attributeChangedCallback(e,t,i){e===Ds&&Us(this)&&!Ts(this,os)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===Cs&&i!==t?this.role="menuitem"+i:e===xs&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(xs)||this.enable(),this.role="menuitem"+this.type,Ss(this,ls,Ps(this,this.parentNode)),Ms(this,fs,Is).call(this)}disconnectedCallback(){this.disable(),Ms(this,fs,Is).call(this),Ss(this,ls,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=j(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(Cs))?e:""}set type(e){this.setAttribute(Cs,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(Rs))?e:this.text}set value(e){this.setAttribute(Rs,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(Us(this))return"true"===this.getAttribute("aria-checked")}set checked(e){Us(this)&&(Ss(this,os,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){Us(this)||this.invokeTargetElement&&q(this,e.target)&&this.invokeTargetElement.dispatchEvent(new Ni({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function Us(e){return"radio"===e.type||"checkbox"===e.type}function Ps(e,t){if(!e)return null;const{host:i}=e.getRootNode();return!t&&i?Ps(e,i):(null==t?void 0:t.items)?t:Ps(t,null==t?void 0:t.parentNode)}os=new WeakMap,ls=new WeakMap,ds=new WeakSet,cs=function(e){const 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?Ms(this,hs,us).call(this):Ms(this,ms,vs).call(this))},hs=new WeakSet,us=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Ts(this,Es)),this.submenuElement.addEventListener("addmenuitem",Ts(this,Es)),this.submenuElement.addEventListener("removemenuitem",Ts(this,Es)),Ts(this,Es).call(this)},ms=new WeakSet,vs=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Ts(this,Es)),this.submenuElement.removeEventListener("addmenuitem",Ts(this,Es)),this.submenuElement.removeEventListener("removemenuitem",Ts(this,Es)),Ts(this,Es).call(this)},Es=new WeakMap,ps=new WeakSet,bs=function(e){const{key:t}=e;this.keysUsed.includes(t)?this.handleClick(e):this.removeEventListener("keyup",Ms(this,ps,bs))},gs=new WeakSet,As=function(e){const{metaKey:t,altKey:i,key:n}=e;t||i||!this.keysUsed.includes(n)?this.removeEventListener("keyup",Ms(this,ps,bs)):this.addEventListener("keyup",Ms(this,ps,bs),{once:!0})},fs=new WeakSet,Is=function(){var e;const t=null==(e=Ts(this,ls))?void 0:e.radioGroupItems;if(!t)return;let i=t.filter((e=>"true"===e.getAttribute("aria-checked"))).pop();i||(i=t[0]);
7for(const e of t)e.setAttribute("aria-checked","false");null==i||i.setAttribute("aria-checked","true")},((e,t,i)=>{((e,t,i)=>{t in e?ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i)})(Ns,"template",Ls),N.customElements.get("media-chrome-menu-item")||N.customElements.define("media-chrome-menu-item",Ns);var Os,Ws,Bs,Vs,Hs,$s,Gs,Ks,qs,Fs,Qs,js,Ys,Zs,zs,Xs,Js,er,tr,ir,nr,ar,sr,rr,or,lr=Ns,dr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},cr=(e,t,i)=>(dr(e,t,"read from private field"),i?i.call(e):t.get(e)),hr=(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)},ur=(e,t,i,n)=>(dr(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),mr=(e,t,i)=>(dr(e,t,"access private method"),i);const vr=U.createElement("template");vr.innerHTML='\n  <style>\n    :host {\n      --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n      --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));\n\n      box-shadow: var(--_focus-visible-box-shadow, none);\n      background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n      height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));\n      display: inline-flex;\n      align-items: center;\n      \n      vertical-align: middle;\n      box-sizing: border-box;\n      position: relative;\n      width: 100px;\n      transition: background .15s linear;\n      cursor: pointer;\n      pointer-events: auto;\n      touch-action: none; \n      z-index: 1; \n    }\n\n    \n    input[type=range]:focus {\n      outline: 0;\n    }\n    input[type=range]:focus::-webkit-slider-runnable-track {\n      outline: 0;\n    }\n\n    :host(:hover) {\n      background: var(--media-control-hover-background, rgb(50 50 70 / .7));\n    }\n\n    #leftgap {\n      padding-left: var(--media-range-padding-left, var(--_media-range-padding));\n    }\n\n    #rightgap {\n      padding-right: var(--media-range-padding-right, var(--_media-range-padding));\n    }\n\n    #startpoint,\n    #endpoint {\n      position: absolute;\n    }\n\n    #endpoint {\n      right: 0;\n    }\n\n    #container {\n      \n      width: var(--media-range-track-width, 100%);\n      transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));\n      position: relative;\n      height: 100%;\n      display: flex;\n      align-items: center;\n      min-width: 40px;\n    }\n\n    #range {\n      \n      display: var(--media-time-range-hover-display, block);\n      bottom: var(--media-time-range-hover-bottom, -7px);\n      height: var(--media-time-range-hover-height, max(100% + 7px, 25px));\n      width: 100%;\n      position: absolute;\n      cursor: pointer;\n\n      -webkit-appearance: none; \n      -webkit-tap-highlight-color: transparent;\n      background: transparent; \n      margin: 0;\n      z-index: 1;\n    }\n\n    @media (hover: hover) {\n      #range {\n        bottom: var(--media-time-range-hover-bottom, -5px);\n        height: var(--media-time-range-hover-height, max(100% + 5px, 20px));\n      }\n    }\n\n    \n    \n    #range::-webkit-slider-thumb {\n      -webkit-appearance: none;\n      background: transparent;\n      width: .1px;\n      height: .1px;\n    }\n\n    \n    #range::-moz-range-thumb {\n      background: transparent;\n      border: transparent;\n      width: .1px;\n      height: .1px;\n    }\n\n    #appearance {\n      height: var(--media-range-track-height, 4px);\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      width: 100%;\n      position: absolute;\n      \n      will-change: transform;\n    }\n\n    #background,\n    #track {\n      border-radius: var(--media-range-track-border-radius, 1px);\n      position: absolute;\n      width: 100%;\n      height: 100%;\n    }\n\n    #background {\n      background: var(--media-range-track-background, rgb(255 255 255 / .2));\n      backdrop-filter: var(--media-range-track-background-backdrop-filter);\n      -webkit-backdrop-filter: var(--media-range-track-background-backdrop-filter);\n    }\n\n    #track {\n      border: var(--media-range-track-border, none);\n      outline: var(--media-range-track-outline);\n      outline-offset: var(--media-range-track-outline-offset);\n      backdrop-filter: var(--media-range-track-backdrop-filter);\n      -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
7\n      box-shadow: var(--media-range-track-box-shadow, none);\n      overflow: hidden;\n    }\n\n    #progress,\n    #highlight,\n    #pointer {\n      position: absolute;\n      height: 100%;\n      will-change: width;\n    }\n\n    #progress {\n      background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));\n      transition: var(--media-range-track-transition);\n    }\n\n    #pointer {\n      background: var(--media-range-track-pointer-background);\n      border-right: var(--media-range-track-pointer-border-right);\n      transition: visibility .25s, opacity .25s;\n      visibility: hidden;\n      opacity: 0;\n    }\n\n    @media (hover: hover) {\n      :host(:hover) #pointer {\n        transition: visibility .5s, opacity .5s;\n        visibility: visible;\n        opacity: 1;\n      }\n    }\n\n    #thumb {\n      width: var(--media-range-thumb-width, 10px);\n      height: var(--media-range-thumb-height, 10px);\n      margin-left: calc(var(--media-range-thumb-width, 10px) / -2);\n      border: var(--media-range-thumb-border, none);\n      border-radius: var(--media-range-thumb-border-radius, 10px);\n      background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));\n      box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);\n      transition: var(--media-range-thumb-transition);\n      transform: var(--media-range-thumb-transform, none);\n      opacity: var(--media-range-thumb-opacity, 1);\n      position: absolute;\n      left: 0;\n      cursor: pointer;\n    }\n\n    :host([disabled]) #thumb {\n      background-color: #777;\n    }\n\n    .segments #appearance {\n      height: var(--media-range-segment-hover-height, 7px);\n    }\n\n    #background,\n    #track {\n      clip-path: url(#segments-clipping);\n    }\n\n    #segments {\n      --segments-gap: var(--media-range-segments-gap, 2px);\n      position: absolute;\n      width: 100%;\n      height: 100%;\n    }\n\n    #segments-clipping {\n      transform: translateX(calc(var(--segments-gap) / 2));\n    }\n\n    #segments-clipping:empty {\n      display: none;\n    }\n\n    #segments-clipping rect {\n      height: var(--media-range-track-height, 4px);\n      y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);\n      transition: var(--media-range-segment-transition, transform .1s ease-in-out);\n      transform: var(--media-range-segment-transform, scaleY(1));\n      transform-origin: center;\n    }\n  </style>\n  <div id="leftgap"></div>\n  <div id="container">\n    <div id="startpoint"></div>\n    <div id="endpoint"></div>\n    <div id="appearance" part="appearance">\n      <div id="background"></div>\n      <div id="track">\n        <div id="highlight"></div>\n        <div id="pointer"></div>\n        <div id="progress"></div>\n      </div>\n      <div id="thumb"></div>\n      <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>\n    </div>
7\n    <input id="range" type="range" min="0" max="1" step="any" value="0">\n  </div>\n  <div id="rightgap"></div>\n';class Er extends N.HTMLElement{constructor(){super(),hr(this,Fs),hr(this,js),hr(this,Zs),hr(this,Xs),hr(this,er),hr(this,ir),hr(this,ar),hr(this,rr),hr(this,Os,void 0),hr(this,Ws,void 0),hr(this,Bs,void 0),hr(this,Vs,void 0),hr(this,Hs,{}),hr(this,$s,[]),hr(this,Gs,(()=>{if(this.range.matches(":focus-visible")){const{style:e}=Z(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}})),hr(this,Ks,(()=>{const{style:e}=Z(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")})),hr(this,qs,(()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)})),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(vr.content.cloneNode(!0))),this.container=this.shadowRoot.querySelector("#container"),ur(this,Bs,this.shadowRoot.querySelector("#startpoint")),ur(this,Vs,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",t.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,n){var a,s,r,o,l;e===t.MEDIA_CONTROLLER?(i&&(null==(s=null==(a=cr(this,Os))?void 0:a.unassociateElement)||s.call(a,this),ur(this,Os,null)),n&&this.isConnected&&(ur(this,Os,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(l=null==(o=cr(this,Os))?void 0:o.associateElement)||l.call(o,this))):("disabled"===e||"aria-disabled"===e&&i!==n)&&(null==n?(this.range.removeAttribute(e),mr(this,js,Ys).call(this)):(this.range.setAttribute(e,n),mr(this,Zs,zs).call(this)))}connectedCallback(){var e,i,n;const{style:a}=Z(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),cr(this,Hs).pointer=Z(this.shadowRoot,"#pointer"),cr(this,Hs).progress=Z(this.shadowRoot,"#progress"),cr(this,Hs).thumb=Z(this.shadowRoot,"#thumb");const s=this.getAttribute(t.MEDIA_CONTROLLER);s&&(ur(this,Os,null==(e=this.getRootNode())?void 0:e.getElementById(s)),null==(n=null==(i=cr(this,Os))?void 0:i.associateElement)||n.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",cr(this,Gs)),this.shadowRoot.addEventListener("focusout",cr(this,Ks)),mr(this,js,Ys).call(this),B(this.container,cr(this,qs))}disconnectedCallback(){var e,t;mr(this,Zs,zs).call(this),null==(t=null==(e=cr(this,Os))?void 0:e.unassociateElement)||t.call(e,this),ur(this,Os,null),this.shadowRoot.removeEventListener("focusin",cr(this,Gs)),this.shadowRoot.removeEventListener("focusout",cr(this,Ks)),V(this.container,cr(this,qs))}updatePointerBar(e){var t;null==(t=cr(this,Hs).pointer)||t.style.setProperty("width",100*this.getPointerRatio(e)+"%")}updateBar(){var e,t;const i=100*this.range.valueAsNumber;null==(e=cr(this,Hs).progress)||e.style.setProperty("width",`${i}%`),null==(t=cr(this,Hs).thumb)||t.style.setProperty("left",`${i}%`)}updateSegments(e){const 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;cr(this,Hs).activeSegment=z(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const i=[...new Set([+this.range.min,...e.flatMap((e=>[e.start,e.end])),+this.range.max])];ur(this,$s,[...i]);const n=i.pop();for(const[e,a]of i.entries()){const[s,r]=[0===e,e===i.length-1],o=s?"calc(var(--segments-gap) / -1)":100*a+"%",l=`calc(${100*((r?n:i[e+1])-a)}%${s||r?"":" - var(--segments-gap)"})`,d=U.createElementNS("http://www.w3.org/2000/svg","rect"),c=Z(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);c.style.setProperty("x",o),c.style.setProperty("width",l),t.append(d)}}getPointerRatio(e){let t=function(e,t,i,n){const a=Y(i,n),s=Y(i,{x:e,y:t}),r=Y(n,{x:e,y:t});return s>a||r>a?s>r?1:0:s/a}(e.clientX,e.clientY,cr(this,Bs).getBoundingClientRect(),cr(this,Vs).getBoundingClientRect());return Math.max(0,Math.min(1,t))}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":mr(this,rr,or).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":mr(this,er,tr).call(this,e);break;case"pointerdown":mr(this,Xs,Js).call(this,e);break;case"pointerup":mr(this,ir,nr).call(this);break;case"pointerleave":mr(this,ar,sr).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}Os=new WeakMap,Ws=new WeakMap,Bs=new WeakMap,Vs=new WeakMap,Hs=new WeakMap,$s=new WeakMap,Gs=new WeakMap,Ks=new WeakMap,qs=new WeakMap,Fs=new WeakSet,Qs=function(e){const t=cr(this,Hs).activeSegment;if(!t)return;const i=this.getPointerRatio(e),n=`#segments-clipping rect:nth-child(${cr(this,$s).findIndex(((e,t,n)=>{const a=n[t+1];return null!=a&&i>=e&&i<=a}))+1})`;t.selectorText==n&&t.style.transform||(t.selectorText=n,t.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},js=new WeakSet,Ys=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},Zs=new WeakSet,zs=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),null==(e=N.window)||e.removeEventListener("pointerup",this),null==(t=N.window)||t.removeEventListener("pointermove",this)},Xs=new WeakSet,Js=function(e){var t;ur(this,Ws,e.composedPath().includes(this.range)),null==(t=N.window)||t.addEventListener("pointerup",this)},er=new WeakSet,tr=function(e){var t;"mouse"!==e.pointerType&&mr(this,Xs,Js).call(this,e),this.addEventListener("pointerleave",this),null==(t=N.window)||t.addEventListener("pointermove",this)},ir=new WeakSet,nr=function(){var e;null==(e=N.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},ar=new WeakSet,sr=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=N.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=cr(this,Hs).activeSegment)||t.style.removeProperty("transform")},rr=new WeakSet,or=function(e){this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),mr(this,Fs,Qs).call(this,e),!this.dragging||"mouse"===e.pointerType&&cr(this,Ws)||(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))},N.customElements.get("media-chrome-range")||N.customElements.define("media-chrome-range",Er);var pr,br=Er,gr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Ar=(e,t,i)=>(gr(e,t,"read from private field"),i?i.call(e):t.get(e)),fr=(e,t,i,n)=>(gr(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);const Ir=U.createElement("template");
7Ir.innerHTML="\n  <style>\n    :host {\n      \n      box-sizing: border-box;\n      display: var(--media-control-display, var(--media-control-bar-display, inline-flex));\n      color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n      --media-loading-indicator-icon-height: 44px;\n    }\n\n    ::slotted(media-time-range),\n    ::slotted(media-volume-range) {\n      min-height: 100%;\n    }\n\n    ::slotted(media-time-range),\n    ::slotted(media-clip-selector) {\n      flex-grow: 1;\n    }\n  </style>\n\n  <slot></slot>\n";class kr extends N.HTMLElement{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,pr,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ir.content.cloneNode(!0)))}static get observedAttributes(){return[t.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,n){var a,s,r,o,l;e===t.MEDIA_CONTROLLER&&(i&&(null==(s=null==(a=Ar(this,pr))?void 0:a.unassociateElement)||s.call(a,this),fr(this,pr,null)),n&&this.isConnected&&(fr(this,pr,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(l=null==(o=Ar(this,pr))?void 0:o.associateElement)||l.call(o,this)))}connectedCallback(){var e,i,n;const a=this.getAttribute(t.MEDIA_CONTROLLER);a&&(fr(this,pr,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(i=Ar(this,pr))?void 0:i.associateElement)||n.call(i,this))}disconnectedCallback(){var e,t;null==(t=null==(e=Ar(this,pr))?void 0:e.unassociateElement)||t.call(e,this),fr(this,pr,null)}}pr=new WeakMap,N.customElements.get("media-control-bar")||N.customElements.define("media-control-bar",kr);var yr,_r=kr,Tr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},wr=(e,t,i)=>(Tr(e,t,"read from private field"),i?i.call(e):t.get(e)),Sr=(e,t,i,n)=>(Tr(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);const Mr=U.createElement("template");
7Mr.innerHTML="\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      background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));\n      padding: var(--media-control-padding, 10px);\n      display: inline-flex;\n      justify-content: center;\n      align-items: center;\n      vertical-align: middle;\n      box-sizing: border-box;\n      text-align: center;\n      pointer-events: auto;\n    }\n\n    \n    :host(:focus-visible) {\n      box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);\n      outline: 0;\n    }\n\n    \n    :host(:where(:focus)) {\n      box-shadow: none;\n      outline: 0;\n    }\n  </style>\n  <slot></slot>\n";class Lr extends N.HTMLElement{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,yr,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Mr.content.cloneNode(!0)))}static get observedAttributes(){return[t.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,n){var a,s,r,o,l;e===t.MEDIA_CONTROLLER&&(i&&(null==(s=null==(a=wr(this,yr))?void 0:a.unassociateElement)||s.call(a,this),Sr(this,yr,null)),n&&this.isConnected&&(Sr(this,yr,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(l=null==(o=wr(this,yr))?void 0:o.associateElement)||l.call(o,this)))}connectedCallback(){var e,i,n;const{style:a}=Z(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const s=this.getAttribute(t.MEDIA_CONTROLLER);s&&(Sr(this,yr,null==(e=this.getRootNode())?void 0:e.getElementById(s)),null==(n=null==(i=wr(this,yr))?void 0:i.associateElement)||n.call(i,this))}disconnectedCallback(){var e,t;null==(t=null==(e=wr(this,yr))?void 0:e.unassociateElement)||t.call(e,this),Sr(this,yr,null)}}yr=new WeakMap,N.customElements.get("media-text-display")||N.customElements.define("media-text-display",Lr);var Cr,Rr=Lr,Dr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},xr=(e,t,i)=>(Dr(e,t,"read from private field"),i?i.call(e):t.get(e));class Nr extends Lr{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,Cr,void 0),((e,t,i,n)=>{Dr(e,t,"write to private field"),n?n.call(e,i):t.set(e,i)})(this,Cr,this.shadowRoot.querySelector("slot")),xr(this,Cr).textContent=T(0)}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===a.MEDIA_DURATION&&(xr(this,Cr).textContent=T(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return X(this,a.MEDIA_DURATION)}set mediaDuration(e){J(this,a.MEDIA_DURATION,e)}}Cr=new WeakMap,N.customElements.get("media-duration-display")||N.customElements.define("media-duration-display",Nr);var Ur=Nr;const Pr=U.createElement("template");Pr.innerHTML=`\n  <style>\n  :host([${a.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]):not([name=icon]) {\n    display: none !important;\n  }\n\n  \n  :host(:not([${a.MEDIA_IS_FULLSCREEN}])) slot:not([name=enter]):not([name=icon]) {\n    display: none !important;\n  }\n  </style>\n\n  <slot name="icon">\n    <slot name="enter"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>\n</svg></slot>\n    <slot name="exit"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>\n</svg></slot>\n  </slot>\n`;const Or=e=>{const t=e.mediaIsFullscreen?p.EXIT_FULLSCREEN():p.ENTER_FULLSCREEN();e.setAttribute("aria-label",t)};class Wr extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_IS_FULLSCREEN,a.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:Pr,...e})}connectedCallback(){super.connectedCallback(),Or(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_IS_FULLSCREEN&&Or(this)}get mediaFullscreenUnavailable(){return ie(this,a.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){ne(this,a.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return ee(this,a.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){te(this,a.MEDIA_IS_FULLSCREEN,e)}handleClick(){const t=this.mediaIsFullscreen?e.MEDIA_EXIT_FULLSCREEN_REQUEST:e.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new N.CustomEvent(t,{composed:!0,bubbles:!0}))}}N.customElements.get("media-fullscreen-button")||N.customElements.define("media-fullscreen-button",Wr);var Br=Wr;const{MEDIA_TIME_IS_LIVE:Vr,MEDIA_PAUSED:Hr}=a,{MEDIA_SEEK_TO_LIVE_REQUEST:$r,MEDIA_PLAY_REQUEST:Gr}=e,Kr=U.createElement("template");Kr.innerHTML=`\n  <style>\n\n  slot[name=indicator] > *,\n  :host ::slotted([slot=indicator]) {\n    \n    min-width: auto;\n    fill: var(--media-live-button-icon-color, rgb(140, 140, 140));\n    color: var(--media-live-button-icon-color, rgb(140, 140, 140));\n  }\n\n  :host([${Vr}]:not([${Hr}])) slot[name=indicator] > *,\n  :host([${Vr}]:not([${Hr}])) ::slotted([slot=indicator]) {\n    fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n    color: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n  }\n\n  :host([${Vr}]:not([${Hr}
7])) {\n    cursor: not-allowed;\n  }\n\n  </style>\n\n  <slot name="indicator"><svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg></slot>\n  \n  <slot name="spacer">&nbsp;</slot><slot name="text">LIVE</slot>\n`;const qr=e=>{const t=e.mediaPaused||!e.mediaTimeIsLive,i=t?p.SEEK_LIVE():p.PLAYING_LIVE();e.setAttribute("aria-label",i),t?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class Fr extends ki{static get observedAttributes(){return[...super.observedAttributes,Hr,Vr]}constructor(e={}){super({slotTemplate:Kr,...e})}connectedCallback(){qr(this),super.connectedCallback()}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),qr(this)}get mediaPaused(){return ee(this,a.MEDIA_PAUSED)}set mediaPaused(e){te(this,a.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return ee(this,a.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){te(this,a.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new N.CustomEvent($r,{composed:!0,bubbles:!0})),this.hasAttribute(Hr)&&this.dispatchEvent(new N.CustomEvent(Gr,{composed:!0,bubbles:!0})))}}N.customElements.get("media-live-button")||N.customElements.define("media-live-button",Fr);var Qr,jr,Yr=Fr,Zr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},zr=(e,t,i)=>(Zr(e,t,"read from private field"),i?i.call(e):t.get(e)),Xr=(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)},Jr=(e,t,i,n)=>(Zr(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);const eo="loadingdelay",to=U.createElement("template");to.innerHTML=`\n<style>\n:host {\n  display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));\n  vertical-align: middle;\n  box-sizing: border-box;\n  --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms);\n}\n\n#status {\n  color: rgba(0,0,0,0);\n  width: 0px;\n  height: 0px;\n}\n\n:host slot[name=icon] > *,\n:host ::slotted([slot=icon]) {\n  opacity: var(--media-loading-indicator-opacity, 0);\n  transition: opacity 0.15s;\n}\n\n:host([${a.MEDIA_LOADING}]:not([${a.MEDIA_PAUSED}])) slot[name=icon] > *,\n:host([${a.MEDIA_LOADING}]:not([${a.MEDIA_PAUSED}])) ::slotted([slot=icon]) {\n  opacity: var(--media-loading-indicator-opacity, 1);\n  transition: opacity 0.15s var(--_loading-indicator-delay);\n}\n\n:host #status {\n  visibility: var(--media-loading-indicator-opacity, hidden);\n  transition: visibility 0.15s;\n}\n\n:host([${a.MEDIA_LOADING}]:not([${a.MEDIA_PAUSED}])) #status {\n  visibility: var(--media-loading-indicator-opacity, visible);\n  transition: visibility 0.15s var(--_loading-indicator-delay);\n}\n\nsvg, img, ::slotted(svg), ::slotted(img) {\n  width: var(--media-loading-indicator-icon-width);\n  height: var(--media-loading-indicator-icon-height, 100px);\n  fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n  vertical-align: middle;\n}\n</style>\n\n<slot name="icon">\n<svg aria-hidden="true" viewBox="0 0 100 100">\n  <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">\n    <animateTransform\n       attributeName="transform"\n       attributeType="XML"\n       type="rotate"\n       dur="1s"\n       from="0 50 50"\n       to="360 50 50"\n       repeatCount="indefinite" />\n  </path>\n</svg>\n</slot>\n<div id="status" role="status" aria-live="polite">${E.MEDIA_LOADING()}</div>\n`;class io extends N.HTMLElement{constructor(){if(super(),Xr(this,Qr,void 0),Xr(this,jr,500),!this.shadowRoot){const e=this.attachShadow({mode:"open"}),t=to.content.cloneNode(!0);e.appendChild(t)}}static get observedAttributes(){return[t.MEDIA_CONTROLLER,a.MEDIA_PAUSED,a.MEDIA_LOADING,eo]}attributeChangedCallback(e,i,n){var a,s,r,o,l;e===eo&&i!==n?this.loadingDelay=Number(n):e===t.MEDIA_CONTROLLER&&(i&&(null==(s=null==(a=zr(this,Qr))?void 0:a.unassociateElement)||s.call(a,this),Jr(this,Qr,null)),n&&this.isConnected&&(Jr(this,Qr,null==(r=this.getRootNode())?void 0:r.getElementById(n)),null==(l=null==(o=zr(this,Qr))?void 0:o.associateElement)||l.call(o,this)))}connectedCallback(){var e,i,n;const a=this.getAttribute(t.MEDIA_CONTROLLER);a&&(Jr(this,Qr,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(i=zr(this,Qr))?void 0:i.associateElement)||n.call(i,this))}disconnectedCallback(){var e,t;null==(t=null==(e=zr(this,Qr))?void 0:e.unassociateElement)||t.call(e,this),Jr(this,Qr,null)}get loadingDelay(){return zr(this,jr)}set loadingDelay(e){Jr(this,jr,e);const{style:t}=Z(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return ee(this,a.MEDIA_PAUSED)}set mediaPaused(e){te(this,a.MEDIA_PAUSED,e)}get mediaLoading(){return ee(this,a.MEDIA_LOADING)}set mediaLoading(e){te(this,a.MEDIA_LOADING,e)}}Qr=new WeakMap,jr=new WeakMap,N.customElements.get("media-loading-indicator")||N.customElements.define("media-loading-indicator",io);var no=io;const{MEDIA_VOLUME_LEVEL:ao}=a,so='<svg aria-hidden="true" viewBox="0 0 24 24">\n  <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"/>\n</svg>',ro=U.createElement("template");ro.innerHTML=`\n  <style>\n  \n  :host(:not([${ao}
7])) slot:not([name=high]):not([name=icon]), \n  :host([${ao}=high]) slot:not([name=high]):not([name=icon]) {\n    display: none !important;\n  }\n\n  :host([${ao}=off]) slot:not([name=off]):not([name=icon]) {\n    display: none !important;\n  }\n\n  :host([${ao}=low]) slot:not([name=low]):not([name=icon]) {\n    display: none !important;\n  }\n\n  :host([${ao}=medium]) slot:not([name=medium]):not([name=icon]) {\n    display: none !important;\n  }\n  </style>\n\n  <slot name="icon">\n    <slot name="off"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <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"/>\n</svg></slot>\n    <slot name="low">${so}</slot>\n    <slot name="medium">${so}</slot>\n    <slot name="high"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <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"/>\n</svg></slot>\n  </slot>\n`;const oo=e=>{const t="off"===e.mediaVolumeLevel?p.UNMUTE():p.MUTE();e.setAttribute("aria-label",t)};class lo extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:ro,...e})}connectedCallback(){oo(this),super.connectedCallback()}attributeChangedCallback(e,t,i){e===a.MEDIA_VOLUME_LEVEL&&oo(this),super.attributeChangedCallback(e,t,i)}get mediaVolumeLevel(){return ie(this,a.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){ne(this,a.MEDIA_VOLUME_LEVEL,e)}handleClick(){const t="off"===this.mediaVolumeLevel?e.MEDIA_UNMUTE_REQUEST:e.MEDIA_MUTE_REQUEST;this.dispatchEvent(new N.CustomEvent(t,{composed:!0,bubbles:!0}))}}N.customElements.get("media-mute-button")||N.customElements.define("media-mute-button",lo);var co=lo;const ho='<svg aria-hidden="true" viewBox="0 0 28 24">\n  <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"/>\n</svg>',uo=U.createElement("template");uo.innerHTML=`\n  <style>\n  :host([${a.MEDIA_IS_PIP}]) slot:not([name=exit]):not([name=icon]) {\n    display: none !important;\n  }\n\n  \n  :host(:not([${a.MEDIA_IS_PIP}])) slot:not([name=enter]):not([name=icon]) {\n    display: none !important;\n  }\n  </style>\n\n  <slot name="icon">\n    <slot name="enter">${ho}</slot>\n    <slot name="exit">${ho}</slot>\n  </slot>\n`;const mo=e=>{const t=e.mediaIsPip?p.EXIT_PIP():p.ENTER_PIP();e.setAttribute("aria-label",t)};class vo extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_IS_PIP,a.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:uo,...e})}connectedCallback(){mo(this),super.connectedCallback()}attributeChangedCallback(e,t,i){e===a.MEDIA_IS_PIP&&mo(this),super.attributeChangedCallback(e,t,i)}get mediaPipUnavailable(){return ie(this,a.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){ne(this,a.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return ee(this,a.MEDIA_IS_PIP)}set mediaIsPip(e){te(this,a.MEDIA_IS_PIP,e)}handleClick(){const t=this.mediaIsPip?e.MEDIA_EXIT_PIP_REQUEST:e.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new N.CustomEvent(t,{composed:!0,bubbles:!0}))}}N.customElements.get("media-pip-button")||N.customElements.define("media-pip-button",vo);var Eo,po=vo,bo=(e,t,i)=>(((e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)})(e,t,"read from private field"),i?i.call(e):t.get(e));const go="rates",Ao=[1,1.2,1.5,1.7,2],fo=U.createElement("template");fo.innerHTML='\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"></slot>\n';class Io extends ki{constructor(e={}){super({slotTemplate:fo,...e}),((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,Eo,new Fe(this,go,{defaultValue:Ao})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML="1x"}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_PLAYBACK_RATE,go]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===go&&(bo(this,Eo).value=i),e===a.MEDIA_PLAYBACK_RATE){const e=i?+i:Number.NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",E.PLAYBACK_RATE({playbackRate:t}))}}get rates(){return bo(this,Eo)}set rates(e){e?Array.isArray(e)&&(bo(this,Eo).value=e.join(" ")):bo(this,Eo).value=""}get mediaPlaybackRate(){return X(this,a.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){J(this,a.MEDIA_PLAYBACK_RATE,e)}handleClick(){var t,i;const n=Array.from(this.rates.values(),(e=>+e)).sort(((e,t)=>e-t)),a=null!=(i=null!=(t=n.find((e=>e>this.mediaPlaybackRate)))?t:n[0])?i:1,s=new N.CustomEvent(e.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(s)}}Eo=new WeakMap,N.customElements.get("media-playback-rate-button")||N.customElements.define("media-playback-rate-button",Io);var ko,yo,_o,To,wo,So=Io,Mo=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Lo=(e,t,i)=>(Mo(e,t,"read from private field"),i?i.call(e):t.get(e)),Co=(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)},Ro=(e,t,i)=>(Mo(e,t,"access private method"),i);const Do="rates";class xo extends Hn{constructor(){super(),Co(this,yo),Co(this,To),Co(this,ko,new Fe(this,Do,{defaultValue:Ao})),Ro(this,yo,_o).call(this)}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_PLAYBACK_RATE,Do]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_PLAYBACK_RATE&&t!=i?this.value=i:e===Do&&t!=i&&(Lo(this,ko).value=i,Ro(this,yo,_o).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ro(this,To,wo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ro(this,To,wo))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:H(this).querySelector("media-playback-rate-menu-button")}get rates(){return Lo(this,ko)}set rates(e){e?Array.isArray(e)&&(Lo(this,ko).value=e.join(" ")):Lo(this,ko).value="",Ro(this,yo,_o).call(this)}get mediaPlaybackRate(){return X(this,a.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){J(this,a.MEDIA_PLAYBACK_RATE,e)}}ko=new WeakMap,yo=new WeakSet,_o=function(){this.defaultSlot.textContent="";for(const e of this.rates){const t=Nn({type:"radio",text:this.formatMenuItemText(`${e}x`,e),value:e,checked:this.mediaPlaybackRate==e});t.prepend(Un(this,"checked-indicator")),this.defaultSlot.append(t)}},To=new WeakSet,wo=function(){if(!this.value)return;const t=new N.CustomEvent(e.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},N.customElements.get("media-playback-rate-menu")||N.customElements.define("media-playback-rate-menu",xo);var No,Uo=xo,Po=(e,t,i)=>(((e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)})(e,t,"read from private field"),i?i.call(e):t.get(e));const Oo="rates",Wo=[1,1.2,1.5,1.7,2],Bo=U.createElement("template");Bo.innerHTML='\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"></slot>\n';class Vo extends sa{constructor(e={}){super({slotTemplate:Bo,...e}),((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,No,new Fe(this,Oo,{defaultValue:Wo})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML="1x"}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_PLAYBACK_RATE,Oo]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===Oo&&(Po(this,No).value=i),e===a.MEDIA_PLAYBACK_RATE){const e=i?+i:Number.NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",E.PLAYBACK_RATE({playbackRate:t}))}}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:H(this).querySelector("media-playback-rate-menu")}get rates(){return Po(this,No)}set rates(e){e?Array.isArray(e)&&(Po(this,No).value=e.join(" ")):Po(this,No).value=""}get mediaPlaybackRate(){return X(this,a.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){J(this,a.MEDIA_PLAYBACK_RATE,e)}}No=new WeakMap,N.customElements.get("media-playback-rate-menu-button")||N.customElements.define("media-playback-rate-menu-button",Vo);var Ho=Vo;const $o=U.createElement("template");$o.innerHTML=`\n  <style>\n  :host([${a.MEDIA_PAUSED}]) slot[name=pause] {\n    display: none !important;\n  }\n\n  :host(:not([${a.MEDIA_PAUSED}])) slot[name=play] {\n    display: none !important;\n  }\n  </style>\n\n  <slot name="icon">\n    <slot name="play"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="m6 21 15-9L6 3v18Z"/>\n</svg></slot>\n    <slot name="pause"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>\n</svg></slot>\n  </slot>\n`;const Go=e=>{const t=e.mediaPaused?p.PLAY():p.PAUSE();e.setAttribute("aria-label",t)};class Ko extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_PAUSED,a.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:$o,...e})}connectedCallback(){Go(this),super.connectedCallback()}attributeChangedCallback(e,t,i){e===a.MEDIA_PAUSED&&Go(this),super.attributeChangedCallback(e,t,i)}get mediaPaused(){return ee(this,a.MEDIA_PAUSED)}set mediaPaused(e){te(this,a.MEDIA_PAUSED,e)}handleClick(){const t=this.mediaPaused?e.MEDIA_PLAY_REQUEST:e.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new N.CustomEvent(t,{composed:!0,bubbles:!0}))}}N.customElements.get("media-play-button")||N.customElements.define("media-play-button",Ko);var qo=Ko;const Fo="placeholdersrc",Qo="src",jo=U.createElement("template");jo.innerHTML='\n  <style>\n    :host {\n      pointer-events: none;\n      display: var(--media-poster-image-display, inline-block);\n      box-sizing: border-box;\n    }\n\n    img {\n      max-width: 100%;\n      max-height: 100%;\n      min-width: 100%;\n      min-height: 100%;\n      background-repeat: no-repeat;\n      background-position: var(--media-poster-image-background-position, var(--media-object-position, center));\n      background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));\n      object-fit: var(--media-object-fit, contain);\n      object-position: var(--media-object-position, center);\n    }\n  </style>\n\n  <img part="poster img" aria-hidden="true" id="image"/>\n';class Yo extends N.HTMLElement{static get observedAttributes(){return[Fo,Qo]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(jo.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){e===Qo&&(null==i?this.image.removeAttribute(Qo):this.image.setAttribute(Qo,i)),e===Fo&&(null==i?this.image.style.removeProperty("background-image"):((e,t)=>{e.style["background-image"]=`url('${t}')`})(this.image,i))}get placeholderSrc(){return ie(this,Fo)}set placeholderSrc(e){ne(this,Qo,e)}get src(){return ie(this,Qo)}set src(e){ne(this,Qo,e)}}N.customElements.get("media-poster-image")||N.customElements.define("media-poster-image",Yo);var Zo,zo=Yo,Xo=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class Jo extends Rr{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,Zo,void 0),((e,t,i,n)=>{Xo(e,t,"write to private field"),n?n.call(e,i):t.set(e,i)})(this,Zo,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_PREVIEW_CHAPTER]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_PREVIEW_CHAPTER&&i!==t&&null!=i&&(((e,t,i)=>(Xo(e,t,"read from private field"),i?i.call(e):t.get(e)))(this,Zo).textContent=i,""!==i?this.setAttribute("aria-valuetext",`chapter: ${i}`):this.removeAttribute("aria-valuetext"))}get mediaPreviewChapter(){return ie(this,a.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){ne(this,a.MEDIA_PREVIEW_CHAPTER,e)}}Zo=new WeakMap,N.customElements.get("media-preview-chapter-display")||N.customElements.define("media-preview-chapter-display",Jo);var el,tl=Jo,il=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nl=(e,t,i)=>(il(e,t,"read from private field"),i?i.call(e):t.get(e)),al=(e,t,i,n)=>(il(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);const sl=U.createElement("template");sl.innerHTML='\n  <style>\n    :host {\n      box-sizing: border-box;\n      display: var(--media-control-display, var(--media-preview-thumbn
7ail-display, inline-block));\n      overflow: hidden;\n    }\n\n    img {\n      display: none;\n      position: relative;\n    }\n  </style>\n  <img crossorigin loading="eager" decoding="async">\n';class rl extends N.HTMLElement{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,el,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(sl.content.cloneNode(!0)))}static get observedAttributes(){return[t.MEDIA_CONTROLLER,a.MEDIA_PREVIEW_IMAGE,a.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,n;const a=this.getAttribute(t.MEDIA_CONTROLLER);a&&(al(this,el,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(n=null==(i=nl(this,el))?void 0:i.associateElement)||n.call(i,this))}disconnectedCallback(){var e,t;null==(t=null==(e=nl(this,el))?void 0:e.unassociateElement)||t.call(e,this),al(this,el,null)}attributeChangedCallback(e,i,n){var s,r,o,l,d;[a.MEDIA_PREVIEW_IMAGE,a.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===t.MEDIA_CONTROLLER&&(i&&(null==(r=null==(s=nl(this,el))?void 0:s.unassociateElement)||r.call(s,this),al(this,el,null)),n&&this.isConnected&&(al(this,el,null==(o=this.getRootNode())?void 0:o.getElementById(n)),null==(d=null==(l=nl(this,el))?void 0:l.associateElement)||d.call(l,this)))}get mediaPreviewImage(){return ie(this,a.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ne(this,a.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(a.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map((e=>+e))}set mediaPreviewCoords(e){e?this.setAttribute(a.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(a.MEDIA_PREVIEW_COORDS)}update(){const e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!e||!t)return;const[i,n,a,s]=e,r=t.split("#")[0],o=getComputedStyle(this),{maxWidth:l,maxHeight:d,minWidth:c,minHeight:h}=o,u=Math.min(parseInt(l)/a,parseInt(d)/s),m=Math.max(parseInt(c)/a,parseInt(h)/s),v=u<1,E=v?u:m>1?m:1,{style:p}=Z(this.shadowRoot,":host"),b=Z(this.shadowRoot,"img").style,g=this.shadowRoot.querySelector("img"),A=v?"min":"max";p.setProperty(`${A}-width`,"initial","important"),p.setProperty(`${A}-height`,"initial","important"),p.width=a*E+"px",p.height=s*E+"px";const f=()=>{b.width=this.imgWidth*E+"px",b.height=this.imgHeight*E+"px",b.display="block"};g.src!==r&&(g.onload=()=>{this.imgWidth=g.naturalWidth,this.imgHeight=g.naturalHeight,f()},g.src=r,f()),f(),b.transform=`translate(-${i*E}px, -${n*E}px)`}}el=new WeakMap,N.customElements.get("media-preview-thumbnail")||N.customElements.define("media-preview-thumbnail",rl);var ol,ll=rl,dl=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},cl=(e,t,i)=>(dl(e,t,"read from private field"),i?i.call(e):t.get(e));class hl extends Lr{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,ol,void 0),((e,t,i,n)=>{dl(e,t,"write to private field"),n?n.call(e,i):t.set(e,i)})(this,ol,this.shadowRoot.querySelector("slot")),cl(this,ol).textContent=T(0)}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===a.MEDIA_PREVIEW_TIME&&null!=i&&(cl(this,ol).textContent=T(i))}get mediaPreviewTime(){return X(this,a.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){J(this,a.MEDIA_PREVIEW_TIME,e)}}ol=new WeakMap,N.customElements.get("media-preview-time-display")||N.customElements.define("media-preview-time-display",hl);var ul,ml,vl,El,pl,bl,gl=hl,Al=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},fl=(e,t,i)=>(Al(e,t,"read from private field"),i?i.call(e):t.get(e)),Il=(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)},kl=(e,t,i,n)=>(Al(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),yl=(e,t,i)=>(Al(e,t,"access private method"),i);class _l extends Hn{constructor(){super(...arguments),Il(this,vl),Il(this,pl),Il(this,ul,[]),Il(this,ml,void 0)}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_RENDITION_LIST,a.MEDIA_RENDITION_SELECTED,a.MEDIA_RENDITION_UNAVAILABLE]}attributeChangedCallback(e,t,i){var n;super.attributeChangedCallback(e,t,i),e===a.MEDIA_RENDITION_SELECTED&&t!==i?this.value=null!=i?i:"auto":e===a.MEDIA_RENDITION_LIST&&t!==i&&(kl(this,ul,null==(n=i)?void 0:n.split(/\s+/).map(A)),yl(this,vl,El).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",yl(this,pl,bl))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",yl(this,pl,bl))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:H(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return fl(this,ul)}set mediaRenditionList(e){kl(this,ul,e),yl(this,vl,El).call(this)}get mediaRenditionSelected(){return ie(this,a.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ne(this,a.MEDIA_RENDITION_SELECTED,e)}}ul=new WeakMap,ml=new WeakMap,vl=new WeakSet,El=function(){if(fl(this,ml)===JSON.stringify(this.mediaRenditionList))return;kl(this,ml,JSON.stringify(this.mediaRenditionList));const e=this.mediaRenditionList.sort(((e,t)=>t.height-e.height));this.defaultSlot.textContent="";let t=!this.mediaRenditionSelected;for(const i of e){const e=Nn({type:"radio",text:this.formatMenuItemText(`${Math.min(i.width,i.height)}p`,i),value:`${i.id}`,checked:i.selected&&!t});
7e.prepend(Un(this,"checked-indicator")),this.defaultSlot.append(e)}const i=Nn({type:"radio",text:this.formatMenuItemText("Auto"),value:"auto",checked:t});i.prepend(Un(this,"checked-indicator")),this.defaultSlot.append(i)},pl=new WeakSet,bl=function(){if(null==this.value)return;const t=new N.CustomEvent(e.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)},N.customElements.get("media-rendition-menu")||N.customElements.define("media-rendition-menu",_l);var Tl=_l;const wl=U.createElement("template");wl.innerHTML='\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';class Sl extends sa{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_RENDITION_SELECTED,a.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:wl})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",E.QUALITY())}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:H(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ie(this,a.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ne(this,a.MEDIA_RENDITION_SELECTED,e)}}N.customElements.get("media-rendition-menu-button")||N.customElements.define("media-rendition-menu-button",Sl);var Ml=Sl;const Ll="seekoffset",Cl=U.createElement("template");Cl.innerHTML='\n  <slot name="icon"><svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">30</text><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"/></svg></slot>\n';class Rl extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_CURRENT_TIME,Ll]}constructor(e={}){super({slotTemplate:Cl,...e})}connectedCallback(){this.seekOffset=X(this,Ll,30),super.connectedCallback()}attributeChangedCallback(e,t,i){e===Ll&&(this.seekOffset=X(this,Ll,30)),super.attributeChangedCallback(e,t,i)}get seekOffset(){return X(this,Ll,30)}set seekOffset(e){J(this,Ll,e),this.setAttribute("aria-label",p.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),G(K(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return X(this,a.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){J(this,a.MEDIA_CURRENT_TIME,e)}handleClick(){const t=Math.max(this.mediaCurrentTime-this.seekOffset,0),i=new N.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(i)}}N.customElements.get("media-seek-backward-button")||N.customElements.define("media-seek-backward-button",Rl);var Dl=Rl;const xl="seekoffset",Nl=U.createElement("template");Nl.innerHTML='\n  <slot name="icon"><svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">30</text><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"/></svg></slot>\n';class Ul extends ki{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_CURRENT_TIME,xl]}constructor(e={}){super({slotTemplate:Nl,...e})}connectedCallback(){this.seekOffset=X(this,xl,30),super.connectedCallback()}attributeChangedCallback(e,t,i){e===xl&&(this.seekOffset=X(this,xl,30)),super.attributeChangedCallback(e,t,i)}get seekOffset(){return X(this,xl,30)}set seekOffset(e){J(this,xl,e),this.setAttribute("aria-label",p.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),G(K(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return X(this,a.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){J(this,a.MEDIA_CURRENT_TIME,e)}handleClick(){const t=this.mediaCurrentTime+this.seekOffset,i=new N.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(i)}}N.customElements.get("media-seek-forward-button")||N.customElements.define("media-seek-forward-button",Ul);var Pl=Ul,Ol=Object.defineProperty;const Wl=U.createElement("template");
7Wl.innerHTML=Hn.template.innerHTML+'\n  <style>\n    :host {\n      background: var(--media-settings-menu-background,\n        var(--media-menu-background,\n        var(--media-control-background,\n        var(--media-secondary-color, rgb(20 20 30 / .8)))));\n      min-width: var(--media-settings-menu-min-width, 160px);\n      border-radius: 2px 2px 0 0;\n      overflow: hidden;\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';class Bl extends Hn{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:H(this).querySelector("media-settings-menu-button")}}((e,t,i)=>{((e,t,i)=>{t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i)})(Bl,"template",Wl),N.customElements.get("media-settings-menu")||N.customElements.define("media-settings-menu",Bl);var Vl=Bl;const Hl=U.createElement("template");Hl.innerHTML='\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';class $l extends sa{static get observedAttributes(){return[...super.observedAttributes,"target"]}constructor(){super({slotTemplate:Hl})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",E.SETTINGS())}get invokeTargetElement(){return null!=this.invokeTarget?super.invokeTargetElement:H(this).querySelector("media-settings-menu")}}N.customElements.get("media-settings-menu-button")||N.customElements.define("media-settings-menu-button",$l);var Gl,Kl=$l,ql=Object.defineProperty;const Fl=U.createElement("template");Fl.innerHTML=Ns.template.innerHTML+'\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',(null==(Gl=Fl.content)?void 0:Gl.querySelector)&&(Fl.content.querySelector('slot[name="suffix"]').innerHTML='\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  ');class Ql extends Ns{}((e,t,i)=>{((e,t,i)=>{t in e?ql(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!=typeof t?t+"":t,i)})(Ql,"template",Fl),N.customElements.get("media-settings-menu-item")||N.customElements.define("media-settings-menu-item",Ql);var jl,Yl=Ql,Zl=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},zl=(e,t,i)=>(Zl(e,t,"read from private field"),i?i.call(e):t.get(e));const Xl={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Jl=[...Object.values(Xl),a.MEDIA_CURRENT_TIME,a.MEDIA_DURATION,a.MEDIA_SEEKABLE],ed=["Enter"," "],td=(e,{timesSep:t="&nbsp;/&nbsp;"}={})=>{var i,n;const a=e.hasAttribute(Xl.REMAINING),s=e.hasAttribute(Xl.SHOW_DURATION),r=null!=(i=e.mediaCurrentTime)?i:0,[,o]=null!=(n=e.mediaSeekable)?n:[];let l=0;Number.isFinite(e.mediaDuration)?l=e.mediaDuration:Number.isFinite(o)&&(l=o);const d=T(a?0-(l-r):r);return s?`${d}${t}${T(l)}`:d};class id extends Lr{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,jl,void 0),((e,t,i,n)=>{Zl(e,t,"write to private field"),n?n.call(e,i):t.set(e,i)})(this,jl,this.shadowRoot.querySelector("slot")),zl(this,jl).innerHTML=`${td(this)}`}static get observedAttributes(){return[...super.observedAttributes,...Jl,"disabled"]}connectedCallback(){const{style:e}=Z(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","pointer"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",E.PLAYBACK_TIME());const t=e=>{const{key:i}=e;ed.includes(i)?this.toggleTimeDisplay():this.removeEventListener("keyup",t)};this.addEventListener("keydown",(e=>{const{metaKey:i,altKey:n,key:a}=e;i||n||!ed.includes(a)?this.removeEventListener("keyup",t):this.addEventListener("keyup",t)})),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,i){Jl.includes(e)?this.update():"disabled"===e&&i!==t&&(null==i?this.enable():this.disable()),super.attributeChangedCallback(e,t,i)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return ee(this,Xl.REMAINING)}set remaining(e){te(this,Xl.REMAINING,e)}get showDuration(){return ee(this,Xl.SHOW_DURATION)}set showDuration(e){te(this,Xl.SHOW_DURATION,e)}get noToggle(){return ee(this,Xl.NO_TOGGLE)}set noToggle(e){te(this,Xl.NO_TOGGLE,e)}get mediaDuration(){return X(this,a.MEDIA_DURATION)}set mediaDuration(e){J(this,a.MEDIA_DURATION,e)}get mediaCurrentTime(){return X(this,a.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){J(this,a.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(a.MEDIA_SEEKABLE);if(e)return e.split(":").map((e=>+e))}set mediaSeekable(e){null!=e?this.setAttribute(a.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(a.MEDIA_SEEKABLE)}update(){const e=td(this);(e=>{var t;const i=e.mediaCurrentTime,[,n]=null!=(t=e.mediaSeekable)?t:[];let a=null;if(Number.isFinite(e.mediaDuration)?a=e.mediaDuration:Number.isFinite(n)&&(a=n),null==i||null===a)return void e.setAttribute("aria-valuetext","video not loaded, unknown time.");const s=e.hasAttribute(Xl.REMAINING),r=e.hasAttribute(Xl.SHOW_DURATION),o=_(s?0-(a-i):i);if(!r)return void e.setAttribute("aria-valuetext",o);const l=`${o} of ${_(a)}`;e.setAttribute("aria-valuetext",l)})(this),e!==zl(this,jl).innerHTML&&(zl(this,jl).innerHTML=e)}}jl=new WeakMap,N.customElements.get("media-time-display")||N.customElements.define("media-time-display",id);var nd,ad,sd,rd,od,ld,dd,cd,hd,ud,md=id,vd=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Ed=(e,t,i)=>(vd(e,t,"read from private field"),i?i.call(e):t.get(e)),pd=(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)},bd=(e,t,i,n)=>(vd(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i);class gd{constructor(e,t,i){pd(this,nd,void 0),pd(this,ad,void 0),pd(this,sd,void 0),pd(this,rd,void 0),pd(this,od,void 0),pd(this,ld,void 0),pd(this,dd,void 0),pd(this,cd,void 0),pd(this,hd,0
7),pd(this,ud,((e=performance.now())=>{bd(this,hd,requestAnimationFrame(Ed(this,ud))),bd(this,rd,performance.now()-Ed(this,sd));const t=1e3/this.fps;if(Ed(this,rd)>t){bd(this,sd,e-Ed(this,rd)%t);const i=1e3/((e-Ed(this,ad))/++((e,t,i,n)=>({set _(n){bd(e,t,n,i)},get _(){return Ed(e,t,n)}}))(this,od)._),n=(e-Ed(this,ld))/1e3/this.duration;let a=Ed(this,dd)+n*this.playbackRate;a-Ed(this,nd).valueAsNumber>0?bd(this,cd,this.playbackRate/this.duration/i):(bd(this,cd,.995*Ed(this,cd)),a=Ed(this,nd).valueAsNumber+Ed(this,cd)),this.callback(a)}})),bd(this,nd,e),this.callback=t,this.fps=i}start(){0===Ed(this,hd)&&(bd(this,sd,performance.now()),bd(this,ad,Ed(this,sd)),bd(this,od,0),Ed(this,ud).call(this))}stop(){0!==Ed(this,hd)&&(cancelAnimationFrame(Ed(this,hd)),bd(this,hd,0))}update({start:e,duration:t,playbackRate:i}){const n=e-Ed(this,nd).valueAsNumber,a=Math.abs(t-this.duration);(n>0||n<-.03||a>=.5)&&this.callback(e),bd(this,dd,e),bd(this,ld,performance.now()),this.duration=t,this.playbackRate=i}}nd=new WeakMap,ad=new WeakMap,sd=new WeakMap,rd=new WeakMap,od=new WeakMap,ld=new WeakMap,dd=new WeakMap,cd=new WeakMap,hd=new WeakMap,ud=new WeakMap;var Ad,fd,Id,kd,yd,_d,Td,wd,Sd,Md,Ld,Cd,Rd,Dd,xd,Nd,Ud,Pd,Od,Wd,Bd,Vd,Hd,$d,Gd,Kd,qd=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Fd=(e,t,i)=>(qd(e,t,"read from private field"),i?i.call(e):t.get(e)),Qd=(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)},jd=(e,t,i,n)=>(qd(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),Yd=(e,t,i)=>(qd(e,t,"access private method"),i);const Zd=U.createElement("template");Zd.innerHTML=`\n  <style>\n    :host {\n      --media-box-border-radius: 4px;\n      --media-box-padding-left: 10px;\n      --media-box-padding-right: 10px;\n      --media-preview-border-radius: var(--media-box-border-radius);\n      --media-box-arrow-offset: var(--media-box-border-radius);\n      --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n      --_preview-background: var(--media-preview-background, var(--_control-background));\n\n      \n      contain: layout;\n    }\n\n    #highlight {\n      background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));\n    }\n\n    #preview-rail,\n    #current-rail {\n      width: 100%;\n      position: absolute;\n      left: 0;\n      bottom: 100%;\n      pointer-events: none;\n      will-change: transform;\n    }\n\n    [part~="box"] {\n      width: min-content;\n      \n      position: absolute;\n      bottom: 100%;\n      flex-direction: column;\n      align-items: center;\n      transform: translateX(-50%);\n    }\n\n    [part~="current-box"] {\n      display: var(--media-current-box-display, var(--media-box-display, flex));\n      margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));\n      visibility: hidden;\n    }\n\n    [part~="preview-box"] {\n      display: var(--media-preview-box-display, var(--media-box-display, flex));\n      margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));\n      transition-property: var(--media-preview-transition-property, visibility, opacity);\n      transition-duration: var(--media-preview-transition-duration-out, .25s);\n      transition-delay: var(--media-preview-transition-delay-out, 0s);\n      visibility: hidden;\n      opacity: 0;\n    }\n\n    :host(:is([${a.MEDIA_PREVIEW_IMAGE}], [${a.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {\n      transition-duration: var(--media-preview-transition-duration-in, .5s);\n      transition-delay: var(--media-preview-transition-delay-in, .25s);\n      visibility: visible;\n      opacity: 1;\n    }\n\n    @media (hover: hover) {\n      :host(:is([${a.MEDIA_PREVIEW_IMAGE}], [${a.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {\n        transition-duration: var(--media-preview-transition-duration-in, .5s);\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        visibility: visible;\n        opacity: 1;\n      }\n    }
7\n\n    media-preview-thumbnail,\n    ::slotted(media-preview-thumbnail) {\n      visibility: hidden;\n      \n      transition: visibility 0s .25s;\n      transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n      background: var(--media-preview-thumbnail-background, var(--_preview-background));\n      box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));\n      max-width: var(--media-preview-thumbnail-max-width, 180px);\n      max-height: var(--media-preview-thumbnail-max-height, 160px);\n      min-width: var(--media-preview-thumbnail-min-width, 120px);\n      min-height: var(--media-preview-thumbnail-min-height, 80px);\n      border: var(--media-preview-thumbnail-border);\n      border-radius: var(--media-preview-thumbnail-border-radius,\n        var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);\n    }\n\n    :host([${a.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,\n    :host([${a.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {\n      transition-delay: var(--media-preview-transition-delay-in, .25s);\n      visibility: visible;\n    }\n\n    @media (hover: hover) {\n      :host([${a.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,\n      :host([${a.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        visibility: visible;\n      }\n\n      :host([${a.MEDIA_PREVIEW_TIME}]:hover) {\n        --media-time-range-hover-display: block;\n      }\n    }\n\n    media-preview-chapter-display,\n    ::slotted(media-preview-chapter-display) {\n      font-size: var(--media-font-size, 13px);\n      line-height: 17px;\n      min-width: 0;\n      visibility: hidden;\n      \n      transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;\n      transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n      background: var(--media-preview-chapter-background, var(--_preview-background));\n      border-radius: var(--media-preview-chapter-border-radius,\n        var(--media-preview-border-radius) var(--media-preview-border-radius)\n        var(--media-preview-border-radius) var(--media-preview-border-radius));\n      padding: var(--media-preview-chapter-padding, 3.5px 9px);\n      margin: var(--media-preview-chapter-margin, 0 0 5px);\n      text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n    }\n\n    :host([${a.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,\n    :host([${a.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {\n      transition-delay: var(--media-preview-transition-delay-in, .25s);\n      border-radius: var(--media-preview-chapter-border-radius, 0);\n      padding: var(--media-preview-chapter-padding, 3.5px 9px 0);\n      margin: var(--media-preview-chapter-margin, 0);\n      min-width: 100%;\n    }\n\n    media-preview-chapter-display[${a.MEDIA_PREVIEW_CHAPTER}],\n    ::slotted(media-preview-chapter-display[${a.MEDIA_PREVIEW_CHAPTER}]) {\n      visibility: visible;\n    }\n\n    media-preview-chapter-display:not([aria-valuetext]),\n    ::slotted(media-preview-chapter-display:not([aria-valuetext])) {\n      display: none;\n    }\n\n    media-preview-time-display,\n    ::slotted(media-preview-time-display),\n    media-time-display,\n    ::slotted(media-time-display) {\n      font-size: var(--media-font-size, 13px);\n      line-height: 17px;\n      min-width: 0;\n      \n      transition: min-width 0s, border-radius 0s;\n      transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n      background: var(--media-preview-time-background, var(--_preview-background));\n      border-radius: var(--media-preview-time-border-radius,\n        var(--media-preview-border-radius) var(--media-preview-border-radius)\n        var(--media-preview-border-radius) var(--media-preview-border-radius));\n      padding: var(--media-preview-time-padding, 3.5px 9px);\n      margin: var(--media-preview-time-margin, 0);\n      text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n      transform: translateX(min(\n        max(calc(50% - var(--_box-width) / 2),\n        calc(var(--_box-shift, 0))),\n        calc(var(--_box-width) / 2 - 50%)\n      ));\n    }\n\n    :host([${a.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,\n    :host([${a.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {\n      transition-delay: var(--media-preview-transition-delay-in, .25s);\n      border-radius: var(--media-preview-time-border-radius,\n        0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));\n      min-width: 100%;\n      transform: translateX(0);\n    }\n\n    :host([${a.MEDIA_PREVIEW_TIME}]:hover) {\n      --media-time-range-hover-display: block;\n    }\n\n    [part~="arrow"],\n    ::slotted([part~="arrow"]) {\n      display: var(--media-box-arrow-display, inline-block);\n      transform: translateX(min(\n        max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),\n        calc(var(--_box-shift, 0))),\n        calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))\n      ));\n      \n      border-color: transparent;\n      border-top-color: var(--media-box-arrow-background, var(--_control-background));\n      border-width: var(--media-box-arrow-border-width,\n        var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);\n      border-style: solid;\n      justify-content: center;\n      height: 0;\n    }\n  </style>\n  <div id="preview-rail">\n    <slot name="preview" part="box preview-box">
7\n      <media-preview-thumbnail></media-preview-thumbnail>\n      <media-preview-chapter-display></media-preview-chapter-display>\n      <media-preview-time-display></media-preview-time-display>\n      <slot name="preview-arrow"><div part="arrow"></div></slot>\n    </slot>\n  </div>\n  <div id="current-rail">\n    <slot name="current" part="box current-box">\n      \n    </slot>\n  </div>\n`;const zd=(e,t=e.mediaCurrentTime)=>{const i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,n=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;if(Number.isNaN(n))return 0;const a=(t-i)/(n-i);return Math.max(0,Math.min(a,1))},Xd=(e,t=e.range.valueAsNumber)=>{const i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,n=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(n)?0:t*(n-i)+i};class Jd extends Er{constructor(){super(),Qd(this,Md),Qd(this,Cd),Qd(this,xd),Qd(this,Ud),Qd(this,Od),Qd(this,Bd),Qd(this,Hd),Qd(this,Gd),Qd(this,Ad,void 0),Qd(this,fd,void 0),Qd(this,Id,void 0),Qd(this,kd,void 0),Qd(this,yd,void 0),Qd(this,_d,void 0),Qd(this,Td,void 0),Qd(this,wd,void 0),Qd(this,Sd,void 0),Qd(this,Dd,(e=>{this.dragging||(this.range.valueAsNumber=e,this.updateBar())})),this.container.appendChild(Zd.content.cloneNode(!0)),jd(this,Id,this.shadowRoot.querySelectorAll('[part~="box"]')),jd(this,yd,this.shadowRoot.querySelector('[part~="preview-box"]')),jd(this,_d,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);jd(this,Td,parseInt(e.getPropertyValue("--media-box-padding-left"))),jd(this,wd,parseInt(e.getPropertyValue("--media-box-padding-right"))),jd(this,fd,new gd(this.range,Fd(this,Dd),60))}static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_PAUSED,a.MEDIA_DURATION,a.MEDIA_SEEKABLE,a.MEDIA_CURRENT_TIME,a.MEDIA_PREVIEW_IMAGE,a.MEDIA_PREVIEW_TIME,a.MEDIA_PREVIEW_CHAPTER,a.MEDIA_BUFFERED,a.MEDIA_PLAYBACK_RATE,a.MEDIA_LOADING,a.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",E.SEEK()),Yd(this,Md,Ld).call(this),jd(this,Ad,this.getRootNode()),null==(e=Fd(this,Ad))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),Yd(this,Md,Ld).call(this),null==(e=Fd(this,Ad))||e.removeEventListener("transitionstart",this),jd(this,Ad,null)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),t!=i&&(e===a.MEDIA_CURRENT_TIME||e===a.MEDIA_PAUSED||e===a.MEDIA_ENDED||e===a.MEDIA_LOADING||e===a.MEDIA_DURATION||e===a.MEDIA_SEEKABLE?(Fd(this,fd).update({start:zd(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Yd(this,Md,Ld).call(this),(e=>{const t=e.range,i=_(+Xd(e)),n=_(+e.mediaSeekableEnd),a=i&&n?`${i} of ${n}`:"video not loaded, unknown time.";t.setAttribute("aria-valuetext",a)})(this)):e===a.MEDIA_BUFFERED&&this.updateBufferedBar(),e!==a.MEDIA_DURATION&&e!==a.MEDIA_SEEKABLE||(this.mediaChaptersCues=Fd(this,Sd),this.updateBar()))}get mediaChaptersCues(){return Fd(this,Sd)}set mediaChaptersCues(e){var t;jd(this,Sd,e),this.updateSegments(null==(t=Fd(this,Sd))?void 0:t.map((e=>({start:zd(this,e.startTime),end:zd(this,e.endTime)}))))}get mediaPaused(){return ee(this,a.MEDIA_PAUSED)}set mediaPaused(e){te(this,a.MEDIA_PAUSED,e)}get mediaLoading(){return ee(this,a.MEDIA_LOADING)}set mediaLoading(e){te(this,a.MEDIA_LOADING,e)}get mediaDuration(){return X(this,a.MEDIA_DURATION)}set mediaDuration(e){J(this,a.MEDIA_DURATION,e)}get mediaCurrentTime(){return X(this,a.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){J(this,a.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return X(this,a.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){J(this,a.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(a.MEDIA_BUFFERED);return e?e.split(" ").map((e=>e.split(":").map((e=>+e)))):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(a.MEDIA_BUFFERED);const t=e.map((e=>e.join(":"))).join(" ");this.setAttribute(a.MEDIA_BUFFERED,t)}get mediaSeekable(){const e=this.getAttribute(a.MEDIA_SEEKABLE);if(e)return e.split(":").map((e=>+e))}set mediaSeekable(e){null!=e?this.setAttribute(a.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(a.MEDIA_SEEKABLE)}get mediaSeekableEnd(){var e;const[,t=this.mediaDuration]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaSeekableStart(){var e;const[t=0]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaPreviewImage(){return ie(this,a.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ne(this,a.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return X(this,a.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){J(this,a.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return ee(this,a.MEDIA_ENDED)}set mediaEnded(e){te(this,a.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const t=this.mediaBuffered;if(!t.length)return;let i;if(this.mediaEnded)i=1;else{const n=this.mediaCurrentTime,[,a=this.mediaSeekableStart]=null!=(e=t.find((([e,t])=>e<=n&&n<=t)))?e:[];i=zd(this,a)}const{style:n}=Z(this.shadowRoot,"#highlight");n.setProperty("width",100*i+"%")}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const e=Z(this.shadowRoot,"#current-rail"),t=Z(this.shadowRoot,'[part~="current-box"]'),i=Yd(this,xd,Nd).call(this,Fd(this,_d)),n=Yd(this,Ud,Pd).call(this,i,this.range.valueAsNumber),a=Yd(this,Od,Wd).call(this,i,this.range.valueAsNumber);e.style.transform=`translateX(${n})`,e.style.setProperty("--_range-width",`${i.range.width}`),t.style.setProperty("--_box-shift",`${a}`),t.style.setProperty("--_box-width",`${i.box.width}px`),t.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":Yd(this,Gd,Kd).call(this);break;case"pointermove":Yd(this,Bd,Vd).call(this,e);break;case"pointerup":case"pointerleave":Yd(this,Hd,$d).call(this,null);break;case"transitionstart":q(e.target,this)&&setTimeout((()=>Yd(this,Md,Ld).call(this)),0)}}}Ad=new WeakMap,fd=new WeakMap,Id=new WeakMap,kd=new WeakMap,yd=new WeakMap,_d=new WeakMap,Td=new WeakMap,wd=new WeakMap,Sd=new WeakMap,Md=new WeakSet,Ld=function(){Yd(this,Cd,Rd).call(this)?Fd(this,fd).start():Fd(this,fd).stop()},Cd=new WeakSet,Rd=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&function(e,t=3){if(e.checkVisibility)return e.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0});let i=e;for(;i&&t>0;){const e=getComputedStyle(i);if("0"===e.opacity||"hidden"===e.visibility||"none"===e.display)return!1;i=i.parentElement,t--}return!0}(this)},Dd=new WeakMap,xd=new WeakSet,Nd=function(e){var t;const i=(null!=(t=this.getAttribute("bounds")?F(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),n=this.range.getBoundingClientRect(),a=e.offsetWidth;return{box:{width:a,min:-(n.left-i.left-a/2),max:i.right-n.left-a/2},bounds:i,range:n}},Ud=new WeakSet,Pd=function(e,t){let i=100*t+"%";const{width:n,min:a,max:s}=e.box;if(!n)return i;if(!Number.isNaN(a)){i=`max(${`calc(1 / var(--_range-width) * 100 * ${a}% + ${"var(--media-box-padding-left)"})`}, ${i})`}if(!Number.isNaN(s)){i=`min(${i}
7, ${`calc(1 / var(--_range-width) * 100 * ${s}% - ${"var(--media-box-padding-right)"})`})`}return i},Od=new WeakSet,Wd=function(e,t){const{width:i,min:n,max:a}=e.box,s=t*e.range.width;if(s<n+Fd(this,Td)){return`${s-i/2+(e.range.left-e.bounds.left-Fd(this,Td))}px`}if(s>a-Fd(this,wd)){return s+i/2-(e.bounds.right-e.range.right-Fd(this,wd))-e.range.width+"px"}return 0},Bd=new WeakSet,Vd=function(e){const t=[...Fd(this,Id)].some((t=>e.composedPath().includes(t)));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void Yd(this,Hd,$d).call(this,null);const i=this.mediaSeekableEnd;if(!i)return;const n=Z(this.shadowRoot,"#preview-rail"),a=Z(this.shadowRoot,'[part~="preview-box"]'),s=Yd(this,xd,Nd).call(this,Fd(this,yd));let r=(e.clientX-s.range.left)/s.range.width;r=Math.max(0,Math.min(1,r));const o=Yd(this,Ud,Pd).call(this,s,r),l=Yd(this,Od,Wd).call(this,s,r);n.style.transform=`translateX(${o})`,n.style.setProperty("--_range-width",`${s.range.width}`),a.style.setProperty("--_box-shift",`${l}`),a.style.setProperty("--_box-width",`${s.box.width}px`);const d=Math.round(Fd(this,kd))-Math.round(r*i);Math.abs(d)<1&&r>.01&&r<.99||(jd(this,kd,r*i),Yd(this,Hd,$d).call(this,Fd(this,kd)))},Hd=new WeakSet,$d=function(t){this.dispatchEvent(new N.CustomEvent(e.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))},Gd=new WeakSet,Kd=function(){Fd(this,fd).stop();const t=Xd(this);this.dispatchEvent(new N.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))},N.customElements.get("media-time-range")||N.customElements.define("media-time-range",Jd);var ec=Jd;class tc extends Er{static get observedAttributes(){return[...super.observedAttributes,a.MEDIA_VOLUME,a.MEDIA_MUTED,a.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",(()=>{const t=this.range.value,i=new N.CustomEvent(e.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(i)}))}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",E.VOLUME())}attributeChangedCallback(e,t,i){var n;super.attributeChangedCallback(e,t,i),e!==a.MEDIA_VOLUME&&e!==a.MEDIA_MUTED||(this.range.valueAsNumber=(n=this).mediaMuted?0:n.mediaVolume,this.range.setAttribute("aria-valuetext",(({value:e})=>`${Math.round(100*e)}%`)(this.range)),this.updateBar())}
7get mediaVolume(){return X(this,a.MEDIA_VOLUME,1)}set mediaVolume(e){J(this,a.MEDIA_VOLUME,e)}get mediaMuted(){return ee(this,a.MEDIA_MUTED)}set mediaMuted(e){te(this,a.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ie(this,a.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){ne(this,a.MEDIA_VOLUME_UNAVAILABLE,e)}}N.customElements.get("media-volume-range")||N.customElements.define("media-volume-range",tc);var ic=tc;export{Mi as MediaAirplayButton,aa as MediaAudioTrackMenu,la as MediaAudioTrackMenuButton,Aa as MediaCaptionsButton,Ma as MediaCaptionsMenu,Na as MediaCaptionsMenuButton,Za as MediaCastButton,yi as MediaChromeButton,ks as MediaChromeDialog,zn as MediaChromeMenu,lr as MediaChromeMenuItem,br as MediaChromeRange,_r as MediaControlBar,vi as MediaController,Ur as MediaDurationDisplay,Br as MediaFullscreenButton,ke as MediaGestureReceiver,Yr as MediaLiveButton,no as MediaLoadingIndicator,co as MediaMuteButton,po as MediaPipButton,qo as MediaPlayButton,So as MediaPlaybackRateButton,Uo as MediaPlaybackRateMenu,Ho as MediaPlaybackRateMenuButton,zo as MediaPosterImage,tl as MediaPreviewChapterDisplay,ll as MediaPreviewThumbnail,gl as MediaPreviewTimeDisplay,Tl as MediaRenditionMenu,Ml as MediaRenditionMenuButton,Dl as MediaSeekBackwardButton,Pl as MediaSeekForwardButton,Vl as MediaSettingsMenu,Kl as MediaSettingsMenuButton,Yl as MediaSettingsMenuItem,md as MediaTimeDisplay,ec as MediaTimeRange,ic as MediaVolumeRange,v as constants,b as labels,S as timeUtils};export default null;
8//# sourceMappingURL=/sm/68e3a8ba19e9350acfd915dfffef05b3b62837863cb89254294d1197ba527436.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.