offsite 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/apps/server/dist/main.mjs +673 -583
- package/apps/server/dist/main.mjs.map +1 -1
- package/apps/web/dist/assets/HugeiconsIcon-eRbI5N8r.js +1 -0
- package/apps/web/dist/assets/audio-player-DPpDuqFI.js +1 -0
- package/apps/web/dist/assets/{dist-BYj5XneA.js → dist-BxKL_-7_.js} +1 -1
- package/apps/web/dist/assets/{image-viewer-DnE3hPpr.js → image-viewer-CXSBWHCX.js} +1 -1
- package/apps/web/dist/assets/index-CjjE4vH0.css +2 -0
- package/apps/web/dist/assets/index-_B37DCJA.js +781 -0
- package/apps/web/dist/assets/{preview-dialog-CApdSumg.js → preview-dialog-Cgeg3W6o.js} +12 -12
- package/apps/web/dist/assets/react-BlUBLzv4.js +1416 -0
- package/apps/web/dist/assets/{tooltip-DZsSQhD8.js → tooltip-D08x1wZY.js} +1 -1
- package/apps/web/dist/assets/utils-PtDt7m8t.js +1 -0
- package/apps/web/dist/assets/video-player-DDu2cDQE.js +1 -0
- package/apps/web/dist/assets/video-player-DlVZx3V3.js +1 -0
- package/apps/web/dist/assets/{video-viewer-B404MUMw.js → video-viewer-Cr1-BYtu.js} +1 -1
- package/apps/web/dist/assets/{zoomable-image-CjNpa0bY.js → zoomable-image-CrpD_Zwi.js} +1 -1
- package/apps/web/dist/assets/zoomable-image-Fkv4fx_U.js +1 -0
- package/apps/web/dist/index.html +6 -5
- package/apps/web/dist/sw.js +1 -1
- package/package.json +1 -1
- package/apps/web/dist/assets/HugeiconsIcon-B46TDTdz.js +0 -1
- package/apps/web/dist/assets/index-DMsagQXD.css +0 -2
- package/apps/web/dist/assets/index-W2nwhfc9.js +0 -783
- package/apps/web/dist/assets/video-player-05lO0mz3.js +0 -1416
- package/apps/web/dist/assets/video-player-DGtpeSpK.js +0 -1
- package/apps/web/dist/assets/zoomable-image-CzRbnhdc.js +0 -1
|
@@ -0,0 +1,1416 @@
|
|
|
1
|
+
import{a as e,n as t}from"./jsx-runtime-D3jfb0Ew.js";var n=e(t(),1),r=new Set([`style`,`children`,`ref`,`key`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`dangerouslySetInnerHTML`]),i={className:`class`,htmlFor:`for`};function a(e){return e.toLowerCase()}function o(e){if(typeof e==`boolean`)return e?``:void 0;if(typeof e!=`function`&&!(typeof e==`object`&&e))return e}function s({react:e,tagName:t,elementClass:n,events:s,displayName:l,defaultProps:u,toAttributeName:d=a,toAttributeValue:f=o}){let p=Number.parseInt(e.version)>=19,m=e.forwardRef((a,l)=>{let m=e.useRef(null),h=e.useRef(new Map),g={},_={},v={},y={};for(let[e,t]of Object.entries(a)){if(r.has(e)){v[e]=t;continue}let a=d(i[e]??e);if(n.prototype&&e in n.prototype&&!(e in(globalThis.HTMLElement?.prototype??{}))&&!n.observedAttributes?.some(e=>e===a)){y[e]=t;continue}if(e.startsWith(`on`)){g[e]=t;continue}let s=f(t);a&&s!=null&&(_[a]=String(s),p||(v[a]=s)),a&&p&&(v[a]=s===o(t)?t:s)}if(typeof window<`u`){for(let t in g){let n=g[t],r=t.endsWith(`Capture`),i=(s?.[t]??t.slice(2).toLowerCase()).slice(0,r?-7:void 0);e.useLayoutEffect(()=>{let e=m?.current;if(e&&typeof n==`function`)return e.addEventListener(i,n,r),()=>{e.removeEventListener(i,n,r)}},[m?.current,n])}e.useLayoutEffect(()=>{if(m.current===null)return;let e=new Map;for(let t in y)c(m.current,t,y[t]),h.current.delete(t),e.set(t,y[t]);for(let[e,t]of h.current)c(m.current,e,void 0);h.current=e})}if(typeof window>`u`&&n?.getTemplateHTML&&n?.shadowRootOptions){let{mode:t,delegatesFocus:r}=n.shadowRootOptions;v.children=[e.createElement(`template`,{shadowrootmode:t,shadowrootdelegatesfocus:r,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(_,a)},key:`ce-la-react-ssr-template-shadow-root`}),v.children]}return e.createElement(t,{...u,...v,ref:e.useCallback(e=>{m.current=e,typeof l==`function`?l(e):l!==null&&(l.current=e)},[l])},v.children)});return m.displayName=l??n.name,m}function c(e,t,n){e[t]=n,n==null&&t in(globalThis.HTMLElement?.prototype??{})&&e.removeAttribute(t)}var l={MEDIA_PLAY_REQUEST:`mediaplayrequest`,MEDIA_PAUSE_REQUEST:`mediapauserequest`,MEDIA_MUTE_REQUEST:`mediamuterequest`,MEDIA_UNMUTE_REQUEST:`mediaunmuterequest`,MEDIA_LOOP_REQUEST:`medialooprequest`,MEDIA_VOLUME_REQUEST:`mediavolumerequest`,MEDIA_SEEK_REQUEST:`mediaseekrequest`,MEDIA_AIRPLAY_REQUEST:`mediaairplayrequest`,MEDIA_ENTER_FULLSCREEN_REQUEST:`mediaenterfullscreenrequest`,MEDIA_EXIT_FULLSCREEN_REQUEST:`mediaexitfullscreenrequest`,MEDIA_PREVIEW_REQUEST:`mediapreviewrequest`,MEDIA_ENTER_PIP_REQUEST:`mediaenterpiprequest`,MEDIA_EXIT_PIP_REQUEST:`mediaexitpiprequest`,MEDIA_ENTER_CAST_REQUEST:`mediaentercastrequest`,MEDIA_EXIT_CAST_REQUEST:`mediaexitcastrequest`,MEDIA_SHOW_TEXT_TRACKS_REQUEST:`mediashowtexttracksrequest`,MEDIA_HIDE_TEXT_TRACKS_REQUEST:`mediahidetexttracksrequest`,MEDIA_SHOW_SUBTITLES_REQUEST:`mediashowsubtitlesrequest`,MEDIA_DISABLE_SUBTITLES_REQUEST:`mediadisablesubtitlesrequest`,MEDIA_TOGGLE_SUBTITLES_REQUEST:`mediatogglesubtitlesrequest`,MEDIA_PLAYBACK_RATE_REQUEST:`mediaplaybackraterequest`,MEDIA_RENDITION_REQUEST:`mediarenditionrequest`,MEDIA_AUDIO_TRACK_REQUEST:`mediaaudiotrackrequest`,MEDIA_SEEK_TO_LIVE_REQUEST:`mediaseektoliverequest`,REGISTER_MEDIA_STATE_RECEIVER:`registermediastatereceiver`,UNREGISTER_MEDIA_STATE_RECEIVER:`unregistermediastatereceiver`},u={MEDIA_CHROME_ATTRIBUTES:`mediachromeattributes`,MEDIA_CONTROLLER:`mediacontroller`},d={MEDIA_AIRPLAY_UNAVAILABLE:`mediaAirplayUnavailable`,MEDIA_AUDIO_TRACK_ENABLED:`mediaAudioTrackEnabled`,MEDIA_AUDIO_TRACK_LIST:`mediaAudioTrackList`,MEDIA_AUDIO_TRACK_UNAVAILABLE:`mediaAudioTrackUnavailable`,MEDIA_BUFFERED:`mediaBuffered`,MEDIA_CAST_UNAVAILABLE:`mediaCastUnavailable`,MEDIA_CHAPTERS_CUES:`mediaChaptersCues`,MEDIA_CURRENT_TIME:`mediaCurrentTime`,MEDIA_DURATION:`mediaDuration`,MEDIA_ENDED:`mediaEnded`,MEDIA_ERROR:`mediaError`,MEDIA_ERROR_CODE:`mediaErrorCode`,MEDIA_ERROR_MESSAGE:`mediaErrorMessage`,MEDIA_FULLSCREEN_UNAVAILABLE:`mediaFullscreenUnavailable`,MEDIA_HAS_PLAYED:`mediaHasPlayed`,MEDIA_HEIGHT:`mediaHeight`,MEDIA_IS_AIRPLAYING:`mediaIsAirplaying`,MEDIA_IS_CASTING:`mediaIsCasting`,MEDIA_IS_FULLSCREEN:`mediaIsFullscreen`,MEDIA_IS_PIP:`mediaIsPip`,MEDIA_LOADING:`mediaLoading`,MEDIA_MUTED:`mediaMuted`,MEDIA_LOOP:`mediaLoop`,MEDIA_PAUSED:`mediaPaused`,MEDIA_PIP_UNAVAILABLE:`mediaPipUnavailable`,MEDIA_PLAYBACK_RATE:`mediaPlaybackRate`,MEDIA_PREVIEW_CHAPTER:`mediaPreviewChapter`,MEDIA_PREVIEW_COORDS:`mediaPreviewCoords`,MEDIA_PREVIEW_IMAGE:`mediaPreviewImage`,MEDIA_PREVIEW_TIME:`mediaPreviewTime`,MEDIA_RENDITION_LIST:`mediaRenditionList`,MEDIA_RENDITION_SELECTED:`mediaRenditionSelected`,MEDIA_RENDITION_UNAVAILABLE:`mediaRenditionUnavailable`,MEDIA_SEEKABLE:`mediaSeekable`,MEDIA_STREAM_TYPE:`mediaStreamType`,MEDIA_SUBTITLES_LIST:`mediaSubtitlesList`,MEDIA_SUBTITLES_SHOWING:`mediaSubtitlesShowing`,MEDIA_TARGET_LIVE_WINDOW:`mediaTargetLiveWindow`,MEDIA_TIME_IS_LIVE:`mediaTimeIsLive`,MEDIA_VOLUME:`mediaVolume`,MEDIA_VOLUME_LEVEL:`mediaVolumeLevel`,MEDIA_VOLUME_UNAVAILABLE:`mediaVolumeUnavailable`,MEDIA_LANG:`mediaLang`,MEDIA_WIDTH:`mediaWidth`},f=Object.entries(d),p=f.reduce((e,[t,n])=>(e[t]=n.toLowerCase(),e),{}),m=f.reduce((e,[t,n])=>(e[t]=n.toLowerCase(),e),{USER_INACTIVE_CHANGE:`userinactivechange`,BREAKPOINTS_CHANGE:`breakpointchange`,BREAKPOINTS_COMPUTED:`breakpointscomputed`});Object.entries(m).reduce((e,[t,n])=>{let r=p[t];return r&&(e[n]=r),e},{userinactivechange:`userinactive`});var h=Object.entries(p).reduce((e,[t,n])=>{let r=m[t];return r&&(e[n]=r),e},{userinactive:`userinactivechange`}),g={SUBTITLES:`subtitles`,CAPTIONS:`captions`,DESCRIPTIONS:`descriptions`,CHAPTERS:`chapters`,METADATA:`metadata`},_={DISABLED:`disabled`,HIDDEN:`hidden`,SHOWING:`showing`},v={MOUSE:`mouse`,PEN:`pen`,TOUCH:`touch`},y={UNAVAILABLE:`unavailable`,UNSUPPORTED:`unsupported`},ee={LIVE:`live`,ON_DEMAND:`on-demand`,UNKNOWN:`unknown`},te={INLINE:`inline`,FULLSCREEN:`fullscreen`,PICTURE_IN_PICTURE:`picture-in-picture`};function ne(e){return e?.map(re).join(` `)}function re(e){if(e){let{id:t,width:n,height:r}=e;return[t,n,r].filter(e=>e!=null).join(`:`)}}function ie(e){return e?.map(ae).join(` `)}function ae(e){if(e){let{id:t,kind:n,language:r,label:i}=e;return[t,n,r,i].filter(e=>e!=null).join(`:`)}}function oe(e){return typeof e==`number`&&!Number.isNaN(e)&&Number.isFinite(e)}var se=e=>new Promise(t=>setTimeout(t,e)),ce={en:{"Start airplay":`Start airplay`,"Stop airplay":`Stop airplay`,Audio:`Audio`,Captions:`Captions`,"Enable captions":`Enable captions`,"Disable captions":`Disable captions`,"Start casting":`Start casting`,"Stop casting":`Stop casting`,"Enter fullscreen mode":`Enter fullscreen mode`,"Exit fullscreen mode":`Exit fullscreen mode`,Mute:`Mute`,Unmute:`Unmute`,Loop:`Loop`,"Enter picture in picture mode":`Enter picture in picture mode`,"Exit picture in picture mode":`Exit picture in picture mode`,Play:`Play`,Pause:`Pause`,"Playback rate":`Playback rate`,"Playback rate {playbackRate}":`Playback rate {playbackRate}`,Quality:`Quality`,"Seek backward":`Seek backward`,"Seek forward":`Seek forward`,Settings:`Settings`,Auto:`Auto`,"audio player":`audio player`,"video player":`video player`,volume:`volume`,seek:`seek`,"closed captions":`closed captions`,"current playback rate":`current playback rate`,"playback time":`playback time`,"media loading":`media loading`,settings:`settings`,"audio tracks":`audio tracks`,quality:`quality`,play:`play`,pause:`pause`,mute:`mute`,unmute:`unmute`,"chapter: {chapterName}":`chapter: {chapterName}`,live:`live`,Off:`Off`,"start airplay":`start airplay`,"stop airplay":`stop airplay`,"start casting":`start casting`,"stop casting":`stop casting`,"enter fullscreen mode":`enter fullscreen mode`,"exit fullscreen mode":`exit fullscreen mode`,"enter picture in picture mode":`enter picture in picture mode`,"exit picture in picture mode":`exit picture in picture mode`,"seek to live":`seek to live`,"playing live":`playing live`,"seek back {seekOffset} seconds":`seek back {seekOffset} seconds`,"seek forward {seekOffset} seconds":`seek forward {seekOffset} seconds`,"Network Error":`Network Error`,"Decode Error":`Decode Error`,"Source Not Supported":`Source Not Supported`,"Encryption Error":`Encryption Error`,"A network error caused the media download to fail.":`A network error caused the media download to fail.`,"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":`A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.`,"An unsupported error occurred. The server or network failed, or your browser does not support this format.":`An unsupported error occurred. The server or network failed, or your browser does not support this format.`,"The media is encrypted and there are no keys to decrypt it.":`The media is encrypted and there are no keys to decrypt it.`,hour:`hour`,hours:`hours`,minute:`minute`,minutes:`minutes`,second:`second`,seconds:`seconds`,"{time} remaining":`{time} remaining`,"{currentTime} of {totalTime}":`{currentTime} of {totalTime}`,"video not loaded, unknown time.":`video not loaded, unknown time.`}},le=globalThis.navigator?.language||`en`,ue=e=>{le=e},de=e=>{let[t]=le.split(`-`);return ce[le]?.[e]||ce[t]?.[e]||ce.en?.[e]||e},fe=()=>{let[e]=le.split(`-`);return ce[le]?le:ce[e]?e:`en`},b=(e,t={})=>de(e).replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):`{${n}}`),pe=[{singular:`hour`,plural:`hours`},{singular:`minute`,plural:`minutes`},{singular:`second`,plural:`seconds`}],me=(e,t)=>`${e} ${b(e===1?pe[t].singular:pe[t].plural)}`,he=e=>{if(!oe(e))return``;let t=Math.abs(e),n=t!==e,r=new Date(0,0,0,0,0,t,0),i=[r.getHours(),r.getMinutes(),r.getSeconds()].map((e,t)=>e&&me(e,t)).filter(e=>e).join(`, `);return n?b(`{time} remaining`,{time:i}):t===0?me(0,2):i};function ge(e,t){let n=!1;e<0&&(n=!0,e=0-e),e=e<0?0:e;let r=Math.floor(e%60),i=Math.floor(e/60%60),a=Math.floor(e/3600),o=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(a=i=r=`0`),a=a>0||s>0?a+`:`:``,i=((a||o>=10)&&i<10?`0`+i:i)+`:`,r=r<10?`0`+r:r,(n?`-`:``)+a+i+r}Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});var _e=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},ve=class extends _e{},ye=class extends ve{constructor(){super(...arguments),this.role=null}},be=class{observe(){}unobserve(){}disconnect(){}},xe={createElement:function(){return new Se.HTMLElement},createElementNS:function(){return new Se.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(e){return!1}},Se={ResizeObserver:be,document:xe,Node:ve,Element:ye,HTMLElement:class extends ye{constructor(){super(...arguments),this.innerHTML=``}get content(){return new Se.DocumentFragment}},DocumentFragment:class extends _e{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(e){return null},setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return``}},matchMedia(e){return{matches:!1,media:e}},DOMParser:class{parseFromString(e,t){return{body:{textContent:e}}}}},Ce=`global`in globalThis&&(globalThis==null?void 0:globalThis.global)===globalThis||typeof window>`u`||window.customElements===void 0,we=Object.keys(Se).every(e=>e in globalThis),x=Ce&&!we?Se:globalThis,S=Ce&&!we?xe:globalThis.document,Te=new WeakMap,Ee=e=>{let t=Te.get(e);return t||Te.set(e,t=new Set),t},De=new x.ResizeObserver(e=>{for(let t of e)for(let e of Ee(t.target))e(t)});function Oe(e,t){Ee(e).add(t),De.observe(e)}function ke(e,t){let n=Ee(e);n.delete(t),n.size||De.unobserve(e)}function C(e){let t={};for(let n of e)t[n.name]=n.value;return t}function Ae(e){return je(e)??Ie(e,`media-controller`)}function je(e){let{MEDIA_CONTROLLER:t}=u,n=e.getAttribute(t);if(n)return Re(e)?.getElementById(n)}var Me=(e,t,n=`.value`)=>{let r=e.querySelector(n);r&&(r.textContent=t)},Ne=(e,t)=>{let n=`slot[name="${t}"]`,r=e.shadowRoot.querySelector(n);return r?r.children:[]},Pe=(e,t)=>Ne(e,t)[0],Fe=(e,t)=>!e||!t?!1:e?.contains(t)?!0:Fe(e,t.getRootNode().host),Ie=(e,t)=>e?e.closest(t)||Ie(e.getRootNode().host,t):null;function Le(e=document){let t=e?.activeElement;return t?Le(t.shadowRoot)??t:null}function Re(e){let t=(e?.getRootNode)?.call(e);return t instanceof ShadowRoot||t instanceof Document?t:null}function ze(e,{depth:t=3,checkOpacity:n=!0,checkVisibilityCSS:r=!0}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:n,checkVisibilityCSS:r});let i=e;for(;i&&t>0;){let e=getComputedStyle(i);if(n&&e.opacity===`0`||r&&e.visibility===`hidden`||e.display===`none`)return!1;i=i.parentElement,t--}return!0}function Be(e,t,n,r){let i=r.x-n.x,a=r.y-n.y,o=i*i+a*a;if(o===0)return 0;let s=((e-n.x)*i+(t-n.y)*a)/o;return Math.max(0,Math.min(1,s))}function w(e,t){return Ve(e,e=>e===t)||He(e,t)}function Ve(e,t){let n;for(n of e.querySelectorAll(`style:not([media])`)??[]){let e;try{e=n.sheet?.cssRules}catch{continue}for(let n of e??[])if(t(n.selectorText))return n}}function He(e,t){let n=e.querySelectorAll(`style:not([media])`)??[],r=n?.[n.length-1];if(!r?.sheet)return console.warn(`Media Chrome: No style sheet found on style tag of`,e),{style:{setProperty:()=>{},removeProperty:()=>``,getPropertyValue:()=>``}};let i=r?.sheet.insertRule(`${t}{}`,r.sheet.cssRules.length);return r.sheet.cssRules?.[i]}function T(e,t,n=NaN){let r=e.getAttribute(t);return r==null?n:+r}function E(e,t,n){let r=+n;n==null||Number.isNaN(r)?e.hasAttribute(t)&&e.removeAttribute(t):T(e,t,void 0)!==r&&e.setAttribute(t,`${r}`)}function D(e,t){return e.hasAttribute(t)}function O(e,t,n){n==null?e.hasAttribute(t)&&e.removeAttribute(t):D(e,t)!=n&&e.toggleAttribute(t,n)}function k(e,t,n=null){return e.getAttribute(t)??n}function A(e,t,n){if(n==null){e.hasAttribute(t)&&e.removeAttribute(t);return}let r=`${n}`;k(e,t,void 0)!==r&&e.setAttribute(t,r)}var Ue=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},j=(e,t,n)=>(Ue(e,t,`read from private field`),n?n.call(e):t.get(e)),We=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Ge=(e,t,n,r)=>(Ue(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),M;function Ke(e){return`
|
|
2
|
+
<style>
|
|
3
|
+
:host {
|
|
4
|
+
display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
</style>
|
|
8
|
+
`}var qe=class extends x.HTMLElement{constructor(){if(super(),We(this,M,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[u.MEDIA_CONTROLLER,p.MEDIA_PAUSED]}attributeChangedCallback(e,t,n){var r,i,a,o;e===u.MEDIA_CONTROLLER&&(t&&((i=(r=j(this,M))?.unassociateElement)==null||i.call(r,this),Ge(this,M,null)),n&&this.isConnected&&(Ge(this,M,this.getRootNode()?.getElementById(n)),(o=(a=j(this,M))?.associateElement)==null||o.call(a,this)))}connectedCallback(){var e,t;this.tabIndex=-1,this.setAttribute(`aria-hidden`,`true`),Ge(this,M,Je(this)),this.getAttribute(u.MEDIA_CONTROLLER)&&((t=(e=j(this,M))?.associateElement)==null||t.call(e,this)),j(this,M)&&(j(this,M).addEventListener(`pointerdown`,this),j(this,M).addEventListener(`click`,this),j(this,M).hasAttribute(`tabindex`)||(j(this,M).tabIndex=0))}disconnectedCallback(){var e,t,n,r;this.getAttribute(u.MEDIA_CONTROLLER)&&((t=(e=j(this,M))?.unassociateElement)==null||t.call(e,this)),(n=j(this,M))==null||n.removeEventListener(`pointerdown`,this),(r=j(this,M))==null||r.removeEventListener(`click`,this),Ge(this,M,null)}handleEvent(e){let t=e.composedPath()?.[0];if([`video`,`media-controller`].includes(t?.localName)){if(e.type===`pointerdown`)this._pointerType=e.pointerType;else if(e.type===`click`){let{clientX:t,clientY:n}=e,{left:r,top:i,width:a,height:o}=this.getBoundingClientRect(),s=t-r,c=n-i;if(s<0||c<0||s>a||c>o||a===0&&o===0)return;let l=this._pointerType||`mouse`;if(this._pointerType=void 0,l===v.TOUCH){this.handleTap(e);return}if(l===v.MOUSE||l===v.PEN){this.handleMouseClick(e);return}}}}get mediaPaused(){return D(this,p.MEDIA_PAUSED)}set mediaPaused(e){O(this,p.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?l.MEDIA_PLAY_REQUEST:l.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new x.CustomEvent(t,{composed:!0,bubbles:!0}))}};M=new WeakMap,qe.shadowRootOptions={mode:`open`},qe.getTemplateHTML=Ke;function Je(e){let t=e.getAttribute(u.MEDIA_CONTROLLER);return t?e.getRootNode()?.getElementById(t):Ie(e,`media-controller`)}x.customElements.get(`media-gesture-receiver`)||x.customElements.define(`media-gesture-receiver`,qe);var Ye=qe,Xe=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},N=(e,t,n)=>(Xe(e,t,`read from private field`),n?n.call(e):t.get(e)),P=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},F=(e,t,n,r)=>(Xe(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),I=(e,t,n)=>(Xe(e,t,`access private method`),n),Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,L={AUDIO:`audio`,AUTOHIDE:`autohide`,BREAKPOINTS:`breakpoints`,GESTURES_DISABLED:`gesturesdisabled`,KEYBOARD_CONTROL:`keyboardcontrol`,NO_AUTOHIDE:`noautohide`,USER_INACTIVE:`userinactive`,AUTOHIDE_OVER_CONTROLS:`autohideovercontrols`};function _t(e){return`
|
|
9
|
+
<style>
|
|
10
|
+
|
|
11
|
+
:host([${p.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
|
|
12
|
+
outline: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
position: relative;
|
|
18
|
+
display: inline-block;
|
|
19
|
+
line-height: 0;
|
|
20
|
+
background-color: var(--media-background-color, #000);
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(:not([${L.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 0;
|
|
27
|
+
left: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
right: 0;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-flow: column nowrap;
|
|
32
|
+
align-items: start;
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
background: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
slot[name=media] {
|
|
38
|
+
display: var(--media-slot-display, contents);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
:host([${L.AUDIO}]) slot[name=media] {
|
|
43
|
+
display: var(--media-slot-display, none);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
:host([${L.AUDIO}]) [part~=layer][part~=gesture-layer] {
|
|
48
|
+
height: 0;
|
|
49
|
+
display: block;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
:host(:not([${L.AUDIO}])[${L.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
|
|
54
|
+
:host(:not([${L.AUDIO}])[${L.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {
|
|
60
|
+
pointer-events: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host(:not([${L.AUDIO}])) *[part~=layer][part~=centered-layer] {
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host(:not([${L.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
|
|
69
|
+
:host(:not([${L.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
|
|
70
|
+
align-self: stretch;
|
|
71
|
+
flex-grow: 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
slot[name=middle-chrome] {
|
|
75
|
+
display: inline;
|
|
76
|
+
flex-grow: 1;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
background: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
::slotted([slot=media]),
|
|
83
|
+
::slotted([slot=poster]) {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:host(:not([${L.AUDIO}])) .spacer {
|
|
90
|
+
flex-grow: 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:host(:-webkit-full-screen) {
|
|
95
|
+
|
|
96
|
+
width: 100% !important;
|
|
97
|
+
height: 100% !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
::slotted(:not([slot=media]):not([slot=poster]):not([${L.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {
|
|
102
|
+
opacity: 1;
|
|
103
|
+
transition: var(--media-control-transition-in, opacity 0.25s);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
:host([${L.USER_INACTIVE}]:not([${p.MEDIA_PAUSED}]):not([${p.MEDIA_IS_AIRPLAYING}]):not([${p.MEDIA_IS_CASTING}]):not([${L.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${L.NO_AUTOHIDE}]):not([role=dialog])) {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
transition: var(--media-control-transition-out, opacity 1s);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([${L.USER_INACTIVE}]:not([${L.NO_AUTOHIDE}]):not([${p.MEDIA_PAUSED}]):not([${p.MEDIA_IS_CASTING}]):not([${L.AUDIO}])) ::slotted([slot=media]) {
|
|
113
|
+
cursor: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([${L.USER_INACTIVE}][${L.AUTOHIDE_OVER_CONTROLS}]:not([${L.NO_AUTOHIDE}]):not([${p.MEDIA_PAUSED}]):not([${p.MEDIA_IS_CASTING}]):not([${L.AUDIO}])) * {
|
|
117
|
+
--media-cursor: none;
|
|
118
|
+
cursor: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
::slotted(media-control-bar) {
|
|
123
|
+
align-self: stretch;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
:host(:not([${L.AUDIO}])[${p.MEDIA_HAS_PLAYED}]) slot[name=poster] {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
::slotted([role=dialog]) {
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 100%;
|
|
134
|
+
align-self: center;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
::slotted([role=menu]) {
|
|
138
|
+
align-self: end;
|
|
139
|
+
}
|
|
140
|
+
</style>
|
|
141
|
+
|
|
142
|
+
<slot name="media" part="layer media-layer"></slot>
|
|
143
|
+
<slot name="poster" part="layer poster-layer"></slot>
|
|
144
|
+
<slot name="gestures-chrome" part="layer gesture-layer">
|
|
145
|
+
<media-gesture-receiver slot="gestures-chrome">
|
|
146
|
+
<template shadowrootmode="${Ye.shadowRootOptions.mode}">
|
|
147
|
+
${Ye.getTemplateHTML({})}
|
|
148
|
+
</template>
|
|
149
|
+
</media-gesture-receiver>
|
|
150
|
+
</slot>
|
|
151
|
+
<span part="layer vertical-layer">
|
|
152
|
+
<slot name="top-chrome" part="top chrome"></slot>
|
|
153
|
+
<slot name="middle-chrome" part="middle chrome"></slot>
|
|
154
|
+
<slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>
|
|
155
|
+
|
|
156
|
+
<slot part="bottom chrome"></slot>
|
|
157
|
+
</span>
|
|
158
|
+
<slot name="dialog" part="layer dialog-layer"></slot>
|
|
159
|
+
`}var vt=Object.values(p),yt=`sm:384 md:576 lg:768 xl:960`;function bt(e){xt(e.target,e.contentRect.width)}function xt(e,t){if(!e.isConnected)return;let n=St(e.getAttribute(L.BREAKPOINTS)??yt),r=Ct(n,t),i=!1;if(Object.keys(n).forEach(t=>{r.includes(t)?e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,``),i=!0):e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),i=!0)}),i){let t=new CustomEvent(m.BREAKPOINTS_CHANGE,{detail:r});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(m.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function St(e){let t=e.split(/\s+/);return Object.fromEntries(t.map(e=>e.split(`:`)))}function Ct(e,t){return Object.keys(e).filter(n=>t>=parseInt(e[n]))}var wt=class extends x.HTMLElement{constructor(){if(super(),P(this,at),P(this,st),P(this,lt),P(this,dt),P(this,pt),P(this,Ze,void 0),P(this,Qe,0),P(this,$e,null),P(this,et,null),P(this,tt,void 0),this.breakpointsComputed=!1,P(this,nt,e=>{let t=this.media;for(let n of e){if(n.type!==`childList`)continue;let e=n.removedNodes;for(let r of e){if(r.slot!=`media`||n.target!=this)continue;let e=n.previousSibling&&n.previousSibling.previousElementSibling;if(!e||!t)this.mediaUnsetCallback(r);else{let t=e.slot!==`media`;for(;(e=e.previousSibling)!==null;)e.slot==`media`&&(t=!1);t&&this.mediaUnsetCallback(r)}}if(t)for(let e of n.addedNodes)e===t&&this.handleMediaUpdated(t)}}),P(this,rt,!1),P(this,it,e=>{N(this,rt)||(setTimeout(()=>{bt(e),F(this,rt,!1)},0),F(this,rt,!0))}),P(this,ht,void 0),P(this,gt,()=>{N(this,ht).assignedElements({flatten:!0}).length?this.handleMediaUpdated(this.media):N(this,$e)&&this.mediaUnsetCallback(N(this,$e))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}F(this,Ze,new MutationObserver(N(this,nt)))}static get observedAttributes(){return[L.AUTOHIDE,L.GESTURES_DISABLED].concat(vt).filter(e=>![p.MEDIA_RENDITION_LIST,p.MEDIA_AUDIO_TRACK_LIST,p.MEDIA_CHAPTERS_CUES,p.MEDIA_WIDTH,p.MEDIA_HEIGHT,p.MEDIA_ERROR,p.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,n){e.toLowerCase()==L.AUTOHIDE&&(this.autohide=n)}get media(){let e=this.querySelector(`:scope > [slot=media]`);return e?.nodeName==`SLOT`&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(F(this,$e,e),e.localName.includes(`-`)&&await x.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;N(this,Ze).observe(this,{childList:!0,subtree:!0}),Oe(this,N(this,it));let t=this.getAttribute(L.AUDIO)==null?b(`video player`):b(`audio player`);this.setAttribute(`role`,`region`),this.setAttribute(`aria-label`,t),this.handleMediaUpdated(this.media),this.setAttribute(L.USER_INACTIVE,``),xt(this,this.getBoundingClientRect().width);let n=this.querySelector(`:scope > slot[slot=media]`);n&&(F(this,ht,n),N(this,ht).addEventListener(`slotchange`,N(this,gt))),this.addEventListener(`pointerdown`,this),this.addEventListener(`pointermove`,this),this.addEventListener(`pointerup`,this),this.addEventListener(`mouseleave`,this),this.addEventListener(`keyup`,this),(e=x.window)==null||e.addEventListener(`mouseup`,this)}disconnectedCallback(){var e;ke(this,N(this,it)),clearTimeout(N(this,et)),N(this,Ze).disconnect(),this.media&&this.mediaUnsetCallback(this.media),(e=x.window)==null||e.removeEventListener(`mouseup`,this),this.removeEventListener(`pointerdown`,this),this.removeEventListener(`pointermove`,this),this.removeEventListener(`pointerup`,this),this.removeEventListener(`mouseleave`,this),this.removeEventListener(`keyup`,this),N(this,ht)&&(N(this,ht).removeEventListener(`slotchange`,N(this,gt)),F(this,ht,null)),F(this,rt,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){F(this,$e,null)}handleEvent(e){switch(e.type){case`pointerdown`:F(this,Qe,e.timeStamp);break;case`pointermove`:I(this,at,ot).call(this,e);break;case`pointerup`:I(this,st,ct).call(this,e);break;case`mouseleave`:I(this,lt,ut).call(this);break;case`mouseup`:this.removeAttribute(L.KEYBOARD_CONTROL);break;case`keyup`:I(this,pt,mt).call(this),this.setAttribute(L.KEYBOARD_CONTROL,``)}}set autohide(e){let t=Number(e);F(this,tt,isNaN(t)?0:t)}get autohide(){return(N(this,tt)===void 0?2:N(this,tt)).toString()}get breakpoints(){return k(this,L.BREAKPOINTS)}set breakpoints(e){A(this,L.BREAKPOINTS,e)}get audio(){return D(this,L.AUDIO)}set audio(e){O(this,L.AUDIO,e)}get gesturesDisabled(){return D(this,L.GESTURES_DISABLED)}set gesturesDisabled(e){O(this,L.GESTURES_DISABLED,e)}get keyboardControl(){return D(this,L.KEYBOARD_CONTROL)}set keyboardControl(e){O(this,L.KEYBOARD_CONTROL,e)}get noAutohide(){return D(this,L.NO_AUTOHIDE)}set noAutohide(e){O(this,L.NO_AUTOHIDE,e)}get autohideOverControls(){return D(this,L.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){O(this,L.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return D(this,L.USER_INACTIVE)}set userInteractive(e){O(this,L.USER_INACTIVE,e)}};Ze=new WeakMap,Qe=new WeakMap,$e=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,rt=new WeakMap,it=new WeakMap,at=new WeakSet,ot=function(e){if(e.pointerType!==`mouse`&&e.timeStamp-N(this,Qe)<250)return;I(this,dt,ft).call(this),clearTimeout(N(this,et));let t=this.hasAttribute(L.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&I(this,pt,mt).call(this)},st=new WeakSet,ct=function(e){if(e.pointerType===`touch`){let t=!this.hasAttribute(L.USER_INACTIVE);[this,this.media].includes(e.target)&&t?I(this,lt,ut).call(this):I(this,pt,mt).call(this)}else e.composedPath().some(e=>[`media-play-button`,`media-fullscreen-button`].includes(e?.localName))&&I(this,pt,mt).call(this)},lt=new WeakSet,ut=function(){if(N(this,tt)<0||this.hasAttribute(L.USER_INACTIVE))return;this.setAttribute(L.USER_INACTIVE,``);let e=new x.CustomEvent(m.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},dt=new WeakSet,ft=function(){if(!this.hasAttribute(L.USER_INACTIVE))return;this.removeAttribute(L.USER_INACTIVE);let e=new x.CustomEvent(m.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},pt=new WeakSet,mt=function(){I(this,dt,ft).call(this),clearTimeout(N(this,et));let e=parseInt(this.autohide);e<0||F(this,et,setTimeout(()=>{I(this,lt,ut).call(this)},e*1e3))},ht=new WeakMap,gt=new WeakMap,wt.shadowRootOptions={mode:`open`},wt.getTemplateHTML=_t,x.customElements.get(`media-container`)||x.customElements.define(`media-container`,wt);var Tt=wt,Et=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},R=(e,t,n)=>(Et(e,t,`read from private field`),n?n.call(e):t.get(e)),Dt=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Ot=(e,t,n,r)=>(Et(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),kt,At,jt,Mt,Nt,Pt,Ft=class{constructor(e,t,{defaultValue:n}={defaultValue:void 0}){Dt(this,Nt),Dt(this,kt,void 0),Dt(this,At,void 0),Dt(this,jt,void 0),Dt(this,Mt,new Set),Ot(this,kt,e),Ot(this,At,t),Ot(this,jt,new Set(n))}[Symbol.iterator](){return R(this,Nt,Pt).values()}get length(){return R(this,Nt,Pt).size}get value(){return[...R(this,Nt,Pt)].join(` `)??``}set value(e){e!==this.value&&(Ot(this,Mt,new Set),this.add(...e?.split(` `)??[]))}toString(){return this.value}item(e){return[...R(this,Nt,Pt)][e]}values(){return R(this,Nt,Pt).values()}forEach(e,t){R(this,Nt,Pt).forEach(e,t)}add(...e){var t;e.forEach(e=>R(this,Mt).add(e)),(this.value!==``||R(this,kt)?.hasAttribute(`${R(this,At)}`))&&((t=R(this,kt))==null||t.setAttribute(`${R(this,At)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>R(this,Mt).delete(e)),(t=R(this,kt))==null||t.setAttribute(`${R(this,At)}`,`${this.value}`)}contains(e){return R(this,Nt,Pt).has(e)}toggle(e,t){return t===void 0?this.contains(e)?(this.remove(e),!1):(this.add(e),!0):t?(this.add(e),!0):(this.remove(e),!1)}replace(e,t){return this.remove(e),this.add(t),e===t}};kt=new WeakMap,At=new WeakMap,jt=new WeakMap,Mt=new WeakMap,Nt=new WeakSet,Pt=function(){return R(this,Mt).size?R(this,Mt):R(this,jt)};var It=(e=``)=>e.split(/\s+/),Lt=(e=``)=>{let[t,n,r]=e.split(`:`),i=r?decodeURIComponent(r):void 0;return{kind:t===`cc`?g.CAPTIONS:g.SUBTITLES,language:n,label:i}},Rt=(e=``,t={})=>It(e).map(e=>{let n=Lt(e);return{...t,...n}}),zt=e=>e?Array.isArray(e)?e.map(e=>typeof e==`string`?Lt(e):e):typeof e==`string`?Rt(e):[e]:[],Bt=({kind:e,label:t,language:n}={kind:`subtitles`})=>t?`${e===`captions`?`cc`:`sb`}:${n}:${encodeURIComponent(t)}`:n,Vt=(e=[])=>Array.prototype.map.call(e,Bt).join(` `),Ht=(e,t)=>n=>n[e]===t,Ut=e=>{let t=Object.entries(e).map(([e,t])=>Ht(e,t));return e=>t.every(t=>t(e))},Wt=(e,t=[],n=[])=>{let r=zt(n).map(Ut);Array.from(t).filter(e=>r.some(t=>t(e))).forEach(t=>{t.mode=e})},Gt=(e,t=()=>!0)=>{if(!e?.textTracks)return[];let n=typeof t==`function`?t:Ut(t);return Array.from(e.textTracks).filter(n)},Kt=e=>!!e.mediaSubtitlesShowing?.length||e.hasAttribute(p.MEDIA_SUBTITLES_SHOWING),qt=e=>{let{media:t,fullscreenElement:n}=e;try{let e=n&&`requestFullscreen`in n?`requestFullscreen`:n&&`webkitRequestFullScreen`in n?`webkitRequestFullScreen`:void 0;if(e){let t=n[e]?.call(n);if(t instanceof Promise)return t.catch(()=>{})}else t?.webkitEnterFullscreen?t.webkitEnterFullscreen():t?.requestFullscreen&&t.requestFullscreen()}catch(e){console.error(e)}},Jt=`exitFullscreen`in S?`exitFullscreen`:`webkitExitFullscreen`in S?`webkitExitFullscreen`:`webkitCancelFullScreen`in S?`webkitCancelFullScreen`:void 0,Yt=e=>{let{documentElement:t}=e;if(Jt){let e=(t?.[Jt])?.call(t);if(e instanceof Promise)return e.catch(()=>{})}},Xt=`fullscreenElement`in S?`fullscreenElement`:`webkitFullscreenElement`in S?`webkitFullscreenElement`:void 0,Zt=e=>{let{documentElement:t,media:n}=e,r=t?.[Xt];return!r&&`webkitDisplayingFullscreen`in n&&`webkitPresentationMode`in n&&n.webkitDisplayingFullscreen&&n.webkitPresentationMode===te.FULLSCREEN?n:r},Qt=e=>{let{media:t,documentElement:n,fullscreenElement:r=t}=e;if(!t||!n)return!1;let i=Zt(e);if(!i)return!1;if(i===r||i===t)return!0;if(i.localName.includes(`-`)){let e=i.shadowRoot;if(!(Xt in e))return Fe(i,r);for(;e?.[Xt];){if(e[Xt]===r)return!0;e=e[Xt]?.shadowRoot}}return!1},$t=`fullscreenEnabled`in S?`fullscreenEnabled`:`webkitFullscreenEnabled`in S?`webkitFullscreenEnabled`:void 0,en=e=>{let{documentElement:t,media:n}=e;return!!t?.[$t]||n&&`webkitSupportsFullscreen`in n},tn,nn=()=>{var e;return tn||(tn=((e=S)?.createElement)?.call(e,`video`),tn)},rn=async(e=nn())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let n=new AbortController,r=await Promise.race([an(e,n.signal),on(e,t)]);return n.abort(),r},an=(e,t)=>new Promise(n=>{e.addEventListener(`volumechange`,()=>n(!0),{signal:t})}),on=async(e,t)=>{for(let n=0;n<10;n++){if(e.volume===t)return!1;await se(10)}return e.volume!==t},sn=/.*Version\/.*Safari\/.*/.test(x.navigator.userAgent),cn=(e=nn())=>x.matchMedia(`(display-mode: standalone)`).matches&&sn?!1:typeof e?.requestPictureInPicture==`function`,ln=(e=nn())=>en({documentElement:S,media:e}),un=ln(),dn=cn(),fn=!!x.WebKitPlaybackTargetAvailabilityEvent,pn=!!x.chrome,mn=e=>Gt(e.media,e=>[g.SUBTITLES,g.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),hn=e=>Gt(e.media,e=>e.mode===_.SHOWING&&[g.SUBTITLES,g.CAPTIONS].includes(e.kind)),gn=(e,t)=>{let n=mn(e),r=hn(e),i=!!r.length;if(n.length){if(t===!1||i&&t!==!0)Wt(_.DISABLED,n,r);else if(t===!0||!i&&t!==!1){let t=n[0],{options:i}=e;if(!i?.noSubtitlesLangPref){let e=x.localStorage.getItem(`media-chrome-pref-subtitles-lang`),r=e?[e,...x.navigator.languages]:x.navigator.languages,i=n.filter(e=>r.some(t=>e.language.toLowerCase().startsWith(t.split(`-`)[0]))).sort((e,t)=>r.findIndex(t=>e.language.toLowerCase().startsWith(t.split(`-`)[0]))-r.findIndex(e=>t.language.toLowerCase().startsWith(e.split(`-`)[0])));i[0]&&(t=i[0])}let{language:a,label:o,kind:s}=t;Wt(_.DISABLED,n,r),Wt(_.SHOWING,n,[{language:a,label:o,kind:s}])}}},_n=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t?!1:typeof e==`number`&&Number.isNaN(e)&&Number.isNaN(t)?!0:typeof e==`object`?Array.isArray(e)?vn(e,t):Object.entries(e).every(([e,n])=>e in t&&_n(n,t[e])):!1,vn=(e,t)=>{let n=Array.isArray(e),r=Array.isArray(t);return n===r?n||r?e.length===t.length&&e.every((e,n)=>_n(e,t[n])):!0:!1},yn=Object.values(ee),bn,xn=rn().then(e=>(bn=e,bn)),Sn=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!(`localName`in e&&e instanceof x.HTMLElement))return;let t=e.localName;if(!t.includes(`-`))return;let n=x.customElements.get(t);n&&e instanceof n||(await x.customElements.whenDefined(t),x.customElements.upgrade(e))}))},Cn=new x.DOMParser,wn=e=>e&&(Cn.parseFromString(e,`text/html`).body.textContent||e),Tn={mediaError:{get(e,t){let{media:n}=e;if(t?.type!==`playing`)return n?.error},mediaEvents:[`emptied`,`error`,`playing`]},mediaErrorCode:{get(e,t){let{media:n}=e;if(t?.type!==`playing`)return n?.error?.code},mediaEvents:[`emptied`,`error`,`playing`]},mediaErrorMessage:{get(e,t){let{media:n}=e;if(t?.type!==`playing`)return n?.error?.message??``},mediaEvents:[`emptied`,`error`,`playing`]},mediaWidth:{get(e){let{media:t}=e;return t?.videoWidth??0},mediaEvents:[`resize`]},mediaHeight:{get(e){let{media:t}=e;return t?.videoHeight??0},mediaEvents:[`resize`]},mediaPaused:{get(e){let{media:t}=e;return t?.paused??!0},set(e,t){var n;let{media:r}=t;r&&(e?r.pause():(n=r.play())==null||n.catch(()=>{}))},mediaEvents:[`play`,`playing`,`pause`,`emptied`]},mediaHasPlayed:{get(e,t){let{media:n}=e;return n?t?t.type===`playing`:!n.paused:!1},mediaEvents:[`playing`,`emptied`]},mediaEnded:{get(e){let{media:t}=e;return t?.ended??!1},mediaEvents:[`seeked`,`ended`,`emptied`]},mediaPlaybackRate:{get(e){let{media:t}=e;return t?.playbackRate??1},set(e,t){let{media:n}=t;n&&Number.isFinite(+e)&&(n.playbackRate=+e)},mediaEvents:[`ratechange`,`loadstart`]},mediaMuted:{get(e){let{media:t}=e;return t?.muted??!1},set(e,t){let{media:n,options:{noMutedPref:r}={}}=t;if(n){n.muted=e;try{let t=x.localStorage.getItem(`media-chrome-pref-muted`)!==null,i=n.hasAttribute(`muted`);if(r){t&&x.localStorage.removeItem(`media-chrome-pref-muted`);return}if(i&&!t)return;x.localStorage.setItem(`media-chrome-pref-muted`,e?`true`:`false`)}catch(e){console.debug(`Error setting muted pref`,e)}}},mediaEvents:[`volumechange`],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noMutedPref:n}}=t,{media:r}=t;if(!(!r||r.muted||n))try{let n=x.localStorage.getItem(`media-chrome-pref-muted`)===`true`;Tn.mediaMuted.set(n,t),e(n)}catch(e){console.debug(`Error getting muted pref`,e)}}]},mediaLoop:{get(e){let{media:t}=e;return t?.loop},set(e,t){let{media:n}=t;n&&(n.loop=e)},mediaEvents:[`medialooprequest`]},mediaVolume:{get(e){let{media:t}=e;return t?.volume??1},set(e,t){let{media:n,options:{noVolumePref:r}={}}=t;if(n){try{e==null?x.localStorage.removeItem(`media-chrome-pref-volume`):!n.hasAttribute(`muted`)&&!r&&x.localStorage.setItem(`media-chrome-pref-volume`,e.toString())}catch(e){console.debug(`Error setting volume pref`,e)}Number.isFinite(+e)&&(n.volume=+e)}},mediaEvents:[`volumechange`],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noVolumePref:n}}=t;if(!n)try{let{media:n}=t;if(!n)return;let r=x.localStorage.getItem(`media-chrome-pref-volume`);if(r==null)return;Tn.mediaVolume.set(+r,t),e(+r)}catch(e){console.debug(`Error getting volume pref`,e)}}]},mediaVolumeLevel:{get(e){let{media:t}=e;return t?.volume===void 0?`high`:t.muted||t.volume===0?`off`:t.volume<.5?`low`:t.volume<.75?`medium`:`high`},mediaEvents:[`volumechange`]},mediaCurrentTime:{get(e){let{media:t}=e;return t?.currentTime??0},set(e,t){let{media:n}=t;n&&oe(e)&&(n.currentTime=e)},mediaEvents:[`timeupdate`,`loadedmetadata`,`seeking`]},mediaDuration:{get(e){let{media:t,options:{defaultDuration:n}={}}=e;return n&&(!t||!t.duration||Number.isNaN(t.duration)||!Number.isFinite(t.duration))?n:Number.isFinite(t?.duration)?t.duration:NaN},mediaEvents:[`durationchange`,`loadedmetadata`,`emptied`]},mediaLoading:{get(e){let{media:t}=e;return t?.readyState<3},mediaEvents:[`waiting`,`playing`,`emptied`]},mediaSeekable:{get(e){let{media:t}=e;if(!t?.seekable?.length)return;let n=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(n||r)return[Number(n.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:[`loadedmetadata`,`emptied`,`progress`,`seekablechange`]},mediaBuffered:{get(e){let{media:t}=e,n=t?.buffered??[];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){let{media:t,options:{defaultStreamType:n}={}}=e,r=[ee.LIVE,ee.ON_DEMAND].includes(n)?n:void 0;if(!t)return r;let{streamType:i}=t;if(yn.includes(i))return i===ee.UNKNOWN?r:i;let a=t.duration;return a===1/0?ee.LIVE:Number.isFinite(a)?ee.ON_DEMAND:r},mediaEvents:[`emptied`,`durationchange`,`loadedmetadata`,`streamtypechange`]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:n}=t,r=Tn.mediaStreamType.get(e);return(n==null||Number.isNaN(n))&&r===ee.LIVE?0:n},mediaEvents:[`emptied`,`durationchange`,`loadedmetadata`,`streamtypechange`,`targetlivewindowchange`]},mediaTimeIsLive:{get(e){let{media:t,options:{liveEdgeOffset:n=10}={}}=e;if(!t)return!1;if(typeof t.liveEdgeStart==`number`)return!Number.isNaN(t.liveEdgeStart)&&t.currentTime>=t.liveEdgeStart;if(Tn.mediaStreamType.get(e)!==ee.LIVE)return!1;let r=t.seekable;if(!r)return!0;if(!r.length)return!1;let i=r.end(r.length-1)-n;return t.currentTime>=i},mediaEvents:[`playing`,`timeupdate`,`progress`,`waiting`,`emptied`]},mediaSubtitlesList:{get(e){return mn(e).map(({kind:e,label:t,language:n})=>({kind:e,label:t,language:n}))},mediaEvents:[`loadstart`],textTracksEvents:[`addtrack`,`removetrack`]},mediaSubtitlesShowing:{get(e){return hn(e).map(({kind:e,label:t,language:n})=>({kind:e,label:t,language:n}))},mediaEvents:[`loadstart`],textTracksEvents:[`addtrack`,`removetrack`,`change`],stateOwnersUpdateHandlers:[(e,t)=>{var n,r;let{media:i,options:a}=t;if(!i)return;let o=e=>{a.defaultSubtitles&&(!e||[g.CAPTIONS,g.SUBTITLES].includes(e?.track?.kind))&&gn(t,!0)};return i.addEventListener(`loadstart`,o),(n=i.textTracks)==null||n.addEventListener(`addtrack`,o),(r=i.textTracks)==null||r.addEventListener(`removetrack`,o),()=>{var e,t;i.removeEventListener(`loadstart`,o),(e=i.textTracks)==null||e.removeEventListener(`addtrack`,o),(t=i.textTracks)==null||t.removeEventListener(`removetrack`,o)}}]},mediaChaptersCues:{get(e){let{media:t}=e;if(!t)return[];let[n]=Gt(t,{kind:g.CHAPTERS});return Array.from(n?.cues??[]).map(({text:e,startTime:t,endTime:n})=>({text:wn(e),startTime:t,endTime:n}))},mediaEvents:[`loadstart`,`loadedmetadata`],textTracksEvents:[`addtrack`,`removetrack`,`change`],stateOwnersUpdateHandlers:[(e,t)=>{let{media:n}=t;if(!n)return;let r=n.querySelector(`track[kind="chapters"][default][src]`),i=n.shadowRoot?.querySelector(`:is(video,audio) > track[kind="chapters"][default][src]`);return r?.addEventListener(`load`,e),i?.addEventListener(`load`,e),()=>{r?.removeEventListener(`load`,e),i?.removeEventListener(`load`,e)}}]},mediaIsPip:{get(e){let{media:t,documentElement:n}=e;if(!t||!n||!n.pictureInPictureElement)return!1;if(n.pictureInPictureElement===t)return!0;if(n.pictureInPictureElement instanceof HTMLMediaElement)return t.localName?.includes(`-`)?Fe(t,n.pictureInPictureElement):!1;if(n.pictureInPictureElement.localName.includes(`-`)){let e=n.pictureInPictureElement.shadowRoot;for(;e?.pictureInPictureElement;){if(e.pictureInPictureElement===t)return!0;e=e.pictureInPictureElement?.shadowRoot}}return!1},set(e,t){let{media:n}=t;if(n){if(e){if(!S.pictureInPictureEnabled){console.warn(`MediaChrome: Picture-in-picture is not enabled`);return}if(!n.requestPictureInPicture){console.warn(`MediaChrome: The current media does not support picture-in-picture`);return}let e=()=>{console.warn(`MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.`)};n.requestPictureInPicture().catch(t=>{if(t.code===11){if(!n.src){console.warn(`MediaChrome: The media is not ready for picture-in-picture. It must have a src set.`);return}if(n.readyState===0&&n.preload===`none`){let t=()=>{n.removeEventListener(`loadedmetadata`,r),n.preload=`none`},r=()=>{n.requestPictureInPicture().catch(e),t()};n.addEventListener(`loadedmetadata`,r),n.preload=`metadata`,setTimeout(()=>{n.readyState===0&&e(),t()},1e3)}else throw t}else throw t})}else S.pictureInPictureElement&&S.exitPictureInPicture()}},mediaEvents:[`enterpictureinpicture`,`leavepictureinpicture`]},mediaRenditionList:{get(e){let{media:t}=e;return[...t?.videoRenditions??[]].map(e=>({...e}))},mediaEvents:[`emptied`,`loadstart`],videoRenditionsEvents:[`addrendition`,`removerendition`]},mediaRenditionSelected:{get(e){let{media:t}=e;return t?.videoRenditions?.[t.videoRenditions?.selectedIndex]?.id},set(e,t){let{media:n}=t;if(!n?.videoRenditions){console.warn(`MediaController: Rendition selection not supported by this media.`);return}let r=e,i=Array.prototype.findIndex.call(n.videoRenditions,e=>e.id==r);n.videoRenditions.selectedIndex!=i&&(n.videoRenditions.selectedIndex=i)},mediaEvents:[`emptied`],videoRenditionsEvents:[`addrendition`,`removerendition`,`change`]},mediaAudioTrackList:{get(e){let{media:t}=e;return[...t?.audioTracks??[]]},mediaEvents:[`emptied`,`loadstart`],audioTracksEvents:[`addtrack`,`removetrack`]},mediaAudioTrackEnabled:{get(e){let{media:t}=e;return[...t?.audioTracks??[]].find(e=>e.enabled)?.id},set(e,t){let{media:n}=t;if(!n?.audioTracks){console.warn(`MediaChrome: Audio track selection not supported by this media.`);return}let r=e;for(let e of n.audioTracks)e.enabled=r==e.id},mediaEvents:[`emptied`],audioTracksEvents:[`addtrack`,`removetrack`,`change`]},mediaIsFullscreen:{get(e){return Qt(e)},set(e,t,n){var r;e?(qt(t),n.detail&&!t.media?.inert&&((r=t.media)==null||r.focus())):Yt(t)},rootEvents:[`fullscreenchange`,`webkitfullscreenchange`],mediaEvents:[`webkitbeginfullscreen`,`webkitendfullscreen`,`webkitpresentationmodechanged`]},mediaIsCasting:{get(e){let{media:t}=e;return!t?.remote||t.remote?.state===`disconnected`?!1:t.remote.state===`connected`},set(e,t){let{media:n}=t;n&&(e&&n.remote?.state!==`disconnected`||(e||n.remote?.state===`connected`)&&(typeof n.remote.prompt==`function`?n.remote.prompt().catch(()=>{}):console.warn(`MediaChrome: Casting is not supported in this environment`)))},remoteEvents:[`connect`,`connecting`,`disconnect`]},mediaIsAirplaying:{get(){return!1},set(e,t){let{media:n}=t;n&&(n.webkitShowPlaybackTargetPicker&&x.WebKitPlaybackTargetAvailabilityEvent?n.webkitShowPlaybackTargetPicker():console.error(`MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment`))},mediaEvents:[`webkitcurrentplaybacktargetiswirelesschanged`]},mediaFullscreenUnavailable:{get(e){let{media:t}=e;if(!un||!ln(t))return y.UNSUPPORTED}},mediaPipUnavailable:{get(e){let{media:t}=e;if(!dn||!cn(t))return y.UNSUPPORTED;if(t?.disablePictureInPicture)return y.UNAVAILABLE}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(bn===!1||t?.volume==null)return y.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{bn??xn.then(t=>e(t?void 0:y.UNSUPPORTED))}]},mediaCastUnavailable:{get(e,{availability:t=`not-available`}={}){let{media:n}=e;if(!pn||!n?.remote?.state)return y.UNSUPPORTED;if(t!=null&&t!==`available`)return y.UNAVAILABLE},stateOwnersUpdateHandlers:[(e,t)=>{var n;let{media:r}=t;if(r)return r.disableRemotePlayback||r.hasAttribute(`disableremoteplayback`)||(n=r?.remote)==null||n.watchAvailability(t=>{e({availability:t?`available`:`not-available`})}).catch(t=>{t.name===`NotSupportedError`?e({availability:null}):e({availability:`not-available`})}),()=>{var e;(e=r?.remote)==null||e.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get(e,t){if(!fn)return y.UNSUPPORTED;if(t?.availability===`not-available`)return y.UNAVAILABLE},mediaEvents:[`webkitplaybacktargetavailabilitychanged`],stateOwnersUpdateHandlers:[(e,t)=>{var n;let{media:r}=t;if(r)return r.disableRemotePlayback||r.hasAttribute(`disableremoteplayback`)||(n=r?.remote)==null||n.watchAvailability(t=>{e({availability:t?`available`:`not-available`})}).catch(t=>{t.name===`NotSupportedError`?e({availability:null}):e({availability:`not-available`})}),()=>{var e;(e=r?.remote)==null||e.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(e){let{media:t}=e;if(!t?.videoRenditions)return y.UNSUPPORTED;if(!t.videoRenditions?.length)return y.UNAVAILABLE},mediaEvents:[`emptied`,`loadstart`],videoRenditionsEvents:[`addrendition`,`removerendition`]},mediaAudioTrackUnavailable:{get(e){let{media:t}=e;if(!t?.audioTracks)return y.UNSUPPORTED;if((t.audioTracks?.length??0)<=1)return y.UNAVAILABLE},mediaEvents:[`emptied`,`loadstart`],audioTracksEvents:[`addtrack`,`removetrack`]},mediaLang:{get(e){let{options:{mediaLang:t}={}}=e;return t??`en`}}},En={[l.MEDIA_PREVIEW_REQUEST](e,t,{detail:n}){let{media:r}=t,i=n??void 0,a,o;if(r&&i!=null){let[e]=Gt(r,{kind:g.METADATA,label:`thumbnails`}),t=Array.prototype.find.call(e?.cues??[],(e,t,n)=>t===0?e.endTime>i:t===n.length-1?e.startTime<=i:e.startTime<=i&&e.endTime>i);if(t){let e=/'^(?:[a-z]+:)?\/\//i.test(t.text)?void 0:r?.querySelector(`track[label="thumbnails"]`)?.src,n=new URL(t.text,e);o=new URLSearchParams(n.hash).get(`#xywh`).split(`,`).map(e=>+e),a=n.href}}let s=e.mediaDuration.get(t),c=e.mediaChaptersCues.get(t).find((e,t,n)=>t===n.length-1&&s===e.endTime?e.startTime<=i&&e.endTime>=i:e.startTime<=i&&e.endTime>i)?.text;return n!=null&&c==null&&(c=``),{mediaPreviewTime:i,mediaPreviewImage:a,mediaPreviewCoords:o,mediaPreviewChapter:c}},[l.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[l.MEDIA_PLAY_REQUEST](e,t){let n=e.mediaStreamType.get(t)===ee.LIVE,r=!t.options?.noAutoSeekToLive,i=e.mediaTargetLiveWindow.get(t)>0;if(n&&r&&!i){let n=e.mediaSeekable.get(t)?.[1];if(n){let r=n-(t.options?.seekToLiveOffset??0);e.mediaCurrentTime.set(r,t)}}e.mediaPaused.set(!1,t)},[l.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:n}){let r=n;e.mediaPlaybackRate.set(r,t)},[l.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[l.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[l.MEDIA_LOOP_REQUEST](e,t,{detail:n}){let r=!!n;return e.mediaLoop.set(r,t),{mediaLoop:r}},[l.MEDIA_VOLUME_REQUEST](e,t,{detail:n}){let r=n;r&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(r,t)},[l.MEDIA_SEEK_REQUEST](e,t,{detail:n}){let r=n;e.mediaCurrentTime.set(r,t)},[l.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){let n=e.mediaSeekable.get(t)?.[1];if(Number.isNaN(Number(n)))return;let r=n-(t.options?.seekToLiveOffset??0);e.mediaCurrentTime.set(r,t)},[l.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:n}){let{options:r}=t,i=mn(t),a=zt(n),o=a[0]?.language;o&&!r.noSubtitlesLangPref&&x.localStorage.setItem(`media-chrome-pref-subtitles-lang`,o),Wt(_.SHOWING,i,a)},[l.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:n}){let r=mn(t),i=n??[];Wt(_.DISABLED,r,i)},[l.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:n}){gn(t,n)},[l.MEDIA_RENDITION_REQUEST](e,t,{detail:n}){let r=n;e.mediaRenditionSelected.set(r,t)},[l.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:n}){let r=n;e.mediaAudioTrackEnabled.set(r,t)},[l.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[l.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[l.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,n){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,n)},[l.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[l.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[l.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[l.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}},Dn=({media:e,fullscreenElement:t,documentElement:n,stateMediator:r=Tn,requestMap:i=En,options:a={},monitorStateOwnersOnlyWithSubscriptions:o=!0})=>{let s=[],c={options:{...a}},l=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),u=e=>{e!=null&&(_n(e,l)||(l=Object.freeze({...l,...e}),s.forEach(e=>e(l))))},d=()=>{let e=Object.entries(r).reduce((e,[t,{get:n}])=>(e[t]=n(c),e),{});u(e)},f={},p,m=async(e,t)=>{let n=!!p;if(p={...c,...p??{},...e},n)return;await Sn(...Object.values(e));let i=s.length>0&&t===0&&o,a=c.media!==p.media,l=c.media?.textTracks!==p.media?.textTracks,m=c.media?.videoRenditions!==p.media?.videoRenditions,h=c.media?.audioTracks!==p.media?.audioTracks,g=c.media?.remote!==p.media?.remote,_=c.documentElement!==p.documentElement,v=!!c.media&&(a||i),y=!!c.media?.textTracks&&(l||i),ee=!!c.media?.videoRenditions&&(m||i),te=!!c.media?.audioTracks&&(h||i),ne=!!c.media?.remote&&(g||i),re=!!c.documentElement&&(_||i),ie=v||y||ee||te||ne||re,ae=s.length===0&&t===1&&o,oe=!!p.media&&(a||ae),se=!!p.media?.textTracks&&(l||ae),ce=!!p.media?.videoRenditions&&(m||ae),le=!!p.media?.audioTracks&&(h||ae),ue=!!p.media?.remote&&(g||ae),de=!!p.documentElement&&(_||ae),fe=oe||se||ce||le||ue||de;ie||fe?(Object.entries(r).forEach(([e,{get:t,mediaEvents:n=[],textTracksEvents:r=[],videoRenditionsEvents:i=[],audioTracksEvents:a=[],remoteEvents:o=[],rootEvents:s=[],stateOwnersUpdateHandlers:l=[]}])=>{f[e]||(f[e]={});let d=n=>{let r=t(c,n);u({[e]:r})},m;m=f[e].mediaEvents,n.forEach(t=>{m&&v&&(c.media.removeEventListener(t,m),f[e].mediaEvents=void 0),oe&&(p.media.addEventListener(t,d),f[e].mediaEvents=d)}),m=f[e].textTracksEvents,r.forEach(t=>{var n,r;m&&y&&((n=c.media.textTracks)==null||n.removeEventListener(t,m),f[e].textTracksEvents=void 0),se&&((r=p.media.textTracks)==null||r.addEventListener(t,d),f[e].textTracksEvents=d)}),m=f[e].videoRenditionsEvents,i.forEach(t=>{var n,r;m&&ee&&((n=c.media.videoRenditions)==null||n.removeEventListener(t,m),f[e].videoRenditionsEvents=void 0),ce&&((r=p.media.videoRenditions)==null||r.addEventListener(t,d),f[e].videoRenditionsEvents=d)}),m=f[e].audioTracksEvents,a.forEach(t=>{var n,r;m&&te&&((n=c.media.audioTracks)==null||n.removeEventListener(t,m),f[e].audioTracksEvents=void 0),le&&((r=p.media.audioTracks)==null||r.addEventListener(t,d),f[e].audioTracksEvents=d)}),m=f[e].remoteEvents,o.forEach(t=>{var n,r;m&&ne&&((n=c.media.remote)==null||n.removeEventListener(t,m),f[e].remoteEvents=void 0),ue&&((r=p.media.remote)==null||r.addEventListener(t,d),f[e].remoteEvents=d)}),m=f[e].rootEvents,s.forEach(t=>{m&&re&&(c.documentElement.removeEventListener(t,m),f[e].rootEvents=void 0),de&&(p.documentElement.addEventListener(t,d),f[e].rootEvents=d)});let h=f[e].stateOwnersUpdateHandlers;if(h&&ie&&(Array.isArray(h)?h:[h]).forEach(e=>{typeof e==`function`&&e()}),fe){let t=l.map(e=>e(d,p)).filter(e=>typeof e==`function`);f[e].stateOwnersUpdateHandlers=t.length===1?t[0]:t}else ie&&(f[e].stateOwnersUpdateHandlers=void 0)}),Object.entries(p).forEach(([e,t])=>{c[e]=t}),d(),p=void 0):(Object.entries(p).forEach(([e,t])=>{c[e]=t}),d(),p=void 0)};return m({media:e,fullscreenElement:t,documentElement:n,options:a}),{dispatch(e){let{type:t,detail:n}=e;i[t]&&l.mediaErrorCode==null?u(i[t](r,c,e)):t===`mediaelementchangerequest`?m({media:n}):t===`fullscreenelementchangerequest`?m({fullscreenElement:n}):t===`documentelementchangerequest`?m({documentElement:n}):t===`optionschangerequest`&&(Object.entries(n??{}).forEach(([e,t])=>{c.options[e]=t}),d())},getState(){return l},subscribe(e){return m({},s.length+1),s.push(e),e(l),()=>{let t=s.indexOf(e);t>=0&&(m({},s.length-1),s.splice(t,1))}}}},On=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},z=(e,t,n)=>(On(e,t,`read from private field`),n?n.call(e):t.get(e)),B=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},kn=(e,t,n,r)=>(On(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),An=(e,t,n)=>(On(e,t,`access private method`),n),jn,Mn,V,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn=[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Enter`,` `,`f`,`m`,`k`,`c`,`l`,`j`,`>`,`<`,`p`],Kn=10,qn=.025,Jn=.25,Yn=.25,Xn=2,H={DEFAULT_SUBTITLES:`defaultsubtitles`,DEFAULT_STREAM_TYPE:`defaultstreamtype`,DEFAULT_DURATION:`defaultduration`,FULLSCREEN_ELEMENT:`fullscreenelement`,HOTKEYS:`hotkeys`,KEYBOARD_BACKWARD_SEEK_OFFSET:`keyboardbackwardseekoffset`,KEYBOARD_FORWARD_SEEK_OFFSET:`keyboardforwardseekoffset`,KEYBOARD_DOWN_VOLUME_STEP:`keyboarddownvolumestep`,KEYBOARD_UP_VOLUME_STEP:`keyboardupvolumestep`,KEYS_USED:`keysused`,LANG:`lang`,LOOP:`loop`,LIVE_EDGE_OFFSET:`liveedgeoffset`,NO_AUTO_SEEK_TO_LIVE:`noautoseektolive`,NO_DEFAULT_STORE:`nodefaultstore`,NO_HOTKEYS:`nohotkeys`,NO_MUTED_PREF:`nomutedpref`,NO_SUBTITLES_LANG_PREF:`nosubtitleslangpref`,NO_VOLUME_PREF:`novolumepref`,SEEK_TO_LIVE_OFFSET:`seektoliveoffset`},Zn=class extends wt{constructor(){super(),B(this,Rn),B(this,Vn),B(this,Un),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,B(this,jn,new Ft(this,H.HOTKEYS)),B(this,Mn,void 0),B(this,V,void 0),B(this,Nn,null),B(this,Pn,void 0),B(this,Fn,void 0),B(this,In,e=>{var t;(t=z(this,V))==null||t.dispatch(e)}),B(this,Ln,void 0),B(this,Bn,e=>{let{key:t,shiftKey:n}=e;n&&(t===`/`||t===`?`)||Gn.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener(`keyup`,z(this,Bn))}),this.associateElement(this);let e={};kn(this,Pn,t=>{Object.entries(t).forEach(([t,n])=>{if(t in e&&e[t]===n)return;this.propagateMediaState(t,n);let r=t.toLowerCase(),i=new x.CustomEvent(h[r],{composed:!0,detail:n});this.dispatchEvent(i)}),e=t})}static get observedAttributes(){return super.observedAttributes.concat(H.NO_HOTKEYS,H.HOTKEYS,H.DEFAULT_STREAM_TYPE,H.DEFAULT_SUBTITLES,H.DEFAULT_DURATION,H.NO_MUTED_PREF,H.NO_VOLUME_PREF,H.LANG,H.LOOP,H.LIVE_EDGE_OFFSET,H.SEEK_TO_LIVE_OFFSET,H.NO_AUTO_SEEK_TO_LIVE)}get mediaStore(){return z(this,V)}set mediaStore(e){var t;z(this,V)&&((t=z(this,Fn))==null||t.call(this),kn(this,Fn,void 0)),kn(this,V,e),!z(this,V)&&!this.hasAttribute(H.NO_DEFAULT_STORE)?An(this,Rn,zn).call(this):kn(this,Fn,z(this,V)?.subscribe(z(this,Pn)))}get fullscreenElement(){return z(this,Mn)??this}set fullscreenElement(e){var t;this.hasAttribute(H.FULLSCREEN_ELEMENT)&&this.removeAttribute(H.FULLSCREEN_ELEMENT),kn(this,Mn,e),(t=z(this,V))==null||t.dispatch({type:`fullscreenelementchangerequest`,detail:this.fullscreenElement})}get defaultSubtitles(){return D(this,H.DEFAULT_SUBTITLES)}set defaultSubtitles(e){O(this,H.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return k(this,H.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){A(this,H.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return T(this,H.DEFAULT_DURATION)}set defaultDuration(e){E(this,H.DEFAULT_DURATION,e)}get noHotkeys(){return D(this,H.NO_HOTKEYS)}set noHotkeys(e){O(this,H.NO_HOTKEYS,e)}get keysUsed(){return k(this,H.KEYS_USED)}set keysUsed(e){A(this,H.KEYS_USED,e)}get liveEdgeOffset(){return T(this,H.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){E(this,H.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return D(this,H.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){O(this,H.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return D(this,H.NO_VOLUME_PREF)}set noVolumePref(e){O(this,H.NO_VOLUME_PREF,e)}get noMutedPref(){return D(this,H.NO_MUTED_PREF)}set noMutedPref(e){O(this,H.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return D(this,H.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){O(this,H.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return D(this,H.NO_DEFAULT_STORE)}set noDefaultStore(e){O(this,H.NO_DEFAULT_STORE,e)}get resolvedLang(){return fe()}attributeChangedCallback(e,t,n){var r,i,a,o,s,c,u,d,f,p;if(super.attributeChangedCallback(e,t,n),e===H.NO_HOTKEYS)n!==t&&n===``?(this.hasAttribute(H.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):n!==t&&n===null&&this.enableHotkeys();else if(e===H.HOTKEYS)z(this,jn).value=n;else if(e===H.DEFAULT_SUBTITLES&&n!==t)(r=z(this,V))==null||r.dispatch({type:`optionschangerequest`,detail:{defaultSubtitles:this.hasAttribute(H.DEFAULT_SUBTITLES)}});else if(e===H.DEFAULT_STREAM_TYPE)(i=z(this,V))==null||i.dispatch({type:`optionschangerequest`,detail:{defaultStreamType:this.getAttribute(H.DEFAULT_STREAM_TYPE)??void 0}});else if(e===H.LIVE_EDGE_OFFSET&&n!==t)(a=z(this,V))==null||a.dispatch({type:`optionschangerequest`,detail:{liveEdgeOffset:this.hasAttribute(H.LIVE_EDGE_OFFSET)?+this.getAttribute(H.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(H.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(H.SEEK_TO_LIVE_OFFSET):this.hasAttribute(H.LIVE_EDGE_OFFSET)?+this.getAttribute(H.LIVE_EDGE_OFFSET):void 0}});else if(e===H.SEEK_TO_LIVE_OFFSET&&n!==t)(o=z(this,V))==null||o.dispatch({type:`optionschangerequest`,detail:{seekToLiveOffset:this.hasAttribute(H.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(H.SEEK_TO_LIVE_OFFSET):this.hasAttribute(H.LIVE_EDGE_OFFSET)?+this.getAttribute(H.LIVE_EDGE_OFFSET):void 0}});else if(e===H.NO_AUTO_SEEK_TO_LIVE)(s=z(this,V))==null||s.dispatch({type:`optionschangerequest`,detail:{noAutoSeekToLive:this.hasAttribute(H.NO_AUTO_SEEK_TO_LIVE)}});else if(e===H.FULLSCREEN_ELEMENT){let e=n?this.getRootNode()?.getElementById(n):void 0;kn(this,Mn,e),(c=z(this,V))==null||c.dispatch({type:`fullscreenelementchangerequest`,detail:this.fullscreenElement})}else e===H.LANG&&n!==t?(ue(n),(u=z(this,V))==null||u.dispatch({type:`optionschangerequest`,detail:{mediaLang:n}})):e===H.LOOP&&n!==t?(d=z(this,V))==null||d.dispatch({type:l.MEDIA_LOOP_REQUEST,detail:n!=null}):e===H.NO_VOLUME_PREF&&n!==t?(f=z(this,V))==null||f.dispatch({type:`optionschangerequest`,detail:{noVolumePref:this.hasAttribute(H.NO_VOLUME_PREF)}}):e===H.NO_MUTED_PREF&&n!==t&&((p=z(this,V))==null||p.dispatch({type:`optionschangerequest`,detail:{noMutedPref:this.hasAttribute(H.NO_MUTED_PREF)}}))}connectedCallback(){var e,t;this.associateElement(this),!z(this,V)&&!this.hasAttribute(H.NO_DEFAULT_STORE)&&An(this,Rn,zn).call(this),(e=z(this,V))==null||e.dispatch({type:`documentelementchangerequest`,detail:S}),(t=z(this,V))==null||t.dispatch({type:`fullscreenelementchangerequest`,detail:this.fullscreenElement}),super.connectedCallback(),z(this,V)&&!z(this,Fn)&&kn(this,Fn,z(this,V)?.subscribe(z(this,Pn))),z(this,Ln)!==void 0&&z(this,V)&&this.media&&setTimeout(()=>{var e;this.media?.textTracks?.length&&((e=z(this,V))==null||e.dispatch({type:l.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:z(this,Ln)}))},0),this.hasAttribute(H.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,n,r,i;if((e=super.disconnectedCallback)==null||e.call(this),this.disableHotkeys(),z(this,V)){let e=z(this,V).getState();kn(this,Ln,!!e.mediaSubtitlesShowing?.length),(t=z(this,V))==null||t.dispatch({type:`fullscreenelementchangerequest`,detail:void 0}),(n=z(this,V))==null||n.dispatch({type:`documentelementchangerequest`,detail:void 0}),(r=z(this,V))==null||r.dispatch({type:l.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}z(this,Fn)&&((i=z(this,Fn))==null||i.call(this),kn(this,Fn,void 0)),this.unassociateElement(this),z(this,Nn)&&(z(this,Nn).remove(),kn(this,Nn,null))}mediaSetCallback(e){var t;super.mediaSetCallback(e),(t=z(this,V))==null||t.dispatch({type:`mediaelementchangerequest`,detail:e}),e.hasAttribute(`tabindex`)||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),(t=z(this,V))==null||t.dispatch({type:`mediaelementchangerequest`,detail:void 0})}propagateMediaState(e,t){cr(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let n=lr(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(l).forEach(t=>{e.addEventListener(t,z(this,In))}),t.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(l).forEach(t=>{e.removeEventListener(t,z(this,In))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),z(this,V)&&Object.entries(z(this,V).getState()).forEach(([t,n])=>{cr([e],t,n)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,n=t.indexOf(e);n<0||t.splice(n,1)}enableHotkeys(){this.addEventListener(`keydown`,An(this,Vn,Hn))}disableHotkeys(){this.removeEventListener(`keydown`,An(this,Vn,Hn)),this.removeEventListener(`keyup`,z(this,Bn))}get hotkeys(){return z(this,jn)}set hotkeys(e){A(this,H.HOTKEYS,e)}keyboardShortcutHandler(e){let t=e.target;if((t.getAttribute(H.KEYS_USED)?.split(` `)??t?.keysUsed??[]).map(e=>e===`Space`?` `:e).filter(Boolean).includes(e.key))return;let n,r,i;if(!z(this,jn).contains(`no${e.key.toLowerCase()}`)&&!(e.key===` `&&z(this,jn).contains(`nospace`))&&(!e.shiftKey||e.key!==`/`&&e.key!==`?`||!z(this,jn).contains(`noshift+/`)))switch(e.key){case` `:case`k`:n=z(this,V).getState().mediaPaused?l.MEDIA_PLAY_REQUEST:l.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new x.CustomEvent(n,{composed:!0,bubbles:!0}));break;case`m`:n=this.mediaStore.getState().mediaVolumeLevel===`off`?l.MEDIA_UNMUTE_REQUEST:l.MEDIA_MUTE_REQUEST,this.dispatchEvent(new x.CustomEvent(n,{composed:!0,bubbles:!0}));break;case`f`:n=this.mediaStore.getState().mediaIsFullscreen?l.MEDIA_EXIT_FULLSCREEN_REQUEST:l.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new x.CustomEvent(n,{composed:!0,bubbles:!0}));break;case`c`:this.dispatchEvent(new x.CustomEvent(l.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case`ArrowLeft`:case`j`:{let e=this.hasAttribute(H.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(H.KEYBOARD_BACKWARD_SEEK_OFFSET):Kn;r=Math.max((this.mediaStore.getState().mediaCurrentTime??0)-e,0),i=new x.CustomEvent(l.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:r}),this.dispatchEvent(i);break}case`ArrowRight`:case`l`:{let e=this.hasAttribute(H.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(H.KEYBOARD_FORWARD_SEEK_OFFSET):Kn;r=Math.max((this.mediaStore.getState().mediaCurrentTime??0)+e,0),i=new x.CustomEvent(l.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:r}),this.dispatchEvent(i);break}case`ArrowUp`:{let e=this.hasAttribute(H.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(H.KEYBOARD_UP_VOLUME_STEP):qn;r=Math.min((this.mediaStore.getState().mediaVolume??1)+e,1),i=new x.CustomEvent(l.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:r}),this.dispatchEvent(i);break}case`ArrowDown`:{let e=this.hasAttribute(H.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(H.KEYBOARD_DOWN_VOLUME_STEP):qn;r=Math.max((this.mediaStore.getState().mediaVolume??1)-e,0),i=new x.CustomEvent(l.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:r}),this.dispatchEvent(i);break}case`<`:{let e=this.mediaStore.getState().mediaPlaybackRate??1;r=Math.max(e-Jn,Yn).toFixed(2),i=new x.CustomEvent(l.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r}),this.dispatchEvent(i);break}case`>`:{let e=this.mediaStore.getState().mediaPlaybackRate??1;r=Math.min(e+Jn,Xn).toFixed(2),i=new x.CustomEvent(l.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r}),this.dispatchEvent(i);break}case`/`:case`?`:e.shiftKey&&An(this,Un,Wn).call(this);break;case`p`:n=this.mediaStore.getState().mediaIsPip?l.MEDIA_EXIT_PIP_REQUEST:l.MEDIA_ENTER_PIP_REQUEST,i=new x.CustomEvent(n,{composed:!0,bubbles:!0}),this.dispatchEvent(i)}}};jn=new WeakMap,Mn=new WeakMap,V=new WeakMap,Nn=new WeakMap,Pn=new WeakMap,Fn=new WeakMap,In=new WeakMap,Ln=new WeakMap,Rn=new WeakSet,zn=function(){this.mediaStore=Dn({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(H.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(H.DEFAULT_DURATION)?+this.getAttribute(H.DEFAULT_DURATION):void 0,defaultStreamType:this.getAttribute(H.DEFAULT_STREAM_TYPE)??void 0,liveEdgeOffset:this.hasAttribute(H.LIVE_EDGE_OFFSET)?+this.getAttribute(H.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(H.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(H.SEEK_TO_LIVE_OFFSET):this.hasAttribute(H.LIVE_EDGE_OFFSET)?+this.getAttribute(H.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(H.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(H.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(H.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(H.NO_SUBTITLES_LANG_PREF)}})},Bn=new WeakMap,Vn=new WeakSet,Hn=function(e){let{metaKey:t,altKey:n,key:r,shiftKey:i}=e,a=i&&(r===`/`||r===`?`);if(a&&z(this,Nn)?.open||t||n||!a&&!Gn.includes(r)){this.removeEventListener(`keyup`,z(this,Bn));return}let o=e.target,s=o instanceof HTMLElement&&(o.tagName.toLowerCase()===`media-volume-range`||o.tagName.toLowerCase()===`media-time-range`);[` `,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(r)&&!(z(this,jn).contains(`no${r.toLowerCase()}`)||r===` `&&z(this,jn).contains(`nospace`))&&!s&&e.preventDefault(),this.addEventListener(`keyup`,z(this,Bn),{once:!0})},Un=new WeakSet,Wn=function(){z(this,Nn)||(kn(this,Nn,S.createElement(`media-keyboard-shortcuts-dialog`)),this.appendChild(z(this,Nn))),z(this,Nn).open=!0};var Qn=Object.values(p),$n=Object.values(d),er=e=>{var t;let{observedAttributes:n}=e.constructor;!n&&e.nodeName?.includes(`-`)&&(x.customElements.upgrade(e),{observedAttributes:n}=e.constructor);let r=((t=(e?.getAttribute)?.call(e,u.MEDIA_CHROME_ATTRIBUTES))?.split)?.call(t,/\s+/);return Array.isArray(n||r)?(n||r).filter(e=>Qn.includes(e)):[]},tr=e=>(e.nodeName?.includes(`-`)&&x.customElements.get(e.nodeName?.toLowerCase())&&!(e instanceof x.customElements.get(e.nodeName.toLowerCase()))&&x.customElements.upgrade(e),$n.some(t=>t in e)),nr=e=>tr(e)||!!er(e).length,rr=e=>(e?.join)?.call(e,`:`),ir={[p.MEDIA_SUBTITLES_LIST]:Vt,[p.MEDIA_SUBTITLES_SHOWING]:Vt,[p.MEDIA_SEEKABLE]:rr,[p.MEDIA_BUFFERED]:e=>e?.map(rr).join(` `),[p.MEDIA_PREVIEW_COORDS]:e=>e?.join(` `),[p.MEDIA_RENDITION_LIST]:ne,[p.MEDIA_AUDIO_TRACK_LIST]:ie},ar=async(e,t,n)=>{if(e.isConnected||await se(0),typeof n==`boolean`||n==null)return O(e,t,n);if(typeof n==`number`)return E(e,t,n);if(typeof n==`string`)return A(e,t,n);if(Array.isArray(n)&&!n.length)return e.removeAttribute(t);let r=ir[t]?.call(ir,n)??n;return e.setAttribute(t,r)},or=e=>!!e.closest?.call(e,`*[slot="media"]`),sr=(e,t)=>{if(or(e))return;let n=(e,t)=>{nr(e)&&t(e);let{children:n=[]}=e??{},r=e?.shadowRoot?.children??[];[...n,...r].forEach(e=>sr(e,t))},r=e?.nodeName.toLowerCase();r.includes(`-`)&&!nr(e)?x.customElements.whenDefined(r).then(()=>{n(e,t)}):n(e,t)},cr=(e,t,n)=>{e.forEach(e=>{if(t in e){e[t]=n;return}let r=er(e),i=t.toLowerCase();r.includes(i)&&ar(e,i,n)})},lr=(e,t,n)=>{sr(e,t);let r=e=>{t(e?.composedPath()[0]??e.target)},i=e=>{n(e?.composedPath()[0]??e.target)};e.addEventListener(l.REGISTER_MEDIA_STATE_RECEIVER,r),e.addEventListener(l.UNREGISTER_MEDIA_STATE_RECEIVER,i);let a=e=>{e.forEach(e=>{let{addedNodes:r=[],removedNodes:i=[],type:a,target:o,attributeName:s}=e;a===`childList`?(Array.prototype.forEach.call(r,e=>sr(e,t)),Array.prototype.forEach.call(i,e=>sr(e,n))):a===`attributes`&&s===u.MEDIA_CHROME_ATTRIBUTES&&(nr(o)?t(o):n(o))})},o=[],s=e=>{let r=e.target;r.name!==`media`&&(o.forEach(e=>sr(e,n)),o=[...r.assignedElements({flatten:!0})],o.forEach(e=>sr(e,t)))};e.addEventListener(`slotchange`,s);let c=new MutationObserver(a);return c.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{sr(e,n),e.removeEventListener(`slotchange`,s),c.disconnect(),e.removeEventListener(l.REGISTER_MEDIA_STATE_RECEIVER,r),e.removeEventListener(l.UNREGISTER_MEDIA_STATE_RECEIVER,i)}};x.customElements.get(`media-controller`)||x.customElements.define(`media-controller`,Zn);var ur=Zn,dr={PLACEMENT:`placement`,BOUNDS:`bounds`};function fr(e){return`
|
|
160
|
+
<style>
|
|
161
|
+
:host {
|
|
162
|
+
--_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
|
|
163
|
+
--_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
|
|
164
|
+
--_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
|
|
165
|
+
--_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
|
|
166
|
+
--_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
|
|
167
|
+
position: relative;
|
|
168
|
+
pointer-events: none;
|
|
169
|
+
display: var(--media-tooltip-display, inline-flex);
|
|
170
|
+
justify-content: center;
|
|
171
|
+
align-items: center;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
z-index: var(--media-tooltip-z-index, 1);
|
|
174
|
+
background: var(--_tooltip-background);
|
|
175
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
176
|
+
font: var(--media-font,
|
|
177
|
+
var(--media-font-weight, 400)
|
|
178
|
+
var(--media-font-size, 13px) /
|
|
179
|
+
var(--media-text-content-height, var(--media-control-height, 18px))
|
|
180
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
181
|
+
padding: var(--media-tooltip-padding, .35em .7em);
|
|
182
|
+
border: var(--media-tooltip-border, none);
|
|
183
|
+
border-radius: var(--media-tooltip-border-radius, 5px);
|
|
184
|
+
filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
|
|
185
|
+
white-space: var(--media-tooltip-white-space, nowrap);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:host([hidden]) {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
img, svg {
|
|
193
|
+
display: inline-block;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
#arrow {
|
|
197
|
+
position: absolute;
|
|
198
|
+
width: 0px;
|
|
199
|
+
height: 0px;
|
|
200
|
+
border-style: solid;
|
|
201
|
+
display: var(--media-tooltip-arrow-display, block);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:host(:not([placement])),
|
|
205
|
+
:host([placement="top"]) {
|
|
206
|
+
position: absolute;
|
|
207
|
+
bottom: calc(100% + var(--media-tooltip-distance, 12px));
|
|
208
|
+
left: 50%;
|
|
209
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
210
|
+
}
|
|
211
|
+
:host(:not([placement])) #arrow,
|
|
212
|
+
:host([placement="top"]) #arrow {
|
|
213
|
+
top: 100%;
|
|
214
|
+
left: 50%;
|
|
215
|
+
border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
|
|
216
|
+
border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
|
|
217
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host([placement="right"]) {
|
|
221
|
+
position: absolute;
|
|
222
|
+
left: calc(100% + var(--media-tooltip-distance, 12px));
|
|
223
|
+
top: 50%;
|
|
224
|
+
transform: translate(0, -50%);
|
|
225
|
+
}
|
|
226
|
+
:host([placement="right"]) #arrow {
|
|
227
|
+
top: 50%;
|
|
228
|
+
right: 100%;
|
|
229
|
+
border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
|
|
230
|
+
border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
|
|
231
|
+
transform: translate(0, -50%);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:host([placement="bottom"]) {
|
|
235
|
+
position: absolute;
|
|
236
|
+
top: calc(100% + var(--media-tooltip-distance, 12px));
|
|
237
|
+
left: 50%;
|
|
238
|
+
transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
|
|
239
|
+
}
|
|
240
|
+
:host([placement="bottom"]) #arrow {
|
|
241
|
+
bottom: 100%;
|
|
242
|
+
left: 50%;
|
|
243
|
+
border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
|
|
244
|
+
border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
|
|
245
|
+
transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
:host([placement="left"]) {
|
|
249
|
+
position: absolute;
|
|
250
|
+
right: calc(100% + var(--media-tooltip-distance, 12px));
|
|
251
|
+
top: 50%;
|
|
252
|
+
transform: translate(0, -50%);
|
|
253
|
+
}
|
|
254
|
+
:host([placement="left"]) #arrow {
|
|
255
|
+
top: 50%;
|
|
256
|
+
left: 100%;
|
|
257
|
+
border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
|
|
258
|
+
border-color: transparent transparent transparent var(--_tooltip-arrow-background);
|
|
259
|
+
transform: translate(0, -50%);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:host([placement="none"]) #arrow {
|
|
263
|
+
display: none;
|
|
264
|
+
}
|
|
265
|
+
</style>
|
|
266
|
+
<slot></slot>
|
|
267
|
+
<div id="arrow"></div>
|
|
268
|
+
`}var pr=class extends x.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{if(!ze(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let e=this.placement;if(e===`left`||e===`right`){this.style.removeProperty(`--media-tooltip-offset-x`);return}let t=getComputedStyle(this),n=Ie(this,`#`+this.bounds)??Ae(this);if(!n)return;let{x:r,width:i}=n.getBoundingClientRect(),{x:a,width:o}=this.getBoundingClientRect(),s=a+o,c=r+i,l=t.getPropertyValue(`--media-tooltip-offset-x`),u=l?parseFloat(l.replace(`px`,``)):0,d=t.getPropertyValue(`--media-tooltip-container-margin`),f=d?parseFloat(d.replace(`px`,``)):0,p=a-r+u-f,m=s-c+u+f;p<0?this.style.setProperty(`--media-tooltip-offset-x`,`${p}px`):m>0?this.style.setProperty(`--media-tooltip-offset-x`,`${m}px`):this.style.removeProperty(`--media-tooltip-offset-x`)},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector(`#arrow`),Object.prototype.hasOwnProperty.call(this,`placement`)){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[dr.PLACEMENT,dr.BOUNDS]}get placement(){return k(this,dr.PLACEMENT)}set placement(e){A(this,dr.PLACEMENT,e)}get bounds(){return k(this,dr.BOUNDS)}set bounds(e){A(this,dr.BOUNDS,e)}};pr.shadowRootOptions={mode:`open`},pr.getTemplateHTML=fr,x.customElements.get(`media-tooltip`)||x.customElements.define(`media-tooltip`,pr);var mr=pr,hr=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},U=(e,t,n)=>(hr(e,t,`read from private field`),n?n.call(e):t.get(e)),gr=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},_r=(e,t,n,r)=>(hr(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),vr=(e,t,n)=>(hr(e,t,`access private method`),n),yr,br,xr,Sr,Cr,wr,Tr,Er={TOOLTIP_PLACEMENT:`tooltipplacement`,DISABLED:`disabled`,NO_TOOLTIP:`notooltip`};function Dr(e,t={}){return`
|
|
269
|
+
<style>
|
|
270
|
+
:host {
|
|
271
|
+
position: relative;
|
|
272
|
+
font: var(--media-font,
|
|
273
|
+
var(--media-font-weight, bold)
|
|
274
|
+
var(--media-font-size, 14px) /
|
|
275
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
276
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
277
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
278
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
279
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px));
|
|
280
|
+
justify-content: var(--media-button-justify-content, center);
|
|
281
|
+
display: inline-flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
vertical-align: middle;
|
|
284
|
+
box-sizing: border-box;
|
|
285
|
+
transition: background .15s linear;
|
|
286
|
+
pointer-events: auto;
|
|
287
|
+
cursor: var(--media-cursor, pointer);
|
|
288
|
+
-webkit-tap-highlight-color: transparent;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
:host(:focus-visible) {
|
|
293
|
+
box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
294
|
+
outline: 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
:host(:where(:focus)) {
|
|
298
|
+
box-shadow: none;
|
|
299
|
+
outline: 0;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
:host(:hover) {
|
|
303
|
+
background: var(--media-control-hover-background, rgba(50 50 70 / .7));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
slot[name="icon"] {
|
|
307
|
+
display: inline-flex;
|
|
308
|
+
align-items: center;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
312
|
+
width: var(--media-button-icon-width);
|
|
313
|
+
height: var(--media-button-icon-height, var(--media-control-height, 24px));
|
|
314
|
+
transform: var(--media-button-icon-transform);
|
|
315
|
+
transition: var(--media-button-icon-transition);
|
|
316
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
317
|
+
vertical-align: middle;
|
|
318
|
+
max-width: 100%;
|
|
319
|
+
max-height: 100%;
|
|
320
|
+
min-width: 100%;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
media-tooltip {
|
|
324
|
+
|
|
325
|
+
max-width: 0;
|
|
326
|
+
overflow-x: clip;
|
|
327
|
+
opacity: 0;
|
|
328
|
+
transition: opacity .3s, max-width 0s 9s;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
:host(:hover) media-tooltip,
|
|
332
|
+
:host(:focus-visible) media-tooltip {
|
|
333
|
+
max-width: 100vw;
|
|
334
|
+
opacity: 1;
|
|
335
|
+
transition: opacity .3s;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
:host([notooltip]) slot[name="tooltip"] {
|
|
339
|
+
display: none;
|
|
340
|
+
}
|
|
341
|
+
</style>
|
|
342
|
+
|
|
343
|
+
${this.getSlotTemplateHTML(e,t)}
|
|
344
|
+
|
|
345
|
+
<slot name="tooltip">
|
|
346
|
+
<media-tooltip part="tooltip" aria-hidden="true">
|
|
347
|
+
<template shadowrootmode="${mr.shadowRootOptions.mode}">
|
|
348
|
+
${mr.getTemplateHTML({})}
|
|
349
|
+
</template>
|
|
350
|
+
<slot name="tooltip-content">
|
|
351
|
+
${this.getTooltipContentHTML(e)}
|
|
352
|
+
</slot>
|
|
353
|
+
</media-tooltip>
|
|
354
|
+
</slot>
|
|
355
|
+
`}function Or(e,t){return`
|
|
356
|
+
<slot></slot>
|
|
357
|
+
`}function kr(){return``}var W=class extends x.HTMLElement{constructor(){if(super(),gr(this,wr),gr(this,yr,void 0),this.preventClick=!1,this.tooltipEl=null,gr(this,br,e=>{this.preventClick||this.handleClick(e),setTimeout(U(this,xr),0)}),gr(this,xr,()=>{var e,t;(t=(e=this.tooltipEl)?.updateXOffset)==null||t.call(e)}),gr(this,Sr,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener(`keyup`,U(this,Sr))}),gr(this,Cr,e=>{let{metaKey:t,altKey:n,key:r}=e;t||n||!this.keysUsed.includes(r)?this.removeEventListener(`keyup`,U(this,Sr)):this.addEventListener(`keyup`,U(this,Sr),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.tooltipEl=this.shadowRoot.querySelector(`media-tooltip`)}static get observedAttributes(){return[`disabled`,Er.TOOLTIP_PLACEMENT,u.MEDIA_CONTROLLER,p.MEDIA_LANG]}enable(){this.addEventListener(`click`,U(this,br)),this.addEventListener(`keydown`,U(this,Cr)),this.tabIndex=0}disable(){this.removeEventListener(`click`,U(this,br)),this.removeEventListener(`keydown`,U(this,Cr)),this.removeEventListener(`keyup`,U(this,Sr)),this.tabIndex=-1}attributeChangedCallback(e,t,n){var r,i,a,o;e===u.MEDIA_CONTROLLER?(t&&((i=(r=U(this,yr))?.unassociateElement)==null||i.call(r,this),_r(this,yr,null)),n&&this.isConnected&&(_r(this,yr,this.getRootNode()?.getElementById(n)),(o=(a=U(this,yr))?.associateElement)==null||o.call(a,this))):e===`disabled`&&n!==t?n==null?this.enable():this.disable():e===Er.TOOLTIP_PLACEMENT&&this.tooltipEl&&n!==t?this.tooltipEl.placement=n:e===p.MEDIA_LANG&&(this.shadowRoot.querySelector(`slot[name="tooltip-content"]`).innerHTML=this.constructor.getTooltipContentHTML()),U(this,xr).call(this)}connectedCallback(){var e,t;let{style:n}=w(this.shadowRoot,`:host`);n.setProperty(`display`,`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute(`disabled`)?this.disable():this.enable(),this.setAttribute(`role`,`button`);let r=this.getAttribute(u.MEDIA_CONTROLLER);r&&(_r(this,yr,this.getRootNode()?.getElementById(r)),(t=(e=U(this,yr))?.associateElement)==null||t.call(e,this)),x.customElements.whenDefined(`media-tooltip`).then(()=>vr(this,wr,Tr).call(this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=U(this,yr))?.unassociateElement)==null||t.call(e,this),_r(this,yr,null),this.removeEventListener(`mouseenter`,U(this,xr)),this.removeEventListener(`focus`,U(this,xr)),this.removeEventListener(`click`,U(this,br))}get keysUsed(){return[`Enter`,` `]}get tooltipPlacement(){return k(this,Er.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){A(this,Er.TOOLTIP_PLACEMENT,e)}get mediaController(){return k(this,u.MEDIA_CONTROLLER)}set mediaController(e){A(this,u.MEDIA_CONTROLLER,e)}get disabled(){return D(this,Er.DISABLED)}set disabled(e){O(this,Er.DISABLED,e)}get noTooltip(){return D(this,Er.NO_TOOLTIP)}set noTooltip(e){O(this,Er.NO_TOOLTIP,e)}handleClick(e){}};yr=new WeakMap,br=new WeakMap,xr=new WeakMap,Sr=new WeakMap,Cr=new WeakMap,wr=new WeakSet,Tr=function(){this.addEventListener(`mouseenter`,U(this,xr)),this.addEventListener(`focus`,U(this,xr)),this.addEventListener(`click`,U(this,br));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},W.shadowRootOptions={mode:`open`},W.getTemplateHTML=Dr,W.getSlotTemplateHTML=Or,W.getTooltipContentHTML=kr,x.customElements.get(`media-chrome-button`)||x.customElements.define(`media-chrome-button`,W);var Ar=W,jr=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
358
|
+
<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"/>
|
|
359
|
+
</svg>
|
|
360
|
+
`;function Mr(e){return`
|
|
361
|
+
<style>
|
|
362
|
+
:host([${p.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
|
|
363
|
+
display: none !important;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
:host(:not([${p.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
|
|
368
|
+
display: none !important;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
:host([${p.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
|
|
372
|
+
:host(:not([${p.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
|
|
373
|
+
display: none;
|
|
374
|
+
}
|
|
375
|
+
</style>
|
|
376
|
+
|
|
377
|
+
<slot name="icon">
|
|
378
|
+
<slot name="enter">${jr}</slot>
|
|
379
|
+
<slot name="exit">${jr}</slot>
|
|
380
|
+
</slot>
|
|
381
|
+
`}function Nr(){return`
|
|
382
|
+
<slot name="tooltip-enter">${b(`start airplay`)}</slot>
|
|
383
|
+
<slot name="tooltip-exit">${b(`stop airplay`)}</slot>
|
|
384
|
+
`}var Pr=e=>{let t=e.mediaIsAirplaying?b(`stop airplay`):b(`start airplay`);e.setAttribute(`aria-label`,t)},Fr=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_IS_AIRPLAYING,p.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Pr(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_IS_AIRPLAYING&&Pr(this)}get mediaIsAirplaying(){return D(this,p.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){O(this,p.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return k(this,p.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){A(this,p.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new x.CustomEvent(l.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};Fr.getSlotTemplateHTML=Mr,Fr.getTooltipContentHTML=Nr,x.customElements.get(`media-airplay-button`)||x.customElements.define(`media-airplay-button`,Fr);var Ir=Fr,Lr=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
385
|
+
<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"/>
|
|
386
|
+
</svg>`,Rr=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
387
|
+
<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"/>
|
|
388
|
+
</svg>`;function zr(e){return`
|
|
389
|
+
<style>
|
|
390
|
+
:host([aria-checked="true"]) slot[name=off] {
|
|
391
|
+
display: none !important;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
:host(:not([aria-checked="true"])) slot[name=on] {
|
|
396
|
+
display: none !important;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
:host([aria-checked="true"]) slot[name=tooltip-enable],
|
|
400
|
+
:host(:not([aria-checked="true"])) slot[name=tooltip-disable] {
|
|
401
|
+
display: none;
|
|
402
|
+
}
|
|
403
|
+
</style>
|
|
404
|
+
|
|
405
|
+
<slot name="icon">
|
|
406
|
+
<slot name="on">${Lr}</slot>
|
|
407
|
+
<slot name="off">${Rr}</slot>
|
|
408
|
+
</slot>
|
|
409
|
+
`}function Br(){return`
|
|
410
|
+
<slot name="tooltip-enable">${b(`Enable captions`)}</slot>
|
|
411
|
+
<slot name="tooltip-disable">${b(`Disable captions`)}</slot>
|
|
412
|
+
`}var Vr=e=>{e.setAttribute(`aria-checked`,Kt(e).toString())},Hr=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_SUBTITLES_LIST,p.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`button`),this.setAttribute(`aria-label`,b(`closed captions`)),Vr(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_SUBTITLES_SHOWING&&Vr(this)}get mediaSubtitlesList(){return Ur(this,p.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Wr(this,p.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Ur(this,p.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Wr(this,p.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new x.CustomEvent(l.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}};Hr.getSlotTemplateHTML=zr,Hr.getTooltipContentHTML=Br;var Ur=(e,t)=>{let n=e.getAttribute(t);return n?Rt(n):[]},Wr=(e,t,n)=>{if(!n?.length){e.removeAttribute(t);return}let r=Vt(n);e.getAttribute(t)!==r&&e.setAttribute(t,r)};x.customElements.get(`media-captions-button`)||x.customElements.define(`media-captions-button`,Hr);var Gr=Hr,Kr=`<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>`,qr=`<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>`;function Jr(e){return`
|
|
413
|
+
<style>
|
|
414
|
+
:host([${p.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
|
|
415
|
+
display: none !important;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
:host(:not([${p.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
|
|
420
|
+
display: none !important;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
:host([${p.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
|
|
424
|
+
:host(:not([${p.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
|
|
425
|
+
display: none;
|
|
426
|
+
}
|
|
427
|
+
</style>
|
|
428
|
+
|
|
429
|
+
<slot name="icon">
|
|
430
|
+
<slot name="enter">${Kr}</slot>
|
|
431
|
+
<slot name="exit">${qr}</slot>
|
|
432
|
+
</slot>
|
|
433
|
+
`}function Yr(){return`
|
|
434
|
+
<slot name="tooltip-enter">${b(`Start casting`)}</slot>
|
|
435
|
+
<slot name="tooltip-exit">${b(`Stop casting`)}</slot>
|
|
436
|
+
`}var Xr=e=>{let t=e.mediaIsCasting?b(`stop casting`):b(`start casting`);e.setAttribute(`aria-label`,t)},Zr=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_IS_CASTING,p.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Xr(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_IS_CASTING&&Xr(this)}get mediaIsCasting(){return D(this,p.MEDIA_IS_CASTING)}set mediaIsCasting(e){O(this,p.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return k(this,p.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){A(this,p.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?l.MEDIA_EXIT_CAST_REQUEST:l.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new x.CustomEvent(e,{composed:!0,bubbles:!0}))}};Zr.getSlotTemplateHTML=Jr,Zr.getTooltipContentHTML=Yr,x.customElements.get(`media-cast-button`)||x.customElements.define(`media-cast-button`,Zr);var Qr=Zr,$r=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},ei=(e,t,n)=>($r(e,t,`read from private field`),n?n.call(e):t.get(e)),ti=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},ni=(e,t,n,r)=>($r(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ri=(e,t,n)=>($r(e,t,`access private method`),n),ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi;function yi(e){return`
|
|
437
|
+
<style>
|
|
438
|
+
:host {
|
|
439
|
+
font: var(--media-font,
|
|
440
|
+
var(--media-font-weight, normal)
|
|
441
|
+
var(--media-font-size, 14px) /
|
|
442
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
443
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
444
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
445
|
+
display: var(--media-dialog-display, inline-flex);
|
|
446
|
+
justify-content: center;
|
|
447
|
+
align-items: center;
|
|
448
|
+
|
|
449
|
+
transition-behavior: allow-discrete;
|
|
450
|
+
visibility: hidden;
|
|
451
|
+
opacity: 0;
|
|
452
|
+
transform: translateY(2px) scale(.99);
|
|
453
|
+
pointer-events: none;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
:host([open]) {
|
|
457
|
+
transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
|
|
458
|
+
visibility: visible;
|
|
459
|
+
opacity: 1;
|
|
460
|
+
transform: translateY(0) scale(1);
|
|
461
|
+
pointer-events: auto;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
#content {
|
|
465
|
+
display: flex;
|
|
466
|
+
position: relative;
|
|
467
|
+
box-sizing: border-box;
|
|
468
|
+
width: min(320px, 100%);
|
|
469
|
+
word-wrap: break-word;
|
|
470
|
+
max-height: 100%;
|
|
471
|
+
overflow: auto;
|
|
472
|
+
text-align: center;
|
|
473
|
+
line-height: 1.4;
|
|
474
|
+
}
|
|
475
|
+
</style>
|
|
476
|
+
${this.getSlotTemplateHTML(e)}
|
|
477
|
+
`}function bi(e){return`
|
|
478
|
+
<slot id="content"></slot>
|
|
479
|
+
`}var xi={OPEN:`open`,ANCHOR:`anchor`},Si=class extends x.HTMLElement{constructor(){super(),ti(this,si),ti(this,li),ti(this,di),ti(this,pi),ti(this,hi),ti(this,_i),ti(this,ii,!1),ti(this,ai,null),ti(this,oi,null)}static get observedAttributes(){return[xi.OPEN,xi.ANCHOR]}get open(){return D(this,xi.OPEN)}set open(e){O(this,xi.OPEN,e)}handleEvent(e){switch(e.type){case`invoke`:ri(this,pi,mi).call(this,e);break;case`focusout`:ri(this,hi,gi).call(this,e);break;case`keydown`:ri(this,_i,vi).call(this,e)}}connectedCallback(){ri(this,si,ci).call(this),this.role||=`dialog`,this.addEventListener(`invoke`,this),this.addEventListener(`focusout`,this),this.addEventListener(`keydown`,this)}disconnectedCallback(){this.removeEventListener(`invoke`,this),this.removeEventListener(`focusout`,this),this.removeEventListener(`keydown`,this)}attributeChangedCallback(e,t,n){ri(this,si,ci).call(this),e===xi.OPEN&&n!==t&&(this.open?ri(this,li,ui).call(this):ri(this,di,fi).call(this))}focus(){ni(this,ai,Le());let e=!this.dispatchEvent(new Event(`focus`,{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event(`focusin`,{composed:!0,bubbles:!0,cancelable:!0}));e||t||this.querySelector(`[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]`)?.focus()}get keysUsed(){return[`Escape`,`Tab`]}};ii=new WeakMap,ai=new WeakMap,oi=new WeakMap,si=new WeakSet,ci=function(){if(!ei(this,ii)&&(ni(this,ii,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=w(this.shadowRoot,`:host`);e.setProperty(`transition`,`display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in`)})}},li=new WeakSet,ui=function(){var e;(e=ei(this,oi))==null||e.setAttribute(`aria-expanded`,`true`),this.dispatchEvent(new Event(`open`,{composed:!0,bubbles:!0})),this.addEventListener(`transitionend`,()=>this.focus(),{once:!0})},di=new WeakSet,fi=function(){var e;(e=ei(this,oi))==null||e.setAttribute(`aria-expanded`,`false`),this.dispatchEvent(new Event(`close`,{composed:!0,bubbles:!0}))},pi=new WeakSet,mi=function(e){ni(this,oi,e.relatedTarget),Fe(this,e.relatedTarget)||(this.open=!this.open)},hi=new WeakSet,gi=function(e){var t;Fe(this,e.relatedTarget)||((t=ei(this,ai))==null||t.focus(),ei(this,oi)&&ei(this,oi)!==e.relatedTarget&&this.open&&(this.open=!1))},_i=new WeakSet,vi=function(e){var t,n,r,i,a;let{key:o,ctrlKey:s,altKey:c,metaKey:l}=e;s||c||l||this.keysUsed.includes(o)&&(e.preventDefault(),e.stopPropagation(),o===`Tab`?(e.shiftKey?(n=(t=this.previousElementSibling)?.focus)==null||n.call(t):(i=(r=this.nextElementSibling)?.focus)==null||i.call(r),this.blur()):o===`Escape`&&((a=ei(this,ai))==null||a.focus(),this.open=!1))},Si.shadowRootOptions={mode:`open`},Si.getTemplateHTML=yi,Si.getSlotTemplateHTML=bi,x.customElements.get(`media-chrome-dialog`)||x.customElements.define(`media-chrome-dialog`,Si);var Ci=Si,wi=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},G=(e,t,n)=>(wi(e,t,`read from private field`),n?n.call(e):t.get(e)),K=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Ti=(e,t,n,r)=>(wi(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Ei=(e,t,n)=>(wi(e,t,`access private method`),n),Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi;function Qi(e){return`
|
|
480
|
+
<style>
|
|
481
|
+
:host {
|
|
482
|
+
--_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
483
|
+
--_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));
|
|
484
|
+
|
|
485
|
+
box-shadow: var(--_focus-visible-box-shadow, none);
|
|
486
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
487
|
+
height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));
|
|
488
|
+
display: inline-flex;
|
|
489
|
+
align-items: center;
|
|
490
|
+
|
|
491
|
+
vertical-align: middle;
|
|
492
|
+
box-sizing: border-box;
|
|
493
|
+
position: relative;
|
|
494
|
+
width: 100px;
|
|
495
|
+
transition: background .15s linear;
|
|
496
|
+
cursor: var(--media-cursor, pointer);
|
|
497
|
+
pointer-events: auto;
|
|
498
|
+
touch-action: none;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
input[type=range]:focus {
|
|
503
|
+
outline: 0;
|
|
504
|
+
}
|
|
505
|
+
input[type=range]:focus::-webkit-slider-runnable-track {
|
|
506
|
+
outline: 0;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
:host(:hover) {
|
|
510
|
+
background: var(--media-control-hover-background, rgb(50 50 70 / .7));
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
#leftgap {
|
|
514
|
+
padding-left: var(--media-range-padding-left, var(--_media-range-padding));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
#rightgap {
|
|
518
|
+
padding-right: var(--media-range-padding-right, var(--_media-range-padding));
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
#startpoint,
|
|
522
|
+
#endpoint {
|
|
523
|
+
position: absolute;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
#endpoint {
|
|
527
|
+
right: 0;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
#container {
|
|
531
|
+
|
|
532
|
+
width: var(--media-range-track-width, 100%);
|
|
533
|
+
transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));
|
|
534
|
+
position: relative;
|
|
535
|
+
height: 100%;
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
min-width: 40px;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
#range {
|
|
542
|
+
|
|
543
|
+
display: var(--media-time-range-hover-display, block);
|
|
544
|
+
bottom: var(--media-time-range-hover-bottom, 0);
|
|
545
|
+
height: var(--media-time-range-hover-height, max(100% , 25px));
|
|
546
|
+
width: 100%;
|
|
547
|
+
position: absolute;
|
|
548
|
+
cursor: var(--media-cursor, pointer);
|
|
549
|
+
|
|
550
|
+
-webkit-appearance: none;
|
|
551
|
+
-webkit-tap-highlight-color: transparent;
|
|
552
|
+
background: transparent;
|
|
553
|
+
margin: 0;
|
|
554
|
+
z-index: 1;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
@media (hover: hover) {
|
|
558
|
+
#range {
|
|
559
|
+
bottom: var(--media-time-range-hover-bottom, 0);
|
|
560
|
+
height: var(--media-time-range-hover-height, max(100%, 20px));
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
#range::-webkit-slider-thumb {
|
|
567
|
+
-webkit-appearance: none;
|
|
568
|
+
background: transparent;
|
|
569
|
+
width: .1px;
|
|
570
|
+
height: .1px;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
#range::-moz-range-thumb {
|
|
575
|
+
background: transparent;
|
|
576
|
+
border: transparent;
|
|
577
|
+
width: .1px;
|
|
578
|
+
height: .1px;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
#appearance {
|
|
582
|
+
height: var(--media-range-track-height, 4px);
|
|
583
|
+
display: flex;
|
|
584
|
+
flex-direction: column;
|
|
585
|
+
justify-content: center;
|
|
586
|
+
width: 100%;
|
|
587
|
+
position: absolute;
|
|
588
|
+
|
|
589
|
+
will-change: transform;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
#track {
|
|
593
|
+
background: var(--media-range-track-background, rgb(255 255 255 / .2));
|
|
594
|
+
border-radius: var(--media-range-track-border-radius, 1px);
|
|
595
|
+
border: var(--media-range-track-border, none);
|
|
596
|
+
outline: var(--media-range-track-outline);
|
|
597
|
+
outline-offset: var(--media-range-track-outline-offset);
|
|
598
|
+
backdrop-filter: var(--media-range-track-backdrop-filter);
|
|
599
|
+
-webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
|
|
600
|
+
box-shadow: var(--media-range-track-box-shadow, none);
|
|
601
|
+
position: absolute;
|
|
602
|
+
width: 100%;
|
|
603
|
+
height: 100%;
|
|
604
|
+
overflow: hidden;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
#progress,
|
|
608
|
+
#pointer {
|
|
609
|
+
position: absolute;
|
|
610
|
+
height: 100%;
|
|
611
|
+
will-change: width;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
#progress {
|
|
615
|
+
background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));
|
|
616
|
+
transition: var(--media-range-track-transition);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
#pointer {
|
|
620
|
+
background: var(--media-range-track-pointer-background);
|
|
621
|
+
border-right: var(--media-range-track-pointer-border-right);
|
|
622
|
+
transition: visibility .25s, opacity .25s;
|
|
623
|
+
visibility: hidden;
|
|
624
|
+
opacity: 0;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
@media (hover: hover) {
|
|
628
|
+
:host(:hover) #pointer {
|
|
629
|
+
transition: visibility .5s, opacity .5s;
|
|
630
|
+
visibility: visible;
|
|
631
|
+
opacity: 1;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
#thumb,
|
|
636
|
+
::slotted([slot=thumb]) {
|
|
637
|
+
width: var(--media-range-thumb-width, 10px);
|
|
638
|
+
height: var(--media-range-thumb-height, 10px);
|
|
639
|
+
transition: var(--media-range-thumb-transition);
|
|
640
|
+
transform: var(--media-range-thumb-transform, none);
|
|
641
|
+
opacity: var(--media-range-thumb-opacity, 1);
|
|
642
|
+
translate: -50%;
|
|
643
|
+
position: absolute;
|
|
644
|
+
left: 0;
|
|
645
|
+
cursor: var(--media-cursor, pointer);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
#thumb {
|
|
649
|
+
border-radius: var(--media-range-thumb-border-radius, 10px);
|
|
650
|
+
background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));
|
|
651
|
+
box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);
|
|
652
|
+
border: var(--media-range-thumb-border, none);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
:host([disabled]) #thumb {
|
|
656
|
+
background-color: #777;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.segments #appearance {
|
|
660
|
+
height: var(--media-range-segment-hover-height, 7px);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
#track {
|
|
664
|
+
clip-path: url(#segments-clipping);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
#segments {
|
|
668
|
+
--segments-gap: var(--media-range-segments-gap, 2px);
|
|
669
|
+
position: absolute;
|
|
670
|
+
width: 100%;
|
|
671
|
+
height: 100%;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
#segments-clipping {
|
|
675
|
+
transform: translateX(calc(var(--segments-gap) / 2));
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
#segments-clipping:empty {
|
|
679
|
+
display: none;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
#segments-clipping rect {
|
|
683
|
+
height: var(--media-range-track-height, 4px);
|
|
684
|
+
y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);
|
|
685
|
+
transition: var(--media-range-segment-transition, transform .1s ease-in-out);
|
|
686
|
+
transform: var(--media-range-segment-transform, scaleY(1));
|
|
687
|
+
transform-origin: center;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */
|
|
691
|
+
#range-label {
|
|
692
|
+
position: absolute;
|
|
693
|
+
left: -10000px;
|
|
694
|
+
background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
695
|
+
pointer-events: none;
|
|
696
|
+
}
|
|
697
|
+
</style>
|
|
698
|
+
<div id="leftgap"></div>
|
|
699
|
+
<div id="container">
|
|
700
|
+
<div id="startpoint"></div>
|
|
701
|
+
<div id="endpoint"></div>
|
|
702
|
+
<div id="appearance">
|
|
703
|
+
<div id="track" part="track">
|
|
704
|
+
<div id="pointer"></div>
|
|
705
|
+
<div id="progress" part="progress"></div>
|
|
706
|
+
</div>
|
|
707
|
+
<slot name="thumb">
|
|
708
|
+
<div id="thumb" part="thumb"></div>
|
|
709
|
+
</slot>
|
|
710
|
+
<svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg>
|
|
711
|
+
</div>
|
|
712
|
+
<input id="range" type="range" min="0" max="1" step="any" value="0">
|
|
713
|
+
<label for="range" id="range-label"></label>
|
|
714
|
+
|
|
715
|
+
${this.getContainerTemplateHTML(e)}
|
|
716
|
+
</div>
|
|
717
|
+
<div id="rightgap"></div>
|
|
718
|
+
`}function $i(e){return``}var ea=class extends x.HTMLElement{constructor(){if(super(),K(this,Ii),K(this,Ri),K(this,Bi),K(this,Hi),K(this,Wi),K(this,Ki),K(this,Ji),K(this,Xi),K(this,Di,void 0),K(this,Oi,void 0),K(this,ki,void 0),K(this,Ai,void 0),K(this,ji,{}),K(this,Mi,[]),K(this,Ni,()=>{if(this.range.matches(`:focus-visible`)){let{style:e}=w(this.shadowRoot,`:host`);e.setProperty(`--_focus-visible-box-shadow`,`var(--_focus-box-shadow)`)}}),K(this,Pi,()=>{let{style:e}=w(this.shadowRoot,`:host`);e.removeProperty(`--_focus-visible-box-shadow`)}),K(this,Fi,()=>{let e=this.shadowRoot.querySelector(`#segments-clipping`);e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector(`#container`),Ti(this,ki,this.shadowRoot.querySelector(`#startpoint`)),Ti(this,Ai,this.shadowRoot.querySelector(`#endpoint`)),this.range=this.shadowRoot.querySelector(`#range`),this.appearance=this.shadowRoot.querySelector(`#appearance`)}static get observedAttributes(){return[`disabled`,`aria-disabled`,u.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var r,i,a,o;e===u.MEDIA_CONTROLLER?(t&&((i=(r=G(this,Di))?.unassociateElement)==null||i.call(r,this),Ti(this,Di,null)),n&&this.isConnected&&(Ti(this,Di,this.getRootNode()?.getElementById(n)),(o=(a=G(this,Di))?.associateElement)==null||o.call(a,this))):(e===`disabled`||e===`aria-disabled`&&t!==n)&&(n==null?(this.range.removeAttribute(e),Ei(this,Ri,zi).call(this)):(this.range.setAttribute(e,n),Ei(this,Bi,Vi).call(this)))}connectedCallback(){var e,t;let{style:n}=w(this.shadowRoot,`:host`);n.setProperty(`display`,`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),G(this,ji).pointer=w(this.shadowRoot,`#pointer`),G(this,ji).progress=w(this.shadowRoot,`#progress`),G(this,ji).thumb=w(this.shadowRoot,`#thumb, ::slotted([slot="thumb"])`),G(this,ji).activeSegment=w(this.shadowRoot,`#segments-clipping rect:nth-child(0)`);let r=this.getAttribute(u.MEDIA_CONTROLLER);r&&(Ti(this,Di,this.getRootNode()?.getElementById(r)),(t=(e=G(this,Di))?.associateElement)==null||t.call(e,this)),this.updateBar(),this.shadowRoot.addEventListener(`focusin`,G(this,Ni)),this.shadowRoot.addEventListener(`focusout`,G(this,Pi)),Ei(this,Ri,zi).call(this),Oe(this.container,G(this,Fi))}disconnectedCallback(){var e,t;Ei(this,Bi,Vi).call(this),(t=(e=G(this,Di))?.unassociateElement)==null||t.call(e,this),Ti(this,Di,null),this.shadowRoot.removeEventListener(`focusin`,G(this,Ni)),this.shadowRoot.removeEventListener(`focusout`,G(this,Pi)),ke(this.container,G(this,Fi))}updatePointerBar(e){var t;(t=G(this,ji).pointer)==null||t.style.setProperty(`width`,`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,t;let n=this.range.valueAsNumber*100;(e=G(this,ji).progress)==null||e.style.setProperty(`width`,`${n}%`),(t=G(this,ji).thumb)==null||t.style.setProperty(`left`,`${n}%`)}updateSegments(e){let t=this.shadowRoot.querySelector(`#segments-clipping`);if(t.textContent=``,this.container.classList.toggle(`segments`,!!e?.length),!e?.length)return;let n=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];Ti(this,Mi,[...n]);let r=n.pop();for(let[e,i]of n.entries()){let[a,o]=[e===0,e===n.length-1],s=a?`calc(var(--segments-gap) / -1)`:`${i*100}%`,c=`calc(${((o?r:n[e+1])-i)*100}%${a||o?``:` - var(--segments-gap)`})`,l=S.createElementNS(`http://www.w3.org/2000/svg`,`rect`),u=He(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);u.style.setProperty(`x`,s),u.style.setProperty(`width`,c),t.append(l)}}getPointerRatio(e){return Be(e.clientX,e.clientY,G(this,ki).getBoundingClientRect(),G(this,Ai).getBoundingClientRect())}get dragging(){return this.hasAttribute(`dragging`)}handleEvent(e){switch(e.type){case`pointermove`:Ei(this,Xi,Zi).call(this,e);break;case`input`:this.updateBar();break;case`pointerenter`:Ei(this,Wi,Gi).call(this,e);break;case`pointerdown`:Ei(this,Hi,Ui).call(this,e);break;case`pointerup`:Ei(this,Ki,qi).call(this);break;case`pointerleave`:Ei(this,Ji,Yi).call(this)}}get keysUsed(){return[`ArrowUp`,`ArrowRight`,`ArrowDown`,`ArrowLeft`]}};Di=new WeakMap,Oi=new WeakMap,ki=new WeakMap,Ai=new WeakMap,ji=new WeakMap,Mi=new WeakMap,Ni=new WeakMap,Pi=new WeakMap,Fi=new WeakMap,Ii=new WeakSet,Li=function(e){let t=G(this,ji).activeSegment;if(!t)return;let n=this.getPointerRatio(e),r=`#segments-clipping rect:nth-child(${G(this,Mi).findIndex((e,t,r)=>{let i=r[t+1];return i!=null&&n>=e&&n<=i})+1})`;(t.selectorText!=r||!t.style.transform)&&(t.selectorText=r,t.style.setProperty(`transform`,`var(--media-range-segment-hover-transform, scaleY(2))`))},Ri=new WeakSet,zi=function(){!this.hasAttribute(`disabled`)&&this.isConnected&&(this.addEventListener(`input`,this),this.addEventListener(`pointerdown`,this),this.addEventListener(`pointerenter`,this))},Bi=new WeakSet,Vi=function(){var e,t;this.removeEventListener(`input`,this),this.removeEventListener(`pointerdown`,this),this.removeEventListener(`pointerenter`,this),this.removeEventListener(`pointerleave`,this),(e=x.window)==null||e.removeEventListener(`pointerup`,this),(t=x.window)==null||t.removeEventListener(`pointermove`,this)},Hi=new WeakSet,Ui=function(e){var t;Ti(this,Oi,e.composedPath().includes(this.range)),(t=x.window)==null||t.addEventListener(`pointerup`,this,{once:!0})},Wi=new WeakSet,Gi=function(e){var t;e.pointerType!==`mouse`&&Ei(this,Hi,Ui).call(this,e),this.addEventListener(`pointerleave`,this,{once:!0}),(t=x.window)==null||t.addEventListener(`pointermove`,this)},Ki=new WeakSet,qi=function(){var e;(e=x.window)==null||e.removeEventListener(`pointerup`,this),this.toggleAttribute(`dragging`,!1),this.range.disabled=this.hasAttribute(`disabled`)},Ji=new WeakSet,Yi=function(){var e,t;this.removeEventListener(`pointerleave`,this),(e=x.window)==null||e.removeEventListener(`pointermove`,this),this.toggleAttribute(`dragging`,!1),this.range.disabled=this.hasAttribute(`disabled`),(t=G(this,ji).activeSegment)==null||t.style.removeProperty(`transform`)},Xi=new WeakSet,Zi=function(e){(e.pointerType!==`pen`||e.buttons!==0)&&(this.toggleAttribute(`dragging`,e.buttons===1||e.pointerType!==`mouse`),this.updatePointerBar(e),Ei(this,Ii,Li).call(this,e),this.dragging&&(e.pointerType!==`mouse`||!G(this,Oi))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0}))))},ea.shadowRootOptions={mode:`open`},ea.getTemplateHTML=Qi,ea.getContainerTemplateHTML=$i,x.customElements.get(`media-chrome-range`)||x.customElements.define(`media-chrome-range`,ea);var ta=ea,na=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},ra=(e,t,n)=>(na(e,t,`read from private field`),n?n.call(e):t.get(e)),ia=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},aa=(e,t,n,r)=>(na(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),oa;function sa(e){return`
|
|
719
|
+
<style>
|
|
720
|
+
:host {
|
|
721
|
+
|
|
722
|
+
box-sizing: border-box;
|
|
723
|
+
display: var(--media-control-display, var(--media-control-bar-display, inline-flex));
|
|
724
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
725
|
+
--media-loading-indicator-icon-height: 44px;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
::slotted(media-time-range),
|
|
729
|
+
::slotted(media-volume-range) {
|
|
730
|
+
min-height: 100%;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
::slotted(media-time-range),
|
|
734
|
+
::slotted(media-clip-selector) {
|
|
735
|
+
flex-grow: 1;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
::slotted([role="menu"]) {
|
|
739
|
+
position: absolute;
|
|
740
|
+
}
|
|
741
|
+
</style>
|
|
742
|
+
|
|
743
|
+
<slot></slot>
|
|
744
|
+
`}var ca=class extends x.HTMLElement{constructor(){if(super(),ia(this,oa,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[u.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var r,i,a,o;e===u.MEDIA_CONTROLLER&&(t&&((i=(r=ra(this,oa))?.unassociateElement)==null||i.call(r,this),aa(this,oa,null)),n&&this.isConnected&&(aa(this,oa,this.getRootNode()?.getElementById(n)),(o=(a=ra(this,oa))?.associateElement)==null||o.call(a,this)))}connectedCallback(){var e,t;let n=this.getAttribute(u.MEDIA_CONTROLLER);n&&(aa(this,oa,this.getRootNode()?.getElementById(n)),(t=(e=ra(this,oa))?.associateElement)==null||t.call(e,this))}disconnectedCallback(){var e,t;(t=(e=ra(this,oa))?.unassociateElement)==null||t.call(e,this),aa(this,oa,null)}};oa=new WeakMap,ca.shadowRootOptions={mode:`open`},ca.getTemplateHTML=sa,x.customElements.get(`media-control-bar`)||x.customElements.define(`media-control-bar`,ca);var la=ca,ua=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},da=(e,t,n)=>(ua(e,t,`read from private field`),n?n.call(e):t.get(e)),fa=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},pa=(e,t,n,r)=>(ua(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ma;function ha(e,t={}){return`
|
|
745
|
+
<style>
|
|
746
|
+
:host {
|
|
747
|
+
font: var(--media-font,
|
|
748
|
+
var(--media-font-weight, normal)
|
|
749
|
+
var(--media-font-size, 14px) /
|
|
750
|
+
var(--media-text-content-height, var(--media-control-height, 24px))
|
|
751
|
+
var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
|
|
752
|
+
color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
|
|
753
|
+
background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));
|
|
754
|
+
padding: var(--media-control-padding, 10px);
|
|
755
|
+
display: inline-flex;
|
|
756
|
+
justify-content: center;
|
|
757
|
+
align-items: center;
|
|
758
|
+
vertical-align: middle;
|
|
759
|
+
box-sizing: border-box;
|
|
760
|
+
text-align: center;
|
|
761
|
+
pointer-events: auto;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
:host(:focus-visible) {
|
|
766
|
+
box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
|
|
767
|
+
outline: 0;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
:host(:where(:focus)) {
|
|
772
|
+
box-shadow: none;
|
|
773
|
+
outline: 0;
|
|
774
|
+
}
|
|
775
|
+
</style>
|
|
776
|
+
|
|
777
|
+
${this.getSlotTemplateHTML(e,t)}
|
|
778
|
+
`}function ga(e,t){return`
|
|
779
|
+
<slot></slot>
|
|
780
|
+
`}var _a=class extends x.HTMLElement{constructor(){if(super(),fa(this,ma,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[u.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,n){var r,i,a,o;e===u.MEDIA_CONTROLLER&&(t&&((i=(r=da(this,ma))?.unassociateElement)==null||i.call(r,this),pa(this,ma,null)),n&&this.isConnected&&(pa(this,ma,this.getRootNode()?.getElementById(n)),(o=(a=da(this,ma))?.associateElement)==null||o.call(a,this)))}connectedCallback(){var e,t;let{style:n}=w(this.shadowRoot,`:host`);n.setProperty(`display`,`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(u.MEDIA_CONTROLLER);r&&(pa(this,ma,this.getRootNode()?.getElementById(r)),(t=(e=da(this,ma))?.associateElement)==null||t.call(e,this))}disconnectedCallback(){var e,t;(t=(e=da(this,ma))?.unassociateElement)==null||t.call(e,this),pa(this,ma,null)}};ma=new WeakMap,_a.shadowRootOptions={mode:`open`},_a.getTemplateHTML=ha,_a.getSlotTemplateHTML=ga,x.customElements.get(`media-text-display`)||x.customElements.define(`media-text-display`,_a);var va=_a,ya=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},ba=(e,t,n)=>(ya(e,t,`read from private field`),n?n.call(e):t.get(e)),xa=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Sa=(e,t,n,r)=>(ya(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Ca;function wa(e,t){return`
|
|
781
|
+
<slot>${ge(t.mediaDuration)}</slot>
|
|
782
|
+
`}var Ta=class extends _a{constructor(){super(),xa(this,Ca,void 0),Sa(this,Ca,this.shadowRoot.querySelector(`slot`)),ba(this,Ca).textContent=ge(this.mediaDuration??0)}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_DURATION]}attributeChangedCallback(e,t,n){e===p.MEDIA_DURATION&&(ba(this,Ca).textContent=ge(+n)),super.attributeChangedCallback(e,t,n)}get mediaDuration(){return T(this,p.MEDIA_DURATION)}set mediaDuration(e){E(this,p.MEDIA_DURATION,e)}};Ca=new WeakMap,Ta.getSlotTemplateHTML=wa,x.customElements.get(`media-duration-display`)||x.customElements.define(`media-duration-display`,Ta);var Ea=Ta,Da={2:b(`Network Error`),3:b(`Decode Error`),4:b(`Source Not Supported`),5:b(`Encryption Error`)},Oa={2:b(`A network error caused the media download to fail.`),3:b(`A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.`),4:b(`An unsupported error occurred. The server or network failed, or your browser does not support this format.`),5:b(`The media is encrypted and there are no keys to decrypt it.`)},ka=e=>e.code===1?null:{title:Da[e.code]??`Error ${e.code}`,message:Oa[e.code]??e.message},Aa=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},ja=(e,t,n)=>(Aa(e,t,`read from private field`),n?n.call(e):t.get(e)),Ma=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Na=(e,t,n,r)=>(Aa(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Pa;function Fa(e){return`
|
|
783
|
+
<style>
|
|
784
|
+
:host {
|
|
785
|
+
background: rgb(20 20 30 / .8);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
#content {
|
|
789
|
+
display: block;
|
|
790
|
+
padding: 1.2em 1.5em;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
h3,
|
|
794
|
+
p {
|
|
795
|
+
margin-block: 0 .3em;
|
|
796
|
+
}
|
|
797
|
+
</style>
|
|
798
|
+
<slot name="error-${e.mediaerrorcode}" id="content">
|
|
799
|
+
${La({code:+e.mediaerrorcode,message:e.mediaerrormessage})}
|
|
800
|
+
</slot>
|
|
801
|
+
`}function Ia(e){return e.code&&ka(e)!==null}function La(e){let{title:t,message:n}=ka(e)??{},r=``;return t&&(r+=`<slot name="error-${e.code}-title"><h3>${t}</h3></slot>`),n&&(r+=`<slot name="error-${e.code}-message"><p>${n}</p></slot>`),r}var Ra=[p.MEDIA_ERROR_CODE,p.MEDIA_ERROR_MESSAGE],za=class extends Si{constructor(){super(...arguments),Ma(this,Pa,null)}static get observedAttributes(){return[...super.observedAttributes,...Ra]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),!Ra.includes(e))return;let r=this.mediaError??{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=Ia(r),this.open&&(this.shadowRoot.querySelector(`slot`).name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector(`#content`).innerHTML=this.formatErrorMessage(r),!this.hasAttribute(`aria-label`))){let{title:e}=ka(r);e&&this.setAttribute(`aria-label`,e)}}get mediaError(){return ja(this,Pa)}set mediaError(e){Na(this,Pa,e)}get mediaErrorCode(){return T(this,`mediaerrorcode`)}set mediaErrorCode(e){E(this,`mediaerrorcode`,e)}get mediaErrorMessage(){return k(this,`mediaerrormessage`)}set mediaErrorMessage(e){A(this,`mediaerrormessage`,e)}};Pa=new WeakMap,za.getSlotTemplateHTML=Fa,za.formatErrorMessage=La,x.customElements.get(`media-error-dialog`)||x.customElements.define(`media-error-dialog`,za);var Ba=za,Va=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},Ha=(e,t,n)=>(Va(e,t,`read from private field`),n?n.call(e):t.get(e)),Ua=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Wa,Ga;function Ka(e){return`
|
|
802
|
+
<style>
|
|
803
|
+
:host {
|
|
804
|
+
position: fixed;
|
|
805
|
+
top: 0;
|
|
806
|
+
left: 0;
|
|
807
|
+
z-index: 9999;
|
|
808
|
+
background: rgb(20 20 30 / .8);
|
|
809
|
+
backdrop-filter: blur(10px);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
#content {
|
|
813
|
+
display: block;
|
|
814
|
+
width: clamp(400px, 40vw, 700px);
|
|
815
|
+
max-width: 90vw;
|
|
816
|
+
text-align: left;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
h2 {
|
|
820
|
+
margin: 0 0 1.5rem 0;
|
|
821
|
+
font-size: 1.5rem;
|
|
822
|
+
font-weight: 500;
|
|
823
|
+
text-align: center;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
.shortcuts-table {
|
|
827
|
+
width: 100%;
|
|
828
|
+
border-collapse: collapse;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.shortcuts-table tr {
|
|
832
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.shortcuts-table tr:last-child {
|
|
836
|
+
border-bottom: none;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.shortcuts-table td {
|
|
840
|
+
padding: 0.75rem 0.5rem;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.shortcuts-table td:first-child {
|
|
844
|
+
text-align: right;
|
|
845
|
+
padding-right: 1rem;
|
|
846
|
+
width: 40%;
|
|
847
|
+
min-width: 120px;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.shortcuts-table td:last-child {
|
|
851
|
+
padding-left: 1rem;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.key {
|
|
855
|
+
display: inline-block;
|
|
856
|
+
background: rgba(255, 255, 255, 0.15);
|
|
857
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
858
|
+
border-radius: 4px;
|
|
859
|
+
padding: 0.25rem 0.5rem;
|
|
860
|
+
font-family: 'Courier New', monospace;
|
|
861
|
+
font-size: 0.9rem;
|
|
862
|
+
font-weight: 500;
|
|
863
|
+
min-width: 1.5rem;
|
|
864
|
+
text-align: center;
|
|
865
|
+
margin: 0 0.2rem;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.description {
|
|
869
|
+
color: rgba(255, 255, 255, 0.9);
|
|
870
|
+
font-size: 0.95rem;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.key-combo {
|
|
874
|
+
display: flex;
|
|
875
|
+
align-items: center;
|
|
876
|
+
justify-content: flex-end;
|
|
877
|
+
gap: 0.3rem;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.key-separator {
|
|
881
|
+
color: rgba(255, 255, 255, 0.5);
|
|
882
|
+
font-size: 0.9rem;
|
|
883
|
+
}
|
|
884
|
+
</style>
|
|
885
|
+
<slot id="content">
|
|
886
|
+
${qa()}
|
|
887
|
+
</slot>
|
|
888
|
+
`}function qa(){return`
|
|
889
|
+
<h2>Keyboard Shortcuts</h2>
|
|
890
|
+
<table class="shortcuts-table">${[{keys:[`Space`,`k`],description:`Toggle Playback`},{keys:[`m`],description:`Toggle mute`},{keys:[`f`],description:`Toggle fullscreen`},{keys:[`c`],description:`Toggle captions or subtitles, if available`},{keys:[`p`],description:`Toggle Picture in Picture`},{keys:[`←`,`j`],description:`Seek back 10s`},{keys:[`→`,`l`],description:`Seek forward 10s`},{keys:[`↑`],description:`Turn volume up`},{keys:[`↓`],description:`Turn volume down`},{keys:[`< (SHIFT+,)`],description:`Decrease playback rate`},{keys:[`> (SHIFT+.)`],description:`Increase playback rate`}].map(({keys:e,description:t})=>`
|
|
891
|
+
<tr>
|
|
892
|
+
<td>
|
|
893
|
+
<div class="key-combo">${e.map((e,t)=>t>0?`<span class="key-separator">or</span><span class="key">${e}</span>`:`<span class="key">${e}</span>`).join(``)}</div>
|
|
894
|
+
</td>
|
|
895
|
+
<td class="description">${t}</td>
|
|
896
|
+
</tr>
|
|
897
|
+
`).join(``)}</table>
|
|
898
|
+
`}var Ja=class extends Si{constructor(){super(...arguments),Ua(this,Wa,e=>{if(!this.open)return;let t=this.shadowRoot?.querySelector(`#content`);if(!t)return;let n=e.composedPath(),r=n[0]===this||n.includes(this),i=n.includes(t);r&&!i&&(this.open=!1)}),Ua(this,Ga,e=>{if(!this.open)return;let t=e.shiftKey&&(e.key===`/`||e.key===`?`);(e.key===`Escape`||t)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener(`click`,Ha(this,Wa)),document.addEventListener(`keydown`,Ha(this,Ga)))}disconnectedCallback(){this.removeEventListener(`click`,Ha(this,Wa)),document.removeEventListener(`keydown`,Ha(this,Ga))}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`open`&&(this.open?(this.addEventListener(`click`,Ha(this,Wa)),document.addEventListener(`keydown`,Ha(this,Ga))):(this.removeEventListener(`click`,Ha(this,Wa)),document.removeEventListener(`keydown`,Ha(this,Ga))))}};Wa=new WeakMap,Ga=new WeakMap,Ja.getSlotTemplateHTML=Ka,x.customElements.get(`media-keyboard-shortcuts-dialog`)||x.customElements.define(`media-keyboard-shortcuts-dialog`,Ja);var Ya=Ja,Xa=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},Za=(e,t,n)=>(Xa(e,t,`read from private field`),n?n.call(e):t.get(e)),Qa=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},$a=(e,t,n,r)=>(Xa(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),eo,to=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
899
|
+
<path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
|
|
900
|
+
</svg>`,no=`<svg aria-hidden="true" viewBox="0 0 26 24">
|
|
901
|
+
<path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
|
|
902
|
+
</svg>`;function ro(e){return`
|
|
903
|
+
<style>
|
|
904
|
+
:host([${p.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
|
|
905
|
+
display: none !important;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
:host(:not([${p.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
|
|
910
|
+
display: none !important;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
:host([${p.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
|
|
914
|
+
:host(:not([${p.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
|
|
915
|
+
display: none;
|
|
916
|
+
}
|
|
917
|
+
</style>
|
|
918
|
+
|
|
919
|
+
<slot name="icon">
|
|
920
|
+
<slot name="enter">${to}</slot>
|
|
921
|
+
<slot name="exit">${no}</slot>
|
|
922
|
+
</slot>
|
|
923
|
+
`}function io(){return`
|
|
924
|
+
<slot name="tooltip-enter">${b(`Enter fullscreen mode`)}</slot>
|
|
925
|
+
<slot name="tooltip-exit">${b(`Exit fullscreen mode`)}</slot>
|
|
926
|
+
`}var ao=e=>{let t=e.mediaIsFullscreen?b(`exit fullscreen mode`):b(`enter fullscreen mode`);e.setAttribute(`aria-label`,t)},oo=class extends W{constructor(){super(...arguments),Qa(this,eo,null)}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_IS_FULLSCREEN,p.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),ao(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_IS_FULLSCREEN&&ao(this)}get mediaFullscreenUnavailable(){return k(this,p.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){A(this,p.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return D(this,p.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){O(this,p.MEDIA_IS_FULLSCREEN,e)}handleClick(e){$a(this,eo,e);let t=Za(this,eo)instanceof PointerEvent,n=this.mediaIsFullscreen?new x.CustomEvent(l.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new x.CustomEvent(l.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}};eo=new WeakMap,oo.getSlotTemplateHTML=ro,oo.getTooltipContentHTML=io,x.customElements.get(`media-fullscreen-button`)||x.customElements.define(`media-fullscreen-button`,oo);var so=oo,{MEDIA_TIME_IS_LIVE:co,MEDIA_PAUSED:lo}=p,{MEDIA_SEEK_TO_LIVE_REQUEST:uo,MEDIA_PLAY_REQUEST:fo}=l,po=`<svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg>`;function mo(e){return`
|
|
927
|
+
<style>
|
|
928
|
+
:host { --media-tooltip-display: none; }
|
|
929
|
+
|
|
930
|
+
slot[name=indicator] > *,
|
|
931
|
+
:host ::slotted([slot=indicator]) {
|
|
932
|
+
|
|
933
|
+
min-width: auto;
|
|
934
|
+
fill: var(--media-live-button-icon-color, rgb(140, 140, 140));
|
|
935
|
+
color: var(--media-live-button-icon-color, rgb(140, 140, 140));
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
:host([${co}]:not([${lo}])) slot[name=indicator] > *,
|
|
939
|
+
:host([${co}]:not([${lo}])) ::slotted([slot=indicator]) {
|
|
940
|
+
fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
941
|
+
color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
:host([${co}]:not([${lo}])) {
|
|
945
|
+
cursor: var(--media-cursor, not-allowed);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
slot[name=text]{
|
|
949
|
+
text-transform: uppercase;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
</style>
|
|
953
|
+
|
|
954
|
+
<slot name="indicator">${po}</slot>
|
|
955
|
+
|
|
956
|
+
<slot name="spacer"> </slot><slot name="text">${b(`live`)}</slot>
|
|
957
|
+
`}var ho=e=>{let t=e.mediaPaused||!e.mediaTimeIsLive,n=b(t?`seek to live`:`playing live`);e.setAttribute(`aria-label`,n);let r=e.shadowRoot?.querySelector(`slot[name="text"]`);r&&(r.textContent=b(`live`)),t?e.removeAttribute(`aria-disabled`):e.setAttribute(`aria-disabled`,`true`)},go=class extends W{static get observedAttributes(){return[...super.observedAttributes,co,lo]}connectedCallback(){super.connectedCallback(),ho(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),ho(this)}get mediaPaused(){return D(this,p.MEDIA_PAUSED)}set mediaPaused(e){O(this,p.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return D(this,p.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){O(this,p.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new x.CustomEvent(uo,{composed:!0,bubbles:!0})),this.hasAttribute(lo)&&this.dispatchEvent(new x.CustomEvent(fo,{composed:!0,bubbles:!0})))}};go.getSlotTemplateHTML=mo,x.customElements.get(`media-live-button`)||x.customElements.define(`media-live-button`,go);var _o=go,vo=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},yo=(e,t,n)=>(vo(e,t,`read from private field`),n?n.call(e):t.get(e)),bo=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},xo=(e,t,n,r)=>(vo(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),So,Co,wo={LOADING_DELAY:`loadingdelay`,NO_AUTOHIDE:`noautohide`},To=500,Eo=`
|
|
958
|
+
<svg aria-hidden="true" viewBox="0 0 100 100">
|
|
959
|
+
<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">
|
|
960
|
+
<animateTransform
|
|
961
|
+
attributeName="transform"
|
|
962
|
+
attributeType="XML"
|
|
963
|
+
type="rotate"
|
|
964
|
+
dur="1s"
|
|
965
|
+
from="0 50 50"
|
|
966
|
+
to="360 50 50"
|
|
967
|
+
repeatCount="indefinite" />
|
|
968
|
+
</path>
|
|
969
|
+
</svg>
|
|
970
|
+
`;function Do(e){return`
|
|
971
|
+
<style>
|
|
972
|
+
:host {
|
|
973
|
+
display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
|
|
974
|
+
vertical-align: middle;
|
|
975
|
+
box-sizing: border-box;
|
|
976
|
+
--_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${To}ms);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
#status {
|
|
980
|
+
color: rgba(0,0,0,0);
|
|
981
|
+
width: 0px;
|
|
982
|
+
height: 0px;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
:host slot[name=icon] > *,
|
|
986
|
+
:host ::slotted([slot=icon]) {
|
|
987
|
+
opacity: var(--media-loading-indicator-opacity, 0);
|
|
988
|
+
transition: opacity 0.15s;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
:host([${p.MEDIA_LOADING}]:not([${p.MEDIA_PAUSED}])) slot[name=icon] > *,
|
|
992
|
+
:host([${p.MEDIA_LOADING}]:not([${p.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
|
|
993
|
+
opacity: var(--media-loading-indicator-opacity, 1);
|
|
994
|
+
transition: opacity 0.15s var(--_loading-indicator-delay);
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
:host #status {
|
|
998
|
+
visibility: var(--media-loading-indicator-opacity, hidden);
|
|
999
|
+
transition: visibility 0.15s;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
:host([${p.MEDIA_LOADING}]:not([${p.MEDIA_PAUSED}])) #status {
|
|
1003
|
+
visibility: var(--media-loading-indicator-opacity, visible);
|
|
1004
|
+
transition: visibility 0.15s var(--_loading-indicator-delay);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
svg, img, ::slotted(svg), ::slotted(img) {
|
|
1008
|
+
width: var(--media-loading-indicator-icon-width);
|
|
1009
|
+
height: var(--media-loading-indicator-icon-height, 100px);
|
|
1010
|
+
fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
|
|
1011
|
+
vertical-align: middle;
|
|
1012
|
+
}
|
|
1013
|
+
</style>
|
|
1014
|
+
|
|
1015
|
+
<slot name="icon">${Eo}</slot>
|
|
1016
|
+
<div id="status" role="status" aria-live="polite">${b(`media loading`)}</div>
|
|
1017
|
+
`}var Oo=class extends x.HTMLElement{constructor(){if(super(),bo(this,So,void 0),bo(this,Co,To),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[u.MEDIA_CONTROLLER,p.MEDIA_PAUSED,p.MEDIA_LOADING,wo.LOADING_DELAY]}attributeChangedCallback(e,t,n){var r,i,a,o;e===wo.LOADING_DELAY&&t!==n?this.loadingDelay=Number(n):e===u.MEDIA_CONTROLLER&&(t&&((i=(r=yo(this,So))?.unassociateElement)==null||i.call(r,this),xo(this,So,null)),n&&this.isConnected&&(xo(this,So,this.getRootNode()?.getElementById(n)),(o=(a=yo(this,So))?.associateElement)==null||o.call(a,this)))}connectedCallback(){var e,t;let n=this.getAttribute(u.MEDIA_CONTROLLER);n&&(xo(this,So,this.getRootNode()?.getElementById(n)),(t=(e=yo(this,So))?.associateElement)==null||t.call(e,this))}disconnectedCallback(){var e,t;(t=(e=yo(this,So))?.unassociateElement)==null||t.call(e,this),xo(this,So,null)}get loadingDelay(){return yo(this,Co)}set loadingDelay(e){xo(this,Co,e);let{style:t}=w(this.shadowRoot,`:host`);t.setProperty(`--_loading-indicator-delay`,`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return D(this,p.MEDIA_PAUSED)}set mediaPaused(e){O(this,p.MEDIA_PAUSED,e)}get mediaLoading(){return D(this,p.MEDIA_LOADING)}set mediaLoading(e){O(this,p.MEDIA_LOADING,e)}get mediaController(){return k(this,u.MEDIA_CONTROLLER)}set mediaController(e){A(this,u.MEDIA_CONTROLLER,e)}get noAutohide(){return D(this,wo.NO_AUTOHIDE)}set noAutohide(e){O(this,wo.NO_AUTOHIDE,e)}};So=new WeakMap,Co=new WeakMap,Oo.shadowRootOptions={mode:`open`},Oo.getTemplateHTML=Do,x.customElements.get(`media-loading-indicator`)||x.customElements.define(`media-loading-indicator`,Oo);var ko=Oo,Ao=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1018
|
+
<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"/>
|
|
1019
|
+
</svg>`,jo=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1020
|
+
<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"/>
|
|
1021
|
+
</svg>`,Mo=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1022
|
+
<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"/>
|
|
1023
|
+
</svg>`;function No(e){return`
|
|
1024
|
+
<style>
|
|
1025
|
+
:host(:not([${p.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
|
|
1026
|
+
:host([${p.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
|
|
1027
|
+
display: none !important;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
:host([${p.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {
|
|
1031
|
+
display: none !important;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
:host([${p.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {
|
|
1035
|
+
display: none !important;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
:host([${p.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {
|
|
1039
|
+
display: none !important;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
:host(:not([${p.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],
|
|
1043
|
+
:host([${p.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {
|
|
1044
|
+
display: none;
|
|
1045
|
+
}
|
|
1046
|
+
</style>
|
|
1047
|
+
|
|
1048
|
+
<slot name="icon">
|
|
1049
|
+
<slot name="off">${Ao}</slot>
|
|
1050
|
+
<slot name="low">${jo}</slot>
|
|
1051
|
+
<slot name="medium">${jo}</slot>
|
|
1052
|
+
<slot name="high">${Mo}</slot>
|
|
1053
|
+
</slot>
|
|
1054
|
+
`}function Po(){return`
|
|
1055
|
+
<slot name="tooltip-mute">${b(`Mute`)}</slot>
|
|
1056
|
+
<slot name="tooltip-unmute">${b(`Unmute`)}</slot>
|
|
1057
|
+
`}var Fo=e=>{let t=e.mediaVolumeLevel===`off`?b(`unmute`):b(`mute`);e.setAttribute(`aria-label`,t)},Io=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),Fo(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_VOLUME_LEVEL&&Fo(this)}get mediaVolumeLevel(){return k(this,p.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){A(this,p.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel===`off`?l.MEDIA_UNMUTE_REQUEST:l.MEDIA_MUTE_REQUEST;this.dispatchEvent(new x.CustomEvent(e,{composed:!0,bubbles:!0}))}};Io.getSlotTemplateHTML=No,Io.getTooltipContentHTML=Po,x.customElements.get(`media-mute-button`)||x.customElements.define(`media-mute-button`,Io);var Lo=Io,Ro=`<svg aria-hidden="true" viewBox="0 0 28 24">
|
|
1058
|
+
<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"/>
|
|
1059
|
+
</svg>`;function zo(e){return`
|
|
1060
|
+
<style>
|
|
1061
|
+
:host([${p.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
|
|
1062
|
+
display: none !important;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
:host(:not([${p.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
|
|
1066
|
+
display: none !important;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
:host([${p.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
|
|
1070
|
+
:host(:not([${p.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
|
|
1071
|
+
display: none;
|
|
1072
|
+
}
|
|
1073
|
+
</style>
|
|
1074
|
+
|
|
1075
|
+
<slot name="icon">
|
|
1076
|
+
<slot name="enter">${Ro}</slot>
|
|
1077
|
+
<slot name="exit">${Ro}</slot>
|
|
1078
|
+
</slot>
|
|
1079
|
+
`}function Bo(){return`
|
|
1080
|
+
<slot name="tooltip-enter">${b(`Enter picture in picture mode`)}</slot>
|
|
1081
|
+
<slot name="tooltip-exit">${b(`Exit picture in picture mode`)}</slot>
|
|
1082
|
+
`}var Vo=e=>{let t=e.mediaIsPip?b(`exit picture in picture mode`):b(`enter picture in picture mode`);e.setAttribute(`aria-label`,t)},Ho=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_IS_PIP,p.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Vo(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_IS_PIP&&Vo(this)}get mediaPipUnavailable(){return k(this,p.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){A(this,p.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return D(this,p.MEDIA_IS_PIP)}set mediaIsPip(e){O(this,p.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?l.MEDIA_EXIT_PIP_REQUEST:l.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new x.CustomEvent(e,{composed:!0,bubbles:!0}))}};Ho.getSlotTemplateHTML=zo,Ho.getTooltipContentHTML=Bo,x.customElements.get(`media-pip-button`)||x.customElements.define(`media-pip-button`,Ho);var Uo=Ho,Wo=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},Go=(e,t,n)=>(Wo(e,t,`read from private field`),n?n.call(e):t.get(e)),Ko=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},qo,Jo={RATES:`rates`},Yo=[1,1.2,1.5,1.7,2];function Xo(e){return Math.round(e*100)/100}function Zo(e){return`
|
|
1083
|
+
<style>
|
|
1084
|
+
:host {
|
|
1085
|
+
min-width: 5ch;
|
|
1086
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
1087
|
+
}
|
|
1088
|
+
</style>
|
|
1089
|
+
<slot name="icon">${e.mediaplaybackrate?Xo(+e.mediaplaybackrate):1}x</slot>
|
|
1090
|
+
`}function Qo(){return b(`Playback rate`)}var $o=class extends W{constructor(){super(),Ko(this,qo,new Ft(this,Jo.RATES,{defaultValue:Yo})),this.container=this.shadowRoot.querySelector(`slot[name="icon"]`),this.container.innerHTML=`${Xo(this.mediaPlaybackRate??1)}x`}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_PLAYBACK_RATE,Jo.RATES]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),e===Jo.RATES&&(Go(this,qo).value=n),e===p.MEDIA_PLAYBACK_RATE){let e=n?+n:NaN,t=Xo(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute(`aria-label`,b(`Playback rate {playbackRate}`,{playbackRate:t}))}}get rates(){return Go(this,qo)}set rates(e){e?Array.isArray(e)?Go(this,qo).value=e.join(` `):typeof e==`string`&&(Go(this,qo).value=e):Go(this,qo).value=``}get mediaPlaybackRate(){return T(this,p.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){E(this,p.MEDIA_PLAYBACK_RATE,e)}handleClick(){let e=Array.from(Go(this,qo).values(),e=>+e).sort((e,t)=>e-t),t=e.find(e=>e>this.mediaPlaybackRate)??e[0]??1,n=new x.CustomEvent(l.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}};qo=new WeakMap,$o.getSlotTemplateHTML=Zo,$o.getTooltipContentHTML=Qo,x.customElements.get(`media-playback-rate-button`)||x.customElements.define(`media-playback-rate-button`,$o);var es=$o,ts=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1091
|
+
<path d="m6 21 15-9L6 3v18Z"/>
|
|
1092
|
+
</svg>`,ns=`<svg aria-hidden="true" viewBox="0 0 24 24">
|
|
1093
|
+
<path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
|
|
1094
|
+
</svg>`;function rs(e){return`
|
|
1095
|
+
<style>
|
|
1096
|
+
:host([${p.MEDIA_PAUSED}]) slot[name=pause],
|
|
1097
|
+
:host(:not([${p.MEDIA_PAUSED}])) slot[name=play] {
|
|
1098
|
+
display: none !important;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
:host([${p.MEDIA_PAUSED}]) slot[name=tooltip-pause],
|
|
1102
|
+
:host(:not([${p.MEDIA_PAUSED}])) slot[name=tooltip-play] {
|
|
1103
|
+
display: none;
|
|
1104
|
+
}
|
|
1105
|
+
</style>
|
|
1106
|
+
|
|
1107
|
+
<slot name="icon">
|
|
1108
|
+
<slot name="play">${ts}</slot>
|
|
1109
|
+
<slot name="pause">${ns}</slot>
|
|
1110
|
+
</slot>
|
|
1111
|
+
`}function is(){return`
|
|
1112
|
+
<slot name="tooltip-play">${b(`Play`)}</slot>
|
|
1113
|
+
<slot name="tooltip-pause">${b(`Pause`)}</slot>
|
|
1114
|
+
`}var as=e=>{let t=e.mediaPaused?b(`play`):b(`pause`);e.setAttribute(`aria-label`,t)},os=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_PAUSED,p.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),as(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),(e===p.MEDIA_PAUSED||e===p.MEDIA_LANG)&&as(this)}get mediaPaused(){return D(this,p.MEDIA_PAUSED)}set mediaPaused(e){O(this,p.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?l.MEDIA_PLAY_REQUEST:l.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new x.CustomEvent(e,{composed:!0,bubbles:!0}))}};os.getSlotTemplateHTML=rs,os.getTooltipContentHTML=is,x.customElements.get(`media-play-button`)||x.customElements.define(`media-play-button`,os);var ss=os,cs={PLACEHOLDER_SRC:`placeholdersrc`,SRC:`src`};function ls(e){return`
|
|
1115
|
+
<style>
|
|
1116
|
+
:host {
|
|
1117
|
+
pointer-events: none;
|
|
1118
|
+
display: var(--media-poster-image-display, inline-block);
|
|
1119
|
+
box-sizing: border-box;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
img {
|
|
1123
|
+
max-width: 100%;
|
|
1124
|
+
max-height: 100%;
|
|
1125
|
+
min-width: 100%;
|
|
1126
|
+
min-height: 100%;
|
|
1127
|
+
background-repeat: no-repeat;
|
|
1128
|
+
background-position: var(--media-poster-image-background-position, var(--media-object-position, center));
|
|
1129
|
+
background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));
|
|
1130
|
+
object-fit: var(--media-object-fit, contain);
|
|
1131
|
+
object-position: var(--media-object-position, center);
|
|
1132
|
+
}
|
|
1133
|
+
</style>
|
|
1134
|
+
|
|
1135
|
+
<img part="poster img" aria-hidden="true" id="image"/>
|
|
1136
|
+
`}var us=e=>{e.style.removeProperty(`background-image`)},ds=(e,t)=>{e.style[`background-image`]=`url('${t}')`},fs=class extends x.HTMLElement{static get observedAttributes(){return[cs.PLACEHOLDER_SRC,cs.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector(`#image`)}attributeChangedCallback(e,t,n){e===cs.SRC&&(n==null?this.image.removeAttribute(cs.SRC):this.image.setAttribute(cs.SRC,n)),e===cs.PLACEHOLDER_SRC&&(n==null?us(this.image):ds(this.image,n))}get placeholderSrc(){return k(this,cs.PLACEHOLDER_SRC)}set placeholderSrc(e){A(this,cs.SRC,e)}get src(){return k(this,cs.SRC)}set src(e){A(this,cs.SRC,e)}};fs.shadowRootOptions={mode:`open`},fs.getTemplateHTML=ls,x.customElements.get(`media-poster-image`)||x.customElements.define(`media-poster-image`,fs);var ps=fs,ms=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},hs=(e,t,n)=>(ms(e,t,`read from private field`),n?n.call(e):t.get(e)),gs=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},_s=(e,t,n,r)=>(ms(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),vs,ys=class extends _a{constructor(){super(),gs(this,vs,void 0),_s(this,vs,this.shadowRoot.querySelector(`slot`))}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_PREVIEW_CHAPTER,p.MEDIA_LANG]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),(e===p.MEDIA_PREVIEW_CHAPTER||e===p.MEDIA_LANG)&&n!==t&&n!=null){if(hs(this,vs).textContent=n,n!==``){let e=b(`chapter: {chapterName}`,{chapterName:n});this.setAttribute(`aria-valuetext`,e)}else this.removeAttribute(`aria-valuetext`)}}get mediaPreviewChapter(){return k(this,p.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){A(this,p.MEDIA_PREVIEW_CHAPTER,e)}};vs=new WeakMap,x.customElements.get(`media-preview-chapter-display`)||x.customElements.define(`media-preview-chapter-display`,ys);var bs=ys,xs=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},Ss=(e,t,n)=>(xs(e,t,`read from private field`),n?n.call(e):t.get(e)),Cs=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},ws=(e,t,n,r)=>(xs(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Ts;function Es(e){return`
|
|
1137
|
+
<style>
|
|
1138
|
+
:host {
|
|
1139
|
+
box-sizing: border-box;
|
|
1140
|
+
display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));
|
|
1141
|
+
overflow: hidden;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
img {
|
|
1145
|
+
display: none;
|
|
1146
|
+
position: relative;
|
|
1147
|
+
}
|
|
1148
|
+
</style>
|
|
1149
|
+
<img crossorigin loading="eager" decoding="async">
|
|
1150
|
+
`}var Ds=class extends x.HTMLElement{constructor(){if(super(),Cs(this,Ts,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=C(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[u.MEDIA_CONTROLLER,p.MEDIA_PREVIEW_IMAGE,p.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t;let n=this.getAttribute(u.MEDIA_CONTROLLER);n&&(ws(this,Ts,this.getRootNode()?.getElementById(n)),(t=(e=Ss(this,Ts))?.associateElement)==null||t.call(e,this))}disconnectedCallback(){var e,t;(t=(e=Ss(this,Ts))?.unassociateElement)==null||t.call(e,this),ws(this,Ts,null)}attributeChangedCallback(e,t,n){var r,i,a,o;[p.MEDIA_PREVIEW_IMAGE,p.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===u.MEDIA_CONTROLLER&&(t&&((i=(r=Ss(this,Ts))?.unassociateElement)==null||i.call(r,this),ws(this,Ts,null)),n&&this.isConnected&&(ws(this,Ts,this.getRootNode()?.getElementById(n)),(o=(a=Ss(this,Ts))?.associateElement)==null||o.call(a,this)))}get mediaPreviewImage(){return k(this,p.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){A(this,p.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(p.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){e?this.setAttribute(p.MEDIA_PREVIEW_COORDS,e.join(` `)):this.removeAttribute(p.MEDIA_PREVIEW_COORDS)}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[n,r,i,a]=e,o=t.split(`#`)[0],s=getComputedStyle(this),{maxWidth:c,maxHeight:l,minWidth:u,minHeight:d}=s,f=s.getPropertyValue(`--media-preview-thumbnail-object-fit`).trim()||`contain`,p,m;if(f===`fill`){let e=parseInt(c)/i,t=parseInt(l)/a,n=parseInt(u)/i,r=parseInt(d)/a;p=e<1?e:Math.max(e,n),m=t<1?t:Math.max(t,r)}else{let e=Math.min(parseInt(c)/i,parseInt(l)/a),t=Math.max(parseInt(u)/i,parseInt(d)/a),n=e<1?e:t>1?t:1;p=n,m=n}let{style:h}=w(this.shadowRoot,`:host`),g=w(this.shadowRoot,`img`).style,_=this.shadowRoot.querySelector(`img`),v=Math.min(p,m)<1?`min`:`max`;h.setProperty(`${v}-width`,`initial`,`important`),h.setProperty(`${v}-height`,`initial`,`important`),h.width=`${i*p}px`,h.height=`${a*m}px`;let y=()=>{g.width=`${this.imgWidth*p}px`,g.height=`${this.imgHeight*m}px`,g.display=`block`};_.src!==o&&(_.onload=()=>{this.imgWidth=_.naturalWidth,this.imgHeight=_.naturalHeight,y(),_.onload=null},_.src=o,y()),y(),g.transform=`translate(-${n*p}px, -${r*m}px)`}};Ts=new WeakMap,Ds.shadowRootOptions={mode:`open`},Ds.getTemplateHTML=Es,x.customElements.get(`media-preview-thumbnail`)||x.customElements.define(`media-preview-thumbnail`,Ds);var Os=Ds,ks=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},As=(e,t,n)=>(ks(e,t,`read from private field`),n?n.call(e):t.get(e)),js=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Ms=(e,t,n,r)=>(ks(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Ns,Ps=class extends _a{constructor(){super(),js(this,Ns,void 0),Ms(this,Ns,this.shadowRoot.querySelector(`slot`)),As(this,Ns).textContent=ge(0)}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_PREVIEW_TIME&&n!=null&&(As(this,Ns).textContent=ge(parseFloat(n)))}get mediaPreviewTime(){return T(this,p.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){E(this,p.MEDIA_PREVIEW_TIME,e)}};Ns=new WeakMap,x.customElements.get(`media-preview-time-display`)||x.customElements.define(`media-preview-time-display`,Ps);var Fs=Ps,Is={SEEK_OFFSET:`seekoffset`},Ls=30,Rs=e=>`
|
|
1151
|
+
<svg aria-hidden="true" viewBox="0 0 20 24">
|
|
1152
|
+
<defs>
|
|
1153
|
+
<style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
|
|
1154
|
+
</defs>
|
|
1155
|
+
<text class="text value" transform="translate(2.18 19.87)">${e}</text>
|
|
1156
|
+
<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"/>
|
|
1157
|
+
</svg>`;function zs(e,t){return`
|
|
1158
|
+
<slot name="icon">${Rs(t.seekOffset)}</slot>
|
|
1159
|
+
`}var Bs=(e,t)=>{e.setAttribute(`aria-label`,b(`seek back {seekOffset} seconds`,{seekOffset:t}))};function Vs(){return b(`Seek backward`)}var Hs=0,Us=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_CURRENT_TIME,Is.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=T(this,Is.SEEK_OFFSET,Ls)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),Bs(this,this.seekOffset),e===Is.SEEK_OFFSET&&(this.seekOffset=T(this,Is.SEEK_OFFSET,Ls))}get seekOffset(){return T(this,Is.SEEK_OFFSET,Ls)}set seekOffset(e){E(this,Is.SEEK_OFFSET,e),this.setAttribute(`aria-label`,b(`seek back {seekOffset} seconds`,{seekOffset:this.seekOffset})),Me(Pe(this,`icon`),this.seekOffset)}get mediaCurrentTime(){return T(this,p.MEDIA_CURRENT_TIME,Hs)}set mediaCurrentTime(e){E(this,p.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new x.CustomEvent(l.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};Us.getSlotTemplateHTML=zs,Us.getTooltipContentHTML=Vs,x.customElements.get(`media-seek-backward-button`)||x.customElements.define(`media-seek-backward-button`,Us);var Ws=Us,Gs={SEEK_OFFSET:`seekoffset`},Ks=30,qs=e=>`
|
|
1160
|
+
<svg aria-hidden="true" viewBox="0 0 20 24">
|
|
1161
|
+
<defs>
|
|
1162
|
+
<style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
|
|
1163
|
+
</defs>
|
|
1164
|
+
<text class="text value" transform="translate(8.9 19.87)">${e}</text>
|
|
1165
|
+
<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"/>
|
|
1166
|
+
</svg>`;function Js(e,t){return`
|
|
1167
|
+
<slot name="icon">${qs(t.seekOffset)}</slot>
|
|
1168
|
+
`}var Ys=(e,t)=>{e.setAttribute(`aria-label`,b(`seek forward {seekOffset} seconds`,{seekOffset:t}))};function Xs(){return b(`Seek forward`)}var Zs=0,Qs=class extends W{static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_CURRENT_TIME,Gs.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=T(this,Gs.SEEK_OFFSET,Ks)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),Ys(this,this.seekOffset),e===Gs.SEEK_OFFSET&&(this.seekOffset=T(this,Gs.SEEK_OFFSET,Ks))}get seekOffset(){return T(this,Gs.SEEK_OFFSET,Ks)}set seekOffset(e){E(this,Gs.SEEK_OFFSET,e),this.setAttribute(`aria-label`,b(`seek forward {seekOffset} seconds`,{seekOffset:this.seekOffset})),Me(Pe(this,`icon`),this.seekOffset)}get mediaCurrentTime(){return T(this,p.MEDIA_CURRENT_TIME,Zs)}set mediaCurrentTime(e){E(this,p.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new x.CustomEvent(l.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};Qs.getSlotTemplateHTML=Js,Qs.getTooltipContentHTML=Xs,x.customElements.get(`media-seek-forward-button`)||x.customElements.define(`media-seek-forward-button`,Qs);var $s=Qs,ec=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},tc=(e,t,n)=>(ec(e,t,`read from private field`),n?n.call(e):t.get(e)),nc=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},rc=(e,t,n,r)=>(ec(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ic=(e,t,n)=>(ec(e,t,`access private method`),n),ac,oc,sc,cc,lc,uc,dc,fc,pc,mc,hc,gc={REMAINING:`remaining`,SHOW_DURATION:`showduration`,NO_TOGGLE:`notoggle`},_c=[...Object.values(gc),p.MEDIA_CURRENT_TIME,p.MEDIA_DURATION,p.MEDIA_SEEKABLE],vc=[`Enter`,` `],yc=` / `,bc=(e,{timesSep:t=yc}={})=>{let n=e.mediaCurrentTime??0,[,r]=e.mediaSeekable??[],i=0;Number.isFinite(e.mediaDuration)?i=e.mediaDuration:Number.isFinite(r)&&(i=r);let a=e.remaining?ge(0-(i-n)):ge(n);return e.showDuration?`${a}${t}${ge(i)}`:a},xc=e=>{let t=e.mediaCurrentTime,[,n]=e.mediaSeekable??[],r=null;if(Number.isFinite(e.mediaDuration)?r=e.mediaDuration:Number.isFinite(n)&&(r=n),t==null||r===null){e.setAttribute(`aria-description`,b(`video not loaded, unknown time.`));return}let i=e.remaining?he(0-(r-t)):he(t);if(!e.showDuration){e.setAttribute(`aria-description`,i);return}let a=b(`{currentTime} of {totalTime}`,{currentTime:i,totalTime:he(r)});e.setAttribute(`aria-description`,a)};function Sc(e,t){return`
|
|
1169
|
+
<slot>${bc(t)}</slot>
|
|
1170
|
+
`}var Cc=e=>{e.setAttribute(`aria-label`,b(`playback time`))},wc=class extends _a{constructor(){super(),nc(this,cc),nc(this,uc),nc(this,fc),nc(this,mc),nc(this,ac,void 0),nc(this,oc,null),nc(this,sc,e=>{let{metaKey:t,altKey:n,key:r}=e;t||n||!vc.includes(r)?this.removeEventListener(`keyup`,tc(this,oc)):this.addEventListener(`keyup`,tc(this,oc))}),rc(this,ac,this.shadowRoot.querySelector(`slot`)),tc(this,ac).innerHTML=`${bc(this)}`}static get observedAttributes(){return[...super.observedAttributes,..._c,`disabled`]}connectedCallback(){let{style:e}=w(this.shadowRoot,`:host(:hover:not([notoggle]))`);e.setProperty(`cursor`,`var(--media-cursor, pointer)`),e.setProperty(`background`,`var(--media-control-hover-background, rgba(50 50 70 / .7))`),this.setAttribute(`aria-label`,b(`playback time`)),ic(this,fc,pc).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute(`remaining`)?this.removeAttribute(`remaining`):this.setAttribute(`remaining`,``))}disconnectedCallback(){this.disable(),ic(this,uc,dc).call(this),super.disconnectedCallback()}attributeChangedCallback(e,t,n){Cc(this),_c.includes(e)?this.update():e===`disabled`&&n!==t?n==null?ic(this,fc,pc).call(this):ic(this,mc,hc).call(this):e===gc.NO_TOGGLE&&n!==t&&(this.noToggle?ic(this,mc,hc).call(this):ic(this,fc,pc).call(this)),super.attributeChangedCallback(e,t,n)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return D(this,gc.REMAINING)}set remaining(e){O(this,gc.REMAINING,e)}get showDuration(){return D(this,gc.SHOW_DURATION)}set showDuration(e){O(this,gc.SHOW_DURATION,e)}get noToggle(){return D(this,gc.NO_TOGGLE)}set noToggle(e){O(this,gc.NO_TOGGLE,e)}get mediaDuration(){return T(this,p.MEDIA_DURATION)}set mediaDuration(e){E(this,p.MEDIA_DURATION,e)}get mediaCurrentTime(){return T(this,p.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){E(this,p.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(p.MEDIA_SEEKABLE);if(e)return e.split(`:`).map(e=>+e)}set mediaSeekable(e){e==null?this.removeAttribute(p.MEDIA_SEEKABLE):this.setAttribute(p.MEDIA_SEEKABLE,e.join(`:`))}update(){let e=bc(this);xc(this),e!==tc(this,ac).innerHTML&&(tc(this,ac).innerHTML=e)}};ac=new WeakMap,oc=new WeakMap,sc=new WeakMap,cc=new WeakSet,lc=function(){tc(this,oc)||(rc(this,oc,e=>{let{key:t}=e;vc.includes(t)?this.toggleTimeDisplay():this.removeEventListener(`keyup`,tc(this,oc))}),this.addEventListener(`keydown`,tc(this,sc)),this.addEventListener(`click`,this.toggleTimeDisplay))},uc=new WeakSet,dc=function(){tc(this,oc)&&(this.removeEventListener(`keyup`,tc(this,oc)),this.removeEventListener(`keydown`,tc(this,sc)),this.removeEventListener(`click`,this.toggleTimeDisplay),rc(this,oc,null))},fc=new WeakSet,pc=function(){!this.noToggle&&!this.hasAttribute(`disabled`)&&(this.setAttribute(`role`,`button`),this.enable(),ic(this,cc,lc).call(this))},mc=new WeakSet,hc=function(){this.removeAttribute(`role`),this.disable(),ic(this,uc,dc).call(this)},wc.getSlotTemplateHTML=Sc,x.customElements.get(`media-time-display`)||x.customElements.define(`media-time-display`,wc);var Tc=wc,Ec=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},q=(e,t,n)=>(Ec(e,t,`read from private field`),n?n.call(e):t.get(e)),Dc=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},J=(e,t,n,r)=>(Ec(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Oc=(e,t,n,r)=>({set _(r){J(e,t,r,n)},get _(){return q(e,t,r)}}),kc,Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc=class{constructor(e,t,n){Dc(this,kc,void 0),Dc(this,Ac,void 0),Dc(this,jc,void 0),Dc(this,Mc,void 0),Dc(this,Nc,void 0),Dc(this,Pc,void 0),Dc(this,Fc,void 0),Dc(this,Ic,void 0),Dc(this,Lc,0),Dc(this,Rc,(e=performance.now())=>{J(this,Lc,requestAnimationFrame(q(this,Rc))),J(this,Mc,performance.now()-q(this,jc));let t=1e3/this.fps;if(q(this,Mc)>t){J(this,jc,e-q(this,Mc)%t);let n=1e3/((e-q(this,Ac))/++Oc(this,Nc)._),r=(e-q(this,Pc))/1e3/this.duration,i=q(this,Fc)+r*this.playbackRate;i-q(this,kc).valueAsNumber>0?J(this,Ic,this.playbackRate/this.duration/n):(J(this,Ic,.995*q(this,Ic)),i=q(this,kc).valueAsNumber+q(this,Ic)),this.callback(i)}}),J(this,kc,e),this.callback=t,this.fps=n}start(){q(this,Lc)===0&&(J(this,jc,performance.now()),J(this,Ac,q(this,jc)),J(this,Nc,0),q(this,Rc).call(this))}stop(){q(this,Lc)!==0&&(cancelAnimationFrame(q(this,Lc)),J(this,Lc,0))}update({start:e,duration:t,playbackRate:n}){let r=e-q(this,kc).valueAsNumber,i=Math.abs(t-this.duration);(r>0||r<-.5/t||i>=.5)&&this.callback(e),J(this,Fc,e),J(this,Pc,performance.now()),this.duration=t,this.playbackRate=n}};kc=new WeakMap,Ac=new WeakMap,jc=new WeakMap,Mc=new WeakMap,Nc=new WeakMap,Pc=new WeakMap,Fc=new WeakMap,Ic=new WeakMap,Lc=new WeakMap,Rc=new WeakMap;var Bc=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},Y=(e,t,n)=>(Bc(e,t,`read from private field`),n?n.call(e):t.get(e)),X=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Z=(e,t,n,r)=>(Bc(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(Bc(e,t,`access private method`),n),Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl=e=>{let t=e.range,n=he(+gl(e)),r=he(+e.mediaSeekableEnd),i=n&&r?b(`{currentTime} of {totalTime}`,{currentTime:n,totalTime:r}):b(`video not loaded, unknown time.`);t.setAttribute(`aria-valuetext`,i)};function ml(e){return`
|
|
1171
|
+
<style>
|
|
1172
|
+
:host {
|
|
1173
|
+
--media-box-border-radius: 4px;
|
|
1174
|
+
--media-box-padding-left: 10px;
|
|
1175
|
+
--media-box-padding-right: 10px;
|
|
1176
|
+
--media-preview-border-radius: var(--media-box-border-radius);
|
|
1177
|
+
--media-box-arrow-offset: var(--media-box-border-radius);
|
|
1178
|
+
--_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
|
|
1179
|
+
--_preview-background: var(--media-preview-background, var(--_control-background));
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
contain: layout;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
#buffered {
|
|
1186
|
+
background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));
|
|
1187
|
+
position: absolute;
|
|
1188
|
+
height: 100%;
|
|
1189
|
+
will-change: width;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
#preview-rail,
|
|
1193
|
+
#current-rail {
|
|
1194
|
+
width: 100%;
|
|
1195
|
+
position: absolute;
|
|
1196
|
+
left: 0;
|
|
1197
|
+
bottom: 100%;
|
|
1198
|
+
pointer-events: none;
|
|
1199
|
+
will-change: transform;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
[part~="box"] {
|
|
1203
|
+
width: min-content;
|
|
1204
|
+
|
|
1205
|
+
position: absolute;
|
|
1206
|
+
bottom: 100%;
|
|
1207
|
+
flex-direction: column;
|
|
1208
|
+
align-items: center;
|
|
1209
|
+
transform: translateX(-50%);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
[part~="current-box"] {
|
|
1213
|
+
display: var(--media-current-box-display, var(--media-box-display, flex));
|
|
1214
|
+
margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));
|
|
1215
|
+
visibility: hidden;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
[part~="preview-box"] {
|
|
1219
|
+
display: var(--media-preview-box-display, var(--media-box-display, flex));
|
|
1220
|
+
margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));
|
|
1221
|
+
transition-property: var(--media-preview-transition-property, visibility, opacity);
|
|
1222
|
+
transition-duration: var(--media-preview-transition-duration-out, .25s);
|
|
1223
|
+
transition-delay: var(--media-preview-transition-delay-out, 0s);
|
|
1224
|
+
visibility: hidden;
|
|
1225
|
+
opacity: 0;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
:host(:is([${p.MEDIA_PREVIEW_IMAGE}], [${p.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
|
|
1229
|
+
transition-duration: var(--media-preview-transition-duration-in, .5s);
|
|
1230
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1231
|
+
visibility: visible;
|
|
1232
|
+
opacity: 1;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
@media (hover: hover) {
|
|
1236
|
+
:host(:is([${p.MEDIA_PREVIEW_IMAGE}], [${p.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
|
|
1237
|
+
transition-duration: var(--media-preview-transition-duration-in, .5s);
|
|
1238
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1239
|
+
visibility: visible;
|
|
1240
|
+
opacity: 1;
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
media-preview-thumbnail,
|
|
1245
|
+
::slotted(media-preview-thumbnail) {
|
|
1246
|
+
visibility: hidden;
|
|
1247
|
+
|
|
1248
|
+
transition: visibility 0s .25s;
|
|
1249
|
+
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
1250
|
+
background: var(--media-preview-thumbnail-background, var(--_preview-background));
|
|
1251
|
+
box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));
|
|
1252
|
+
max-width: var(--media-preview-thumbnail-max-width, 180px);
|
|
1253
|
+
max-height: var(--media-preview-thumbnail-max-height, 160px);
|
|
1254
|
+
min-width: var(--media-preview-thumbnail-min-width, 120px);
|
|
1255
|
+
min-height: var(--media-preview-thumbnail-min-height, 80px);
|
|
1256
|
+
border: var(--media-preview-thumbnail-border);
|
|
1257
|
+
border-radius: var(--media-preview-thumbnail-border-radius,
|
|
1258
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
|
|
1262
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
|
|
1263
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1264
|
+
visibility: visible;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
@media (hover: hover) {
|
|
1268
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
|
|
1269
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
|
|
1270
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1271
|
+
visibility: visible;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
:host([${p.MEDIA_PREVIEW_TIME}]:hover) {
|
|
1275
|
+
--media-time-range-hover-display: block;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
media-preview-chapter-display,
|
|
1280
|
+
::slotted(media-preview-chapter-display) {
|
|
1281
|
+
font-size: var(--media-font-size, 13px);
|
|
1282
|
+
line-height: 17px;
|
|
1283
|
+
min-width: 0;
|
|
1284
|
+
visibility: hidden;
|
|
1285
|
+
|
|
1286
|
+
transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;
|
|
1287
|
+
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
1288
|
+
background: var(--media-preview-chapter-background, var(--_preview-background));
|
|
1289
|
+
border-radius: var(--media-preview-chapter-border-radius,
|
|
1290
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius)
|
|
1291
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
1292
|
+
padding: var(--media-preview-chapter-padding, 3.5px 9px);
|
|
1293
|
+
margin: var(--media-preview-chapter-margin, 0 0 5px);
|
|
1294
|
+
text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
|
|
1298
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
|
|
1299
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1300
|
+
border-radius: var(--media-preview-chapter-border-radius, 0);
|
|
1301
|
+
padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
|
|
1302
|
+
margin: var(--media-preview-chapter-margin, 0);
|
|
1303
|
+
min-width: 100%;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
media-preview-chapter-display[${p.MEDIA_PREVIEW_CHAPTER}],
|
|
1307
|
+
::slotted(media-preview-chapter-display[${p.MEDIA_PREVIEW_CHAPTER}]) {
|
|
1308
|
+
visibility: visible;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
media-preview-chapter-display:not([aria-valuetext]),
|
|
1312
|
+
::slotted(media-preview-chapter-display:not([aria-valuetext])) {
|
|
1313
|
+
display: none;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
media-preview-time-display,
|
|
1317
|
+
::slotted(media-preview-time-display),
|
|
1318
|
+
media-time-display,
|
|
1319
|
+
::slotted(media-time-display) {
|
|
1320
|
+
font-size: var(--media-font-size, 13px);
|
|
1321
|
+
line-height: 17px;
|
|
1322
|
+
min-width: 0;
|
|
1323
|
+
|
|
1324
|
+
transition: min-width 0s, border-radius 0s;
|
|
1325
|
+
transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
|
|
1326
|
+
background: var(--media-preview-time-background, var(--_preview-background));
|
|
1327
|
+
border-radius: var(--media-preview-time-border-radius,
|
|
1328
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius)
|
|
1329
|
+
var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
1330
|
+
padding: var(--media-preview-time-padding, 3.5px 9px);
|
|
1331
|
+
margin: var(--media-preview-time-margin, 0);
|
|
1332
|
+
text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));
|
|
1333
|
+
transform: translateX(min(
|
|
1334
|
+
max(calc(50% - var(--_box-width) / 2),
|
|
1335
|
+
calc(var(--_box-shift, 0))),
|
|
1336
|
+
calc(var(--_box-width) / 2 - 50%)
|
|
1337
|
+
));
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
|
|
1341
|
+
:host([${p.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
|
|
1342
|
+
transition-delay: var(--media-preview-transition-delay-in, .25s);
|
|
1343
|
+
border-radius: var(--media-preview-time-border-radius,
|
|
1344
|
+
0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
|
|
1345
|
+
min-width: 100%;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
:host([${p.MEDIA_PREVIEW_TIME}]:hover) {
|
|
1349
|
+
--media-time-range-hover-display: block;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
[part~="arrow"],
|
|
1353
|
+
::slotted([part~="arrow"]) {
|
|
1354
|
+
display: var(--media-box-arrow-display, inline-block);
|
|
1355
|
+
transform: translateX(min(
|
|
1356
|
+
max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),
|
|
1357
|
+
calc(var(--_box-shift, 0))),
|
|
1358
|
+
calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))
|
|
1359
|
+
));
|
|
1360
|
+
|
|
1361
|
+
border-color: transparent;
|
|
1362
|
+
border-top-color: var(--media-box-arrow-background, var(--_control-background));
|
|
1363
|
+
border-width: var(--media-box-arrow-border-width,
|
|
1364
|
+
var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);
|
|
1365
|
+
border-style: solid;
|
|
1366
|
+
justify-content: center;
|
|
1367
|
+
height: 0;
|
|
1368
|
+
}
|
|
1369
|
+
</style>
|
|
1370
|
+
<div id="preview-rail">
|
|
1371
|
+
<slot name="preview" part="box preview-box">
|
|
1372
|
+
<media-preview-thumbnail>
|
|
1373
|
+
<template shadowrootmode="${Os.shadowRootOptions.mode}">
|
|
1374
|
+
${Os.getTemplateHTML({})}
|
|
1375
|
+
</template>
|
|
1376
|
+
</media-preview-thumbnail>
|
|
1377
|
+
<media-preview-chapter-display></media-preview-chapter-display>
|
|
1378
|
+
<media-preview-time-display></media-preview-time-display>
|
|
1379
|
+
<slot name="preview-arrow"><div part="arrow"></div></slot>
|
|
1380
|
+
</slot>
|
|
1381
|
+
</div>
|
|
1382
|
+
<div id="current-rail">
|
|
1383
|
+
<slot name="current" part="box current-box">
|
|
1384
|
+
|
|
1385
|
+
</slot>
|
|
1386
|
+
</div>
|
|
1387
|
+
`}var hl=(e,t=e.mediaCurrentTime)=>{let n=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,r=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;if(Number.isNaN(r))return 0;let i=(t-n)/(r-n);return Math.max(0,Math.min(i,1))},gl=(e,t=e.range.valueAsNumber)=>{let n=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,r=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(r)?0:t*(r-n)+n},_l=class extends ea{constructor(){super(),X(this,Qc),X(this,tl),X(this,rl),X(this,al),X(this,sl),X(this,ll),X(this,dl),X(this,Vc,null),X(this,Hc,void 0),X(this,Uc,void 0),X(this,Wc,void 0),X(this,Gc,void 0),X(this,Kc,void 0),X(this,qc,void 0),X(this,Jc,void 0),X(this,Yc,void 0),X(this,Xc,void 0),X(this,Zc,()=>{Q(this,Qc,$c).call(this)?Y(this,Hc).start():Y(this,Hc).stop()}),X(this,el,e=>{this.dragging||(oe(e)&&(this.range.valueAsNumber=e),Y(this,Xc)||this.updateBar())}),this.shadowRoot.querySelector(`#track`).insertAdjacentHTML(`afterbegin`,`<div id="buffered" part="buffered"></div>`),Z(this,Uc,this.shadowRoot.querySelectorAll(`[part~="box"]`)),Z(this,Gc,this.shadowRoot.querySelector(`[part~="preview-box"]`)),Z(this,Kc,this.shadowRoot.querySelector(`[part~="current-box"]`));let e=getComputedStyle(this);Z(this,qc,parseInt(e.getPropertyValue(`--media-box-padding-left`))),Z(this,Jc,parseInt(e.getPropertyValue(`--media-box-padding-right`))),Z(this,Hc,new zc(this.range,Y(this,el),60))}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_PAUSED,p.MEDIA_DURATION,p.MEDIA_SEEKABLE,p.MEDIA_CURRENT_TIME,p.MEDIA_PREVIEW_IMAGE,p.MEDIA_PREVIEW_TIME,p.MEDIA_PREVIEW_CHAPTER,p.MEDIA_BUFFERED,p.MEDIA_PLAYBACK_RATE,p.MEDIA_LOADING,p.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute(`aria-label`,b(`seek`)),Y(this,Zc).call(this),Z(this,Vc,this.getRootNode()),(e=Y(this,Vc))==null||e.addEventListener(`transitionstart`,this)}disconnectedCallback(){var e;super.disconnectedCallback(),Y(this,Hc).stop(),(e=Y(this,Vc))==null||e.removeEventListener(`transitionstart`,this),Z(this,Vc,null)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),t!=n&&(e===p.MEDIA_CURRENT_TIME||e===p.MEDIA_PAUSED||e===p.MEDIA_ENDED||e===p.MEDIA_LOADING||e===p.MEDIA_DURATION||e===p.MEDIA_SEEKABLE?(Y(this,Hc).update({start:hl(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Y(this,Zc).call(this),pl(this)):e===p.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===p.MEDIA_DURATION||e===p.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=Y(this,Yc),this.updateBar()))}get mediaChaptersCues(){return Y(this,Yc)}set mediaChaptersCues(e){Z(this,Yc,e),this.updateSegments(Y(this,Yc)?.map(e=>({start:hl(this,e.startTime),end:hl(this,e.endTime)})))}get mediaPaused(){return D(this,p.MEDIA_PAUSED)}set mediaPaused(e){O(this,p.MEDIA_PAUSED,e)}get mediaLoading(){return D(this,p.MEDIA_LOADING)}set mediaLoading(e){O(this,p.MEDIA_LOADING,e)}get mediaDuration(){return T(this,p.MEDIA_DURATION)}set mediaDuration(e){E(this,p.MEDIA_DURATION,e)}get mediaCurrentTime(){return T(this,p.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){E(this,p.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return T(this,p.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){E(this,p.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(p.MEDIA_BUFFERED);return e?e.split(` `).map(e=>e.split(`:`).map(e=>+e)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(p.MEDIA_BUFFERED);return}let t=e.map(e=>e.join(`:`)).join(` `);this.setAttribute(p.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(p.MEDIA_SEEKABLE);if(e)return e.split(`:`).map(e=>+e)}set mediaSeekable(e){e==null?this.removeAttribute(p.MEDIA_SEEKABLE):this.setAttribute(p.MEDIA_SEEKABLE,e.join(`:`))}get mediaSeekableEnd(){let[,e=this.mediaDuration]=this.mediaSeekable??[];return e}get mediaSeekableStart(){let[e=0]=this.mediaSeekable??[];return e}get mediaPreviewImage(){return k(this,p.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){A(this,p.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return T(this,p.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){E(this,p.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return D(this,p.MEDIA_ENDED)}set mediaEnded(e){O(this,p.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){let e=this.mediaBuffered;if(!e.length)return;let t;if(this.mediaEnded)t=1;else{let n=this.mediaCurrentTime,[,r=this.mediaSeekableStart]=e.find(([e,t])=>e<=n&&n<=t)??[];t=hl(this,r)}let{style:n}=w(this.shadowRoot,`#buffered`);n.setProperty(`width`,`${t*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector(`slot[name="current"]`).assignedElements().length)return;let e=w(this.shadowRoot,`#current-rail`),t=w(this.shadowRoot,`[part~="current-box"]`),n=Q(this,tl,nl).call(this,Y(this,Kc)),r=Q(this,rl,il).call(this,n,this.range.valueAsNumber),i=Q(this,al,ol).call(this,n,this.range.valueAsNumber);e.style.transform=`translateX(${r})`,e.style.setProperty(`--_range-width`,`${n.range.width}`),t.style.setProperty(`--_box-shift`,`${i}`),t.style.setProperty(`--_box-width`,`${n.box.width}px`),t.style.setProperty(`visibility`,`initial`)}handleEvent(e){switch(super.handleEvent(e),e.type){case`input`:Q(this,dl,fl).call(this);break;case`pointermove`:Q(this,sl,cl).call(this,e);break;case`pointerup`:Y(this,Xc)&&Z(this,Xc,!1);break;case`pointerdown`:Z(this,Xc,!0);break;case`pointerleave`:Q(this,ll,ul).call(this,null);break;case`transitionstart`:Fe(e.target,this)&&setTimeout(()=>Y(this,Zc).call(this),0)}}};Vc=new WeakMap,Hc=new WeakMap,Uc=new WeakMap,Wc=new WeakMap,Gc=new WeakMap,Kc=new WeakMap,qc=new WeakMap,Jc=new WeakMap,Yc=new WeakMap,Xc=new WeakMap,Zc=new WeakMap,Qc=new WeakSet,$c=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&ze(this)},el=new WeakMap,tl=new WeakSet,nl=function(e){let t=((this.getAttribute(`bounds`)?Ie(this,`#${this.getAttribute(`bounds`)}`):this.parentElement)??this).getBoundingClientRect(),n=this.range.getBoundingClientRect(),r=e.offsetWidth;return{box:{width:r,min:-(n.left-t.left-r/2),max:t.right-n.left-r/2},bounds:t,range:n}},rl=new WeakSet,il=function(e,t){let n=`${t*100}%`,{width:r,min:i,max:a}=e.box;if(!r)return n;if(Number.isNaN(i)||(n=`max(${`calc(1 / var(--_range-width) * 100 * ${i}% + var(--media-box-padding-left))`}, ${n})`),!Number.isNaN(a)){let e=`calc(1 / var(--_range-width) * 100 * ${a}% - var(--media-box-padding-right))`;n=`min(${n}, ${e})`}return n},al=new WeakSet,ol=function(e,t){let{width:n,min:r,max:i}=e.box,a=t*e.range.width;if(a<r+Y(this,qc)){let t=e.range.left-e.bounds.left-Y(this,qc);return`${a-n/2+t}px`}if(a>i-Y(this,Jc)){let t=e.bounds.right-e.range.right-Y(this,Jc);return`${a+n/2-t-e.range.width}px`}return 0},sl=new WeakSet,cl=function(e){let t=[...Y(this,Uc)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this))){Q(this,ll,ul).call(this,null);return}let n=this.mediaSeekableEnd;if(!n)return;let r=w(this.shadowRoot,`#preview-rail`),i=w(this.shadowRoot,`[part~="preview-box"]`),a=Q(this,tl,nl).call(this,Y(this,Gc)),o=(e.clientX-a.range.left)/a.range.width;o=Math.max(0,Math.min(1,o));let s=Q(this,rl,il).call(this,a,o),c=Q(this,al,ol).call(this,a,o);r.style.transform=`translateX(${s})`,r.style.setProperty(`--_range-width`,`${a.range.width}`),i.style.setProperty(`--_box-shift`,`${c}`),i.style.setProperty(`--_box-width`,`${a.box.width}px`);let l=Math.round(Y(this,Wc))-Math.round(o*n);Math.abs(l)<1&&o>.01&&o<.99||(Z(this,Wc,o*n),Q(this,ll,ul).call(this,Y(this,Wc)))},ll=new WeakSet,ul=function(e){this.dispatchEvent(new x.CustomEvent(l.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},dl=new WeakSet,fl=function(){Y(this,Hc).stop();let e=gl(this);this.dispatchEvent(new x.CustomEvent(l.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},_l.shadowRootOptions={mode:`open`},_l.getContainerTemplateHTML=ml,x.customElements.get(`media-time-range`)||x.customElements.define(`media-time-range`,_l);var vl=_l,yl=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},bl=(e,t,n)=>(yl(e,t,`read from private field`),n?n.call(e):t.get(e)),xl=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Sl,Cl=1,wl=e=>e.mediaMuted?0:e.mediaVolume,Tl=e=>`${Math.round(e*100)}%`,El=class extends ea{constructor(){super(...arguments),xl(this,Sl,()=>{let e=this.range.value,t=new x.CustomEvent(l.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_VOLUME,p.MEDIA_MUTED,p.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute(`aria-label`,b(`volume`)),this.range.addEventListener(`input`,bl(this,Sl))}disconnectedCallback(){this.range.removeEventListener(`input`,bl(this,Sl)),super.disconnectedCallback()}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),(e===p.MEDIA_VOLUME||e===p.MEDIA_MUTED)&&(this.range.valueAsNumber=wl(this),this.range.setAttribute(`aria-valuetext`,Tl(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return T(this,p.MEDIA_VOLUME,Cl)}set mediaVolume(e){E(this,p.MEDIA_VOLUME,e)}get mediaMuted(){return D(this,p.MEDIA_MUTED)}set mediaMuted(e){O(this,p.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return k(this,p.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){A(this,p.MEDIA_VOLUME_UNAVAILABLE,e)}};Sl=new WeakMap,x.customElements.get(`media-volume-range`)||x.customElements.define(`media-volume-range`,El);var Dl=El;function Ol(e){return`
|
|
1388
|
+
<style>
|
|
1389
|
+
:host {
|
|
1390
|
+
min-width: 4ch;
|
|
1391
|
+
padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
|
|
1392
|
+
width: 100%;
|
|
1393
|
+
display: grid;
|
|
1394
|
+
grid-template-columns: 1fr auto;
|
|
1395
|
+
gap: 1rem;
|
|
1396
|
+
font-weight: var(--media-button-font-weight, normal);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
#checked-indicator {
|
|
1400
|
+
display: none;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
:host([${p.MEDIA_LOOP}]) #checked-indicator {
|
|
1404
|
+
display: block;
|
|
1405
|
+
}
|
|
1406
|
+
</style>
|
|
1407
|
+
|
|
1408
|
+
<span id="icon">
|
|
1409
|
+
</span>
|
|
1410
|
+
|
|
1411
|
+
<div id="checked-indicator">
|
|
1412
|
+
<svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
|
|
1413
|
+
<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"/>
|
|
1414
|
+
</svg>
|
|
1415
|
+
</div>
|
|
1416
|
+
`}function kl(){return b(`Loop`)}var Al=class extends W{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,p.MEDIA_LOOP]}connectedCallback(){super.connectedCallback(),this.container=this.shadowRoot?.querySelector(`#icon`)||null,this.container&&(this.container.textContent=b(`Loop`))}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===p.MEDIA_LOOP&&this.container&&this.setAttribute(`aria-checked`,this.mediaLoop?`true`:`false`)}get mediaLoop(){return D(this,p.MEDIA_LOOP)}set mediaLoop(e){O(this,p.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,t=new x.CustomEvent(l.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};Al.getSlotTemplateHTML=Ol,Al.getTooltipContentHTML=kl,x.customElements.get(`media-loop-button`)||x.customElements.define(`media-loop-button`,Al);var jl=Al;function $(e){if(typeof e==`boolean`)return e?``:void 0;if(typeof e!=`function`){if(Array.isArray(e)&&e.every(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`))return e.join(` `);if(!(typeof e==`object`&&e))return e}}s({tagName:`media-gesture-receiver`,elementClass:Ye,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-container`,elementClass:Tt,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});var Ml=s({tagName:`media-controller`,elementClass:ur,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});s({tagName:`media-tooltip`,elementClass:mr,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-chrome-button`,elementClass:Ar,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-airplay-button`,elementClass:Ir,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-captions-button`,elementClass:Gr,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-cast-button`,elementClass:Qr,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-chrome-dialog`,elementClass:Ci,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-chrome-range`,elementClass:ta,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});var Nl=s({tagName:`media-control-bar`,elementClass:la,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});s({tagName:`media-text-display`,elementClass:va,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-duration-display`,elementClass:Ea,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-error-dialog`,elementClass:Ba,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-keyboard-shortcuts-dialog`,elementClass:Ya,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});var Pl=s({tagName:`media-fullscreen-button`,elementClass:so,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});s({tagName:`media-live-button`,elementClass:_o,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});var Fl=s({tagName:`media-loading-indicator`,elementClass:ko,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),Il=s({tagName:`media-mute-button`,elementClass:Lo,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),Ll=s({tagName:`media-pip-button`,elementClass:Uo,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),Rl=s({tagName:`media-playback-rate-button`,elementClass:es,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),zl=s({tagName:`media-play-button`,elementClass:ss,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});s({tagName:`media-poster-image`,elementClass:ps,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-preview-chapter-display`,elementClass:bs,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-preview-thumbnail`,elementClass:Os,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),s({tagName:`media-preview-time-display`,elementClass:Fs,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});var Bl=s({tagName:`media-seek-backward-button`,elementClass:Ws,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),Vl=s({tagName:`media-seek-forward-button`,elementClass:$s,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),Hl=s({tagName:`media-time-display`,elementClass:Tc,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),Ul=s({tagName:`media-time-range`,elementClass:vl,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}}),Wl=s({tagName:`media-volume-range`,elementClass:Dl,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});s({tagName:`media-loop-button`,elementClass:jl,react:n.default,toAttributeValue:$,defaultProps:{suppressHydrationWarning:!0}});export{Il as a,Rl as c,Hl as d,Ul as f,Fl as i,Bl as l,Ml as n,Ll as o,Wl as p,Pl as r,zl as s,Nl as t,Vl as u};
|