PageSourceSearch

https://vinitkumar.me/app-749b4e5b03dfc6c263e8.js

js vinitkumar.me collected 2026-10-03 23:17:08 UTC 251,810 bytes, 2 lines download raw bytes

1(self.webpackChunkvinit_kumar_blog=self.webpackChunkvinit_kumar_blog||[]).push([[524],{20:function(e,t,n){const i=n(9377),{getResourceURLsForPathname:r,loadPage:a,loadPageSync:o}=n(6814).Zf;t.N=function(e,t,n,s){void 0===t&&(t={});let l=i.map(n=>{if(!n.plugin[e])return;t.getResourceURLsForPathname=r,t.loadPage=a,t.loadPageSync=o;const i=n.plugin[e](t,n.options);return i&&s&&(t=s({args:t,result:i,plugin:n})),i});return l=l.filter(e=>void 0!==e),l.length>0?l:n?[n]:[]},t.v=(e,t,n)=>i.reduce((n,i)=>i.plugin[e]?n.then(()=>i.plugin[e](t,i.options)):n,Promise.resolve())},213:function(){"use strict";const e={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"},t={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},n={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_P
1LAYED:"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"},i=Object.entries(n),r=i.reduce((e,[t,n])=>(e[t]=n.toLowerCase(),e),{}),a=i.reduce((e,[t,n])=>(e[t]=n.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),o=(Object.entries(a).reduce((e,[t,n])=>{const i=r[t];return i&&(e[n]=i),e},{userinactivechange:"userinactive"}),Object.entries(r).reduce((e,[t,n])=>{const i=a[t];return i&&(e[n]=i),e},{userinactive:"userinactivechange"})),s={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},l="disabled",d="showing",c="mouse",u="pen",h="touch",m="unavailable",p="unsupported",v={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},E="fullscreen";function g(e){if(e){const{id:t,width:n,height:i}=e;return[t,n,i].filter(e=>null!=e).join(":")}}function f(e){if(e){const{id:t,kind:n,language:i,label:r}=e;return[t,n,i,r].filter(e=>null!=e).join(":")}}function b(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}const y=e=>new Promise(t=>setTimeout(t,e));var w;const A={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 
1Error","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."}};let _=(null==(w=globalThis.navigator)?void 0:w.language)||"en";const I=(e,t={})=>(e=>{var t,n,i;const[r]=_.split("-");return(null==(t=A[_])?void 0:t[e])||(null==(n=A[r])?void 0:n[e])||(null==(i=A.en)?void 0:i[e])||e})(e).replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):`{${n}}`),k=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],T=e=>{if(!b(e))return"";const t=Math.abs(e),n=t!==e,i=new Date(0,0,0,0,0,t,0),r=[i.getHours(),i.getMinutes(),i.getSeconds()].map((e,t)=>e&&((e,t)=>`${e} ${I(1===e?k[t].singular:k[t].plural)}`)(e,t)).filter(e=>e).join(", ");return n?I("{time} remaining",{time:r}):r};function S(e,t){let n=!1;e<0&&(n=!0,e=0-e),e=e<0?0:e;let i=Math.floor(e%60),r=Math.floor(e/60%60),a=Math.floor(e/3600);const o=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(a=r=i="0"),a=a>0||s>0?a+":":"",r=((a||o>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,(n?"-":"")+a+r+i}Object.freeze({length:0,start(e){const t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){const t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});class M{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class R extends M{}class C extends R{constructor(){super(...arguments),this.role=null}}const L={createElement:function(){return new D.HTMLElement},createElementNS:function(){return new D.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(e){return!1}},D={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:L,Node:R,Element:C,HTMLElement:class extends C{constructor(){super(...arguments),this.innerHTML=""}get content(){return new D.DocumentFragment}},DocumentFragment:class extends M{},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}}}}},x="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"undefined"==typeof window||void 0===window.customElements,P=Object.keys(D).every(e=>e in globalThis),O=x&&!P?D:globalThis,N=x&&!P?L:globalThis.document,U=new WeakMap,H=e=>{let t=U.get(e);return t||U.set(e,t=new Set),t},W=new O.ResizeObserver(e=>{for(const t of e)for(const e of H(t.target))e(t)});function $(e,t){H(e).add(t),W.observe(e)}function V(e,t){const n=H(e);n.delete(t),n.size||W.unobserve(e)}function j(e){const t={};for(const n of e)t[n.name]=n.value;return t}function B(e){var n;return null!=(n=function(e){var n;const{MEDIA_CONTROLLER:i}=t,r=e.getAttribute(i);if(r)return null==(n=function(e){var t;const n=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);if(n instanceof ShadowRoot||n instanceof Document)return n;return null}(e))?void 0:n.getElementById(r)}(e))?n:Q(e,"media-controller")}const F=(e,t,n=".value")=>{const i=e.querySelector(n);i&&(i.textContent=t)},q=(e,t)=>
1((e,t)=>{const n=`slot[name="${t}"]`,i=e.shadowRoot.querySelector(n);return i?i.children:[]})(e,t)[0],G=(e,t)=>!(!e||!t)&&(!!(null==e?void 0:e.contains(t))||G(e,t.getRootNode().host)),Q=(e,t)=>{if(!e)return null;const n=e.closest(t);return n||Q(e.getRootNode().host,t)};function K(e=document){var t;const n=null==e?void 0:e.activeElement;return n?null!=(t=K(n.shadowRoot))?t:n:null}function Y(e,{depth:t=3,checkOpacity:n=!0,checkVisibilityCSS:i=!0}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:n,checkVisibilityCSS:i});let r=e;for(;r&&t>0;){const e=getComputedStyle(r);if(n&&"0"===e.opacity||i&&"hidden"===e.visibility||"none"===e.display)return!1;r=r.parentElement,t--}return!0}function z(e,t){const n=function(e,t){var n,i;let r;for(r of null!=(n=e.querySelectorAll("style:not([media])"))?n:[]){let e;try{e=null==(i=r.sheet)?void 0:i.cssRules}catch{continue}for(const n of null!=e?e:[])if(t(n.selectorText))return n}}(e,e=>e===t);return n||Z(e,t)}function Z(e,t){var n,i;const r=null!=(n=e.querySelectorAll("style:not([media])"))?n:[],a=null==r?void 0:r[r.length-1];if(!(null==a?void 0:a.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};const o=null==a?void 0:a.sheet.insertRule(`${t}{}`,a.sheet.cssRules.length);return null==(i=a.sheet.cssRules)?void 0:i[o]}function X(e,t,n=Number.NaN){const i=e.getAttribute(t);return null!=i?+i:n}function J(e,t,n){const i=+n;null==n||Number.isNaN(i)?e.hasAttribute(t)&&e.removeAttribute(t):X(e,t,void 0)!==i&&e.setAttribute(t,`${i}`)}function ee(e,t){return e.hasAttribute(t)}function te(e,t,n){null!=n?ee(e,t)!=n&&e.toggleAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function ne(e,t,n=null){var i;return null!=(i=e.getAttribute(t))?i:n}function ie(e,t,n){if(null==n)return void(e.hasAttribute(t)&&e.removeAttribute(t));const i=`${n}`;ne(e,t,void 0)!==i&&e.setAttribute(t,i)}var re,ae=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},oe=(e,t,n)=>(ae(e,t,"read from private field"),n?n.call(e):t.get(e)),se=(e,t,n,i)=>(ae(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class le extends O.HTMLElement{constructor(){if(super(),((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)})(this,re,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[t.MEDIA_CONTROLLER,r.MEDIA_PAUSED]}attributeChangedCallback(e,n,i){var r,a,o,s,l;e===t.MEDIA_CONTROLLER&&(n&&(null==(a=null==(r=oe(this,re))?void 0:r.unassociateElement)||a.call(r,this),se(this,re,null)),i&&this.isConnected&&(se(this,re,null==(o=this.getRootNode())?void 0:o.getElementById(i)),null==(l=null==(s=oe(this,re))?void 0:s.associateElement)||l.call(s,this)))}connectedCallback(){var e,n;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),se(this,re,function(e){var n;const i=e.getAttribute(t.MEDIA_CONTROLLER);if(i)return null==(n=e.getRootNode())?void 0:n.getElementById(i);return Q(e,"media-controller")}(this)),this.getAttribute(t.MEDIA_CONTROLLER)&&(null==(n=null==(e=oe(this,re))?void 0:e.associateElement)||n.call(e,this)),oe(this,re)&&(oe(this,re).addEventListener("pointerdown",this),oe(this,re).addEventListener("click",this),oe(this,re).hasAttribute("tabindex")||(oe(this,re).tabIndex=0))}disconnectedCallback(){var e,n,i,r;this.getAttribute(t.MEDIA_CONTROLLER)&&(null==(n=null==(e=oe(this,re))?void 0:e.unassociateElement)||n.call(e,this)),null==(i=oe(this,re))||i.removeEventListener("pointerdown",this),null==(r=oe(this,re))||r.removeEventListener("click",this),se(this,re,null)}handleEvent(e){var t;const n=null==(t=e.composedPath())?void 0:t[0];if(["video","media-controller"].includes(null==n?void 0:n.localName))if("pointerdown"===e.type)this._pointerType=e.pointerType;else if("click"===e.type){const{clientX:t,clientY:n}=e,{left:i,top:r,width:a,height:o}=this.getBoundingClientRect(),s=t-i,l=n-r;if(s<0||l<0||s>a||l>o||0===a&&0===o)return;const d=this._pointerType||"mouse";if(this._pointerType=void 0,d===h)return void this.handleTap(e);if(d===c||d===u)return void this.handleMouseClick(e)}}get mediaPaused(){return ee(this,r.MEDIA_PAUSED)}set mediaPaused(e){te(this,r.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(t){const n=this.mediaPaused?e.MEDIA_PLAY_REQUEST:e.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new O.CustomEvent(n,{composed:!0,bubbles:!0}))}}re=new WeakMap,le.shadowRootOptions={mode:"open"},le.getTemplateHTML=function(e){return"\n    <style>\n      :host {\n        display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));\n        box-sizing: border-box;\n      }\n    </style>\n  "},O.customElements.get("media-gesture-receiver")||O.customElements.define("media-gesture-receiver",le);var de,ce,ue,he,me,pe,ve,Ee,ge,fe,be,ye,we,Ae,_e,Ie,ke,Te,Se,Me,Re=le,Ce=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Le=(e,t,n)=>(Ce(e,t,"read from private field"),n?n.call(e):t.get(e)),De=(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)},xe=(e,t,n,i)=>(Ce(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Pe=(e,t,n
1)=>(Ce(e,t,"access private method"),n);const Oe={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};const Ne=Object.values(r);function Ue(e,t){var n;if(!e.isConnected)return;const i=function(e){const t=e.split(/\s+/);return Object.fromEntries(t.map(e=>e.split(":")))}(null!=(n=e.getAttribute(Oe.BREAKPOINTS))?n:"sm:384 md:576 lg:768 xl:960"),r=function(e,t){return Object.keys(e).filter(n=>t>=parseInt(e[n]))}(i,t);let o=!1;if(Object.keys(i).forEach(t=>{r.includes(t)?e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),o=!0):e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),o=!0)}),o){const t=new CustomEvent(a.BREAKPOINTS_CHANGE,{detail:r});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(a.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class He extends O.HTMLElement{constructor(){if(super(),De(this,ge),De(this,be),De(this,we),De(this,_e),De(this,ke),De(this,de,void 0),De(this,ce,0),De(this,ue,null),De(this,he,null),De(this,me,void 0),this.breakpointsComputed=!1,De(this,pe,e=>{const t=this.media;for(const n of e){if("childList"!==n.type)continue;const e=n.removedNodes;for(const i of e){if("media"!=i.slot||n.target!=this)continue;let e=n.previousSibling&&n.previousSibling.previousElementSibling;if(e&&t){let t="media"!==e.slot;for(;null!==(e=e.previousSibling);)"media"==e.slot&&(t=!1);t&&this.mediaUnsetCallback(i)}else this.mediaUnsetCallback(i)}if(t)for(const i of n.addedNodes)i===t&&this.handleMediaUpdated(t)}}),De(this,ve,!1),De(this,Ee,e=>{Le(this,ve)||(setTimeout(()=>{!function(e){Ue(e.target,e.contentRect.width)}(e),xe(this,ve,!1)},0),xe(this,ve,!0))}),De(this,Se,void 0),De(this,Me,()=>{Le(this,Se).assignedElements({flatten:!0}).length?this.handleMediaUpdated(this.media):Le(this,ue)&&this.mediaUnsetCallback(Le(this,ue))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}xe(this,de,new MutationObserver(Le(this,pe)))}static get observedAttributes(){return[Oe.AUTOHIDE,Oe.GESTURES_DISABLED].concat(Ne).filter(e=>![r.MEDIA_RENDITION_LIST,r.MEDIA_AUDIO_TRACK_LIST,r.MEDIA_CHAPTERS_CUES,r.MEDIA_WIDTH,r.MEDIA_HEIGHT,r.MEDIA_ERROR,r.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,n){e.toLowerCase()==Oe.AUTOHIDE&&(this.autohide=n)}get media(){let e=this.querySelector(":scope > [slot=media]");return"SLOT"==(null==e?void 0:e.nodeName)&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(xe(this,ue,e),e.localName.includes("-")&&await O.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;Le(this,de).observe(this,{childList:!0,subtree:!0}),$(this,Le(this,Ee));const t=null!=this.getAttribute(Oe.AUDIO),n=I(t?"audio player":"video player");this.setAttribute("role","region"),this.setAttribute("aria-label",n),this.handleMediaUpdated(this.media),this.setAttribute(Oe.USER_INACTIVE,""),Ue(this,this.getBoundingClientRect().width);const i=this.querySelector(":scope > slot[slot=media]");i&&(xe(this,Se,i),Le(this,Se).addEventListener("slotchange",Le(this,Me))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=O.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;V(this,Le(this,Ee)),clearTimeout(Le(this,he)),Le(this,de).disconnect(),this.media&&this.mediaUnsetCallback(this.media),null==(e=O.window)||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),Le(this,Se)&&(Le(this,Se).removeEventListener("slotchange",Le(this,Me)),xe(this,Se,null)),xe(this,ve,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){xe(this,ue,null)}handleEvent(e){switch(e.type){case"pointerdown":xe(this,ce,e.timeStamp);break;case"pointermove":Pe(this,ge,fe).call(this,e);break;case"pointerup":Pe(this,be,ye).call(this,e);break;case"mouseleave":Pe(this,we,Ae).call(this);break;case"mouseup":this.removeAttribute(Oe.KEYBOARD_CONTROL);break;case"keyup":Pe(this,ke,Te).call(this),this.setAttribute(Oe.KEYBOARD_CONTROL,"")}}set autohide(e){const t=Number(e);xe(this,me,isNaN(t)?0:t)}get autohide(){return(void 0===Le(this,me)?2:Le(this,me)).toString()}get breakpoints(){return ne(this,Oe.BREAKPOINTS)}set breakpoints(e){ie(this,Oe.BREAKPOINTS,e)}get audio(){return ee(this,Oe.AUDIO)}set audio(e){te(this,Oe.AUDIO,e)}get gesturesDisabled(){return ee(this,Oe.GESTURES_DISABLED)}set gesturesDisabled(e){te(this,Oe.GESTURES_DISABLED,e)}get keyboardControl(){return ee(this,Oe.KEYBOARD_CONTROL)}set keyboardControl(e){te(this,Oe.KEYBOARD_CONTROL,e)}get noAutohide(){return ee(this,Oe.NO_AUTOHIDE)}set noAutohide(e){te(this,Oe.NO_AUTOHIDE,e)}get autohideOverControls(){return ee(this,Oe.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){te(this,Oe.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return ee(this,Oe.USER_INACTIVE)}
1set userInteractive(e){te(this,Oe.USER_INACTIVE,e)}}de=new WeakMap,ce=new WeakMap,ue=new WeakMap,he=new WeakMap,me=new WeakMap,pe=new WeakMap,ve=new WeakMap,Ee=new WeakMap,ge=new WeakSet,fe=function(e){if("mouse"!==e.pointerType){const t=250;if(e.timeStamp-Le(this,ce)<t)return}Pe(this,_e,Ie).call(this),clearTimeout(Le(this,he));const t=this.hasAttribute(Oe.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&Pe(this,ke,Te).call(this)},be=new WeakSet,ye=function(e){if("touch"===e.pointerType){const t=!this.hasAttribute(Oe.USER_INACTIVE);[this,this.media].includes(e.target)&&t?Pe(this,we,Ae).call(this):Pe(this,ke,Te).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&Pe(this,ke,Te).call(this)},we=new WeakSet,Ae=function(){if(Le(this,me)<0)return;if(this.hasAttribute(Oe.USER_INACTIVE))return;this.setAttribute(Oe.USER_INACTIVE,"");const e=new O.CustomEvent(a.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},_e=new WeakSet,Ie=function(){if(!this.hasAttribute(Oe.USER_INACTIVE))return;this.removeAttribute(Oe.USER_INACTIVE);const e=new O.CustomEvent(a.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},ke=new WeakSet,Te=function(){Pe(this,_e,Ie).call(this),clearTimeout(Le(this,he));const e=parseInt(this.autohide);e<0||xe(this,he,setTimeout(()=>{Pe(this,we,Ae).call(this)},1e3*e))},Se=new WeakMap,Me=new WeakMap,He.shadowRootOptions={mode:"open"},He.getTemplateHTML=function(e){return`\n    <style>\n      \n      :host([${r.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {\n        outline: none;\n      }\n\n      :host {\n        box-sizing: border-box;\n        position: relative;\n        display: inline-block;\n        line-height: 0;\n        background-color: var(--media-background-color, #000);\n        overflow: hidden;\n      }\n\n      :host(:not([${Oe.AUDIO}])) [part~=layer]:not([part~=media-layer]) {\n        position: absolute;\n        top: 0;\n        left: 0;\n        bottom: 0;\n        right: 0;\n        display: flex;\n        flex-flow: column nowrap;\n        align-items: start;\n        pointer-events: none;\n        background: none;\n      }\n\n      slot[name=media] {\n        display: var(--media-slot-display, contents);\n      }\n\n      \n      :host([${Oe.AUDIO}]) slot[name=media] {\n        display: var(--media-slot-display, none);\n      }\n\n      \n      :host([${Oe.AUDIO}]) [part~=layer][part~=gesture-layer] {\n        height: 0;\n        display: block;\n      }\n\n      \n      :host(:not([${Oe.AUDIO}])[${Oe.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),\n          :host(:not([${Oe.AUDIO}])[${Oe.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {\n        display: none;\n      }\n\n      \n      ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {\n        pointer-events: auto;\n      }\n\n      :host(:not([${Oe.AUDIO}])) *[part~=layer][part~=centered-layer] {\n        align-items: center;\n        justify-content: center;\n      }\n\n      :host(:not([${Oe.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),\n      :host(:not([${Oe.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {\n        align-self: stretch;\n        flex-grow: 1;\n      }\n\n      slot[name=middle-chrome] {\n        display: inline;\n        flex-grow: 1;\n        pointer-events: none;\n        background: none;\n      }\n\n      \n      ::slotted([slot=media]),\n      ::slotted([slot=poster]) {\n        width: 100%;\n        height: 100%;\n      }\n\n      \n      :host(:not([${Oe.AUDIO}])) .spacer {\n        flex-grow: 1;\n      }\n\n      \n      :host(:-webkit-full-screen) {\n        \n        width: 100% !important;\n        height: 100% !important;\n      }\n\n      \n      ::slotted(:not([slot=media]):not([slot=poster]):not([${Oe.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {\n        opacity: 1;\n        transition: var(--media-control-transition-in, opacity 0.25s);\n      }\n\n      \n      :host([${Oe.USER_INACTIVE}]:not([${r.MEDIA_PAUSED}]):not([${r.MEDIA_IS_AIRPLAYING}
1]):not([${r.MEDIA_IS_CASTING}]):not([${Oe.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${Oe.NO_AUTOHIDE}]):not([role=dialog])) {\n        opacity: 0;\n        transition: var(--media-control-transition-out, opacity 1s);\n      }\n\n      :host([${Oe.USER_INACTIVE}]:not([${Oe.NO_AUTOHIDE}]):not([${r.MEDIA_PAUSED}]):not([${r.MEDIA_IS_CASTING}]):not([${Oe.AUDIO}])) ::slotted([slot=media]) {\n        cursor: none;\n      }\n\n      :host([${Oe.USER_INACTIVE}][${Oe.AUTOHIDE_OVER_CONTROLS}]:not([${Oe.NO_AUTOHIDE}]):not([${r.MEDIA_PAUSED}]):not([${r.MEDIA_IS_CASTING}]):not([${Oe.AUDIO}])) * {\n        --media-cursor: none;\n        cursor: none;\n      }\n\n\n      ::slotted(media-control-bar)  {\n        align-self: stretch;\n      }\n\n      \n      :host(:not([${Oe.AUDIO}])[${r.MEDIA_HAS_PLAYED}]) slot[name=poster] {\n        display: none;\n      }\n\n      ::slotted([role=dialog]) {\n        width: 100%;\n        height: 100%;\n        align-self: center;\n      }\n\n      ::slotted([role=menu]) {\n        align-self: end;\n      }\n    </style>\n\n    <slot name="media" part="layer media-layer"></slot>\n    <slot name="poster" part="layer poster-layer"></slot>\n    <slot name="gestures-chrome" part="layer gesture-layer">\n      <media-gesture-receiver slot="gestures-chrome">\n        <template shadowrootmode="${Re.shadowRootOptions.mode}">\n          ${Re.getTemplateHTML({})}\n        </template>\n      </media-gesture-receiver>\n    </slot>\n    <span part="layer vertical-layer">\n      <slot name="top-chrome" part="top chrome"></slot>\n      <slot name="middle-chrome" part="middle chrome"></slot>\n      <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>\n      \n      <slot part="bottom chrome"></slot>\n    </span>\n    <slot name="dialog" part="layer dialog-layer"></slot>\n  `},O.customElements.get("media-container")||O.customElements.define("media-container",He);var We,$e,Ve,je,Be,Fe,qe=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ge=(e,t,n)=>(qe(e,t,"read from private field"),n?n.call(e):t.get(e)),Qe=(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)},Ke=(e,t,n,i)=>(qe(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class Ye{constructor(e,t,{defaultValue:n}={defaultValue:void 0}){Qe(this,Be),Qe(this,We,void 0),Qe(this,$e,void 0),Qe(this,Ve,void 0),Qe(this,je,new Set),Ke(this,We,e),Ke(this,$e,t),Ke(this,Ve,new Set(n))}[Symbol.iterator](){return Ge(this,Be,Fe).values()}get length(){return Ge(this,Be,Fe).size}get value(){var e;return null!=(e=[...Ge(this,Be,Fe)].join(" "))?e:""}set value(e){var t;e!==this.value&&(Ke(this,je,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...Ge(this,Be,Fe)][e]}values(){return Ge(this,Be,Fe).values()}forEach(e,t){Ge(this,Be,Fe).forEach(e,t)}add(...e){var t,n;e.forEach(e=>Ge(this,je).add(e)),(""!==this.value||(null==(t=Ge(this,We))?void 0:t.hasAttribute(`${Ge(this,$e)}`)))&&(null==(n=Ge(this,We))||n.setAttribute(`${Ge(this,$e)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>Ge(this,je).delete(e)),null==(t=Ge(this,We))||t.setAttribute(`${Ge(this,$e)}`,`${this.value}`)}contains(e){return Ge(this,Be,Fe).has(e)}toggle(e,t){return void 0!==t?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}}We=new WeakMap,$e=new WeakMap,Ve=new WeakMap,je=new WeakMap,Be=new WeakSet,Fe=function(){return Ge(this,je).size?Ge(this,je):Ge(this,Ve)};const ze=(e="")=>{const[t,n,i]=e.split(":"),r=i?decodeURIComponent(i):void 0;return{kind:"cc"===t?s.CAPTIONS:s.SUBTITLES,language:n,label:r}},Ze=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{const n=ze(e);return{...t,...n}}),Xe=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?ze(e):e):"string"==typeof e?Ze(e):[e]:[],Je=({kind:e,label:t,language:n}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${n}:${encodeURIComponent(t)}`:n,et=(e=[])=>Array.prototype.map.call(e,Je).join(" "),tt=e=>{const t=Object.entries(e).map(([e,t])=>((e,t)=>n=>n[e]===t)(e,t));return e=>t.every(t=>t(e))},nt=(e,t=[],n=[])=>{const i=Xe(n).map(tt);Array.from(t).filter(e=>i.some(t=>
1t(e))).forEach(t=>{t.mode=e})},it=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];const n="function"==typeof t?t:tt(t);return Array.from(e.textTracks).filter(n)},rt="exitFullscreen"in N?"exitFullscreen":"webkitExitFullscreen"in N?"webkitExitFullscreen":"webkitCancelFullScreen"in N?"webkitCancelFullScreen":void 0,at="fullscreenElement"in N?"fullscreenElement":"webkitFullscreenElement"in N?"webkitFullscreenElement":void 0,ot=e=>{var t;const{media:n,documentElement:i,fullscreenElement:r=n}=e;if(!n||!i)return!1;const a=(e=>{const{documentElement:t,media:n}=e,i=null==t?void 0:t[at];return!i&&"webkitDisplayingFullscreen"in n&&"webkitPresentationMode"in n&&n.webkitDisplayingFullscreen&&n.webkitPresentationMode===E?n:i})(e);if(!a)return!1;if(a===r||a===n)return!0;if(a.localName.includes("-")){let e=a.shadowRoot;if(!(at in e))return G(a,r);for(;null==e?void 0:e[at];){if(e[at]===r)return!0;e=null==(t=e[at])?void 0:t.shadowRoot}}return!1},st="fullscreenEnabled"in N?"fullscreenEnabled":"webkitFullscreenEnabled"in N?"webkitFullscreenEnabled":void 0;let lt;const dt=()=>{var e,t;return lt||(lt=null==(t=null==(e=N)?void 0:e.createElement)?void 0:t.call(e,"video"),lt)},ct=(e,t)=>new Promise(n=>{e.addEventListener("volumechange",()=>n(!0),{signal:t})}),ut=async(e,t)=>{for(let n=0;n<10;n++){if(e.volume===t)return!1;await y(10)}return e.volume!==t},ht=/.*Version\/.*Safari\/.*/.test(O.navigator.userAgent),mt=(e=dt())=>(!O.matchMedia("(display-mode: standalone)").matches||!ht)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),pt=(e=dt())=>(e=>{const{documentElement:t,media:n}=e;return!!(null==t?void 0:t[st])||n&&"webkitSupportsFullscreen"in n})({documentElement:N,media:e}),vt=pt(),Et=mt(),gt=!!O.WebKitPlaybackTargetAvailabilityEvent,ft=!!O.chrome,bt=e=>it(e.media,e=>[s.SUBTITLES,s.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),yt=e=>it(e.media,e=>e.mode===d&&[s.SUBTITLES,s.CAPTIONS].includes(e.kind)),wt=(e,t)=>{const n=bt(e),i=yt(e),r=!!i.length;if(n.length)if(!1===t||r&&!0!==t)nt(l,n,i);else if(!0===t||!r&&!1!==t){let t=n[0];const{options:r}=e;if(!(null==r?void 0:r.noSubtitlesLangPref)){const e=O.localStorage.getItem("media-chrome-pref-subtitles-lang"),i=e?[e,...O.navigator.languages]:O.navigator.languages,r=n.filter(e=>i.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>i.findIndex(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))-i.findIndex(e=>t.language.toLowerCase().startsWith(e.split("-")[0])));r[0]&&(t=r[0])}const{language:a,label:o,kind:s}=t;nt(l,n,i),nt(d,n,[{language:a,label:o,kind:s}])}},At=(e,t)=>e===t||null!=e&&null!=t&&(typeof e==typeof t&&(!("number"!=typeof e||!Number.isNaN(e)||!Number.isNaN(t))||"object"==typeof e&&(Array.isArray(e)?_t(e,t):Object.entries(e).every(([e,n])=>e in t&&At(n,t[e]))))),_t=(e,t)=>{const n=Array.isArray(e),i=Array.isArray(t);return n===i&&(!n&&!i||e.length===t.length&&e.every((e,n)=>At(e,t[n])))},It=Object.values(v);let kt;const Tt=(async(e=dt())=>{if(!e)return!1;const t=e.volume;e.volume=t/2+.1;const n=new AbortController,i=await Promise.race([ct(e,n.signal),ut(e,t)]);return n.abort(),i})().then(e=>(kt=e,kt)),St=new O.DOMParser,Mt=e=>e&&St.parseFromString(e,"text/html").body.textContent||e,Rt={mediaError:{get(e,t){const{media:n}=e;if("playing"!==(null==t?void 0:t.type))return null==n?void 0:n.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(e,t){var n;const{media:i}=e;if("playing"!==(null==t?void 0:t.type))return null==(n=null==i?void 0:i.error)?void 0:n.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(e,t){var n,i;const{media:r}=e;if("playing"!==(null==t?void 0:t.type))return null!=(i=null==(n=null==r?void 0:r.error)?void 0:n.message)?i:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.videoWidth)?t:0},mediaEvents:["resize"]},mediaHeight:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.videoHeight)?t:0},mediaEvents:["resize"]},mediaPaused:{get(e){var t;const{media:n}=e;return null==(t=null==n?void 0:n.paused)||t},set(e,t){var n;const{media:i}=t;i&&(e?i.pause():null==(n=i.play())||n.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(e,t){const{media:n}=e;return!!n&&(t?"playing"===t.type:!n.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.ended)&&t},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.playbackRate)?t:1},set(e,t){const{media:n}=t;n&&Number.isFinite(+e)&&(n.playbackRate=+e)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.muted)&&t},set(e,t){const{media:n,options:{noMutedPref:i}={}}=t;if(n){n.muted=e;try{const t=null!==O.localStorage.getItem("media-chrome-pref-muted"),r=n.hasAttribute("muted");if(i)return void(t&&O.localStorage.removeItem("media-chrome-pref-muted"));if(r&&!t)return;O.localStorage.setItem("media-chrome-pref-muted",e?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{const{options:{noMutedPref:n}}=t,{media:i}=t;if(i&&!i.muted&&!n)try{const n="true"===O.localStorage.getItem("media-chrome-pref-muted");Rt.mediaMuted.set(n,t),e(n)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaLoop:{get(e){const{media:t}=e;return null==t?void 0:t.loop},set(e,t){const{media:n}=t;n&&(n.loop=e)},mediaEvents:["medialooprequest"]},mediaVolume:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.volume)?t:1},set(e,t){const{media:n,options:{noVolumePref:i}={}}=t;if(n){try{null==e?O.localStorage.removeItem("media-chrome-pref-volume"):n.hasAttribute("muted")||i||O.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+e)&&(n.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{const{options:{noVolumePref:n}}=t;if(!n)try{const{media:n}=t;if(!n)return;const i=O.localStorage.getItem("media-chrome-pref-volume");if(null==i)return;Rt.mediaVolume.set(+i,t),e(+i)}catch(i){console.debug("Error getting volume pref",i)}}]},mediaVolumeLevel:{get(e){const{media:t}=e;return void 0===(null==t?void 0:t.volume)?"high":t.muted||0===t.volume?"off":t.volume<.5?"low":t.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(e){var t;const{media:n}=e;return null!=(t=null==n?void 0:n.currentTime)?t:0},set(e,t){const{media:n}=t;n&&b(e)&&(n.currentTime=e)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(e){const{media:t,options:{defaultDuration:n}={}}=e;return!n||t&&t.duration&&!Number.isNaN(t.duration)&&Number.isFinite(t.duration)?Number.isFinite(null==t?void 0:t.duration)?t.duration:Number.NaN:n},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(e){const{media:t}=e;return(null==t?void 0:t.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(e){var t;const{media:n}=e;if(!(null==(t=null==n?void 0:n.seekable)?void 0:t.length))return;const i=n.seekable.start(0),r=n.seekable.end(n.seekable.length-1);return i||r?[Number(i.toFixed(3)),Number(r.toFixed(3))]:void 0},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(e){var t;const{media:n}=e,i=null!=(t=null==n?void 0:n.buffered)?t:[];return Array.from(i).map((e,t)=>[Number(i.start(t).toFixed(3)),Number(i.end(t).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(e){const{media:t,options:{defaultStreamType:n}={}}
1=e,i=[v.LIVE,v.ON_DEMAND].includes(n)?n:void 0;if(!t)return i;const{streamType:r}=t;if(It.includes(r))return r===v.UNKNOWN?i:r;const a=t.duration;return a===1/0?v.LIVE:Number.isFinite(a)?v.ON_DEMAND:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){const{media:t}=e;if(!t)return Number.NaN;const{targetLiveWindow:n}=t,i=Rt.mediaStreamType.get(e);return null!=n&&!Number.isNaN(n)||i!==v.LIVE?n:0},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(e){const{media:t,options:{liveEdgeOffset:n=10}={}}=e;if(!t)return!1;if("number"==typeof t.liveEdgeStart)return!Number.isNaN(t.liveEdgeStart)&&t.currentTime>=t.liveEdgeStart;if(!(Rt.mediaStreamType.get(e)===v.LIVE))return!1;const i=t.seekable;if(!i)return!0;if(!i.length)return!1;const r=i.end(i.length-1)-n;return t.currentTime>=r},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(e){return bt(e).map(({kind:e,label:t,language:n})=>({kind:e,label:t,language:n}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(e){return yt(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,i;const{media:r,options:a}=t;if(!r)return;const o=e=>{var n;if(!a.defaultSubtitles)return;e&&![s.CAPTIONS,s.SUBTITLES].includes(null==(n=null==e?void 0:e.track)?void 0:n.kind)||wt(t,!0)};return r.addEventListener("loadstart",o),null==(n=r.textTracks)||n.addEventListener("addtrack",o),null==(i=r.textTracks)||i.addEventListener("removetrack",o),()=>{var e,t;r.removeEventListener("loadstart",o),null==(e=r.textTracks)||e.removeEventListener("addtrack",o),null==(t=r.textTracks)||t.removeEventListener("removetrack",o)}}]},mediaChaptersCues:{get(e){var t;const{media:n}=e;if(!n)return[];const[i]=it(n,{kind:s.CHAPTERS});return Array.from(null!=(t=null==i?void 0:i.cues)?t:[]).map(({text:e,startTime:t,endTime:n})=>({text:Mt(e),startTime:t,endTime:n}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var n;const{media:i}=t;if(!i)return;const r=i.querySelector('track[kind="chapters"][default][src]'),a=null==(n=i.shadowRoot)?void 0:n.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==r||r.addEventListener("load",e),null==a||a.addEventListener("load",e),()=>{null==r||r.removeEventListener("load",e),null==a||a.removeEventListener("load",e)}}]},mediaIsPip:{get(e){var t,n;const{media:i,documentElement:r}=e;if(!i||!r)return!1;if(!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===i)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=i.localName)?void 0:t.includes("-"))&&G(i,r.pictureInPictureElement);if(r.pictureInPictureElement.localName.includes("-")){let e=r.pictureInPictureElement.shadowRoot;for(;null==e?void 0:e.pictureInPictureElement;){if(e.pictureInPictureElement===i)return!0;e=null==(n=e.pictureInPictureElement)?void 0:n.shadowRoot}}return!1},set(e,t){const{media:n}=t;if(n)if(e){if(!N.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!n.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");const e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};n.requestPictureInPicture().catch(t=>{if(11!==t.code)throw t;if(n.src){if(0!==n.readyState||"none"!==n.preload)throw t;{const t=()=>{n.removeEventListener("loadedmetadata",i),n.preload="none"},i=()=>{n.requestPictureInPicture().catch(e),t()};n.addEventListener("loadedmetadata",i),n.preload="metadata",setTimeout(()=>{0===n.readyState&&e(),t()},1e3)}}else console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.")})}else N.pictureInPictureElement&&N.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(e){var t;const{media:n}=e;return[...null!=(t=null==n?void 0:n.videoRenditions)?t:[]].map(e=>({...e}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(e){var t,n,i;const{media:r}=e;return null==(i=null==(n=null==r?void 0:r.videoRenditions)?void 0:n[null==(t=r.videoRenditions)?void 0:t.selectedIndex])?void 0:i.id},set(e,t){const{media:n}=t;if(!(null==n?void 0:n.videoRenditions))return void console.warn("MediaController: Rendition selection not supported by this media.");const i=e,r=Array.prototype.findIndex.call(n.videoRenditions,e=>e.id==i);n.videoRenditions.selectedIndex!=r&&(n.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(e){var t;const{media:n}=e;return[...null!=(t=null==n?void 0:n.audioTracks)?t:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(e){var t,n;const{media:i}=e;return null==(n=[...null!=(t=null==i?void 0:i.audioTracks)?t:[]].find(e=>e.enabled))?void 0:n.id},set(e,t){const{media:n}=t;if(!(null==n?void 0:n.audioTracks))return void console.warn("MediaChrome: Audio track selection not supported by this media.");const i=e;for(const r of n.audioTracks)r.enabled=i==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(e){return ot(e)},set(e,t,n){var i,r;if(e){(e=>{var t;const{media:n,fullscreenElement:i}=e;try{const e=i&&"requestFullscreen"in i?"requestFullscreen":i&&"webkitRequestFullScreen"in i?"webkitRequestFullScreen":void 0;if(e){const n=null==(t=i[e])?void 0:t.call(i);if(n instanceof Promise)return n.catch(()=>{})}else(null==n?void 0:n.webkitEnterFullscreen)?n.webkitEnterFullscreen():(null==n?void 0:n.requestFullscreen)&&n.requestFullscreen()}catch(r){console.error(r)}})(t);n.detail&&!(null==(i=t.media)?void 0:i.inert)&&(null==(r=t.media)||r.focus())}else(e=>{var t;const{documentElement:n}=e;if(rt){const e=null==(t=null==n?void 0:n[rt])?void 0:t.call(n);if(e instanceof Promise)e.catch(()=>{})}})(t)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(e){var t;const{media:n}=e;return!(!(null==n?void 0:n.remote)||"disconnected"===(null==(t=n.remote)?void 0:t.state))&&"connected"===n.remote.state},set(e,t){var n,i;const{media:r}=t;r&&(e&&"disconnected"!==(null==(n=r.remote)?void 0:n.state)||(e||"connected"===(null==(i=r.remote)?void 0:i.state))&&("function"==typeof r.remote.prompt?r.remote.prompt().catch(()=>{}):console.warn("MediaChrome: Casting is not supported in this environment")))},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(e,t){const{media:n}=t;n&&(n.webkitShowPlaybackTargetPicker&&O.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){const{media:t}=e;if(!vt||!pt(t))return p}},mediaPipUnavailable:{get(e){const{media:t}=e;return Et&&mt(t)?(null==t?void 0:t.disablePictureInPicture)?m:void 0:p}},mediaVolumeUnavailable:{get(e){const{media:t}=e;if(!1===kt||null==(null==t?void 0:t.volume))return p},stateOwnersUpdateHandlers:[e=>{null==kt&&Tt.then(t=>e(t?void 0:p))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var n;const{media:i}=e;return ft&&(null==(n=null==i?void 0:i.remote)?void 0:n.state)?null!=t&&"available"!==t?m:void 0:p},stateOwnersUpdateHandlers:[(e,t)=>{var n;const{media:i}=t;if(!i)return;return i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||null==(n=null==i?void 0:i.remote)||n.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==i?void 0:i.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get(e,t){return gt?"not-available"===(null==t?void 0:t.availability)?m:void 0:p},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(e,t)=>{var n;const{media:i}=t;if(!i)return;return i.disableRemotePlayback||i.hasAttribute("disableremoteplayback")||null==(n=null==i?void 0:i.remote)||n.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==i?void 0:i.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(e){var t;const{media:n}=e;return(null==n?void 0:n.videoRenditions)?(null==(t=n.videoRenditions)?void 0:t.length)?void 0:m:p},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(e){var t,n;const{media:i}=e;return(null==i?void 0:i.audioTracks)?(null!=(n=null==(t=i.audioTracks)?void 0:t.length)?n:0)<=1?m:void 0:p},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){const{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},Ct={[e.MEDIA_PREVIEW_REQUEST](e,t,{detail:n}){var i,r,a;const{media:o}=t,l=null!=n?n:void 0;let d,c;if(o&&null!=l){const[e]=it(o,{kind:s.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(i=null==e?void 0:e.cues)?i:[],(e,t,n)=>0===t?e.endTime>
1l:t===n.length-1?e.startTime<=l:e.startTime<=l&&e.endTime>l);if(t){const e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(r=null==o?void 0:o.querySelector('track[label="thumbnails"]'))?void 0:r.src,n=new URL(t.text,e);c=new URLSearchParams(n.hash).get("#xywh").split(",").map(e=>+e),d=n.href}}const u=e.mediaDuration.get(t);let h=null==(a=e.mediaChaptersCues.get(t).find((e,t,n)=>t===n.length-1&&u===e.endTime?e.startTime<=l&&e.endTime>=l:e.startTime<=l&&e.endTime>l))?void 0:a.text;return null!=n&&null==h&&(h=""),{mediaPreviewTime:l,mediaPreviewImage:d,mediaPreviewCoords:c,mediaPreviewChapter:h}},[e.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[e.MEDIA_PLAY_REQUEST](e,t){var n,i,r,a;const o=e.mediaStreamType.get(t)===v.LIVE,s=!(null==(n=t.options)?void 0:n.noAutoSeekToLive),l=e.mediaTargetLiveWindow.get(t)>0;if(o&&s&&!l){const n=null==(i=e.mediaSeekable.get(t))?void 0:i[1];if(n){const i=n-(null!=(a=null==(r=t.options)?void 0:r.seekToLiveOffset)?a:0);e.mediaCurrentTime.set(i,t)}}e.mediaPaused.set(!1,t)},[e.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:n}){const i=n;e.mediaPlaybackRate.set(i,t)},[e.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[e.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[e.MEDIA_LOOP_REQUEST](e,t,{detail:n}){const i=!!n;return e.mediaLoop.set(i,t),{mediaLoop:i}},[e.MEDIA_VOLUME_REQUEST](e,t,{detail:n}){const i=n;i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[e.MEDIA_SEEK_REQUEST](e,t,{detail:n}){const i=n;e.mediaCurrentTime.set(i,t)},[e.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var n,i,r;const a=null==(n=e.mediaSeekable.get(t))?void 0:n[1];if(Number.isNaN(Number(a)))return;const o=a-(null!=(r=null==(i=t.options)?void 0:i.seekToLiveOffset)?r:0);e.mediaCurrentTime.set(o,t)},[e.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:n}){var i;const{options:r}=t,a=bt(t),o=Xe(n),s=null==(i=o[0])?void 0:i.language;s&&!r.noSubtitlesLangPref&&O.localStorage.setItem("media-chrome-pref-subtitles-lang",s),nt(d,a,o)},[e.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:n}){const i=bt(t);nt(l,i,null!=n?n:[])},[e.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:n}){wt(t,n)},[e.MEDIA_RENDITION_REQUEST](e,t,{detail:n}){const i=n;e.mediaRenditionSelected.set(i,t)},[e.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:n}){const i=n;e.mediaAudioTrackEnabled.set(i,t)},[e.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[e.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[e.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,n){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,n)},[e.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[e.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[e.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[e.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}},Lt=({media:e,fullscreenElement:t,documentElement:n,stateMediator:i=Rt,requestMap:r=Ct,options:a={},monitorStateOwnersOnlyWithSubscriptions:o=!0})=>{const s=[],l={options:{...a}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const c=e=>{null!=e&&(At(e,d)||(d=Object.freeze({...d,...e}
1),s.forEach(e=>e(d))))},u=()=>{const e=Object.entries(i).reduce((e,[t,{get:n}])=>(e[t]=n(l),e),{});c(e)},h={};let m;const p=async(e,t)=>{var n,r,a,d,p,v,E,g,f,b,y,w,A,_,I,k;const T=!!m;if(m={...l,...null!=m?m:{},...e},T)return;await(async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof O.HTMLElement))return;const t=e.localName;if(!t.includes("-"))return;const n=O.customElements.get(t);n&&e instanceof n||(await O.customElements.whenDefined(t),O.customElements.upgrade(e))}))})(...Object.values(e));const S=s.length>0&&0===t&&o,M=l.media!==m.media,R=(null==(n=l.media)?void 0:n.textTracks)!==(null==(r=m.media)?void 0:r.textTracks),C=(null==(a=l.media)?void 0:a.videoRenditions)!==(null==(d=m.media)?void 0:d.videoRenditions),L=(null==(p=l.media)?void 0:p.audioTracks)!==(null==(v=m.media)?void 0:v.audioTracks),D=(null==(E=l.media)?void 0:E.remote)!==(null==(g=m.media)?void 0:g.remote),x=l.documentElement!==m.documentElement,P=!!l.media&&(M||S),N=!!(null==(f=l.media)?void 0:f.textTracks)&&(R||S),U=!!(null==(b=l.media)?void 0:b.videoRenditions)&&(C||S),H=!!(null==(y=l.media)?void 0:y.audioTracks)&&(L||S),W=!!(null==(w=l.media)?void 0:w.remote)&&(D||S),$=!!l.documentElement&&(x||S),V=P||N||U||H||W||$,j=0===s.length&&1===t&&o,B=!!m.media&&(M||j),F=!!(null==(A=m.media)?void 0:A.textTracks)&&(R||j),q=!!(null==(_=m.media)?void 0:_.videoRenditions)&&(C||j),G=!!(null==(I=m.media)?void 0:I.audioTracks)&&(L||j),Q=!!(null==(k=m.media)?void 0:k.remote)&&(D||j),K=!!m.documentElement&&(x||j),Y=B||F||q||G||Q||K;if(!(V||Y))return Object.entries(m).forEach(([e,t])=>{l[e]=t}),u(),void(m=void 0);Object.entries(i).forEach(([e,{get:t,mediaEvents:n=[],textTracksEvents:i=[],videoRenditionsEvents:r=[],audioTracksEvents:a=[],remoteEvents:o=[],rootEvents:s=[],stateOwnersUpdateHandlers:d=[]}])=>{h[e]||(h[e]={});const u=n=>{const i=t(l,n);c({[e]:i})};let p;p=h[e].mediaEvents,n.forEach(t=>{p&&P&&(l.media.removeEventListener(t,p),h[e].mediaEvents=void 0),B&&(m.media.addEventListener(t,u),h[e].mediaEvents=u)}),p=h[e].textTracksEvents,i.forEach(t=>{var n,i;p&&N&&(null==(n=l.media.textTracks)||n.removeEventListener(t,p),h[e].textTracksEvents=void 0),F&&(null==(i=m.media.textTracks)||i.addEventListener(t,u),h[e].textTracksEvents=u)}),p=h[e].videoRenditionsEvents,r.forEach(t=>{var n,i;p&&U&&(null==(n=l.media.videoRenditions)||n.removeEventListener(t,p),h[e].videoRenditionsEvents=void 0),q&&(null==(i=m.media.videoRenditions)||i.addEventListener(t,u),h[e].videoRenditionsEvents=u)}),p=h[e].audioTracksEvents,a.forEach(t=>{var n,i;p&&H&&(null==(n=l.media.audioTracks)||n.removeEventListener(t,p),h[e].audioTracksEvents=void 0),G&&(null==(i=m.media.audioTracks)||i.addEventListener(t,u),h[e].audioTracksEvents=u)}),p=h[e].remoteEvents,o.forEach(t=>{var n,i;p&&W&&(null==(n=l.media.remote)||n.removeEventListener(t,p),h[e].remoteEvents=void 0),Q&&(null==(i=m.media.remote)||i.addEventListener(t,u),h[e].remoteEvents=u)}),p=h[e].rootEvents,s.forEach(t=>{p&&$&&(l.documentElement.removeEventListener(t,p),h[e].rootEvents=void 0),K&&(m.documentElement.addEventListener(t,u),h[e].rootEvents=u)});const v=h[e].stateOwnersUpdateHandlers;if(v&&V){(Array.isArray(v)?v:[v]).forEach(e=>{"function"==typeof e&&e()})}if(Y){const t=d.map(e=>e(u,m)).filter(e=>"function"==typeof e);h[e].stateOwnersUpdateHandlers=1===t.length?t[0]:t}else V&&(h[e].stateOwnersUpdateHandlers=void 0)}),Object.entries(m).forEach(([e,t])=>{l[e]=t}),u(),m=void 0};return p({media:e,fullscreenElement:t,documentElement:n,options:a}),{dispatch(e){const{type:t,detail:n}=e;r[t]&&null==d.mediaErrorCode?c(r[t](i,l,e)):"mediaelementchangerequest"===t?p({media:n}):"fullscreenelementchangerequest"===t?p({fullscreenElement:n}):"documentelementchangerequest"===t?p({documentElement:n}):"optionschangerequest"===t&&(Object.entries(null!=n?n:{}).forEach(([e,t])=>{l.options[e]=t}),u())},getState(){return d},subscribe(e){return p({},s.length+1),s.push(e),e(d),()=>{const t=s.indexOf(e);t>=0&&(p({},s.length-1),s.splice(t,1))}}}};var Dt,xt,Pt,Ot,Nt,Ut,Ht,Wt,$t,Vt,jt,Bt,Ft,qt,Gt,Qt=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)}
1,Kt=(e,t,n)=>(Qt(e,t,"read from private field"),n?n.call(e):t.get(e)),Yt=(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)},zt=(e,t,n,i)=>(Qt(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Zt=(e,t,n)=>(Qt(e,t,"access private method"),n);const Xt=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],Jt="defaultsubtitles",en="defaultstreamtype",tn="defaultduration",nn="fullscreenelement",rn="hotkeys",an="keyboardbackwardseekoffset",on="keyboardforwardseekoffset",sn="keyboarddownvolumestep",ln="keyboardupvolumestep",dn="keysused",cn="lang",un="loop",hn="liveedgeoffset",mn="noautoseektolive",pn="nodefaultstore",vn="nohotkeys",En="nomutedpref",gn="nosubtitleslangpref",fn="novolumepref",bn="seektoliveoffset";class yn extends He{constructor(){super(),Yt(this,$t),Yt(this,Bt),Yt(this,qt),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,Yt(this,Dt,new Ye(this,rn)),Yt(this,xt,void 0),Yt(this,Pt,void 0),Yt(this,Ot,null),Yt(this,Nt,void 0),Yt(this,Ut,void 0),Yt(this,Ht,e=>{var t;null==(t=Kt(this,Pt))||t.dispatch(e)}),Yt(this,Wt,void 0),Yt(this,jt,e=>{const{key:t,shiftKey:n}=e;n&&("/"===t||"?"===t)||Xt.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener("keyup",Kt(this,jt))}),this.associateElement(this);let e={};zt(this,Nt,t=>{Object.entries(t).forEach(([t,n])=>{if(t in e&&e[t]===n)return;this.propagateMediaState(t,n);const i=t.toLowerCase(),r=new O.CustomEvent(o[i],{composed:!0,detail:n});this.dispatchEvent(r)}),e=t})}static get observedAttributes(){return super.observedAttributes.concat(vn,rn,en,Jt,tn,En,fn,cn,un,hn,bn,mn)}get mediaStore(){return Kt(this,Pt)}set mediaStore(e){var t,n;Kt(this,Pt)&&(null==(t=Kt(this,Ut))||t.call(this),zt(this,Ut,void 0)),zt(this,Pt,e),Kt(this,Pt)||this.hasAttribute(pn)?zt(this,Ut,null==(n=Kt(this,Pt))?void 0:n.subscribe(Kt(this,Nt))):Zt(this,$t,Vt).call(this)}get fullscreenElement(){var e;return null!=(e=Kt(this,xt))?e:this}set fullscreenElement(e){var t;this.hasAttribute(nn)&&this.removeAttribute(nn),zt(this,xt,e),null==(t=Kt(this,Pt))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return ee(this,Jt)}set defaultSubtitles(e){te(this,Jt,e)}get defaultStreamType(){return ne(this,en)}set defaultStreamType(e){ie(this,en,e)}get defaultDuration(){return X(this,tn)}set defaultDuration(e){J(this,tn,e)}get noHotkeys(){return ee(this,vn)}set noHotkeys(e){te(this,vn,e)}get keysUsed(){return ne(this,dn)}set keysUsed(e){ie(this,dn,e)}get liveEdgeOffset(){return X(this,hn)}set liveEdgeOffset(e){J(this,hn,e)}get noAutoSeekToLive(){return ee(this,mn)}set noAutoSeekToLive(e){te(this,mn,e)}get noVolumePref(){return ee(this,fn)}set noVolumePref(e){te(this,fn,e)}get noMutedPref(){return ee(this,En)}set noMutedPref(e){te(this,En,e)}get noSubtitlesLangPref(){return ee(this,gn)}set noSubtitlesLangPref(e){te(this,gn,e)}get noDefaultStore(){return ee(this,pn)}set noDefaultStore(e){te(this,pn,e)}get resolvedLang(){return(()=>{const[e]=_.split("-");return A[_]?_:A[e]?e:"en"})()}attributeChangedCallback(t,n,i){var r,a,o,s,l,d,c,u,h,m,p,v;if(super.attributeChangedCallback(t,n,i),t===vn)i!==n&&""===i?(this.hasAttribute(rn)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):i!==n&&null===i&&this.enableHotkeys();else if(t===rn)Kt(this,Dt).value=i;else if(t===Jt&&i!==n)null==(r=Kt(this,Pt))||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(Jt)}});else if(t===en)null==(o=Kt(this,Pt))||o.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(a=this.getAttribute(en))?a:void 0}});else if(t===hn&&i!==n)null==(s=Kt(this,Pt))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(hn)?+this.getAttribute(hn):void 0,seekToLiveOffset:this.hasAttribute(bn)?+this.getAttribute(bn):this.hasAttribute(hn)?+this.getAttribute(hn):void 0}});else if(t===bn&&i!==n)null==(l=Kt(this,Pt))||l.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(bn)?+this.getAttribute(bn):this.hasAttribute(hn)?+this.getAttribute(hn):void 0}});else if(t===mn)null==(d=Kt(this,Pt))||d.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(mn)}});else if(t===nn){const e=i?null==(c=this.getRootNode())?void 0:c.getElementById(i):void 0;zt(this,xt,e),null==(u=Kt(this,Pt))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else t===cn&&i!==n?(_=i,null==(h=Kt(this,Pt))||h.dispatch({type:"optionschangerequest",detail:{mediaLang:i}}
1)):t===un&&i!==n?null==(m=Kt(this,Pt))||m.dispatch({type:e.MEDIA_LOOP_REQUEST,detail:null!=i}):t===fn&&i!==n?null==(p=Kt(this,Pt))||p.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(fn)}}):t===En&&i!==n&&(null==(v=Kt(this,Pt))||v.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(En)}}))}connectedCallback(){var t,n,i;this.associateElement(this),Kt(this,Pt)||this.hasAttribute(pn)||Zt(this,$t,Vt).call(this),null==(t=Kt(this,Pt))||t.dispatch({type:"documentelementchangerequest",detail:N}),null==(n=Kt(this,Pt))||n.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),Kt(this,Pt)&&!Kt(this,Ut)&&zt(this,Ut,null==(i=Kt(this,Pt))?void 0:i.subscribe(Kt(this,Nt))),void 0!==Kt(this,Wt)&&Kt(this,Pt)&&this.media&&setTimeout(()=>{var t,n,i;(null==(n=null==(t=this.media)?void 0:t.textTracks)?void 0:n.length)&&(null==(i=Kt(this,Pt))||i.dispatch({type:e.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:Kt(this,Wt)}))},0),this.hasAttribute(vn)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var t,n,i,r,a,o;if(null==(t=super.disconnectedCallback)||t.call(this),this.disableHotkeys(),Kt(this,Pt)){const t=Kt(this,Pt).getState();zt(this,Wt,!!(null==(n=t.mediaSubtitlesShowing)?void 0:n.length)),null==(i=Kt(this,Pt))||i.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),null==(r=Kt(this,Pt))||r.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(a=Kt(this,Pt))||a.dispatch({type:e.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}Kt(this,Ut)&&(null==(o=Kt(this,Ut))||o.call(this),zt(this,Ut,void 0)),this.unassociateElement(this),Kt(this,Ot)&&(Kt(this,Ot).remove(),zt(this,Ot,null))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=Kt(this,Pt))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=Kt(this,Pt))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){Mn(this.mediaStateReceivers,e,t)}associateElement(t){if(!t)return;const{associatedElementSubscriptions:n}=this;if(n.has(t))return;const i=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),a=Rn(t,i,r);Object.values(e).forEach(e=>{t.addEventListener(e,Kt(this,Ht))}),n.set(t,a)}unassociateElement(t){if(!t)return;const{associatedElementSubscriptions:n}=this;if(!n.has(t))return;n.get(t)(),n.delete(t),Object.values(e).forEach(e=>{t.removeEventListener(e,Kt(this,Ht))})}registerMediaStateReceiver(e){if(!e)return;const t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Kt(this,Pt)&&Object.entries(Kt(this,Pt).getState()).forEach(([t,n])=>{Mn([e],t,n)}))}unregisterMediaStateReceiver(e){const t=this.mediaStateReceivers,n=t.indexOf(e);n<0||t.splice(n,1)}enableHotkeys(){this.addEventListener("keydown",Zt(this,Bt,Ft))}disableHotkeys(){this.removeEventListener("keydown",Zt(this,Bt,Ft)),this.removeEventListener("keyup",Kt(this,jt))}get hotkeys(){return Kt(this,Dt)}set hotkeys(e){ie(this,rn,e)}keyboardShortcutHandler(t){var n,i,r,a,o,s,l,d,c;const u=t.target;if((null!=(r=null!=(i=null==(n=u.getAttribute(dn))?void 0:n.split(" "))?i:null==u?void 0:u.keysUsed)?r:[]).map(e=>
1"Space"===e?" ":e).filter(Boolean).includes(t.key))return;let h,m,p;if(Kt(this,Dt).contains(`no${t.key.toLowerCase()}`))return;if(" "===t.key&&Kt(this,Dt).contains("nospace"))return;if(!(t.shiftKey&&("/"===t.key||"?"===t.key))||!Kt(this,Dt).contains("noshift+/"))switch(t.key){case" ":case"k":h=Kt(this,Pt).getState().mediaPaused?e.MEDIA_PLAY_REQUEST:e.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new O.CustomEvent(h,{composed:!0,bubbles:!0}));break;case"m":h="off"===this.mediaStore.getState().mediaVolumeLevel?e.MEDIA_UNMUTE_REQUEST:e.MEDIA_MUTE_REQUEST,this.dispatchEvent(new O.CustomEvent(h,{composed:!0,bubbles:!0}));break;case"f":h=this.mediaStore.getState().mediaIsFullscreen?e.MEDIA_EXIT_FULLSCREEN_REQUEST:e.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new O.CustomEvent(h,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new O.CustomEvent(e.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{const t=this.hasAttribute(an)?+this.getAttribute(an):10;m=Math.max((null!=(a=this.mediaStore.getState().mediaCurrentTime)?a:0)-t,0),p=new O.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break}case"ArrowRight":case"l":{const t=this.hasAttribute(on)?+this.getAttribute(on):10;m=Math.max((null!=(o=this.mediaStore.getState().mediaCurrentTime)?o:0)+t,0),p=new O.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break}case"ArrowUp":{const t=this.hasAttribute(ln)?+this.getAttribute(ln):.025;m=Math.min((null!=(s=this.mediaStore.getState().mediaVolume)?s:1)+t,1),p=new O.CustomEvent(e.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break}case"ArrowDown":{const t=this.hasAttribute(sn)?+this.getAttribute(sn):.025;m=Math.max((null!=(l=this.mediaStore.getState().mediaVolume)?l:1)-t,0),p=new O.CustomEvent(e.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break}case"<":{const t=null!=(d=this.mediaStore.getState().mediaPlaybackRate)?d:1;m=Math.max(t-.25,.25).toFixed(2),p=new O.CustomEvent(e.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break}case">":{const t=null!=(c=this.mediaStore.getState().mediaPlaybackRate)?c:1;m=Math.min(t+.25,2).toFixed(2),p=new O.CustomEvent(e.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:m}),this.dispatchEvent(p);break}case"/":case"?":t.shiftKey&&Zt(this,qt,Gt).call(this);break;case"p":h=this.mediaStore.getState().mediaIsPip?e.MEDIA_EXIT_PIP_REQUEST:e.MEDIA_ENTER_PIP_REQUEST,p=new O.CustomEvent(h,{composed:!0,bubbles:!0}),this.dispatchEvent(p)}}}Dt=new WeakMap,xt=new WeakMap,Pt=new WeakMap,Ot=new WeakMap,Nt=new WeakMap,Ut=new WeakMap,Ht=new WeakMap,Wt=new WeakMap,$t=new WeakSet,Vt=function(){var e;this.mediaStore=Lt({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(Jt),defaultDuration:this.hasAttribute(tn)?+this.getAttribute(tn):void 0,defaultStreamType:null!=(e=this.getAttribute(en))?e:void 0,liveEdgeOffset:this.hasAttribute(hn)?+this.getAttribute(hn):void 0,seekToLiveOffset:this.hasAttribute(bn)?+this.getAttribute(bn):this.hasAttribute(hn)?+this.getAttribute(hn):void 0,noAutoSeekToLive:this.hasAttribute(mn),noVolumePref:this.hasAttribute(fn),noMutedPref:this.hasAttribute(En),noSubtitlesLangPref:this.hasAttribute(gn)}})},jt=new WeakMap,Bt=new WeakSet,Ft=function(e){var t;const{metaKey:n,altKey:i,key:r,shiftKey:a}=e,o=a&&("/"===r||"?"===r);if(o&&(null==(t=Kt(this,Ot))?void 0:t.open))return void this.removeEventListener("keyup",Kt(this,jt));if(n||i||!o&&!Xt.includes(r))return void this.removeEventListener("keyup",Kt(this,jt));const s=e.target,l=s instanceof HTMLElement&&("media-volume-range"===s.tagName.toLowerCase()||"media-time-range"===s.tagName.toLowerCase());![" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)||Kt(this,Dt).contains(`no${r.toLowerCase()}`)||" "===r&&Kt(this,Dt).contains("nospace")||l||e.preventDefault(),this.addEventListener("keyup",Kt(this,jt),{once:!0})},qt=new WeakSet,Gt=function(){Kt(this,Ot)||(zt(this,Ot,N.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(Kt(this,Ot))),Kt(this,Ot).open=!0};const wn=Object.values(r),An=Object.values(n),_n=e=>{var n,i,r,a;let{observedAttributes:o}=e.constructor;!o&&(null==(n=e.nodeName)?void 0:n.includes("-"))&&(O.customElements.upgrade(e),({observedAttributes:o}=e.constructor));const s=null==(a=null==(r=null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,t.MEDIA_CHROME_ATTRIBUTES))?void 0:r.split)?void 0:a.call(r,/\s+/);return Array.isArray(o||s)?(o||s).filter(e=>wn.includes(e)):[]},In=e=>(e=>{var t,n;return!(null==(t=e.nodeName)?void 0:t.includes("-"))||!O.customElements.get(null==(n=e.nodeName)?void 0:n.toLowerCase())||e instanceof O.customElements.get(e.nodeName.toLowerCase())||O.customElements.upgrade(e),An.some(t=>t in e)})(e)||!!_n(e).length,kn=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},Tn={[r.MEDIA_SUBTITLES_LIST]:et,[r.MEDIA_SUBTITLES_SHOWING]:et,[r.MEDIA_SEEKABLE]:kn,[r.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(kn).join(" "),[r.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[r.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(g).join(" ")},[r.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(f).join(" ")}},Sn=(e,t)=>
1{if((e=>{var t;return!!(null==(t=e.closest)?void 0:t.call(e,'*[slot="media"]'))})(e))return;const n=(e,t)=>{var n,i;In(e)&&t(e);const{children:r=[]}=null!=e?e:{};[...r,...null!=(i=null==(n=null==e?void 0:e.shadowRoot)?void 0:n.children)?i:[]].forEach(e=>Sn(e,t))},i=null==e?void 0:e.nodeName.toLowerCase();!i.includes("-")||In(e)?n(e,t):O.customElements.whenDefined(i).then(()=>{n(e,t)})},Mn=(e,t,n)=>{e.forEach(e=>{if(t in e)return void(e[t]=n);const i=_n(e),r=t.toLowerCase();i.includes(r)&&(async(e,t,n)=>{var i,r;if(e.isConnected||await y(0),"boolean"==typeof n||null==n)return te(e,t,n);if("number"==typeof n)return J(e,t,n);if("string"==typeof n)return ie(e,t,n);if(Array.isArray(n)&&!n.length)return e.removeAttribute(t);const a=null!=(r=null==(i=Tn[t])?void 0:i.call(Tn,n))?r:n;e.setAttribute(t,a)})(e,r,n)})},Rn=(n,i,r)=>{Sn(n,i);const a=e=>{var t;const n=null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target;i(n)},o=e=>{var t;const n=null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target;r(n)};n.addEventListener(e.REGISTER_MEDIA_STATE_RECEIVER,a),n.addEventListener(e.UNREGISTER_MEDIA_STATE_RECEIVER,o);let s=[];const l=e=>{const t=e.target;"media"!==t.name&&(s.forEach(e=>Sn(e,r)),s=[...t.assignedElements({flatten:!0})],s.forEach(e=>Sn(e,i)))};n.addEventListener("slotchange",l);const d=new MutationObserver(e=>{e.forEach(e=>{const{addedNodes:n=[],removedNodes:a=[],type:o,target:s,attributeName:l}=e;"childList"===o?(Array.prototype.forEach.call(n,e=>Sn(e,i)),Array.prototype.forEach.call(a,e=>Sn(e,r))):"attributes"===o&&l===t.MEDIA_CHROME_ATTRIBUTES&&(In(s)?i(s):r(s))})});d.observe(n,{childList:!0,attributes:!0,subtree:!0});return()=>{Sn(n,r),n.removeEventListener("slotchange",l),d.disconnect(),n.removeEventListener(e.REGISTER_MEDIA_STATE_RECEIVER,a),n.removeEventListener(e.UNREGISTER_MEDIA_STATE_RECEIVER,o)}};O.customElements.get("media-controller")||O.customElements.define("media-controller",yn);const Cn="placement",Ln="bounds";class Dn extends O.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!Y(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const t=this.placement;if("left"===t||"right"===t)return void this.style.removeProperty("--media-tooltip-offset-x");const n=getComputedStyle(this),i=null!=(e=Q(this,"#"+this.bounds))?e:B(this);if(!i)return;const{x:r,width:a}=i.getBoundingClientRect(),{x:o,width:s}=this.getBoundingClientRect(),l=o+s,d=r+a,c=n.getPropertyValue("--media-tooltip-offset-x"),u=c?parseFloat(c.replace("px","")):0,h=n.getPropertyValue("--media-tooltip-container-margin"),m=h?parseFloat(h.replace("px","")):0,p=o-r+u-m,v=l-d+u+m;p<0?this.style.setProperty("--media-tooltip-offset-x",`${p}px`):v>0?this.style.setProperty("--media-tooltip-offset-x",`${v}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[Cn,Ln]}get placement(){return ne(this,Cn)}set placement(e){ie(this,Cn,e)}get bounds(){return ne(this,Ln)}set bounds(e){ie(this,Ln,e)}}Dn.shadowRootOptions={mode:"open"},Dn.getTemplateHTML=function(e){return'\n    <style>\n      :host {\n        --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));\n        --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));\n        --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);\n        --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);\n        --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));\n        position: relative;\n        pointer-events: none;\n        display: var(--media-tooltip-display, inline-flex);\n        justify-content: center;\n        align-items: center;\n        box-sizing: border-box;\n        z-index: var(--media-tooltip-z-index, 1);\n        background: var(--_tooltip-background);\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        font: var(--media-font,\n          var(--media-font-weight, 400)\n          var(--media-font-size, 13px) /\n          var(--media-text-content-height, var(--media-control-height, 18px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        padding: var(--media-tooltip-padding, .35em .7em);\n        border: var(--media-tooltip-border, none);\n        border-radius: var(--media-tooltip-border-radius, 5px);\n        filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));\n        white-space: var(--media-tooltip-white-space, nowrap);\n      }\n\n      :host([hidden]) {\n        display: none;\n      }\n\n      img, svg {\n        display: inline-block;\n      }\n\n      #arrow {\n        position: absolute;\n        width: 0px;\n        height: 0px;\n        border-style: solid;\n        display: var(--media-tooltip-arrow-display, block);\n      }\n\n      :host(:not([placement])),\n      :host([placement="top"]) {\n        position: absolute;\n        bottom: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
1);\n      }\n      :host(:not([placement])) #arrow,\n      :host([placement="top"]) #arrow {\n        top: 100%;\n        left: 50%;\n        border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);\n        border-color: var(--_tooltip-arrow-background) transparent transparent transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="right"]) {\n        position: absolute;\n        left: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="right"]) #arrow {\n        top: 50%;\n        right: 100%;\n        border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;\n        border-color: transparent var(--_tooltip-arrow-background) transparent transparent;\n        transform: translate(0, -50%);\n      }\n\n      :host([placement="bottom"]) {\n        position: absolute;\n        top: calc(100% + var(--media-tooltip-distance, 12px));\n        left: 50%;\n        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);\n      }\n      :host([placement="bottom"]) #arrow {\n        bottom: 100%;\n        left: 50%;\n        border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);\n        border-color: transparent transparent var(--_tooltip-arrow-background) transparent;\n        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);\n      }\n\n      :host([placement="left"]) {\n        position: absolute;\n        right: calc(100% + var(--media-tooltip-distance, 12px));\n        top: 50%;\n        transform: translate(0, -50%);\n      }\n      :host([placement="left"]) #arrow {\n        top: 50%;\n        left: 100%;\n        border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);\n        border-color: transparent transparent transparent var(--_tooltip-arrow-background);\n        transform: translate(0, -50%);\n      }\n      \n      :host([placement="none"]) #arrow {\n        display: none;\n      }\n    </style>\n    <slot></slot>\n    <div id="arrow"></div>\n  '},O.customElements.get("media-tooltip")||O.customElements.define("media-tooltip",Dn);var xn,Pn,On,Nn,Un,Hn,Wn,$n=Dn,Vn=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},jn=(e,t,n)=>(Vn(e,t,"read from private field"),n?n.call(e):t.get(e)),Bn=(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)},Fn=(e,t,n,i)=>(Vn(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const qn="tooltipplacement",Gn="disabled",Qn="notooltip";class Kn extends O.HTMLElement{constructor(){if(super(),Bn(this,Hn),Bn(this,xn,void 0),this.preventClick=!1,this.tooltipEl=null,Bn(this,Pn,e=>{this.preventClick||this.handleClick(e),setTimeout(jn(this,On),0)}),Bn(this,On,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),Bn(this,Nn,e=>{const{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",jn(this,Nn))}),Bn(this,Un,e=>{const{metaKey:t,altKey:n,key:i}=e;t||n||!this.keysUsed.includes(i)?this.removeEventListener("keyup",jn(this,Nn)):this.addEventListener("keyup",jn(this,Nn),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(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",qn,t.MEDIA_CONTROLLER,r.MEDIA_LANG]}enable(){this.addEventListener("click",jn(this,Pn)),this.addEventListener("keydown",jn(this,Un)),this.tabIndex=0}disable(){this.removeEventListener("click",jn(this,Pn)),this.removeEventListener("keydown",jn(this,Un)),this.removeEventListener("keyup",jn(this,Nn)),this.tabIndex=-1}attributeChangedCallback(e,n,i){var a,o,s,l,d;e===t.MEDIA_CONTROLLER?(n&&(null==(o=null==(a=jn(this,xn))?void 0:a.unassociateElement)||o.call(a,this),Fn(this,xn,null)),i&&this.isConnected&&(Fn(this,xn,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(d=null==(l=jn(this,xn))?void 0:l.associateElement)||d.call(l,this))):"disabled"===e&&i!==n?null==i?this.enable():this.disable():e===qn&&this.tooltipEl&&i!==n?this.tooltipEl.placement=i:e===r.MEDIA_LA
1NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),jn(this,On).call(this)}connectedCallback(){var e,n,i;const{style:r}=z(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const a=this.getAttribute(t.MEDIA_CONTROLLER);a&&(Fn(this,xn,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(n=jn(this,xn))?void 0:n.associateElement)||i.call(n,this)),O.customElements.whenDefined("media-tooltip").then(()=>{return(e=this,t=Hn,n=Wn,Vn(e,t,"access private method"),n).call(this);var e,t,n})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=jn(this,xn))?void 0:e.unassociateElement)||t.call(e,this),Fn(this,xn,null),this.removeEventListener("mouseenter",jn(this,On)),this.removeEventListener("focus",jn(this,On)),this.removeEventListener("click",jn(this,Pn))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ne(this,qn)}set tooltipPlacement(e){ie(this,qn,e)}get mediaController(){return ne(this,t.MEDIA_CONTROLLER)}set mediaController(e){ie(this,t.MEDIA_CONTROLLER,e)}get disabled(){return ee(this,Gn)}set disabled(e){te(this,Gn,e)}get noTooltip(){return ee(this,Qn)}set noTooltip(e){te(this,Qn,e)}handleClick(e){}}xn=new WeakMap,Pn=new WeakMap,On=new WeakMap,Nn=new WeakMap,Un=new WeakMap,Hn=new WeakSet,Wn=function(){this.addEventListener("mouseenter",jn(this,On)),this.addEventListener("focus",jn(this,On)),this.addEventListener("click",jn(this,Pn));const e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},Kn.shadowRootOptions={mode:"open"},Kn.getTemplateHTML=function(e,t={}){return`\n    <style>\n      :host {\n        position: relative;\n        font: var(--media-font,\n          var(--media-font-weight, bold)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        padding: var(--media-button-padding, var(--media-control-padding, 10px));\n        justify-content: var(--media-button-justify-content, center);\n        display: inline-flex;\n        align-items: center;\n        vertical-align: middle;\n        box-sizing: border-box;\n        transition: background .15s linear;\n        pointer-events: auto;\n        cursor: var(--media-cursor, pointer);\n        -webkit-tap-highlight-color: transparent;\n      }\n\n      \n      :host(:focus-visible) {\n        box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        outline: 0;\n      }\n      \n      :host(:where(:focus)) {\n        box-shadow: none;\n        outline: 0;\n      }\n\n      :host(:hover) {\n        background: var(--media-control-hover-background, rgba(50 50 70 / .7));\n      }\n\n      slot[name="icon"] {\n        display: inline-flex;\n        align-items: center;\n      }\n\n      svg, img, ::slotted(svg), ::slotted(img) {\n        width: var(--media-button-icon-width);\n        height: var(--media-button-icon-height, var(--media-control-height, 24px));\n        transform: var(--media-button-icon-transform);\n        transition: var(--media-button-icon-transition);\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        vertical-align: middle;\n        max-width: 100%;\n        max-height: 100%;\n        min-width: 100%;\n      }\n\n      media-tooltip {\n        \n        max-width: 0;\n        overflow-x: clip;\n        opacity: 0;\n        transition: opacity .3s, max-width 0s 9s;\n      }\n\n      :host(:hover) media-tooltip,\n      :host(:focus-visible) media-tooltip {\n        max-width: 100vw;\n        opacity: 1;\n        transition: opacity .3s;\n      }\n\n      :host([notooltip]) slot[name="tooltip"] {\n        display: none;\n      }\n    </style>
1\n\n    ${this.getSlotTemplateHTML(e,t)}\n\n    <slot name="tooltip">\n      <media-tooltip part="tooltip" aria-hidden="true">\n        <template shadowrootmode="${$n.shadowRootOptions.mode}">\n          ${$n.getTemplateHTML({})}\n        </template>\n        <slot name="tooltip-content">\n          ${this.getTooltipContentHTML(e)}\n        </slot>\n      </media-tooltip>\n    </slot>\n  `},Kn.getSlotTemplateHTML=function(e,t){return"\n    <slot></slot>\n  "},Kn.getTooltipContentHTML=function(){return""},O.customElements.get("media-chrome-button")||O.customElements.define("media-chrome-button",Kn);const Yn='<svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>\n</svg>\n';const zn=e=>{const t=e.mediaIsAirplaying?I("stop airplay"):I("start airplay");e.setAttribute("aria-label",t)};class Zn extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_IS_AIRPLAYING,r.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),zn(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_IS_AIRPLAYING&&zn(this)}get mediaIsAirplaying(){return ee(this,r.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){te(this,r.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return ne(this,r.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){ie(this,r.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){const t=new O.CustomEvent(e.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(t)}}Zn.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${r.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([${r.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],\n      :host(:not([${r.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">${Yn}</slot>\n      <slot name="exit">${Yn}</slot>\n    </slot>\n  `},Zn.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${I("start airplay")}</slot>\n    <slot name="tooltip-exit">${I("stop airplay")}</slot>\n  `},O.customElements.get("media-airplay-button")||O.customElements.define("media-airplay-button",Zn);const Xn=e=>{e.setAttribute("aria-checked",(e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(r.MEDIA_SUBTITLES_SHOWING)})(e).toString())};class Jn extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_SUBTITLES_LIST,r.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",I("closed captions")),Xn(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_SUBTITLES_SHOWING&&Xn(this)}get mediaSubtitlesList(){return ei(this,r.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ti(this,r.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ei(this,r.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ti(this,r.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new O.CustomEvent(e.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}Jn.getSlotTemplateHTML=function(e){return'\n    <style>\n      :host([aria-checked="true"]) slot[name=off] {\n        display: none !important;\n      }\n\n      \n      :host(:not([aria-checked="true"])) slot[name=on] {\n        display: none !important;\n      }\n\n      :host([aria-checked="true"]) slot[name=tooltip-enable],\n      :host(:not([aria-checked="true"])) slot[name=tooltip-disable] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="on"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 
10 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>\n</svg></slot>\n      <slot name="off"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>\n</svg></slot>\n    </slot>\n  '},Jn.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enable">${I("Enable captions")}</slot>\n    <slot name="tooltip-disable">${I("Disable captions")}</slot>\n  `};const ei=(e,t)=>{const n=e.getAttribute(t);return n?Ze(n):[]},ti=(e,t,n)=>{if(!(null==n?void 0:n.length))return void e.removeAttribute(t);const i=et(n);e.getAttribute(t)!==i&&e.setAttribute(t,i)};O.customElements.get("media-captions-button")||O.customElements.define("media-captions-button",Jn);const ni=e=>{const t=e.mediaIsCasting?I("stop casting"):I("start casting");e.setAttribute("aria-label",t)};class ii extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_IS_CASTING,r.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),ni(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_IS_CASTING&&ni(this)}get mediaIsCasting(){return ee(this,r.MEDIA_IS_CASTING)}set mediaIsCasting(e){te(this,r.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ne(this,r.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){ie(this,r.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const t=this.mediaIsCasting?e.MEDIA_EXIT_CAST_REQUEST:e.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new O.CustomEvent(t,{composed:!0,bubbles:!0}))}}ii.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${r.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([${r.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],\n      :host(:not([${r.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg></slot>\n      <slot name="exit"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg></slot>\n    </slot>\n  `},ii.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${I("Start casting")}</slot>\n    <slot name="tooltip-exit">${I("Stop casting")}</slot>\n  `},O.customElements.get("media-cast-button")||O.customElements.define("media-cast-button",ii);var ri,ai,oi,si,li,di,ci,ui,hi,mi,pi,vi,Ei,gi,fi,bi=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},yi=(e,t,n)=>(bi(e,t,"read from private field"),n?n.call(e):t.get(e)),wi=(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)},Ai=(e,t,n,i)=>(bi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),_i=(e,t,n)=>(bi(e,t,"access private method"),n);const Ii="open",ki="anchor";class Ti extends O.HTMLElement{constructor(){super(),wi(this,si),wi(this,di),wi(this,ui),wi(this,mi),wi(this,vi),wi(this,gi),wi(this,ri,!1),wi(this,ai,null),wi(this,oi,null)}static get observedAttributes(){return[Ii,ki]}get open(){return ee(this,Ii)}set open(e){te(this,Ii,e)}handleEvent(e){switch(e.type){case"invoke":_i(this,mi,pi).call(this,e);break;case"focusout":_i(this,vi,Ei).call(this,e);break;case"keydown":_i(this,gi,fi).call(this,e)}}connectedCallback(){_i(this,si,li).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}disconnectedCallback(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}attributeChangedCallback(e,t,n){_i(this,si,li).call(this),e===Ii&&n!==t&&(this.open?_i(this,di,ci).call(this):_i(this,ui,hi).call(this))}focus(){Ai(this,ai,K());const e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||t)return;
1const n=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==n||n.focus()}get keysUsed(){return["Escape","Tab"]}}ri=new WeakMap,ai=new WeakMap,oi=new WeakMap,si=new WeakSet,li=function(){if(!yi(this,ri)&&(Ai(this,ri,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{const{style:e}=z(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},di=new WeakSet,ci=function(){var e;null==(e=yi(this,oi))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},ui=new WeakSet,hi=function(){var e;null==(e=yi(this,oi))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},mi=new WeakSet,pi=function(e){Ai(this,oi,e.relatedTarget),G(this,e.relatedTarget)||(this.open=!this.open)},vi=new WeakSet,Ei=function(e){var t;G(this,e.relatedTarget)||(null==(t=yi(this,ai))||t.focus(),yi(this,oi)&&yi(this,oi)!==e.relatedTarget&&this.open&&(this.open=!1))},gi=new WeakSet,fi=function(e){var t,n,i,r,a;const{key:o,ctrlKey:s,altKey:l,metaKey:d}=e;s||l||d||this.keysUsed.includes(o)&&(e.preventDefault(),e.stopPropagation(),"Tab"===o?(e.shiftKey?null==(n=null==(t=this.previousElementSibling)?void 0:t.focus)||n.call(t):null==(r=null==(i=this.nextElementSibling)?void 0:i.focus)||r.call(i),this.blur()):"Escape"===o&&(null==(a=yi(this,ai))||a.focus(),this.open=!1))},Ti.shadowRootOptions={mode:"open"},Ti.getTemplateHTML=function(e){return`\n    <style>\n      :host {\n        font: var(--media-font,\n          var(--media-font-weight, normal)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        display: var(--media-dialog-display, inline-flex);\n        justify-content: center;\n        align-items: center;\n        \n        transition-behavior: allow-discrete;\n        visibility: hidden;\n        opacity: 0;\n        transform: translateY(2px) scale(.99);\n        pointer-events: none;\n      }\n\n      :host([open]) {\n        transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;\n        visibility: visible;\n        opacity: 1;\n        transform: translateY(0) scale(1);\n        pointer-events: auto;\n      }\n\n      #content {\n        display: flex;\n        position: relative;\n        box-sizing: border-box;\n        width: min(320px, 100%);\n        word-wrap: break-word;\n        max-height: 100%;\n        overflow: auto;\n        text-align: center;\n        line-height: 1.4;\n      }\n    </style>\n    ${this.getSlotTemplateHTML(e)}\n  `},Ti.getSlotTemplateHTML=function(e){return'\n    <slot id="content"></slot>\n  '},O.customElements.get("media-chrome-dialog")||O.customElements.define("media-chrome-dialog",Ti);var Si,Mi,Ri,Ci,Li,Di,xi,Pi,Oi,Ni,Ui,Hi,Wi,$i,Vi,ji,Bi,Fi,qi,Gi,Qi,Ki,Yi,zi,Zi,Xi=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ji=(e,t,n)=>(Xi(e,t,"read from private field"),n?n.call(e):t.get(e)),er=(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)},tr=(e,t,n,i)=>(Xi(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),nr=(e,t,n)=>(Xi(e,t,"access private method"),n);class ir extends O.HTMLElement{constructor(){if(super(),er(this,Ni),er(this,Hi),er(this,$i),er(this,ji),er(this,Fi),er(this,Gi),er(this,Ki),er(this,zi),er(this,Si,void 0),er(this,Mi,void 0),er(this,Ri,void 0),er(this,Ci,void 0),er(this,Li,{}),er(this,Di,[]),er(this,xi,()=>{if(this.range.matches(":focus-visible")){const{style:e}=z(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-sha
1dow)")}}),er(this,Pi,()=>{const{style:e}=z(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),er(this,Oi,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),tr(this,Ri,this.shadowRoot.querySelector("#startpoint")),tr(this,Ci,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",t.MEDIA_CONTROLLER]}attributeChangedCallback(e,n,i){var r,a,o,s,l;e===t.MEDIA_CONTROLLER?(n&&(null==(a=null==(r=Ji(this,Si))?void 0:r.unassociateElement)||a.call(r,this),tr(this,Si,null)),i&&this.isConnected&&(tr(this,Si,null==(o=this.getRootNode())?void 0:o.getElementById(i)),null==(l=null==(s=Ji(this,Si))?void 0:s.associateElement)||l.call(s,this))):("disabled"===e||"aria-disabled"===e&&n!==i)&&(null==i?(this.range.removeAttribute(e),nr(this,Hi,Wi).call(this)):(this.range.setAttribute(e,i),nr(this,$i,Vi).call(this)))}connectedCallback(){var e,n,i;const{style:r}=z(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),Ji(this,Li).pointer=z(this.shadowRoot,"#pointer"),Ji(this,Li).progress=z(this.shadowRoot,"#progress"),Ji(this,Li).thumb=z(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),Ji(this,Li).activeSegment=z(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const a=this.getAttribute(t.MEDIA_CONTROLLER);a&&(tr(this,Si,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(n=Ji(this,Si))?void 0:n.associateElement)||i.call(n,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",Ji(this,xi)),this.shadowRoot.addEventListener("focusout",Ji(this,Pi)),nr(this,Hi,Wi).call(this),$(this.container,Ji(this,Oi))}disconnectedCallback(){var e,t;nr(this,$i,Vi).call(this),null==(t=null==(e=Ji(this,Si))?void 0:e.unassociateElement)||t.call(e,this),tr(this,Si,null),this.shadowRoot.removeEventListener("focusin",Ji(this,xi)),this.shadowRoot.removeEventListener("focusout",Ji(this,Pi)),V(this.container,Ji(this,Oi))}updatePointerBar(e){var t;null==(t=Ji(this,Li).pointer)||t.style.setProperty("width",100*this.getPointerRatio(e)+"%")}updateBar(){var e,t;const n=100*this.range.valueAsNumber;null==(e=Ji(this,Li).progress)||e.style.setProperty("width",`${n}%`),null==(t=Ji(this,Li).thumb)||t.style.setProperty("left",`${n}%`)}updateSegments(e){const t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!!(null==e?void 0:e.length)),!(null==e?void 0:e.length))return;const n=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];tr(this,Di,[...n]);const i=n.pop();for(const[r,a]of n.entries()){const[e,o]=[0===r,r===n.length-1],s=e?"calc(var(--segments-gap) / -1)":100*a+"%",l=`calc(${100*((o?i:n[r+1])-a)}%${e||o?"":" - var(--segments-gap)"})`,d=N.createElementNS("http://www.w3.org/2000/svg","rect"),c=Z(this.shadowRoot,`#segments-clipping rect:nth-child(${r+1})`);c.style.setProperty("x",s),c.style.setProperty("width",l),t.append(d)}}getPointerRatio(e){return function(e,t,n,i){const r=i.x-n.x,a=i.y-n.y,o=r*r+a*a;if(0===o)return 0;const s=((e-n.x)*r+(t-n.y)*a)/o;return Math.max(0,Math.min(1,s))}(e.clientX,e.clientY,Ji(this,Ri).getBoundingClientRect(),Ji(this,Ci).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":nr(this,zi,Zi).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":nr(this,Fi,qi).call(this,e);break;case"pointerdown":nr(this,ji,Bi).call(this,e);break;case"pointerup":nr(this,Gi,Qi).call(this);break;case"pointerleave":nr(this,Ki,Yi).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}Si=new WeakMap,Mi=new WeakMap,Ri=new WeakMap,Ci=new WeakMap,Li=new WeakMap,Di=new WeakMap,xi=new WeakMap,Pi=new WeakMap,Oi=new WeakMap,Ni=new WeakSet,Ui=function(e){const t=Ji(this,Li).activeSegment;if(!t)return;const n=this.getPointerRatio(e),i=`#segments-clipping rect:nth-child(${Ji(this,Di).findIndex((e,t,i)=>{const r=i[t+1];return null!=r&&n>=e&&n<=r})+1})`;t.selectorText==i&&t.style.transform||(t.selectorText=i,t.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},Hi=new WeakSet,Wi=function(){!this.hasAttribute("disabled")&&this.isConnected&&(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},$i=new WeakSet,Vi=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),null==(e=O.window)||e.removeEventListener("pointerup",this),null==(t=O.window)||t.removeEventListener("pointermove",this)},ji=new WeakSet,Bi=function(e){var t;tr(this,Mi,e.composedPath().includes(this.range)),null==(t=O.window)||t.addEventListener("pointerup",this,{once:!0})},Fi=new WeakSet,qi=function(e){var t;"mouse"!==e.pointerType&&nr(this,ji,Bi).call(this,e),this.addEventListener("pointerleave",this,{once:!0}),null==(t=O.window)||t.addEventListener("pointermove",this)},Gi=new WeakSet,Qi=function(){var e;null==(e=O.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},Ki=new WeakSet,Yi=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=O.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=Ji(this,Li).activeSegment)||t.style.removeProperty("transform")},zi=new WeakSet,Zi=function(e){"pen"===e.pointerType&&0===e.buttons||(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),nr(this,Ni,Ui).call(this,e),!this.dragging||"mouse"===e.pointerType&&Ji(this,Mi)||(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},ir.shadowRootOptions={mode:"open"},ir.getTemplateHTML=function(e){return`\n    <style>
1\n      :host {\n        --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));\n\n        box-shadow: var(--_focus-visible-box-shadow, none);\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));\n        display: inline-flex;\n        align-items: center;\n        \n        vertical-align: middle;\n        box-sizing: border-box;\n        position: relative;\n        width: 100px;\n        transition: background .15s linear;\n        cursor: var(--media-cursor, pointer);\n        pointer-events: auto;\n        touch-action: none; \n      }\n\n      \n      input[type=range]:focus {\n        outline: 0;\n      }\n      input[type=range]:focus::-webkit-slider-runnable-track {\n        outline: 0;\n      }\n\n      :host(:hover) {\n        background: var(--media-control-hover-background, rgb(50 50 70 / .7));\n      }\n\n      #leftgap {\n        padding-left: var(--media-range-padding-left, var(--_media-range-padding));\n      }\n\n      #rightgap {\n        padding-right: var(--media-range-padding-right, var(--_media-range-padding));\n      }\n\n      #startpoint,\n      #endpoint {\n        position: absolute;\n      }\n\n      #endpoint {\n        right: 0;\n      }\n\n      #container {\n        \n        width: var(--media-range-track-width, 100%);\n        transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));\n        position: relative;\n        height: 100%;\n        display: flex;\n        align-items: center;\n        min-width: 40px;\n      }\n\n      #range {\n        \n        display: var(--media-time-range-hover-display, block);\n        bottom: var(--media-time-range-hover-bottom, 0);\n        height: var(--media-time-range-hover-height, max(100% , 25px));\n        width: 100%;\n        position: absolute;\n        cursor: var(--media-cursor, pointer);\n\n        -webkit-appearance: none; \n        -webkit-tap-highlight-color: transparent;\n        background: transparent; \n        margin: 0;\n        z-index: 1;\n      }\n\n      @media (hover: hover) {\n        #range {\n          bottom: var(--media-time-range-hover-bottom, 0);\n          height: var(--media-time-range-hover-height, max(100%, 20px));\n        }\n      }\n\n      \n      \n      #range::-webkit-slider-thumb {\n        -webkit-appearance: none;\n        background: transparent;\n        width: .1px;\n        height: .1px;\n      }\n\n      \n      #range::-moz-range-thumb {\n        background: transparent;\n        border: transparent;\n        width: .1px;\n        height: .1px;\n      }\n\n      #appearance {\n        height: var(--media-range-track-height, 4px);\n        display: flex;\n        flex-direction: column;\n        justify-content: center;\n        width: 100%;\n        position: absolute;\n        \n        will-change: transform;\n      }\n\n      #track {\n        background: var(--media-range-track-background, rgb(255 255 255 / .2));\n        border-radius: var(--media-range-track-border-radius, 1px);\n        border: var(--media-range-track-border, none);\n        outline: var(--media-range-track-outline);\n        outline-offset: var(--media-range-track-outline-offset);\n        backdrop-filter: var(--media-range-track-backdrop-filter);\n        -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
1\n        box-shadow: var(--media-range-track-box-shadow, none);\n        position: absolute;\n        width: 100%;\n        height: 100%;\n        overflow: hidden;\n      }\n\n      #progress,\n      #pointer {\n        position: absolute;\n        height: 100%;\n        will-change: width;\n      }\n\n      #progress {\n        background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));\n        transition: var(--media-range-track-transition);\n      }\n\n      #pointer {\n        background: var(--media-range-track-pointer-background);\n        border-right: var(--media-range-track-pointer-border-right);\n        transition: visibility .25s, opacity .25s;\n        visibility: hidden;\n        opacity: 0;\n      }\n\n      @media (hover: hover) {\n        :host(:hover) #pointer {\n          transition: visibility .5s, opacity .5s;\n          visibility: visible;\n          opacity: 1;\n        }\n      }\n\n      #thumb,\n      ::slotted([slot=thumb]) {\n        width: var(--media-range-thumb-width, 10
1px);\n        height: var(--media-range-thumb-height, 10px);\n        transition: var(--media-range-thumb-transition);\n        transform: var(--media-range-thumb-transform, none);\n        opacity: var(--media-range-thumb-opacity, 1);\n        translate: -50%;\n        position: absolute;\n        left: 0;\n        cursor: var(--media-cursor, pointer);\n      }\n\n      #thumb {\n        border-radius: var(--media-range-thumb-border-radius, 10px);\n        background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));\n        box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);\n        border: var(--media-range-thumb-border, none);\n      }\n\n      :host([disabled]) #thumb {\n        background-color: #777;\n      }\n\n      .segments #appearance {\n        height: var(--media-range-segment-hover-height, 7px);\n      }\n\n      #track {\n        clip-path: url(#segments-clipping);\n      }\n\n      #segments {\n        --segments-gap: var(--media-range-segments-gap, 2px);\n        position: absolute;\n        width: 100%;\n        height: 100%;\n      }\n\n      #segments-clipping {\n        transform: translateX(calc(var(--segments-gap) / 2));\n      }\n\n      #segments-clipping:empty {\n        display: none;\n      }\n\n      #segments-clipping rect {\n        height: var(--media-range-track-height, 4px);\n        y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);\n        transition: var(--media-range-segment-transition, transform .1s ease-in-out);\n        transform: var(--media-range-segment-transform, scaleY(1));\n        transform-origin: center;\n      }\n\n      /* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */\n      #range-label {\n        position: absolute;\n        left: -10000px;\n        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        pointer-events: none;\n      }\n    </style>\n    <div id="leftgap"></div>\n    <div id="container">\n      <div id="startpoint"></div>\n      <div id="endpoint"></div>\n      <div id="appearance">\n        <div id="track" part="track">\n          <div id="pointer"></div>\n          <div id="progress" part="progress"></div>\n        </div>\n        <slot name="thumb">\n          <div id="thumb" part="thumb"></div>\n        </slot>\n        <svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg>\n      </div>
1\n        <input id="range" type="range" min="0" max="1" step="any" value="0">\n        <label for="range" id="range-label"></label>\n\n      ${this.getContainerTemplateHTML(e)}\n    </div>\n    <div id="rightgap"></div>\n  `},ir.getContainerTemplateHTML=function(e){return""},O.customElements.get("media-chrome-range")||O.customElements.define("media-chrome-range",ir);var rr,ar=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},or=(e,t,n)=>(ar(e,t,"read from private field"),n?n.call(e):t.get(e)),sr=(e,t,n,i)=>(ar(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class lr extends O.HTMLElement{constructor(){if(super(),((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)})(this,rr,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[t.MEDIA_CONTROLLER]}attributeChangedCallback(e,n,i){var r,a,o,s,l;e===t.MEDIA_CONTROLLER&&(n&&(null==(a=null==(r=or(this,rr))?void 0:r.unassociateElement)||a.call(r,this),sr(this,rr,null)),i&&this.isConnected&&(sr(this,rr,null==(o=this.getRootNode())?void 0:o.getElementById(i)),null==(l=null==(s=or(this,rr))?void 0:s.associateElement)||l.call(s,this)))}connectedCallback(){var e,n,i;const r=this.getAttribute(t.MEDIA_CONTROLLER);r&&(sr(this,rr,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(n=or(this,rr))?void 0:n.associateElement)||i.call(n,this))}disconnectedCallback(){var e,t;null==(t=null==(e=or(this,rr))?void 0:e.unassociateElement)||t.call(e,this),sr(this,rr,null)}}rr=new WeakMap,lr.shadowRootOptions={mode:"open"},lr.getTemplateHTML=function(e){return'\n    <style>\n      :host {\n        \n        box-sizing: border-box;\n        display: var(--media-control-display, var(--media-control-bar-display, inline-flex));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        --media-loading-indicator-icon-height: 44px;\n      }\n\n      ::slotted(media-time-range),\n      ::slotted(media-volume-range) {\n        min-height: 100%;\n      }\n\n      ::slotted(media-time-range),\n      ::slotted(media-clip-selector) {\n        flex-grow: 1;\n      }\n\n      ::slotted([role="menu"]) {\n        position: absolute;\n      }\n    </style>\n\n    <slot></slot>\n  '},O.customElements.get("media-control-bar")||O.customElements.define("media-control-bar",lr);var dr,cr=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ur=(e,t,n)=>(cr(e,t,"read from private field"),n?n.call(e):t.get(e)),hr=(e,t,n,i)=>(cr(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class mr extends O.HTMLElement{constructor(){if(super(),((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)})(this,dr,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[t.MEDIA_CONTROLLER]}attributeChangedCallback(e,n,i){var r,a,o,s,l;e===t.MEDIA_CONTROLLER&&(n&&(null==(a=null==(r=ur(this,dr))?void 0:r.unassociateElement)||a.call(r,this),hr(this,dr,null)),i&&this.isConnected&&(hr(this,dr,null==(o=this.getRootNode())?void 0:o.getElementById(i)),null==(l=null==(s=ur(this,dr))?void 0:s.associateElement)||l.call(s,this)))}connectedCallback(){var e,n,i;const{style:r}=z(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const a=this.getAttribute(t.MEDIA_CONTROLLER);a&&(hr(this,dr,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(n=ur(this,dr))?void 0:n.associateElement)||i.call(n,this))}disconnectedCallback(){var e,t;null==(t=null==(e=ur(this,dr))?void 0:e.unassociateElement)||t.call(e,this),hr(this,dr,null)}}dr=new WeakMap,mr.shadowRootOptions={mode:"open"},mr.getTemplateHTML=function(e,t={}){return`\n    <style>\n      :host {\n        font: var(--media-font,\n          var(--media-font-weight, normal)\n          var(--media-font-size, 14px) /\n          var(--media-text-content-height, var(--media-control-height, 24px))\n          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));\n        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));\n        background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));\n        padding: var(--media-control-padding, 10px);\n        display: inline-flex;\n        justify-content: center;\n        align-items: center;\n        vertical-align: middle;\n        box-sizing: border-box;\n        text-align: center;\n        pointer-events: auto;\n      }\n\n      \n      :host(:focus-visible) {\n        box-shadow: var(--media-focus-box-sha
1dow, inset 0 0 0 2px rgb(27 127 204 / .9));\n        outline: 0;\n      }\n\n      \n      :host(:where(:focus)) {\n        box-shadow: none;\n        outline: 0;\n      }\n    </style>\n\n    ${this.getSlotTemplateHTML(e,t)}\n  `},mr.getSlotTemplateHTML=function(e,t){return"\n    <slot></slot>\n  "},O.customElements.get("media-text-display")||O.customElements.define("media-text-display",mr);var pr,vr=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Er=(e,t,n)=>(vr(e,t,"read from private field"),n?n.call(e):t.get(e));class gr extends mr{constructor(){var e,t,n,i,r;super(),((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)})(this,pr,void 0),t=this,n=pr,i=this.shadowRoot.querySelector("slot"),vr(t,n,"write to private field"),r?r.call(t,i):n.set(t,i),Er(this,pr).textContent=S(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_DURATION]}attributeChangedCallback(e,t,n){e===r.MEDIA_DURATION&&(Er(this,pr).textContent=S(+n)),super.attributeChangedCallback(e,t,n)}get mediaDuration(){return X(this,r.MEDIA_DURATION)}set mediaDuration(e){J(this,r.MEDIA_DURATION,e)}}pr=new WeakMap,gr.getSlotTemplateHTML=function(e,t){return`\n    <slot>${S(t.mediaDuration)}</slot>\n  `},O.customElements.get("media-duration-display")||O.customElements.define("media-duration-display",gr);const fr={2:I("Network Error"),3:I("Decode Error"),4:I("Source Not Supported"),5:I("Encryption 
1Error")},br={2:I("A network error caused the media download to fail."),3:I("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:I("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:I("The media is encrypted and there are no keys to decrypt it.")},yr=e=>{var t,n;return 1===e.code?null:{title:null!=(t=fr[e.code])?t:`Error ${e.code}`,message:null!=(n=br[e.code])?n:e.message}};var wr,Ar=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};function _r(e){var t;const{title:n,message:i}=null!=(t=yr(e))?t:{};let r="";return n&&(r+=`<slot name="error-${e.code}-title"><h3>${n}</h3></slot>`),i&&(r+=`<slot name="error-${e.code}-message"><p>${i}</p></slot>`),r}const Ir=[r.MEDIA_ERROR_CODE,r.MEDIA_ERROR_MESSAGE];class kr extends Ti{constructor(){super(...arguments),((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)})(this,wr,null)}static get observedAttributes(){return[...super.observedAttributes,...Ir]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,n){var i;if(super.attributeChangedCallback(e,t,n),!Ir.includes(e))return;const r=null!=(i=this.mediaError)?i:{code:this.mediaErrorCode,message:this.mediaErrorMessage};var a;if(this.open=(a=r).code&&null!==yr(a),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r),!this.hasAttribute("aria-label"))){const{title:e}=yr(r);e&&this.setAttribute("aria-label",e)}}get mediaError(){return Ar(e=this,t=wr,"read from private field"),n?n.call(e):t.get(e);var e,t,n}set mediaError(e){((e,t,n,i)=>{Ar(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,wr,e)}get mediaErrorCode(){return X(this,"mediaerrorcode")}set mediaErrorCode(e){J(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ne(this,"mediaerrormessage")}set mediaErrorMessage(e){ie(this,"mediaerrormessage",e)}}wr=new WeakMap,kr.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host {\n        background: rgb(20 20 30 / .8);\n      }\n\n      #content {\n        display: block;\n        padding: 1.2em 1.5em;\n      }\n\n      h3,\n      p {\n        margin-block: 0 .3em;\n      }\n    </style>\n    <slot name="error-${e.mediaerrorcode}" id="content">\n      ${_r({code:+e.mediaerrorcode,message:e.mediaerrormessage})}\n    </slot>\n  `},kr.formatErrorMessage=_r,O.customElements.get("media-error-dialog")||O.customElements.define("media-error-dialog",kr);var Tr,Sr,Mr=(e,t,n)=>(((e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)})(e,t,"read from private field"),n?n.call(e):t.get(e)),Rr=(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)};class Cr extends Ti{constructor(){super(...arguments),Rr(this,Tr,e=>{var t;if(!this.open)return;const n=null==(t=this.shadowRoot)?void 0:t.querySelector("#content");if(!n)return;const i=e.composedPath(),r=i[0]===this||i.includes(this),a=i.includes(n);r&&!a&&(this.open=!1)}),Rr(this,Sr,e=>{if(!this.open)return;const t=e.shiftKey&&("/"===e.key||"?"===e.key);"Escape"!==e.key&&!t||e.ctrlKey||e.altKey||e.metaKey||(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",Mr(this,Tr)),document.addEventListener("keydown",Mr(this,Sr)))}disconnectedCallback(){this.removeEventListener("click",Mr(this,Tr)),document.removeEventListener("keydown",Mr(this,Sr))}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),"open"===e&&(this.open?(this.addEventListener("click",Mr(this,Tr)),document.addEventListener("keydown",Mr(this,Sr))):(this.removeEventListener("click",Mr(this,Tr)),document.removeEventListener("keydown",Mr(this,Sr))))}}Tr=new WeakMap,Sr=new WeakMap,Cr.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host {\n        position: fixed;\n        top: 0;\n        left: 0;\n        z-index: 9999;\n        background: rgb(20 20 30 / .8);\n        backdrop-filter: blur(10px);\n      }\n\n      #content {\n        display: block;\n        width: clamp(400px, 40vw, 700px);\n        max-width: 90vw;\n        text-align: left;\n      }\n\n      h2 {\n        margin: 0 0 1.5rem 0;\n        font-size: 1.5rem;\n        font-weight: 500;\n        text-align: center;\n      }\n\n      .shortcuts-table {\n        width: 100%;\n        border-collapse: collapse;\n      }\n\n      .shortcuts-table tr {\n        border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n      }\n\n      .shortcuts-table tr:last-child {\n        border-bottom: none;\n      }\n\n      .shortcuts-table td {\n        padding: 0.75rem 0.5rem;\n      }\n\n      .shortcuts-table td:first-child {\n        text-align: right;\n        padding-right: 1rem;\n        width: 40%;\n        min-width: 120px;\n      }\n\n      .shortcuts-table td:last-child {\n        padding-left: 1rem;\n      }\n\n      .key {\n        display: inline-block;\n        background: rgba(255, 255, 255, 0.15);\n        border: 1px solid rgba(255, 255, 255, 0.2);\n        border-radius: 4px;\n        padding: 0.25rem 0.5rem;\n        font-family: 'Courier New', monospace;\n        font-size: 0.9rem;\n        font-weight: 500;\n        min-width: 1.5rem;\n        text-align: center;\n        margin: 0 0.2rem;\n      }\n\n      .description {\n        color: rgba(255, 255, 255, 0.9);\n        font-size: 0.95rem;\n      }\n\n      .key-combo {\n        display: flex;\n        align-items: center;\n        justify-content: flex-end;\n        gap: 0.3rem;\n      }\n\n      .key-separator {\n        color: rgba(255, 255, 255, 0.5);\n        font-size: 0.9rem;\n      }\n    </style>\n    <slot id="content">\n      \n    <h2>Keyboard Shortcuts</h2>\n    <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})=>`\n      <tr>\n        <td>\n          <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>\n        </td>\n        <td class="description">${t}</td>\n      </tr>\n    `).join("")}</table>\n  \n    </slot>\n  `},O.customElements.get("media-keyboard-shortcuts-dialog")||O.customElements.define("media-keyboard-shortcuts-dialog",Cr);
1var Lr,Dr=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};const xr=e=>{const t=e.mediaIsFullscreen?I("exit fullscreen mode"):I("enter fullscreen mode");e.setAttribute("aria-label",t)};class Pr extends Kn{constructor(){super(...arguments),((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)})(this,Lr,null)}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_IS_FULLSCREEN,r.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),xr(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_IS_FULLSCREEN&&xr(this)}get mediaFullscreenUnavailable(){return ne(this,r.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){ie(this,r.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return ee(this,r.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){te(this,r.MEDIA_IS_FULLSCREEN,e)}handleClick(t){var n,i,r,a;r=t,Dr(n=this,i=Lr,"write to private field"),a?a.call(n,r):i.set(n,r);const o=((e,t,n)=>(Dr(e,t,"read from private field"),n?n.call(e):t.get(e)))(this,Lr)instanceof PointerEvent,s=this.mediaIsFullscreen?new O.CustomEvent(e.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new O.CustomEvent(e.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:o});this.dispatchEvent(s)}}Lr=new WeakMap,Pr.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${r.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      \n      :host(:not([${r.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],\n      :host(:not([${r.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>\n</svg></slot>\n      <slot name="exit"><svg aria-hidden="true" viewBox="0 0 26 24">\n  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>\n</svg></slot>\n    </slot>\n  `},Pr.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${I("Enter fullscreen mode")}</slot>\n    <slot name="tooltip-exit">${I("Exit fullscreen mode")}</slot>\n  `},O.customElements.get("media-fullscreen-button")||O.customElements.define("media-fullscreen-button",Pr);const{MEDIA_TIME_IS_LIVE:Or,MEDIA_PAUSED:Nr}=r,{MEDIA_SEEK_TO_LIVE_REQUEST:Ur,MEDIA_PLAY_REQUEST:Hr}=e;const Wr=e=>{var t;const n=e.mediaPaused||!e.mediaTimeIsLive,i=I(n?"seek to live":"playing live");e.setAttribute("aria-label",i);const r=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');r&&(r.textContent=I("live")),n?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class $r extends Kn{static get observedAttributes(){return[...super.observedAttributes,Or,Nr]}connectedCallback(){super.connectedCallback(),Wr(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),Wr(this)}get mediaPaused(){return ee(this,r.MEDIA_PAUSED)}set mediaPaused(e){te(this,r.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return ee(this,r.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){te(this,r.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new O.CustomEvent(Ur,{composed:!0,bubbles:!0})),this.hasAttribute(Nr)&&this.dispatchEvent(new O.CustomEvent(Hr,{composed:!0,bubbles:!0})))}}$r.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host { --media-tooltip-display: none; }\n      \n      slot[name=indicator] > *,\n      :host ::slotted([slot=indicator]) {\n        \n        min-width: auto;\n        fill: var(--media-live-button-icon-color, rgb(140, 140, 140));\n        color: var(--media-live-button-icon-color, rgb(140, 140, 140));\n      }\n\n      :host([${Or}]:not([${Nr}])) slot[name=indicator] > *,\n      :host([${Or}]:not([${Nr}])) ::slotted([slot=indicator]) {\n        fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n        color: var(--media-live-button-indicator-color, rgb(255, 0, 0));\n      }\n\n      :host([${Or}]:not([${Nr}])) {\n        cursor: var(--media-cursor, not-allowed);\n      }\n\n      slot[name=text]{\n        text-transform: uppercase;\n      }\n\n    </style>\n\n    <slot name="indicator"><svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg></slot>\n    \n    <slot name="spacer">&nbsp;</slot><slot name="text">${I("live")}</slot>\n  `},O.customElements.get("media-live-button")||O.customElements.define("media-live-button",$r);
1var Vr,jr,Br=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Fr=(e,t,n)=>(Br(e,t,"read from private field"),n?n.call(e):t.get(e)),qr=(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)},Gr=(e,t,n,i)=>(Br(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);const Qr="loadingdelay",Kr="noautohide";class Yr extends O.HTMLElement{constructor(){if(super(),qr(this,Vr,void 0),qr(this,jr,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[t.MEDIA_CONTROLLER,r.MEDIA_PAUSED,r.MEDIA_LOADING,Qr]}attributeChangedCallback(e,n,i){var r,a,o,s,l;e===Qr&&n!==i?this.loadingDelay=Number(i):e===t.MEDIA_CONTROLLER&&(n&&(null==(a=null==(r=Fr(this,Vr))?void 0:r.unassociateElement)||a.call(r,this),Gr(this,Vr,null)),i&&this.isConnected&&(Gr(this,Vr,null==(o=this.getRootNode())?void 0:o.getElementById(i)),null==(l=null==(s=Fr(this,Vr))?void 0:s.associateElement)||l.call(s,this)))}connectedCallback(){var e,n,i;const r=this.getAttribute(t.MEDIA_CONTROLLER);r&&(Gr(this,Vr,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(n=Fr(this,Vr))?void 0:n.associateElement)||i.call(n,this))}disconnectedCallback(){var e,t;null==(t=null==(e=Fr(this,Vr))?void 0:e.unassociateElement)||t.call(e,this),Gr(this,Vr,null)}get loadingDelay(){return Fr(this,jr)}set loadingDelay(e){Gr(this,jr,e);const{style:t}=z(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return ee(this,r.MEDIA_PAUSED)}set mediaPaused(e){te(this,r.MEDIA_PAUSED,e)}get mediaLoading(){return ee(this,r.MEDIA_LOADING)}set mediaLoading(e){te(this,r.MEDIA_LOADING,e)}get mediaController(){return ne(this,t.MEDIA_CONTROLLER)}set mediaController(e){ie(this,t.MEDIA_CONTROLLER,e)}get noAutohide(){return ee(this,Kr)}set noAutohide(e){te(this,Kr,e)}}Vr=new WeakMap,jr=new WeakMap,Yr.shadowRootOptions={mode:"open"},Yr.getTemplateHTML=function(e){return`\n    <style>\n      :host {\n        display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));\n        vertical-align: middle;\n        box-sizing: border-box;\n        --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms);\n      }\n\n      #status {\n        color: rgba(0,0,0,0);\n        width: 0px;\n        height: 0px;\n      }\n\n      :host slot[name=icon] > *,\n      :host ::slotted([slot=icon]) {\n        opacity: var(--media-loading-indicator-opacity, 0);\n        transition: opacity 0.15s;\n      }\n\n      :host([${r.MEDIA_LOADING}]:not([${r.MEDIA_PAUSED}])) slot[name=icon] > *,\n      :host([${r.MEDIA_LOADING}]:not([${r.MEDIA_PAUSED}])) ::slotted([slot=icon]) {\n        opacity: var(--media-loading-indicator-opacity, 1);\n        transition: opacity 0.15s var(--_loading-indicator-delay);\n      }\n\n      :host #status {\n        visibility: var(--media-loading-indicator-opacity, hidden);\n        transition: visibility 0.15s;\n      }\n\n      :host([${r.MEDIA_LOADING}]:not([${r.MEDIA_PAUSED}])) #status {\n        visibility: var(--media-loading-indicator-opacity, visible);\n        transition: visibility 0.15s var(--_loading-indicator-delay);\n      }\n\n      svg, img, ::slotted(svg), ::slotted(img) {\n        width: var(--media-loading-indicator-icon-width);\n        height: var(--media-loading-indicator-icon-height, 100px);\n        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));\n        vertical-align: middle;\n      }\n    </style>\n\n    <slot name="icon">\n<svg aria-hidden="true" viewBox="0 0 100 100">\n  <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">\n    <animateTransform\n       attributeName="transform"\n       attributeType="XML"\n       type="rotate"\n       dur="1s"\n       from="0 50 50"\n       to="360 50 50"\n       repeatCount="indef
1inite" />\n  </path>\n</svg>\n</slot>\n    <div id="status" role="status" aria-live="polite">${I("media loading")}</div>\n  `},O.customElements.get("media-loading-indicator")||O.customElements.define("media-loading-indicator",Yr);const zr='<svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>\n</svg>';const Zr=e=>{const t="off"===e.mediaVolumeLevel,n=I(t?"unmute":"mute");e.setAttribute("aria-label",n)};class Xr extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),Zr(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_VOLUME_LEVEL&&Zr(this)}get mediaVolumeLevel(){return ne(this,r.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){ie(this,r.MEDIA_VOLUME_LEVEL,e)}handleClick(){const t="off"===this.mediaVolumeLevel?e.MEDIA_UNMUTE_REQUEST:e.MEDIA_MUTE_REQUEST;this.dispatchEvent(new O.CustomEvent(t,{composed:!0,bubbles:!0}))}}Xr.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host(:not([${r.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),\n      :host([${r.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {\n        display: none !important;\n      }\n\n      :host(:not([${r.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],\n      :host([${r.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="off"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>\n</svg></slot>\n      <slot name="low">${zr}</slot>\n      <slot name="medium">${zr}</slot>\n      <slot name="high"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>\n</svg></slot>\n    </slot>\n  `},Xr.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-mute">${I("Mute")}</slot>\n    <slot name="tooltip-unmute">${I("Unmute")}</slot>\n  `},O.customElements.get("media-mute-button")||O.customElements.define("media-mute-button",Xr);const Jr='<svg aria-hidden="true" viewBox="0 0 28 24">\n  <path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>\n</svg>';const ea=e=>{const t=e.mediaIsPip?I("exit picture in picture mode"):I("enter picture in picture mode");e.setAttribute("aria-label",t)};class ta extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_IS_PIP,r.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),ea(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_IS_PIP&&ea(this)}get mediaPipUnavailable(){return ne(this,r.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){ie(this,r.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return ee(this,r.MEDIA_IS_PIP)}set mediaIsPip(e){te(this,r.MEDIA_IS_PIP,e)}handleClick(){const t=this.mediaIsPip?e.MEDIA_EXIT_PIP_REQUEST:e.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new O.CustomEvent(t,{composed:!0,bubbles:!0}))}}ta.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${r.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {\n        display: none !important;\n      }\n\n      :host(:not([${r.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_IS_PIP}]) slot[name=tooltip-enter],\n      :host(:not([${r.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="enter">${Jr}</slot>\n      <slot name="exit">${Jr}</slot>\n    </slot>\n  `},ta.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-enter">${I("Enter picture in picture mode")}</slot>\n    <slot name="tooltip-exit">${I("Exit picture in picture mode")}</slot>\n  `},O.customElements.get("media-pip-button")||O.customElements.define("media-pip-button",ta);var na,ia=(e,t,n)=>(((e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)})(e,t,"read from private field"),n?n.call(e):t.get(e));const ra="rates",aa=[1,1.2,1.5,1.7,2];function oa(e){return Math.round(100*e)/100}class sa extends Kn{constructor(){var e;super(),((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)})(this,na,new Ye(this,ra,{defaultValue:aa})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${oa(null!=(e=this.mediaPlaybackRate)?e:1)}x`}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PLAYBACK_RATE,ra]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),e===ra&&(ia(this,na).value=n),e===r.MEDIA_PLAYBACK_RATE){const e=n?+n:Number.NaN,t=oa(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",I("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return ia(this,na)}set rates(e){e?Array.isArray(e)?ia(this,na).value=e.join(" "):"str
1ing"==typeof e&&(ia(this,na).value=e):ia(this,na).value=""}get mediaPlaybackRate(){return X(this,r.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){J(this,r.MEDIA_PLAYBACK_RATE,e)}handleClick(){var t,n;const i=Array.from(ia(this,na).values(),e=>+e).sort((e,t)=>e-t),r=null!=(n=null!=(t=i.find(e=>e>this.mediaPlaybackRate))?t:i[0])?n:1,a=new O.CustomEvent(e.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(a)}}na=new WeakMap,sa.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host {\n        min-width: 5ch;\n        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n      }\n    </style>\n    <slot name="icon">${e.mediaplaybackrate?oa(+e.mediaplaybackrate):1}x</slot>\n  `},sa.getTooltipContentHTML=function(){return I("Playback rate")},O.customElements.get("media-playback-rate-button")||O.customElements.define("media-playback-rate-button",sa);const la=e=>{const t=e.mediaPaused?I("play"):I("pause");e.setAttribute("aria-label",t)};class da extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PAUSED,r.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),la(this)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e!==r.MEDIA_PAUSED&&e!==r.MEDIA_LANG||la(this)}get mediaPaused(){return ee(this,r.MEDIA_PAUSED)}set mediaPaused(e){te(this,r.MEDIA_PAUSED,e)}handleClick(){const t=this.mediaPaused?e.MEDIA_PLAY_REQUEST:e.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new O.CustomEvent(t,{composed:!0,bubbles:!0}))}}da.getSlotTemplateHTML=function(e){return`\n    <style>\n      :host([${r.MEDIA_PAUSED}]) slot[name=pause],\n      :host(:not([${r.MEDIA_PAUSED}])) slot[name=play] {\n        display: none !important;\n      }\n\n      :host([${r.MEDIA_PAUSED}]) slot[name=tooltip-pause],\n      :host(:not([${r.MEDIA_PAUSED}])) slot[name=tooltip-play] {\n        display: none;\n      }\n    </style>\n\n    <slot name="icon">\n      <slot name="play"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="m6 21 15-9L6 3v18Z"/>\n</svg></slot>\n      <slot name="pause"><svg aria-hidden="true" viewBox="0 0 24 24">\n  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>\n</svg></slot>\n    </slot>\n  `},da.getTooltipContentHTML=function(){return`\n    <slot name="tooltip-play">${I("Play")}</slot>\n    <slot name="tooltip-pause">${I("Pause")}</slot>\n  `},O.customElements.get("media-play-button")||O.customElements.define("media-play-button",da);const ca="placeholdersrc",ua="src";class ha extends O.HTMLElement{static get observedAttributes(){return[ca,ua]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,n){e===ua&&(null==n?this.image.removeAttribute(ua):this.image.setAttribute(ua,n)),e===ca&&(null==n?this.image.style.removeProperty("background-image"):((e,t)=>{e.style["background-image"]=`url('${t}')`})(this.image,n))}get placeholderSrc(){return ne(this,ca)}set placeholderSrc(e){ie(this,ua,e)}get src(){return ne(this,ua)}set src(e){ie(this,ua,e)}}ha.shadowRootOptions={mode:"open"},ha.getTemplateHTML=function(e){return'\n    <style>\n      :host {\n        pointer-events: none;\n        display: var(--media-poster-image-display, inline-block);\n        box-sizing: border-box;\n      }\n\n      img {\n        max-width: 100%;\n        max-height: 100%;\n        min-width: 100%;\n        min-height: 100%;\n        background-repeat: no-repeat;\n        background-position: var(--media-poster-image-background-position, var(--media-object-position, center));\n        background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));\n        object-fit: var(--media-object-fit, contain);\n        object-position: var(--media-object-position, center);\n      }\n    </style>\n\n    <img part="poster img" aria-hidden="true" id="image"/>\n  '},O.customElements.get("media-poster-image")||O.customElements.define("media-poster-image",ha);var ma,pa=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};class va extends mr{constructor(){var e,t,n,i;super(),((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)})(this,ma,void 0),e=this,t=ma,n=this.shadowRoot.querySelector("slot"),pa(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PREVIEW_CHAPTER,r.MEDIA_LA
1NG]}attributeChangedCallback(e,t,n){if(super.attributeChangedCallback(e,t,n),(e===r.MEDIA_PREVIEW_CHAPTER||e===r.MEDIA_LANG)&&n!==t&&null!=n)if((i=this,a=ma,pa(i,a,"read from private field"),o?o.call(i):a.get(i)).textContent=n,""!==n){const e=I("chapter: {chapterName}",{chapterName:n});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext");var i,a,o}get mediaPreviewChapter(){return ne(this,r.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){ie(this,r.MEDIA_PREVIEW_CHAPTER,e)}}ma=new WeakMap,O.customElements.get("media-preview-chapter-display")||O.customElements.define("media-preview-chapter-display",va);var Ea,ga=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},fa=(e,t,n)=>(ga(e,t,"read from private field"),n?n.call(e):t.get(e)),ba=(e,t,n,i)=>(ga(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class ya extends O.HTMLElement{constructor(){if(super(),((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)})(this,Ea,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=j(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[t.MEDIA_CONTROLLER,r.MEDIA_PREVIEW_IMAGE,r.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,n,i;const r=this.getAttribute(t.MEDIA_CONTROLLER);r&&(ba(this,Ea,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(n=fa(this,Ea))?void 0:n.associateElement)||i.call(n,this))}disconnectedCallback(){var e,t;null==(t=null==(e=fa(this,Ea))?void 0:e.unassociateElement)||t.call(e,this),ba(this,Ea,null)}attributeChangedCallback(e,n,i){var a,o,s,l,d;[r.MEDIA_PREVIEW_IMAGE,r.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===t.MEDIA_CONTROLLER&&(n&&(null==(o=null==(a=fa(this,Ea))?void 0:a.unassociateElement)||o.call(a,this),ba(this,Ea,null)),i&&this.isConnected&&(ba(this,Ea,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(d=null==(l=fa(this,Ea))?void 0:l.associateElement)||d.call(l,this)))}get mediaPreviewImage(){return ne(this,r.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ie(this,r.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(r.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){e?this.setAttribute(r.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(r.MEDIA_PREVIEW_COORDS)}update(){const e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!e||!t)return;const[n,i,r,a]=e,o=t.split("#")[0],s=getComputedStyle(this),{maxWidth:l,maxHeight:d,minWidth:c,minHeight:u}=s;let h,m;if("fill"===(s.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain")){const e=parseInt(l)/r,t=parseInt(d)/a,n=parseInt(c)/r,i=parseInt(u)/a;h=e<1?e:Math.max(e,n),m=t<1?t:Math.max(t,i)}else{const e=Math.min(parseInt(l)/r,parseInt(d)/a),t=Math.max(parseInt(c)/r,parseInt(u)/a),n=e<1?e:t>1?t:1;h=n,m=n}const{style:p}=z(this.shadowRoot,":host"),v=z(this.shadowRoot,"img").style,E=this.shadowRoot.querySelector("img"),g=Math.min(h,m)<1?"min":"max";p.setProperty(`${g}-width`,"initial","important"),p.setProperty(`${g}-height`,"initial","important"),p.width=r*h+"px",p.height=a*m+"px";const f=()=>{v.width=this.imgWidth*h+"px",v.height=this.imgHeight*m+"px",v.display="block"};E.src!==o&&(E.onload=()=>{this.imgWidth=E.naturalWidth,this.imgHeight=E.naturalHeight,f(),E.onload=null},E.src=o,f()),f(),v.transform=`translate(-${n*h}px, -${i*m}px)`}}Ea=new WeakMap,ya.shadowRootOptions={mode:"open"},ya.getTemplateHTML=function(e){return'\n    <style>\n      :host {\n        box-sizing: border-box;\n        display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));\n        overflow: hidden;\n      }\n\n      img {\n        display: none;\n        position: relative;\n      }\n    </style>\n    <img crossorigin loading="eager" decoding="async">\n  '},O.customElements.get("media-preview-thumbnail")||O.customElements.define("media-preview-thumbnail",ya);var wa,Aa=ya,_a=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ia=(e,t,n)=>(_a(e,t,"read from private field"),n?n.call(e):t.get(e));class ka extends mr{constructor(){var e,t,n,i;super(),((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)})(this,wa,void 0),e=this,t=wa,n=this.shadowRoot.querySelector("slot"),_a(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),Ia(this,wa).textContent=S(0)}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_PREVIEW_TIME&&null!=n&&(Ia(this,wa).textContent=S(parseFloat(n)))}get mediaPreviewTime(){return X(this,r.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){J(this,r.MEDIA_PREVIEW_TIME,e)}}wa=new WeakMap,O.customElements.get("media-preview-time-display")||O.customElements.define("media-preview-time-display",ka);const Ta="seekoffset";class Sa extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_CURRENT_TIME,Ta]}connectedCallback(){super.connectedCallback(),this.seekOffset=X(this,Ta,30)}attributeChangedCallback(e,t,n){var i,r;super.attributeChangedCallback(e,t,n),i=this,r=this.seekOffset,i.setAttribute("aria-label",I("seek back {seekOffset} seconds",{seekOffset:r})),e===Ta&&(this.seekOffset=X(this,Ta,30))}get seekOffset(){return X(this,Ta,30)}set seekOffset(e){J(this,Ta,e),this.setAttribute("aria-label",I("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),F(q(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return X(this,r.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){J(this,r.MEDIA_CURRENT_TIME,e)}handleClick(){const t=Math.max(this.mediaCurrentTime-this.seekOffset,0),n=new O.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}}Sa.getSlotTemplateHTML=function(e,t){return`\n    <slot name="icon">${n=t.seekOffset,`\n  <svg aria-hidden="true" viewBox="0 0 20 24">\n    <defs>\n      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>\n    </defs>\n    <text class="text value" transform="translate(2.18 19.87)">${n}</text>\n    <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"/>\n  </svg>`}</slot>\n  `;var n},Sa.getTooltipContentHTML=function(){return I("Seek backward")},O.customElements.get("media-seek-backward-button")||O.customElements.define("media-seek-backward-button",S
1a);const Ma="seekoffset";class Ra extends Kn{static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_CURRENT_TIME,Ma]}connectedCallback(){super.connectedCallback(),this.seekOffset=X(this,Ma,30)}attributeChangedCallback(e,t,n){var i,r;super.attributeChangedCallback(e,t,n),i=this,r=this.seekOffset,i.setAttribute("aria-label",I("seek forward {seekOffset} seconds",{seekOffset:r})),e===Ma&&(this.seekOffset=X(this,Ma,30))}get seekOffset(){return X(this,Ma,30)}set seekOffset(e){J(this,Ma,e),this.setAttribute("aria-label",I("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),F(q(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return X(this,r.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){J(this,r.MEDIA_CURRENT_TIME,e)}handleClick(){const t=this.mediaCurrentTime+this.seekOffset,n=new O.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}}Ra.getSlotTemplateHTML=function(e,t){return`\n    <slot name="icon">${n=t.seekOffset,`\n  <svg aria-hidden="true" viewBox="0 0 20 24">\n    <defs>\n      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>\n    </defs>\n    <text class="text value" transform="translate(8.9 19.87)">${n}</text>\n    <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"/>\n  </svg>`}</slot>\n  `;var n},Ra.getTooltipContentHTML=function(){return I("Seek forward")},O.customElements.get("media-seek-forward-button")||O.customElements.define("media-seek-forward-button",Ra);var Ca,La,Da,xa,Pa,Oa,Na,Ua,Ha,Wa,$a,Va=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ja=(e,t,n)=>(Va(e,t,"read from private field"),n?n.call(e):t.get(e)),Ba=(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)},Fa=(e,t,n,i)=>(Va(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),qa=(e,t,n)=>(Va(e,t,"access private method"),n);const Ga={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Qa=[...Object.values(Ga),r.MEDIA_CURRENT_TIME,r.MEDIA_DURATION,r.MEDIA_SEEKABLE],Ka=["Enter"," "],Ya=(e,{timesSep:t="&nbsp;/&nbsp;"}={})=>{var n,i;const r=null!=(n=e.mediaCurrentTime)?n:0,[,a]=null!=(i=e.mediaSeekable)?i:[];let o=0;Number.isFinite(e.mediaDuration)?o=e.mediaDuration:Number.isFinite(a)&&(o=a);const s=e.remaining?S(0-(o-r)):S(r);return e.showDuration?`${s}${t}${S(o)}`:s};class za extends mr{constructor(){super(),Ba(this,xa),Ba(this,Oa),Ba(this,Ua),Ba(this,Wa),Ba(this,Ca,void 0),Ba(this,La,null),Ba(this,Da,e=>{const{metaKey:t,altKey:n,key:i}=e;t||n||!Ka.includes(i)?this.removeEventListener("keyup",ja(this,La)):this.addEventListener("keyup",ja(this,La))}),Fa(this,Ca,this.shadowRoot.querySelector("slot")),ja(this,Ca).innerHTML=`${Ya(this)}`}static get observedAttributes(){return[...super.observedAttributes,...Qa,"disabled"]}connectedCallback(){const{style:e}=z(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",I("playback time")),qa(this,Ua,Ha).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),qa(this,Oa,Na).call(this),super.disconnectedCallback()}attributeChangedCallback(e,t,n){this.setAttribute("aria-label",I("playback time")),Qa.includes(e)?this.update():"disabled"===e&&n!==t?null==n?qa(this,Ua,Ha).call(this):qa(this,Wa,$a).call(this):e===Ga.NO_TOGGLE&&n!==t&&(this.noToggle?qa(this,Wa,$a).call(this):qa(this,Ua,Ha).call(this)),super.attributeChangedCallback(e,t,n)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return ee(this,Ga.REMAINING)}set remaining(e){te(this,Ga.REMAINING,e)}get showDuration(){return ee(this,Ga.SHOW_DURATION)}set showDuration(e){te(this,Ga.SHOW_DURATION,e)}get noToggle(){return ee(this,Ga.NO_TOGGLE)}set noToggle(e){te(this,Ga.NO_TOGGLE,e)}get mediaDuration(){return X(this,r.MEDIA_DURATION)}set mediaDuration(e){J(this,r.MEDIA_DURATION,e)}get mediaCurrentTime(){return X(this,r.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){J(this,r.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(r.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null!=e?this.setAttribute(r.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(r.MEDIA_SEEKABLE)}update(){const e=Ya(this);(e=>{var t;const n=e.mediaCurrentTime,[,i]=null!=(t=e.mediaSeekable)?t:[];let r=null;if(Number.isFinite(e.mediaDuration)?r=e.mediaDuration:Number.isFinite(i)&&(r=i),null==n||null===r)return void e.setAttribute("aria-description",I("video not loaded, unknown time."));const a=e.remaining?T(0-(r-n)):T(n);if(!e.showDuration)return void e.setAttribute("aria-description",a);const o=T(r),s=I("{currentTime} of {totalTime}",{currentTime:a,totalTime:o});e.setAttribute("aria-description",s)})(this),e!==ja(this,Ca).innerHTML&&(ja(this,Ca).innerHTML=e)}}Ca=new WeakMap,La=new WeakMap,Da=new WeakMap,xa=new WeakSet,Pa=function(){ja(this,La)||(Fa(this,La,e=>{const{key:t}=e;Ka.includes(t)?this.toggleTimeDisplay():this.removeEventListener("keyup",ja(this,La))}),this.addEventListener("keydown",ja(this,Da)),this.addEventListener("click",this.toggleTimeDisplay))},Oa=new WeakSet,Na=function(){ja(this,La)&&(this.removeEventListener("keyup",ja(this,La)),this.removeEventListener("keydown",ja(this,Da)),this.removeEventListener("click",this.toggleTimeDisplay),Fa(this,La,null))},Ua=new WeakSet,Ha=function(){this.noToggle||this.hasAttribute("disabled")||(this.setAttribute("role","button"),this.enable(),qa(this,xa,Pa).call(this))},Wa=new WeakSet,$a=function(){this.removeAttribute("role"),this.disable(),qa(this,Oa,Na).call(this)},za.getSlotTemplateHTML=function(e,t){return`\n    <slot>${Ya(t)}</slot>\n  `},O.customElements.get("media-time-display")||O.customElements.define("media-time-display",za);var Za,Xa,Ja,eo,to,no,io,ro,ao,oo,so=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},lo=(e,t,n)=>(so(e,t,"read from private field"),n?n.call(e):t.get(e)),co=(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)},uo=(e,t,n,i)=>(so(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);class ho{constructor(e,t,n){co(this,Za,void 0),co(this,Xa,void 0),co(this,Ja,void 0),co(this,eo,void 0),co(this,to,void 0),co(this,no,void 0),co(this,io,void 0),co(this,ro,void 0),co(this,ao,0),co(this,oo,(e=performance.now())=>{uo(this,ao,requestAnimationFrame(lo(this,oo))),uo(this,eo,performance.now()-lo(this,Ja));const t=1e3/this.fps;if(lo(this,eo)>t){uo(this,Ja,e-lo(this,eo)%t);const o=1e3/((e-lo(this,Xa))/++(n=this,i=to,{set _(e){uo(n,i,e,r)},get _(){return lo(n,i,a)}})._),s=(e-lo(this,no))/1e3/this.duration;let l=lo(this,io)+s*this.playbackRate;l-lo(this,Za).valueAsNumber>0?uo(this,ro,this.playbackRate/this.duration/o):(uo(this,ro,.995*lo(this,ro)),l=lo(this,Za).valueAsNumber+lo(this,ro)),this.callback(l)}var n,i,r,a}),uo(this,Za,e),this.callback=t,this.fps=n}start(){0===lo(this,ao)&&(uo(this,Ja,performance.now()),uo(this,Xa,lo(this,Ja)),uo(this,to,0),lo(this,oo).call(this))}stop(){0!==lo(this,ao)&&(cancelAnimationFrame(lo(this,ao)),uo(this,ao,0))}update({start:e,duration:t,playbackRate:n}){const i=e-lo(this,Za).valueAsNumber,r=Math.abs(t-this.duration);(i>0||i<-.03||r>=.5)&&this.callback(e),uo(this,io,e),uo(this,no,performance.now()),this.duration=t,this.playbackRate=n}}Za=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,eo=new WeakMap,to=new WeakMap,no=new WeakMap,io=new WeakMap,ro=new WeakMap,ao=new WeakMap,oo=new WeakMap;var mo,po,vo,Eo,go,fo,bo,yo,wo,Ao,_o,Io,ko,To,So,Mo,Ro,Co,Lo,Do,xo,Po,Oo,No,Uo,Ho,Wo=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},$o=(e,t,n)=>(Wo(e,t,"read from private field"),n?n.call(e):t.get(e)),Vo=(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)},jo=(e,t,n,i)=>(Wo(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Bo=(e,t,n)=>(Wo(e,t,"access private method"),n);const Fo=(e,t=e.mediaCurrentTime)=>{const n=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,i=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;if(Number.isNaN(i))return 0;const r=(t-n)/(i-n);return Math.max(0,Math.min(r,1))},qo=(e,t=e.range.valueAsNumber)=>{const n=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,i=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(i)?0:t*(i-n)+n};class Go extends ir{constructor(){super(),Vo(this,Io),Vo(this,So),Vo(this,Ro),Vo(this,Lo),Vo(this,xo),Vo(this,Oo),Vo(this,Uo),Vo(this,mo,null),Vo(this,po,void 0),Vo(this,vo,void 0),Vo(this,Eo,void 0),Vo(this,go,void 0),Vo(this,fo,void 0),Vo(this,bo,void 0),Vo(this,yo,void 0),Vo(this,wo,void 0),Vo(this,Ao,void 0),Vo(this,_o,()=>{Bo(this,Io,ko).call(this)?$o(this,po).start():$o(this,po).stop()}),Vo(this,To,e=>{this.dragging||(b(e)&&(this.range.valueAsNumber=e),$o(this,Ao)||this.updateBar())});this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),jo(this,vo,this.shadowRoot.querySelectorAll('[part~="box"]')),jo(this,go,this.shadowRoot.querySelector('[part~="preview-box"]')),jo(this,fo,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);
1jo(this,bo,parseInt(e.getPropertyValue("--media-box-padding-left"))),jo(this,yo,parseInt(e.getPropertyValue("--media-box-padding-right"))),jo(this,po,new ho(this.range,$o(this,To),60))}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_PAUSED,r.MEDIA_DURATION,r.MEDIA_SEEKABLE,r.MEDIA_CURRENT_TIME,r.MEDIA_PREVIEW_IMAGE,r.MEDIA_PREVIEW_TIME,r.MEDIA_PREVIEW_CHAPTER,r.MEDIA_BUFFERED,r.MEDIA_PLAYBACK_RATE,r.MEDIA_LOADING,r.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",I("seek")),$o(this,_o).call(this),jo(this,mo,this.getRootNode()),null==(e=$o(this,mo))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),$o(this,po).stop(),null==(e=$o(this,mo))||e.removeEventListener("transitionstart",this),jo(this,mo,null)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),t!=n&&(e===r.MEDIA_CURRENT_TIME||e===r.MEDIA_PAUSED||e===r.MEDIA_ENDED||e===r.MEDIA_LOADING||e===r.MEDIA_DURATION||e===r.MEDIA_SEEKABLE?($o(this,po).update({start:Fo(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),$o(this,_o).call(this),(e=>{const t=e.range,n=T(+qo(e)),i=T(+e.mediaSeekableEnd),r=n&&i?I("{currentTime} of {totalTime}",{currentTime:n,totalTime:i}):I("video not loaded, unknown time.");t.setAttribute("aria-valuetext",r)})(this)):e===r.MEDIA_BUFFERED&&this.updateBufferedBar(),e!==r.MEDIA_DURATION&&e!==r.MEDIA_SEEKABLE||(this.mediaChaptersCues=$o(this,wo),this.updateBar()))}get mediaChaptersCues(){return $o(this,wo)}set mediaChaptersCues(e){var t;jo(this,wo,e),this.updateSegments(null==(t=$o(this,wo))?void 0:t.map(e=>({start:Fo(this,e.startTime),end:Fo(this,e.endTime)})))}get mediaPaused(){return ee(this,r.MEDIA_PAUSED)}set mediaPaused(e){te(this,r.MEDIA_PAUSED,e)}get mediaLoading(){return ee(this,r.MEDIA_LOADING)}set mediaLoading(e){te(this,r.MEDIA_LOADING,e)}get mediaDuration(){return X(this,r.MEDIA_DURATION)}set mediaDuration(e){J(this,r.MEDIA_DURATION,e)}get mediaCurrentTime(){return X(this,r.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){J(this,r.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return X(this,r.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){J(this,r.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(r.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(r.MEDIA_BUFFERED);const t=e.map(e=>e.join(":")).join(" ");this.setAttribute(r.MEDIA_BUFFERED,t)}get mediaSeekable(){const e=this.getAttribute(r.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null!=e?this.setAttribute(r.MEDIA_SEEKABLE,e.join(":")):this.removeAttribute(r.MEDIA_SEEKABLE)}get mediaSeekableEnd(){var e;const[,t=this.mediaDuration]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaSeekableStart(){var e;const[t=0]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaPreviewImage(){return ne(this,r.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){ie(this,r.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return X(this,r.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){J(this,r.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return ee(this,r.MEDIA_ENDED)}set mediaEnded(e){te(this,r.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const t=this.mediaBuffered;if(!t.length)return;let n;if(this.mediaEnded)n=1;else{const i=this.mediaCurrentTime,[,r=this.mediaSeekableStart]=null!=(e=t.find(([e,t])=>e<=i&&i<=t))?e:[];n=Fo(this,r)}const{style:i}=z(this.shadowRoot,"#buffered");i.setProperty("width",100*n+"%")}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const e=z(this.shadowRoot,"#current-rail"),t=z(this.shadowRoot,'[part~="current-box"]'),n=Bo(this,So,Mo).call(this,$o(this,fo)),i=Bo(this,Ro,Co).call(this,n,this.range.valueAsNumber),r=Bo(this,Lo,Do).call(this,n,this.range.valueAsNumber);e.style.transform=`translateX(${i})`,e.style.setProperty("--_range-width",`${n.range.width}`),t.style.setProperty("--_box-shift",`${r}`),t.style.setProperty("--_box-width",`${n.box.width}px`),t.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":Bo(this,Uo,Ho).call(this);break;case"pointermove":Bo(this,xo,Po).call(this,e);break;case"pointerup":$o(this,Ao)&&jo(this,Ao,!1);break;case"pointerdown":jo(this,Ao,!0);break;case"pointerleave":Bo(this,Oo,No).call(this,null);break;case"transitionstart":G(e.target,this)&&setTimeout(()=>
1$o(this,_o).call(this),0)}}}mo=new WeakMap,po=new WeakMap,vo=new WeakMap,Eo=new WeakMap,go=new WeakMap,fo=new WeakMap,bo=new WeakMap,yo=new WeakMap,wo=new WeakMap,Ao=new WeakMap,_o=new WeakMap,Io=new WeakSet,ko=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&Y(this)},To=new WeakMap,So=new WeakSet,Mo=function(e){var t;const n=(null!=(t=this.getAttribute("bounds")?Q(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),i=this.range.getBoundingClientRect(),r=e.offsetWidth;return{box:{width:r,min:-(i.left-n.left-r/2),max:n.right-i.left-r/2},bounds:n,range:i}},Ro=new WeakSet,Co=function(e,t){let n=100*t+"%";const{width:i,min:r,max:a}=e.box;if(!i)return n;if(!Number.isNaN(r)){n=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + ${"var(--media-box-padding-left)"})`}, ${n})`}if(!Number.isNaN(a)){n=`min(${n}, ${`calc(1 / var(--_range-width) * 100 * ${a}% - ${"var(--media-box-padding-right)"})`})`}return n},Lo=new WeakSet,Do=function(e,t){const{width:n,min:i,max:r}
1=e.box,a=t*e.range.width;if(a<i+$o(this,bo)){return`${a-n/2+(e.range.left-e.bounds.left-$o(this,bo))}px`}if(a>r-$o(this,yo)){return a+n/2-(e.bounds.right-e.range.right-$o(this,yo))-e.range.width+"px"}return 0},xo=new WeakSet,Po=function(e){const t=[...$o(this,vo)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void Bo(this,Oo,No).call(this,null);const n=this.mediaSeekableEnd;if(!n)return;const i=z(this.shadowRoot,"#preview-rail"),r=z(this.shadowRoot,'[part~="preview-box"]'),a=Bo(this,So,Mo).call(this,$o(this,go));let o=(e.clientX-a.range.left)/a.range.width;o=Math.max(0,Math.min(1,o));const s=Bo(this,Ro,Co).call(this,a,o),l=Bo(this,Lo,Do).call(this,a,o);i.style.transform=`translateX(${s})`,i.style.setProperty("--_range-width",`${a.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${a.box.width}px`);const d=Math.round($o(this,Eo))-Math.round(o*n);Math.abs(d)<1&&o>.01&&o<.99||(jo(this,Eo,o*n),Bo(this,Oo,No).call(this,$o(this,Eo)))},Oo=new WeakSet,No=function(t){this.dispatchEvent(new O.CustomEvent(e.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))},Uo=new WeakSet,Ho=function(){$o(this,po).stop();const t=qo(this);this.dispatchEvent(new O.CustomEvent(e.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))},Go.shadowRootOptions={mode:"open"},Go.getContainerTemplateHTML=function(e){return`\n    <style>\n      :host {\n        --media-box-border-radius: 4px;\n        --media-box-padding-left: 10px;\n        --media-box-padding-right: 10px;\n        --media-preview-border-radius: var(--media-box-border-radius);\n        --media-box-arrow-offset: var(--media-box-border-radius);\n        --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));\n        --_preview-background: var(--media-preview-background, var(--_control-background));\n\n        \n        contain: layout;\n      }\n\n      #buffered {\n        background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));\n        position: absolute;\n        height: 100%;\n        will-change: width;\n      }\n\n      #preview-rail,\n      #current-rail {\n        width: 100%;\n        position: absolute;\n        left: 0;\n        bottom: 100%;\n        pointer-events: none;\n        will-change: transform;\n      }\n\n      [part~="box"] {\n        width: min-content;\n        \n        position: absolute;\n        bottom: 100%;\n        flex-direction: column;\n        align-items: center;\n        transform: translateX(-50%);\n      }\n\n      [part~="current-box"] {\n        display: var(--media-current-box-display, var(--media-box-display, flex));\n        margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));\n        visibility: hidden;\n      }\n\n      [part~="preview-box"] {\n        display: var(--media-preview-box-display, var(--media-box-display, flex));\n        margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));\n        transition-property: var(--media-preview-transition-property, visibility, opacity);\n        transition-duration: var(--media-preview-transition-duration-out, .25s);\n        transition-delay: var(--media-preview-transition-delay-out, 0s);\n        visibility: hidden;\n        opacity: 0;\n      }\n\n      :host(:is([${r.MEDIA_PREVIEW_IMAGE}], [${r.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {\n        transition-duration: var(--media-preview-transition-duration-in, .5s);\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        visibility: visible;\n        opacity: 1;\n      }\n\n      @media (hover: hover) {\n        :host(:is([${r.MEDIA_PREVIEW_IMAGE}], [${r.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {\n          transition-duration: var(--media-preview-transition-duration-in, .5s);\n          transition-delay: var(--media-preview-transition-delay-in, .25s);\n          visibility: visible;\n          opacity: 1;\n        }\n      }\n\n      media-preview-thumbnail,\n      ::slotted(media-preview-thumbn
1ail) {\n        visibility: hidden;\n        \n        transition: visibility 0s .25s;\n        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n        background: var(--media-preview-thumbnail-background, var(--_preview-background));\n        box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));\n        max-width: var(--media-preview-thumbnail-max-width, 180px);\n        max-height: var(--media-preview-thumbnail-max-height, 160px);\n        min-width: var(--media-preview-thumbnail-min-width, 120px);\n        min-height: var(--media-preview-thumbnail-min-height, 80px);\n        border: var(--media-preview-thumbnail-border);\n        border-radius: var(--media-preview-thumbnail-border-radius,\n          var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);\n      }\n\n      :host([${r.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,\n      :host([${r.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        visibility: visible;\n      }\n\n      @media (hover: hover) {\n        :host([${r.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,\n        :host([${r.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {\n          transition-delay: var(--media-preview-transition-delay-in, .25s);\n          visibility: visible;\n        }\n\n        :host([${r.MEDIA_PREVIEW_TIME}]:hover) {\n          --media-time-range-hover-display: block;\n        }\n      }\n\n      media-preview-chapter-display,\n      ::slotted(media-preview-chapter-display) {\n        font-size: var(--media-font-size, 13px);\n        line-height: 17px;\n        min-width: 0;\n        visibility: hidden;\n        \n        transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;\n        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n        background: var(--media-preview-chapter-background, var(--_preview-background));\n        border-radius: var(--media-preview-chapter-border-radius,\n          var(--media-preview-border-radius) var(--media-preview-border-radius)\n          var(--media-preview-border-radius) var(--media-preview-border-radius));\n        padding: var(--media-preview-chapter-padding, 3.5px 9px);\n        margin: var(--media-preview-chapter-margin, 0 0 5px);\n        text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n      }\n\n      :host([${r.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,\n      :host([${r.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        border-radius: var(--media-preview-chapter-border-radius, 0);\n        padding: var(--media-preview-chapter-padding, 3.5px 9px 0);\n        margin: var(--media-preview-chapter-margin, 0);\n        min-width: 100%;\n      }\n\n      media-preview-chapter-display[${r.MEDIA_PREVIEW_CHAPTER}],\n      ::slotted(media-preview-chapter-display[${r.MEDIA_PREVIEW_CHAPTER}]) {\n        visibility: visible;\n      }\n\n      media-preview-chapter-display:not([aria-valuetext]),\n      ::slotted(media-preview-chapter-display:not([aria-valuetext])) {\n        display: none;\n      }\n\n      media-preview-time-display,\n      ::slotted(media-preview-time-display),\n      media-time-display,\n      ::slotted(media-time-display) {\n        font-size: var(--media-font-size, 13px);\n        line-height: 17px;\n        min-width: 0;\n        \n        transition: min-width 0s, border-radius 0s;\n        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));\n        background: var(--media-preview-time-background, var(--_preview-background));\n        border-radius: var(--media-preview-time-border-radius,\n          var(--media-preview-border-radius) var(--media-preview-border-radius)\n          var(--media-preview-border-radius) var(--media-preview-border-radius));\n        padding: var(--media-preview-time-padding, 3.5px 9px);\n        margin: var(--media-preview-time-margin, 0);\n        text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));\n        transform: translateX(min(\n          max(calc(50% - var(--_box-width) / 2),\n          calc(var(--_box-shift, 0))),\n          calc(var(--_box-width) / 2 - 50%)\n        ));\n      }\n\n      :host([${r.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,\n      :host([${r.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {\n        transition-delay: var(--media-preview-transition-delay-in, .25s);\n        border-radius: var(--media-preview-time-border-radius,\n          0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));\n        min-width: 100%;\n      }\n\n      :host([${r.MEDIA_PREVIEW_TIME}]:hover) {\n        --media-time-range-hover-display: block;\n      }\n\n      [part~="arrow"],\n      ::slotted([part~="arrow"]) {\n        display: var(--media-box-arrow-display, inline-block);\n        transform: translateX(min(\n          max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),\n          calc(var(--_box-shift, 0))),\n          calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))\n        ));\n        \n        border-color: transparent;\n        border-top-color: var(--media-box-arrow-background, var(--_control-background));\n        border-width: var(--media-box-arrow-border-width,\n          var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);\n        border-style: solid;\n        justify-content: center;\n        height: 0;\n      }\n    </style>\n    <div id="preview-rail">\n      <slot name="preview" part="box preview-box">
1\n        <media-preview-thumbnail>\n          <template shadowrootmode="${Aa.shadowRootOptions.mode}">\n            ${Aa.getTemplateHTML({})}\n          </template>\n        </media-preview-thumbnail>\n        <media-preview-chapter-display></media-preview-chapter-display>\n        <media-preview-time-display></media-preview-time-display>\n        <slot name="preview-arrow"><div part="arrow"></div></slot>\n      </slot>\n    </div>\n    <div id="current-rail">\n      <slot name="current" part="box current-box">\n        \n      </slot>\n    </div>\n  `},O.customElements.get("media-time-range")||O.customElements.define("media-time-range",Go);var Qo,Ko=(e,t,n)=>(((e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)})(e,t,"read from private field"),n?n.call(e):t.get(e));class Yo extends ir{constructor(){super(...arguments),((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)})(this,Qo,()=>{const t=this.range.value,n=new O.CustomEvent(e.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)})}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_VOLUME,r.MEDIA_MUTED,r.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",I("volume")),this.range.addEventListener("input",Ko(this,Qo))}disconnectedCallback(){this.range.removeEventListener("input",Ko(this,Qo)),super.disconnectedCallback()}attributeChangedCallback(e,t,n){var i,a;super.attributeChangedCallback(e,t,n),e!==r.MEDIA_VOLUME&&e!==r.MEDIA_MUTED||(this.range.valueAsNumber=(a=this).mediaMuted?0:a.mediaVolume,this.range.setAttribute("aria-valuetext",(i=this.range.valueAsNumber,`${Math.round(100*i)}%`)),this.updateBar())}
1get mediaVolume(){return X(this,r.MEDIA_VOLUME,1)}set mediaVolume(e){J(this,r.MEDIA_VOLUME,e)}get mediaMuted(){return ee(this,r.MEDIA_MUTED)}set mediaMuted(e){te(this,r.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ne(this,r.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){ie(this,r.MEDIA_VOLUME_UNAVAILABLE,e)}}Qo=new WeakMap,O.customElements.get("media-volume-range")||O.customElements.define("media-volume-range",Yo);class zo extends Kn{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,r.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=I("Loop"))}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===r.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return ee(this,r.MEDIA_LOOP)}set mediaLoop(e){te(this,r.MEDIA_LOOP,e)}handleClick(){const t=!this.mediaLoop,n=new O.CustomEvent(e.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}}zo.getSlotTemplateHTML=function(e){return`\n      <style>\n        :host {\n          min-width: 4ch;\n          padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));\n          width: 100%;\n          display: grid;\n          grid-template-columns: 1fr auto;\n          gap: 1rem;\n          font-weight: var(--media-button-font-weight, normal);\n        }\n\n        #checked-indicator {\n          display: none;\n        }\n\n        :host([${r.MEDIA_LOOP}]) #checked-indicator {\n          display: block;\n        }\n      </style>\n      \n      <span id="icon">\n     </span>\n\n      <div id="checked-indicator">\n        <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">\n          <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>\n        </svg>\n      </div>\n    `},zo.getTooltipContentHTML=function(){return I("Loop")},O.customElements.get("media-loop-button")||O.customElements.define("media-loop-button",zo)},311:function(e){"use strict";e.exports=function(e,t,n,i,r,a,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[n,i,r,a,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return d[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},626:function(e,t,n){"use strict";n.r(t);var i=n(20);"https:"!==window.location.protocol&&"localhost"!==window.location.hostname?console.error("Service workers can only be used over HTTPS, or on localhost for development"):"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(function(e){e.addEventListener("updatefound",()=>{(0,i.N)("onServiceWorkerUpdateFound",{serviceWorker:e});const t=e.installing;console.log("installingWorker",t),t.addEventListener("statechange",()=>{switch(t.state){case"installed":navigator.serviceWorker.controller?(window.___swUpdated=!0,(0,i.N)("onServiceWorkerUpdateReady",{serviceWorker:e}),window.___failedResources&&(console.log("resources failed, SW updated - reloading"),window.location.reload())):(console.log("Content is now available offline!"),(0,i.N)("onServiceWorkerInstalled",{serviceWorker:e}));break;case"redundant":console.error("The installing service worker became redundant."),(0,i.N)("onServiceWorkerRedundant",{serviceWorker:e});break;case"activated":(0,i.N)("onServiceWorkerActive",{serviceWorker:e})}})})}).catch(function(e){console.error("Error during service worker registration:",e)})},700:function(e,t){t.U=()=>""},963:function(e,t,n){"use strict";n.r(t);var i=n(6540),r=n(6814),a=n(8428);t.default=e=>{let{location:t}=e;const n=r.Ay.loadPageSync(t.pathname);return n?i.createElement(a.A,{location:t,pageResources:n,...n.json}):null}},2024:function(e,t,n){"use strict";n.d(t,{Jr:function(){return o},dd:function(){return r},hr:function(){return s},j$:function(){return a}});var i=n(6540);const r=i.createContext({}),a=i.createContext({}),o=i.createContext({}),s=i.createContext({})},2311:function(e,t,n){"use strict";t.__esModule=!0,t.onInitialClientRender=void 0;n(5535),n(9300);t.onInitialClientRender=()=>{}},2475:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},2549:function(e,t,n){var i;e.exports=(i=n(963))&&i.default||i},3215:function(e,t,n){"use strict";var i=n(4994);
1t.__esModule=!0,t.ScrollHandler=t.ScrollContext=void 0;var r=i(n(2475)),a=i(n(6221)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(i,a,o):i[a]=e[a]}i.default=e,n&&n.set(e,i);return i}(n(6540)),s=i(n(5556)),l=n(4351);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}var c=o.createContext(new l.SessionStorage);t.ScrollContext=c,c.displayName="GatsbyScrollContext";var u=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(t=e.call.apply(e,[this].concat(i))||this)._stateStorage=new l.SessionStorage,t._isTicking=!1,t._latestKnownScrollY=0,t.scrollListener=function(){t._latestKnownScrollY=window.scrollY,t._isTicking||(t._isTicking=!0,requestAnimationFrame(t._saveScroll.bind((0,r.default)(t))))},t.windowScroll=function(e,n){t.shouldUpdateScroll(n,t.props)&&window.scrollTo(0,e)},t.scrollToHash=function(e,n){var i=document.getElementById(e.substring(1));i&&t.shouldUpdateScroll(n,t.props)&&i.scrollIntoView()},t.shouldUpdateScroll=function(e,n){var i=t.props.shouldUpdateScroll;return!i||i.call((0,r.default)(t),e,n)},t}(0,a.default)(t,e);var n=t.prototype;return n._saveScroll=function(){var e=this.props.location.key||null;e&&this._stateStorage.save(this.props.location,e,this._latestKnownScrollY),this._isTicking=!1},n.componentDidMount=function(){var e;window.addEventListener("scroll",this.scrollListener);var t=this.props.location,n=t.key,i=t.hash;n&&(e=this._stateStorage.read(this.props.location,n)),i?this.scrollToHash(decodeURI(i),void 0):e&&this.windowScroll(e,void 0)},n.componentWillUnmount=function(){window.removeEventListener("scroll",this.scrollListener)},n.componentDidUpdate=function(e){var t,n=this.props.location,i=n.hash,r=n.key;r&&(t=this._stateStorage.read(this.props.location,r)),i?this.scrollToHash(decodeURI(i),e):this.windowScroll(t,e)},n.render=function(){return o.createElement(c.Provider,{value:this._stateStorage},this.props.children)},t}(o.Component);t.ScrollHandler=u,u.propTypes={shouldUpdateScroll:s.default.func,children:s.default.element.isRequired,location:s.default.object.isRequired}},3309:function(e,t){"use strict";t.__esModule=!0,t.getForwards=function(e){return null==e?void 0:e.flatMap(e=>(null==e?void 0:e.forward)||[])}},3662:function(e,t,n){"use strict";function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}n.d(t,{A:function(){return i}})},3721:function(e,t,n){"use strict";t.__esModule=!0,t.useScrollRestoration=function(e){var t=(0,a.useLocation)(),n=(0,r.useContext)(i.ScrollContext),o=(0,r.useRef)(null);return(0,r.useLayoutEffect)(function(){if(o.current){var i=n.read(t,e);o.current.scrollTo(0,i||0)}},[t.key]),{ref:o,onScroll:function(){o.current&&n.save(t,e,o.current.scrollTop)}}};
1var i=n(3215),r=n(6540),a=n(6462)},4351:function(e,t){"use strict";t.__esModule=!0,t.SessionStorage=void 0;var n="___GATSBY_REACT_ROUTER_SCROLL",i=function(){function e(){}var t=e.prototype;return t.read=function(e,t){var i=this.getStateKey(e,t);try{var r=window.sessionStorage.getItem(i);return r?JSON.parse(r):0}catch(a){return window&&window[n]&&window[n][i]?window[n][i]:0}},t.save=function(e,t,i){var r=this.getStateKey(e,t),a=JSON.stringify(i);try{window.sessionStorage.setItem(r,a)}catch(o){window&&window[n]||(window[n]={}),window[n][r]=JSON.parse(a)}},t.getStateKey=function(e,t){var n="@@scroll|"+e.pathname;return null==t?n:n+"|"+t},e}();t.SessionStorage=i},4506:function(e,t,n){"use strict";function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.d(t,{A:function(){return r}})},4598:function(e,t,n){"use strict";var i=n(4794)},4656:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.SCRIPT_TYPE="text/partytown",t.partytownSnippet=e=>((e,t)=>{const{forward:n=[],...i}=e||{},r=JSON.stringify(i,(e,t)=>("function"==typeof t&&(t=String(t)).startsWith(e+"(")&&(t="function "+t),t));return["!(function(w,p,f,c){",Object.keys(i).length>0?`c=w[p]=Object.assign(w[p]||{},${r});`:"c=w[p]=w[p]||{};","c[f]=(c[f]||[])",n.length>0?`.concat(${JSON.stringify(n)})`:"","})(window,'partytown','forward');",t].join("")})(e,'/* Partytown 0.7.6 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,"/"==(a=(o.lib||"/~partytown/")+(o.debug?"debug/":""))[0]&&(s=e.querySelectorAll(\'script[type="text/partytown"]\'),i!=t?i.dispatchEvent(new CustomEvent("pt1",{detail:t})):(d=setTimeout(f,1e4),e.addEventListener("pt0",w),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||"partytown-sw.js"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener("statechange",(function(t){"activated"==t.target.state&&h()}))}),console.error):f())))}function h(t){c=e.createElement(t?"script":"iframe"),t||(c.setAttribute("style","display:block;width:0;height:0;border:0;visibility:hidden"),c.setAttribute("aria-hidden",!0)),c.src=a+"partytown-"+(t?"atomics.js?v=0.7.6":"sandbox-sw.html?"+Date.now()),e.body.appendChild(c)}function f(n,r){for(w(),i==t&&(o.forward||[]).map((function(e){delete t[e.split(".")[0]]})),n=0;n<s.length;n++)(r=e.createElement("script")).innerHTML=s[n].innerHTML,e.head.appendChild(r);c&&c.parentNode.removeChild(c)}function w(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(".").map((function(e,n,i){p=p[i[n]]=n+1<i.length?"push"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),"complete"==e.readyState?u():(t.addEventListener("DOMContentLoaded",u),t.addEventListener("load",u))}(window,document,navigator,top,window.crossOriginIsolated);')},4794:function(e,t,n){"use strict";n.r(t),n.d(t,{Link:function(){return s.N_},PageRenderer:function(){return a()},Script:function(){return _.Script},ScriptStrategy:function(){return _.ScriptStrategy},Slice:function(){return y},StaticQuery:function(){return l.de},StaticQueryContext:function(){return l.G},collectedScriptsByPage:function(){return _.collectedScriptsByPage},graphql:function(){return k},navigate:function(){return s.oo},parsePath:function(){return s.Rr},prefetchPathname:function(){return I},scriptCache:function(){return _.scriptCache},scriptCallbackCache:function(){return _.scriptCallbackCache},useScrollRestoration:function(){return o.RV},useStaticQuery:function(){return l.GR},withAssetPrefix:function(){return s.Zf},withPrefix:function(){return s.Fe}});var i=n(6814),r=n(2549),a=n.n(r),o=n(7035),s=n(7078),l=n(7231),d=n(7387);
1function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var u=n(3662);function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(h())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var r=new(e.bind.apply(e,i));return n&&(0,u.A)(r,n.prototype),r}(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,u.A)(n,e)},m(e)}var p=n(6540),v=n(700),E=n(2024);const g=e=>{let{sliceId:t,children:n}=e;const i=[p.createElement("slice-start",{id:`${t}-1`}),p.createElement("slice-end",{id:`${t}-1`})];return n&&(i.push(n),i.push(p.createElement("slice-start",{id:`${t}-2`}),p.createElement("slice-end",{id:`${t}-2`}))),i},f=e=>{let{sliceName:t,allowEmpty:n,children:i,...r}=e;const a=(0,p.useContext)(E.Jr),o=(0,p.useContext)(E.hr),s=a[t];if(!s){if(n)return null;throw new Error(`Slice "${s}" for "${t}" slot not found`)}const l=((e,t)=>Object.keys(t).length?`${e}-${(0,v.U)(t)}`:e)(s,r);let d=o[l];return d?i&&(d.hasChildren=!0):o[l]=d={props:r,sliceName:s,hasChildren:!!i},p.createElement(g,{sliceId:l},i)},b=e=>{let{sliceName:t,allowEmpty:n,children:i,...r}=e;const a=(0,p.useContext)(E.Jr),o=(0,p.useContext)(E.dd),s=a[t],l=o.get(s);if(!l){if(n)return null;throw new Error(`Slice "${s}" for "${t}" slot not found`)}return p.createElement(l.component,Object.assign({sliceContext:l.sliceContext,data:l.data},r),i)};function y(e){{const t={...e,sliceName:e.alias};delete t.alias,delete t.__renderedByLocation;const n=(0,p.useContext)(E.j$),i=A(e);if(Object.keys(i).length)throw new w("browser"===n.renderEnvironment,t.sliceName,i,e.__renderedByLocation);if("server"===n.renderEnvironment)return p.createElement(f,t);if("browser"===n.renderEnvironment)return p.createElement(b,t);if("engines"===n.renderEnvironment||"dev-ssr"===n.renderEnvironment)return p.createElement(b,t);if("slices"===n.renderEnvironment){let t="";try{t=`\n\nSlice component "${n.sliceRoot.name}" (${n.sliceRoot.componentPath}) tried to render <Slice alias="${e.alias}"/>`}catch{}throw new Error(`Nested slices are not supported.${t}\n\nSee https://gatsbyjs.com/docs/reference/built-in-components/gatsby-slice#nested-slices`)}throw new Error(`Slice context "${n.renderEnvironment}" is not supported.`)}}let w=function(e){function t(n,i,r,a){var o;const s=Object.entries(r).map(e=>{let[t,n]=e;return`not serializable "${n}" type passed to "${t}" prop`}).join(", "),l="SlicePropsError";let d="",c="";if(n){var u,h;let e="";if(p.captureOwnerStack){const t=p.captureOwnerStack(),n=(new Error).stack||"";e=t?`${n}\n${t}`:n}else e=null!==(u=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)&&void 0!==u&&null!==(h=u.ReactDebugCurrentFrame)&&void 0!==h&&h.getCurrentStack?p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDebugCurrentFrame.getCurrentStack():(new Error).stack||"";const t=e.trim().split("\n").slice(1);t.length>0&&(t[0]=t[0].trim(),d="\n"+t.join("\n")),c=`Slice "${i}" was passed props that are not serializable (${s}).`}else{c=`${l}: Slice "${i}" was passed props that are not serializable (${s}).`;d=`${c}\n${(new Error).stack.trim().split("\n").slice(2).join("\n")}`}return(o=e.call(this,c)||this).name=l,d?o.stack=d:Error.captureStackTrace(o,t),a&&(o.forcedLocation={...a,functionName:"Slice"}),o}return(0,d.A)(t,e),t}(m(Error));const A=function(e,t,n,i){void 0===t&&(t={}),void 0===n&&(n=[]),void 0===i&&(i=null);for(const[r,a]of Object.entries(e)){if(null==a||!i&&"children"===r)continue;const e=i?`${i}.${r}`:r;"function"==typeof a?t[e]=typeof a:"object"==typeof a&&n.indexOf(a)<=0&&(n.push(a),A(a,t,n,e))}return t};var _=n(5535);const I=i.Ay.enqueue;function k(){throw new Error("It appears like Gatsby is misconfigured. Gatsby related `graphql` calls are supposed to only be evaluated at compile time, and then compiled away. Unfortunately, something went wrong and the query was left in the compiled code.\n\nUnless your site has a complex or custom babel/Gatsby configuration this is likely a bug in Gatsby.")}},4860:function(e,t){"use strict";var n=!1,i=[".twitter-tweet",".twitter-timeline",".twitter-follow-button",".twitter-share-button"].join(",");t.onRouteUpdate=function(){var e,t;null!==document.querySelector(i)&&(n||(e='\n    window.twttr = (function(d, s, id) {\n      var js,\n        fjs = d.getElementsByTagName(s)[0],\n        t = window.twttr || {};\n      if (d.getElementById(id)) return t;\n      js = d.createElement(s);\n      js.id = id;\n      js.src = "https://platform.twitter.com/widgets.js";\n      fjs.parentNode.insertBefore(js, fjs);\n      t._e = [];\n      t.ready = function(f) {\n        t._e.push(f);\n      };\n      return t;\n    })(document, "script", "twitter-wjs");\n  ',(t=document.createElement("script")).type="text/javascript",t.innerText=e,document.getElementsByTagName("head")[0].appendChild(t),n=!0),"undefined"!=typeof twttr&&window.twttr.widgets&&"function"==typeof window.twttr.widgets.load&&window.twttr.widgets.load())}}
1,4994:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5535:function(e,t,n){"use strict";n.r(t),n.d(t,{Script:function(){return p},ScriptStrategy:function(){return d},collectedScriptsByPage:function(){return s},scriptCache:function(){return h},scriptCallbackCache:function(){return m}});var i=n(6540),r=n(6462);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(this,arguments)}const o=new Map,s={get:e=>o.get(e)||[],set(e,t){const n=o.get(e)||[];n.push(t),o.set(e,n)},delete(e){o.delete(e)}},l="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){const t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)};var d,c;(c=d||(d={})).postHydrate="post-hydrate",c.idle="idle",c.offMainThread="off-main-thread";const u=new Set(["src","strategy","dangerouslySetInnerHTML","children","onLoad","onError"]),h=new Set,m=new Map;function p(e){return i.createElement(r.Location,null,()=>i.createElement(v,e))}function v(e){const{src:t,strategy:n=d.postHydrate}=e||{},{pathname:o}=(0,r.useLocation)();if((0,i.useEffect)(()=>{let t;switch(n){case d.postHydrate:t=E(e);break;case d.idle:l(()=>{t=E(e)});break;case d.offMainThread:{const t=f(e);s.set(o,t)}}return()=>{const{script:e,loadCallback:n,errorCallback:i}=t||{};n&&(null==e||e.removeEventListener("load",n)),i&&(null==e||e.removeEventListener("error",i)),null==e||e.remove()}},[]),n===d.offMainThread){const r=g(e),l=f(e);return"undefined"==typeof window&&s.set(o,l),i.createElement("script",r?a({type:"text/partytown","data-strategy":n,crossOrigin:"anonymous"},l,{dangerouslySetInnerHTML:{__html:g(e)}}):a({type:"text/partytown",src:b(t),"data-strategy":n,crossOrigin:"anonymous"},l))}return null}function E(e){const{id:t,src:n,strategy:i=d.postHydrate,onLoad:r,onError:o}=e||{},s=t||n,l=["load","error"],c={load:r,error:o};if(s){for(const e of l)if(null!=c&&c[e]){var u;const t=m.get(s)||{},{callbacks:n=[]}=(null==t?void 0:t[e])||{};var p,v;n.push(null==c?void 0:c[e]),null!=t&&null!=(u=t[e])&&u.event?null==c||null==(p=c[e])||p.call(c,null==t||null==(v=t[e])?void 0:v.event):m.set(s,a({},t,{[e]:{callbacks:n}}))}if(h.has(s))return null}const E=g(e),b=f(e),w=document.createElement("script");t&&(w.id=t),w.dataset.strategy=i;for(const[a,d]of Object.entries(b))w.setAttribute(a,d);E&&(w.textContent=E),n&&(w.src=n);const A={};if(s){for(const e of l){const t=t=>y(t,s,e);w.addEventListener(e,t),A[`${e}Callback`]=t}h.add(s)}return document.body.appendChild(w),{script:w,loadCallback:A.loadCallback,errorCallback:A.errorCallback}}function g(e){const{dangerouslySetInnerHTML:t,children:n=""}=e||{},{__html:i=""}=t||{};return i||n}function f(e){const t={};for(const[n,i]of Object.entries(e))u.has(n)||(t[n]=i);return t}function b(e){if(e)return`/__third-party-proxy?url=${encodeURIComponent(e)}`}function y(e,t,n){const i=m.get(t)||{};for(const a of(null==i||null==(r=i[n])?void 0:r.callbacks)||[]){var r;a(e)}m.set(t,{[n]:{event:e}})}},5616:function(e,t,n){"use strict";var i=n(7688),r=i.DEFAULT_OPTIONS,a=i.imageClass,o=i.imageBackgroundClass,s=i.imageWrapperClass;t.onRouteUpdate=function(e,t){for(var n=Object.assign({},r,t),i=document.querySelectorAll("."+s),l=function(){var e=i[d],t=e.querySelector("."+o),r=e.querySelector("."+a),s=function(){t.style.transition="opacity 0.5s 0.5s",r.style.transition="opacity 0.5s",l()},l=function e(){t.style.opacity=0,r.style.opacity=1,r.style.color="inherit",r.style.boxShadow="inset 0px 0px 0px 400px "+n.backgroundColor,r.removeEventListener("load",s),r.removeEventListener("error",e)};r.style.opacity=0,r.addEventListener("load",s),r.addEventListener("error",l),r.complete&&l()},d=0;d<i.length;d++)l()}},5636:function(e){function t(n,i){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,i)}
1e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6221:function(e,t,n){var i=n(5636);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},6395:function(e,t){"use strict";t.T=void 0;const n=[".html",".json",".js",".map",".txt",".xml",".pdf"];t.T=(e,t="always")=>{if("/"===e)return e;const i=e.endsWith("/");return((e,t)=>{for(const n of e)if(t.endsWith(n))return!0;return!1})(n,e)?e:"always"===t?i?e:`${e}/`:"never"===t&&i?e.slice(0,-1):e}},6462:function(e,t,n){"use strict";var i;n.r(t),n.d(t,{BaseContext:function(){return E},Link:function(){return Q},Location:function(){return X},LocationContext:function(){return g},LocationProvider:function(){return Z},Match:function(){return ee},Redirect:function(){return I},Router:function(){return se},ServerLocation:function(){return J},createHistory:function(){return c},createMemorySource:function(){return u},globalHistory:function(){return m},insertParams:function(){return R},isRedirect:function(){return w},match:function(){return S},navigate:function(){return p},pick:function(){return T},redirectTo:function(){return A},resolve:function(){return M},shallowCompare:function(){return W},startsWith:function(){return k},useBaseContext:function(){return f},useLocation:function(){return de},useLocationContext:function(){return b},useMatch:function(){return he},useNavigate:function(){return ce},useParams:function(){return ue},validateRedirect:function(){return C}});var r=n(6540),a=n(5556),o=n(311);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(this,arguments)}function l(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)t.indexOf(n=a[i])>=0||(r[n]=e[n]);return r}const d=e=>{const{search:t,hash:n,href:i,origin:r,protocol:a,host:o,hostname:s,port:l}=e.location;let{pathname:d}=e.location;return!d&&i&&h&&(d=new URL(i).pathname),{pathname:encodeURI(decodeURI(d)),search:t,hash:n,href:i,origin:r,protocol:a,host:o,hostname:s,port:l,state:e.history.state,key:e.history.state&&e.history.state.key||"initial"}},c=(e,t)=>{let n=[],i=d(e),r=!1,a=()=>{};return{get location(){return i},get transitioning(){return r},_onTransitionComplete(){r=!1,a()},listen(t){n.push(t);const r=()=>{i=d(e),t({location:i,action:"POP"})};return e.addEventListener("popstate",r),()=>{e.removeEventListener("popstate",r),n=n.filter(e=>e!==t)}},navigate(t,{state:o,replace:l=!1}={}){if("number"==typeof t)e.history.go(t);else{o=s({},o,{key:Date.now()+""});try{r||l?e.history.replaceState(o,null,t):e.history.pushState(o,null,t)}catch(n){e.location[l?"replace":"assign"](t)}}i=d(e),r=!0;const c=new Promise(e=>a=e);return n.forEach(e=>e({location:i,action:"PUSH"})),c}}},u=(e="/")=>{const t=e.indexOf("?"),n={pathname:t>-1?e.substr(0,t):e,search:t>-1?e.substr(t):""};let i=0;const r=[n],a=[null];return{get location(){return r[i]},addEventListener(e,t){},removeEventListener(e,t){},history:{get entries(){return r},get index(){return i},get state(){return a[i]},pushState(e,t,n){const[o,s=""]=n.split("?");i++,r.push({pathname:o,search:s.length?`?${s}`:s}),a.push(e)},replaceState(e,t,n){const[o,s=""]=n.split("?");r[i]={pathname:o,search:s},a[i]=e},go(e){const t=i+e;t<0||t>a.length-1||(i=t)}}}},h=!("undefined"==typeof window||!window.document||!window.document.createElement),m=c(h?window:u()),{navigate:p}=m;function v(e,t){return r.createServerContext?((e,t=null)=>(globalThis.__SERVER_CONTEXT||(globalThis.__SERVER_CONTEXT={}),globalThis.__SERVER_CONTEXT[e]||(globalThis.__SERVER_CONTEXT[e]=r.createServerContext(e,t)),globalThis.__SERVER_CONTEXT[e]))(e,t):r.createContext(t)}const E=v("Base",{baseuri:"/",basepath:"/"}),g=v("Location"),f=()=>r.useContext(E),b=()=>r.useContext(g);function y(e){this.uri=e}const w=e=>e instanceof y,A=e=>{throw new y(e)};function _(e){const{to:t,replace:n=!0,state:i,noThrow:a,baseuri:o}=e;r.useEffect(()=>{Promise.resolve().then(()=>{const r=M(t,o);p(R(r,e),{replace:n,state:i})})},[]);const s=M(t,o);return a||A(R(s,e)),null}const I=e=>{const t=b(),{baseuri:n}=f();return r.createElement(_,s({},t,{baseuri:n},e))};I.propTypes={from:a.string,to:a.string.isRequired};const k=(e,t)=>e.substr(0,t.length)===t,T=(e,t)=>
1{let n,i;const[r]=t.split("?"),a=N(r),s=""===a[0],l=O(e);for(let d=0,c=l.length;d<c;d++){let e=!1;const r=l[d].route;if(r.default){i={route:r,params:{},uri:t};continue}const c=N(r.path),u={},h=Math.max(a.length,c.length);let m=0;for(;m<h;m++){const t=c[m],n=a[m];if(x(t)){u[t.slice(1)||"*"]=a.slice(m).map(decodeURIComponent).join("/");break}if(void 0===n){e=!0;break}const i=L.exec(t);if(i&&!s){const e=-1===H.indexOf(i[1]);o(e,`<Router> dynamic segment "${i[1]}" is a reserved name. Please use a different name in path "${r.path}".`);const t=decodeURIComponent(n);u[i[1]]=t}else if(t!==n){e=!0;break}}if(!e){n={route:r,params:u,uri:"/"+a.slice(0,m).join("/")};break}}return n||i||null},S=(e,t)=>T([{path:e}],t),M=(e,t)=>{if(k(e,"/"))return e;const[n,i]=e.split("?"),[r]=t.split("?"),a=N(n),o=N(r);if(""===a[0])return U(r,i);if(!k(a[0],".")){const e=o.concat(a).join("/");return U(("/"===r?"":"/")+e,i)}const s=o.concat(a),l=[];for(let d=0,c=s.length;d<c;d++){const e=s[d];".."===e?l.pop():"."!==e&&l.push(e)}return U("/"+l.join("/"),i)},R=(e,t)=>{const[n,i=""]=e.split("?");let r="/"+N(n).map(e=>{const n=L.exec(e);return n?t[n[1]]:e}).join("/");const{location:{search:a=""}={}}=t,o=a.split("?")[1]||"";return r=U(r,i,o),r},C=(e,t)=>{const n=e=>D(e);return N(e).filter(n).sort().join("/")===N(t).filter(n).sort().join("/")},L=/^:(.+)/,D=e=>L.test(e),x=e=>e&&"*"===e[0],P=(e,t)=>({route:e,score:e.default?0:N(e.path).reduce((e,t)=>(e+=4,(e=>""===e)(t)?e+=1:D(t)?e+=2:x(t)?e-=5:e+=3,e),0),index:t}),O=e=>e.map(P).sort((e,t)=>e.score<t.score?1:e.score>t.score?-1:e.index-t.index),N=e=>e.replace(/(^\/+|\/+$)/g,"").split("/"),U=(e,...t)=>e+((t=t.filter(e=>e&&e.length>0))&&t.length>0?`?${t.join("&")}`:""),H=["uri","path"],W=(e,t)=>{const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>t.hasOwnProperty(n)&&e[n]===t[n])},$=e=>e.replace(/(^\/+|\/+$)/g,""),V=e=>t=>{if(!t)return null;if(t.type===r.Fragment&&t.props.children)return r.Children.map(t.props.children,V(e));if(o(t.props.path||t.props.default||t.type===I,`<Router>: Children of <Router> must have a \`path\` or \`default\` prop, or be a \`<Redirect>\`. None found on element type \`${t.type}\``),o(!!(t.type!==I||t.props.from&&t.props.to),`<Redirect from="${t.props.from}" to="${t.props.to}"/> requires both "from" and "to" props when inside a <Router>.`),o(!(t.type===I&&!C(t.props.from,t.props.to)),`<Redirect from="${t.props.from} to="${t.props.to}"/> has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.`),t.props.default)return{value:t,default:!0};const n=t.type===I?t.props.from:t.props.path,i="/"===n?e:`${$(e)}/${$(n)}`;return{value:t,default:t.props.default,path:t.props.children?`${$(i)}/*`:i}},j=["innerRef"],B=["to","state","replace","getProps"],F=["key"];let{forwardRef:q}=i||(i=n.t(r,2));void 0===q&&(q=e=>e);const G=()=>{},Q=q((e,t)=>{let{innerRef:n}=e,i=l(e,j);const{baseuri:a}=f(),{location:o}=b(),{to:d,state:c,replace:u,getProps:h=G}=i,m=l(i,B),v=M(d,a),E=encodeURI(v),g=o.pathname===E,y=k(o.pathname,E);return r.createElement("a",s({ref:t||n,"aria-current":g?"page":void 0},m,h({isCurrent:g,isPartiallyCurrent:y,href:v,location:o}),{href:v,onClick:e=>{if(m.onClick&&m.onClick(e),(e=>!e.defaultPrevented&&0===e.button&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey))(e)){e.preventDefault();let t=u;if("boolean"!=typeof u&&g){const e=l(s({},o.state),F);t=W(s({},c),e)}p(v,{state:c,replace:t})}}}))});Q.displayName="Link",Q.propTypes={to:a.string.isRequired};class K extends r.Component{constructor(...e){super(...e),this.displayName="ReactUseErrorBoundary"}componentDidCatch(...e){this.setState({}),this.props.onError(...e)}render(){return this.props.children}}const Y=r.createContext({componentDidCatch:{current:void 0},error:void 0,setError:()=>!1});function z({children:e}){const[t,n]=r.useState(),i=r.useRef(),a=r.useMemo(()=>({componentDidCatch:i,error:t,setError:n}),[t]);return r.createElement(Y.Provider,{value:a},r.createElement(K,{error:t,onError:(e,t)=>{n(e),null==i.current||i.current(e,t)}},e))}z.displayName="ReactUseErrorBoundaryContext";const Z=function(e){var t,n;function i(t){return r.createElement(z,null,r.createElement(e,s({key:"WrappedComponent"},t)))}return i.displayName=`WithErrorBoundary(${null!=(t=null!=(n=e.displayName)?n:e.name)?t:"Component"})`,i}(({history:e=m,children:t})=>{const{location:n}=e,[i,a]=r.useState({location:n}),[o]=function(){const e=r.useContext(Y);e.componentDidCatch.current=void 0;const t=r.useCallback(()=>{e.setError(void 0)},[]);return[e.error,t]}();if(r.useEffect(()=>{e._onTransitionComplete()},[i.location]),r.useEffect(()=>{let t=!1;const n=e.listen(({location:e})=>{Promise.resolve().then(()=>{requestAnimationFrame(()=>{t||a({location:e})})})});return()=>{t=!0,n()}},[]),o){if(!w(o))throw o;p(o.uri,{replace:!0})}return r.createElement(g.Provider,{value:i},"function"==typeof t?t(i):t||null)}),X=({children:e})=>{const t=b();return t?e(t):r.createElement(Z,null,e)},J=({url:e,children:t})=>{const n=e.indexOf("?");let i,a="";return n>-1?(i=e.substring(0,n),a=e.substring(n)):i=e,r.createElement(g.Provider,{value:{location:{pathname:i,search:a,hash:""}}},t)},ee=({path:e,children:t})=>{const{baseuri:n}=f(),{location:i}=b(),r=M(e,n),a=S(r,i.pathname);return t({location:i,match:a?s({},a.params,{uri:a.uri,path:e}):null})},te=["uri","location","component"],ne=["children","style","component","uri","location"],ie=e=>{let{uri:t,location:n,component:i}=e,a=l(e,te);return r.createElement(ae,s({},a,{component:i,uri:t,location:n}))};let re=0;const ae=e=>{let{children:t,style:n,component:i="div",uri:a,location:o}=e,d=l(e,ne);const c=r.useRef(),u=r.useRef(!0),h=r.useRef(a),m=r.useRef(o.pathname),p=r.useRef(!1);r.useEffect(()=>(re++,v(),()=>{re--,0===re&&(u.current=!0)}),[]),r.useEffect(()=>{let e=!1,t=!1;a!==h.current&&(h.current=a,e=!0),o.pathname!==m.current&&(m.current=o.pathname,t=!0),p.current=e||t&&o.pathname===a,p.current&&v()},[a,o]);const v=r.useCallback(()=>{var e;u.current?u.current=!1:(e=c.current,p.current&&e&&e.focus())},[]);return r.createElement(i,s({style:s({outline:"none"},n),tabIndex:"-1",ref:c},d),t)},oe=["location","primary","children","basepath","baseuri","component"],se=e=>{const t=f(),n=b();return r.createElement(le,s({},t,n,e))};function le(e){const{location:t,primary:n=!0,children:i,basepath:a,component:o="div"}=e,d=l(e,oe),c=r.Children.toArray(i).reduce((e,t)=>
1{const n=V(a)(t);return e.concat(n)},[]),{pathname:u}=t,h=T(c,u);if(h){const{params:e,uri:i,route:l,route:{value:c}}=h,u=l.default?a:l.path.replace(/\*$/,""),m=s({},e,{uri:i,location:t}),p=r.cloneElement(c,m,c.props.children?r.createElement(se,{location:t,primary:n},c.props.children):void 0),v=n?ie:o,g=n?s({uri:i,location:t,component:o},d):d;return r.createElement(E.Provider,{value:{baseuri:i,basepath:u}},r.createElement(v,g,p))}return null}const de=()=>{const e=b();if(!e)throw new Error("useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");return e.location},ce=()=>{throw new Error("useNavigate is removed. Use import { navigate } from 'gatsby' instead")},ue=()=>{const e=f();if(!e)throw new Error("useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");const t=de(),n=S(e.basepath,t.pathname);return n?n.params:null},he=e=>{if(!e)throw new Error("useMatch(path: string) requires an argument of a string to match against");const t=f();if(!t)throw new Error("useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");const n=de(),i=M(e,t.baseuri),r=S(i,n.pathname);return r?s({},r.params,{uri:r.uri,path:e}):null}},6491:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});const i=new Map,r=new Map;function a(e){let t=i.get(e);return t||(t=r.get(e.toLowerCase())),t}[].forEach(e=>{e.ignoreCase?r.set(e.fromPath,e):i.set(e.fromPath,e)})},6498:function(e,t,n){"use strict";var i=n(7387),r=n(20),a=n(6540),o=n(6462),s=n(7035),l=n(7231),d=n(2024),c=n(6814),u=n(6491),h=n(9369);const m={id:"gatsby-announcer",style:{position:"absolute",top:0,width:1,height:1,padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},"aria-live":"assertive","aria-atomic":"true"};var p=n(7078);function v(e){const t=(0,u.X)(e),{hash:n,search:i}=window.location;return null!=t&&(window.___replace(t.toPath+i+n),!0)}let E="";window.addEventListener("unhandledrejection",e=>{/loading chunk \d* failed./i.test(e.reason)&&E&&(window.location.pathname=E)});const g=(e,t)=>{v(e.pathname)||(E=e.pathname,(0,r.N)("onPreRouteUpdate",{location:e,prevLocation:t}))},f=(e,t)=>{v(e.pathname)||(0,r.N)("onRouteUpdate",{location:e,prevLocation:t})},b=function(e,t){if(void 0===t&&(t={}),"number"==typeof e)return void o.globalHistory.navigate(e);const{pathname:n,search:i,hash:a}=(0,p.Rr)(e),s=(0,u.X)(n);if(s&&(e=s.toPath+i+a),window.___swUpdated)return void(window.location=n+i+a);const l=setTimeout(()=>{h.A.emit("onDelayedLoadPageResources",{pathname:n}),(0,r.N)("onRouteUpdateDelayed",{location:window.location})},1e3);c.Ay.loadPage(n+i).then(r=>{if(!r||r.status===c.Wi.Error)return window.history.replaceState({},"",location.href),window.location=n,void clearTimeout(l);r&&r.page.webpackCompilationHash!==window.___webpackCompilationHash&&("serviceWorker"in navigator&&null!==navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&navigator.serviceWorker.controller.postMessage({gatsbyApi:"clearPathResources"}),window.location=n+i+a),(0,o.navigate)(e,t),clearTimeout(l)})};function y(e,t){let{location:n}=t;const{pathname:i,hash:a}=n,o=(0,r.N)("shouldUpdateScroll",{prevRouterProps:e,pathname:i,routerProps:{location:n},getSavedScrollPosition:e=>[0,this._stateStorage.read(e,e.key)]});if(o.length>0)return o[o.length-1];if(e){const{location:{pathname:t}}=e;if(t===i)return a?decodeURI(a.slice(1)):[0,0]}return!0}let w=function(e){function t(t){var n;return(n=e.call(this,t)||this).announcementRef=a.createRef(),n}(0,i.A)(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){requestAnimationFrame(()=>{let e=`new page at ${this.props.location.pathname}`;document.title&&(e=document.title);const t=document.querySelectorAll("#gatsby-focus-wrapper h1");t&&t.length&&(e=t[0].textContent);const n=`Navigated to ${e}`;if(this.announcementRef.current){this.announcementRef.current.innerText!==n&&(this.announcementRef.current.innerText=n)}})},n.render=function(){return a.createElement("div",Object.assign({},m,{ref:this.announcementRef}))},t}(a.Component);const A=(e,t)=>
1{var n,i;return e.href!==t.href||(null==e||null===(n=e.state)||void 0===n?void 0:n.key)!==(null==t||null===(i=t.state)||void 0===i?void 0:i.key)};let _=function(e){function t(t){var n;return n=e.call(this,t)||this,g(t.location,null),n}(0,i.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){f(this.props.location,null)},n.shouldComponentUpdate=function(e){return!!A(this.props.location,e.location)&&(g(e.location,this.props.location),!0)},n.componentDidUpdate=function(e){A(e.location,this.props.location)&&f(this.props.location,e.location)},n.render=function(){return a.createElement(a.Fragment,null,this.props.children,a.createElement(w,{location:location}))},t}(a.Component);var I=n(8428),k=n(6877);function T(e,t){for(var n in e)if(!(n in t))return!0;for(var i in t)if(e[i]!==t[i])return!0;return!1}var S=function(e){function t(t){var n;n=e.call(this)||this;const{location:i,pageResources:r}=t;return n.state={location:{...i},pageResources:r||c.Ay.loadPageSync(i.pathname+i.search,{withErrorDetails:!0})},n}(0,i.A)(t,e),t.getDerivedStateFromProps=function(e,t){let{location:n}=e;if(t.location.href!==n.href){return{pageResources:c.Ay.loadPageSync(n.pathname+n.search,{withErrorDetails:!0}),location:{...n}}}return{location:{...n}}};var n=t.prototype;return n.loadResources=function(e){c.Ay.loadPage(e).then(t=>{t&&t.status!==c.Wi.Error?this.setState({location:{...window.location},pageResources:t}):(window.history.replaceState({},"",location.href),window.location=e)})},n.shouldComponentUpdate=function(e,t){return t.pageResources?this.state.pageResources!==t.pageResources||(this.state.pageResources.component!==t.pageResources.component||(this.state.pageResources.json!==t.pageResources.json||(!(this.state.location.key===t.location.key||!t.pageResources.page||!t.pageResources.page.matchPath&&!t.pageResources.page.path)||function(e,t,n){return T(e.props,t)||T(e.state,n)}(this,e,t)))):(this.loadResources(e.location.pathname+e.location.search),!1)},n.render=function(){return this.props.children(this.state)},t}(a.Component),M=n(8797),R=n(9732);const C=new c.N5(k,[],window.pageData);(0,c.iC)(C),C.setApiRunner(r.N);const{render:L,hydrate:D}=(0,R.n)();window.asyncRequires=k,window.___emitter=h.A,window.___loader=c.Zf,o.globalHistory.listen(e=>{e.location.action=e.action}),window.___push=e=>b(e,{replace:!1}),window.___replace=e=>b(e,{replace:!0}),window.___navigate=(e,t)=>b(e,t);const x="gatsby-reload-compilation-hash-match";(0,r.v)("onClientEntry").then(()=>{const e=(e,t)=>{console.error("Uncaught error:",e,t),(0,r.N)("onUncaughtError",{error:e,errorInfo:t})},t=(e,t)=>{(0,r.N)("onCaughtError",{error:e,errorInfo:t})};(0,r.N)("registerServiceWorker").filter(Boolean).length>0&&n(626);const u=e=>a.createElement(o.BaseContext.Provider,{value:{baseuri:"/",basepath:"/"}},a.createElement(I.A,e)),h=a.createContext({}),m={renderEnvironment:"browser"};let p=function(e){function t(){return e.apply(this,arguments)||this}return(0,i.A)(t,e),t.prototype.render=function(){const{children:e}=this.props;return a.createElement(o.Location,null,t=>{let{location:n}=t;return a.createElement(S,{location:n},t=>{let{pageResources:n,location:i}=t;const r=(0,c.LE)(),o=(0,c.Rh)();return a.createElement(l.G.Provider,{value:r},a.createElement(d.j$.Provider,{value:m},a.createElement(d.dd.Provider,{value:o},a.createElement(d.Jr.Provider,{value:n.page.slicesMap},a.createElement(h.Provider,{value:{pageResources:n,location:i}},e)))))})})},t}(a.Component),v=function(e){function t(){return e.apply(this,arguments)||this}return(0,i.A)(t,e),t.prototype.render=function(){return a.createElement(h.Consumer,null,e=>{let{pageResources:t,location:n}=e;return a.createElement(_,{location:n},a.createElement(s.z_,{location:n,shouldUpdateScroll:y},a.createElement(o.Router,{basepath:"",location:n,id:"gatsby-focus-wrapper"},a.createElement(u,Object.assign({path:"/404.html"===t.page.path||"/500.html"===t.page.path?(0,M.A)(n.pathname,""):encodeURI((t.page.matchPath||t.page.path).split("?")[0])},this.props,{location:n,pageResources:t},t.json)))))})},t}(a.Component);const{pagePath:E,location:g}=window;E&&""+E!==g.pathname+(E.includes("?")?g.search:"")&&!(C.findMatchPath((0,M.A)(g.pathname,""))||E.match(/^\/(404|500)(\/?|.html)$/)||E.match(/^\/offline-plugin-app-shell-fallback\/?$/))&&(0,o.navigate)(""+E+(E.includes("?")?""
1:g.search)+g.hash,{replace:!0});const f=()=>{try{return sessionStorage}catch{return null}};c.Zf.loadPage(g.pathname+g.search).then(n=>{var i;const o=f();if(null!=n&&null!==(i=n.page)&&void 0!==i&&i.webpackCompilationHash&&n.page.webpackCompilationHash!==window.___webpackCompilationHash&&("serviceWorker"in navigator&&null!==navigator.serviceWorker.controller&&"activated"===navigator.serviceWorker.controller.state&&navigator.serviceWorker.controller.postMessage({gatsbyApi:"clearPathResources"}),o)){if(!("1"===o.getItem(x)))return o.setItem(x,"1"),void window.location.reload(!0)}if(o&&o.removeItem(x),!n||n.status===c.Wi.Error){const e=`page resources for ${g.pathname} not found. Not rendering React`;if(n&&n.error)throw console.error(e),n.error;throw new Error(e)}const s=(0,r.N)("wrapRootElement",{element:a.createElement(v,null)},a.createElement(v,null),e=>{let{result:t}=e;return{element:t}}).pop(),l=function(){const e=a.useRef(!1);return a.useEffect(()=>{e.current||(e.current=!0,performance.mark&&performance.mark("onInitialClientRender"),(0,r.N)("onInitialClientRender"))},[]),a.createElement(p,null,s)},d=document.getElementById("gatsby-focus-wrapper");let u=(n,i)=>L(n,i,{onUncaughtError:e,onCaughtError:t});d&&d.children.length&&(u=(n,i)=>D(n,i,{onUncaughtError:e,onCaughtError:t}));const h=(0,r.N)("replaceHydrateFunction",void 0,u)[0]||u;function m(){const e="undefined"!=typeof window?document.getElementById("___gatsby"):null;h(a.createElement(l,null),e)}const E=document;if("complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll)setTimeout(function(){m()},0);else{const e=function(){E.removeEventListener("DOMContentLoaded",e,!1),window.removeEventListener("load",e,!1),m()};E.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1)}})})},6774:function(e,t){"use strict";var n=0,i=function(e){var t=window.decodeURI(e.replace("#",""));if(""!==t){var i=document.getElementById(t);if(i){var r=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,a=document.documentElement.clientTop||document.body.clientTop||0,o=window.getComputedStyle(i),s=o.getPropertyValue("scroll-margin-top")||o.getPropertyValue("scroll-snap-margin-top")||"0px";return i.getBoundingClientRect().top+r-parseInt(s,10)-a-n}}return null};t.onInitialClientRender=function(e,t){t.offsetY&&(n=t.offsetY),requestAnimationFrame(function(){var e=i(window.location.hash);null!==e&&window.scrollTo(0,e)})},t.shouldUpdateScroll=function(e){var t=e.routerProps.location,n=i(t.hash);return null===n||[0,n]}},6814:function(e,t,n){"use strict";n.d(t,{Wi:function(){return c},N5:function(){return y},Ay:function(){return _},Rh:function(){return k},LE:function(){return I},Zf:function(){return A},iC:function(){return w}});var i=n(7387),r=n(4506);const a=function(e){if("undefined"==typeof document)return!1;const t=document.createElement("link");try{if(t.relList&&"function"==typeof t.relList.supports)return t.relList.supports(e)}catch(n){return!1}return!1}("prefetch")?function(e,t){return new Promise((n,i)=>{if("undefined"==typeof document)return void i();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),Object.keys(t).forEach(e=>{r.setAttribute(e,t[e])}),r.onload=n,r.onerror=i;(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).appendChild(r)})}:function(e){return new Promise((t,n)=>{const i=new XMLHttpRequest;i.open("GET",e,!0),i.onload=()=>{200===i.status?t():n()},i.send(null)})},o={};var s=function(e,t){return new Promise(n=>{o[e]?n():a(e,t).then(()=>{n(),o[e]=!0}).catch(()=>{})})},l=n(9369),d=n(8990);const c={Error:"error",Success:"success"},u=e=>{const[t,n]=e.split("?");var i;return`/page-data/${"/"===t?"index":(i="/"===(i=t)[0]?i.slice(1):i).endsWith("/")?i.slice(0,-1):i}/page-data.json${n?`?${n}`:""}`},h=e=>e.startsWith("//");function m(e,t){return void 0===t&&(t="GET"),new Promise(n=>{const i=new XMLHttpRequest;i.open(t,e,!0),i.onreadystatechange=()=>{4==i.readyState&&n(i)},i.send(null)})}const p=/bot|crawler|spider|crawling/i,v=function(e,t,n){var i;void 0===t&&(t=null);const r={componentChunkName:e.componentChunkName,path:e.path,webpackCompilationHash:e.webpackCompilationHash,matchPath:e.matchPath,staticQueryHashes:e.staticQueryHashes,getServerDataError:e.getServerDataError,slicesMap:null!==(i=e.slicesMap)&&void 0!==i?i:{}};return{component:t,head:n,json:e.result,page:r}};function E(e){return new Promise(t=>{try{const n=e.readRoot();t(n)}catch(n){if(!Object.hasOwnProperty.call(n,"_response")||!Object.hasOwnProperty.call(n,"_status"))throw n;setTimeout(()=>{E(e).then(t)},200)}})}let g=function(){function e(e,t){this.inFlightNetworkRequests=new Map,this.pageDb=new Map,this.inFlightDb=new Map,this.staticQueryDb={},this.pageDataDb=new Map,this.partialHydrationDb=new Map,this.slice
1sDataDb=new Map,this.sliceInflightDb=new Map,this.slicesDb=new Map,this.isPrefetchQueueRunning=!1,this.prefetchQueued=[],this.prefetchTriggered=new Set,this.prefetchCompleted=new Set,this.loadComponent=e,(0,d.QX)(t)}var t=e.prototype;return t.memoizedGet=function(e){let t=this.inFlightNetworkRequests.get(e);return t||(t=m(e,"GET"),this.inFlightNetworkRequests.set(e,t)),t.then(t=>(this.inFlightNetworkRequests.delete(e),t)).catch(t=>{throw this.inFlightNetworkRequests.delete(e),t})},t.setApiRunner=function(e){this.apiRunner=e,this.prefetchDisabled=e("disableCorePrefetching").some(e=>e)},t.fetchPageDataJson=function(e){const{pagePath:t,retries:n=0}=e,i=u(t);return this.memoizedGet(i).then(i=>{const{status:r,responseText:a}=i;if(200===r)try{const n=JSON.parse(a);if(void 0===n.path)throw new Error("not a valid pageData response");const i=t.split("?")[1];return i&&!n.path.includes(i)&&(n.path+=`?${i}`),Object.assign(e,{status:c.Success,payload:n})}catch(o){}return 404===r||200===r?"/404.html"===t||"/500.html"===t?Object.assign(e,{status:c.Error}):this.fetchPageDataJson(Object.assign(e,{pagePath:"/404.html",notFound:!0})):500===r?this.fetchPageDataJson(Object.assign(e,{pagePath:"/500.html",internalServerError:!0})):n<3?this.fetchPageDataJson(Object.assign(e,{retries:n+1})):Object.assign(e,{status:c.Error})})},t.fetchPartialHydrationJson=function(e){const{pagePath:t,retries:n=0}=e,i=u(t).replace(".json","-rsc.json");return this.memoizedGet(i).then(i=>{const{status:r,responseText:a}=i;if(200===r)try{return Object.assign(e,{status:c.Success,payload:a})}catch(o){}return 404===r||200===r?"/404.html"===t||"/500.html"===t?Object.assign(e,{status:c.Error}):this.fetchPartialHydrationJson(Object.assign(e,{pagePath:"/404.html",notFound:!0})):500===r?this.fetchPartialHydrationJson(Object.assign(e,{pagePath:"/500.html",internalServerError:!0})):n<3?this.fetchPartialHydrationJson(Object.assign(e,{retries:n+1})):Object.assign(e,{status:c.Error})})},t.loadPageDataJson=function(e){const t=(0,d.Hh)(e);if(this.pageDataDb.has(t)){const e=this.pageDataDb.get(t);return Promise.resolve(e)}return this.fetchPageDataJson({pagePath:t}).then(e=>(this.pageDataDb.set(t,e),e))},t.loadPartialHydrationJson=function(e){const t=(0,d.Hh)(e);if(this.partialHydrationDb.has(t)){const e=this.partialHydrationDb.get(t);return Promise.resolve(e)}return this.fetchPartialHydrationJson({pagePath:t}).then(e=>(this.partialHydrationDb.set(t,e),e))}
1,t.loadSliceDataJson=function(e){if(this.slicesDataDb.has(e)){const t=this.slicesDataDb.get(e);return Promise.resolve({sliceName:e,jsonPayload:t})}return m(`/slice-data/${e}.json`,"GET").then(t=>{const n=JSON.parse(t.responseText);return this.slicesDataDb.set(e,n),{sliceName:e,jsonPayload:n}})},t.findMatchPath=function(e){return(0,d.Yl)(e)},t.loadPage=function(e){const t=(0,d.Hh)(e);if(this.pageDb.has(t)){const e=this.pageDb.get(t);return e.error?Promise.resolve({error:e.error,status:e.status}):Promise.resolve(e.payload)}if(this.inFlightDb.has(t))return this.inFlightDb.get(t);const i=[this.loadAppData(),this.loadPageDataJson(t)];const a=Promise.all(i).then(e=>{const[i,a,o]=e;if(a.status===c.Error||(null==o?void 0:o.status)===c.Error)return{status:c.Error};let s=a.payload;const{componentChunkName:d,staticQueryHashes:u=[],slicesMap:h={}}=s,m={},p=Array.from(new Set(Object.values(h))),g=e=>{if(this.slicesDb.has(e.name))return this.slicesDb.get(e.name);if(this.sliceInflightDb.has(e.name))return this.sliceInflightDb.get(e.name);const t=this.loadComponent(e.componentChunkName).then(t=>{return{component:(n=t,n&&n.default||n),sliceContext:e.result.sliceContext,data:e.result.data};var n});return this.sliceInflightDb.set(e.name,t),t.then(t=>{this.slicesDb.set(e.name,t),this.sliceInflightDb.delete(e.name)}),t};return Promise.all(p.map(e=>this.loadSliceDataJson(e))).then(e=>{const h=[],p=(0,r.A)(u);for(const{jsonPayload:t,sliceName:n}of Object.values(e)){h.push({name:n,...t});for(const e of t.staticQueryHashes)p.includes(e)||p.push(e)}const f=[Promise.all(h.map(g)),this.loadComponent(d,"head")];f.push(this.loadComponent(d));const b=Promise.all(f).then(e=>{const[t,r,l]=e;m.createdAt=new Date;for(const n of t)(!n||n instanceof Error)&&(m.status=c.Error,m.error=n);let d;if((!l||l instanceof Error)&&(m.status=c.Error,m.error=l),m.status!==c.Error){if(m.status=c.Success,!0!==a.notFound&&!0!==(null==o?void 0:o.notFound)||(m.notFound=!0),s=Object.assign(s,{webpackCompilationHash:i?i.webpackCompilationHash:""}),"string"==typeof(null==o?void 0:o.payload)){d=v(s,null,r),d.partialHydration=o.payload;const e=new ReadableStream({start(e){const t=new TextEncoder;e.enqueue(t.encode(o.payload))},pull(e){e.close()},cancel(){}});return n.e(522).then(n.t.bind(n,8522,23)).then(t=>{let{createFromReadableStream:n}=t;return E(n(e))}).then(e=>(d.partialHydration=e,d))}d=v(s,l,r)}return d}),y=Promise.all(p.map(e=>{if(this.staticQueryDb[e]){const t=this.staticQueryDb[e];return{staticQueryHash:e,jsonPayload:t}}return this.memoizedGet(`/page-data/sq/d/${e}.json`).then(t=>{const n=JSON.parse(t.responseText);return{staticQueryHash:e,jsonPayload:n}}).catch(()=>{throw new Error(`We couldn't load "/page-data/sq/d/${e}.json"`)})})).then(e=>{const t={};return e.forEach(e=>{let{staticQueryHash:n,jsonPayload:i}=e;t[n]=i,this.staticQueryDb[n]=i}),t});return Promise.all([b,y]).then(e=>{let n,[i,r]=e;return i&&(n={...i,staticQueryResults:r},m.payload=n,l.A.emit("onPostLoadPageResources",{page:n,pageResources:n})),this.pageDb.set(t,m),m.error?{error:m.error,status:m.status}:n}).catch(e=>({error:e,status:c.Error}))})});return a.then(()=>{this.inFlightDb.delete(t)}).catch(e=>{throw this.inFlightDb.delete(t),e}),this.inFlightDb.set(t,a),a},t.loadPageSync=function(e,t){void 0===t&&(t={});const n=(0,d.Hh)(e);if(this.pageDb.has(n)){var i;const e=this.pageDb.get(n);if(e.payload)return e.payload;if(null!==(i=t)&&void 0!==i&&i.withErrorDetails)return{error:e.error,status:e.status}}},t.shouldPrefetch=function(e){return!!(()=>{if("connection"in navigator&&void 0!==navigator.connection){if((navigator.connection.effectiveType||"").includes("2g"))return!1;if(navigator.connection.saveData)return!1}return!0})()&&((!navigator.userAgent||!p.test(navigator.userAgent))&&!this.pageDb.has(e))},t.prefetch=function(e){if(!this.shouldPrefetch(e))return{then:e=>e(!1),abort:()=>{}};if(this.prefetchTriggered.has(e))return{then:e=>e(!0),abort:()=>{}};const t={resolve:null,reject:null,promise:null};t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),this.prefetchQueued.push([e,t]);const n=new AbortController;return n.signal.addEventListener("abort",()=>{const t=this.prefetchQueued.findIndex(t=>{let[n]=t;return n===e});-1!==t&&this.prefetchQueued.splice(t,1)}),this.isPrefetchQueueRunning||(this.isPrefetchQueueRunning=!0,setTimeout(()=>{this._processNextPrefetchBatch()},3e3)),{then:(e,n)=>t.promise.then(e,n),abort:n.abort.bind(n)}},t._processNextPrefetchBatch=function(){(window.requestIdleCallback||(e=>setTimeout(e,0)))(()=>{const e=this.prefetchQueued.splice(0,4),t=Promise.all(e.map(e=>{let[t,n]=e;return this.prefetchTriggered.has(t)||(this.apiRunner("onPrefetchPathname",{pathname:t}),this.prefetchTriggered.add(t)),this.prefetchDisabled?n.resolve(!1):this.doPrefetch((0,d.Hh)(t)).then(()=>{this.prefetchCompleted.has(t)||(this.apiRunner("onPostPrefetchPathname",{pathname:t}),this.prefetchCompleted.add(t)),n.resolve(!0)})}));this.prefetchQueued.length?t.then(()=>{setTimeout(()=>{this._processNextPrefetchBatch()},3e3)}):this.isPrefetchQueueRunning=!1})},t.doPrefetch=function(e){const t=u(e);return s(t,{crossOrigin:"anonymous",as:"fetch"}).then(()=>this.loadPageDataJson(e))},t.hovering=function(e){this.loadPage(e)},t.getResourceURLsForPathname=function(e){const t=(0,d.Hh)(e),n=this.pageDataDb.get(t);if(n){const e=v(n.payload);return[].concat((0,r.A)(f(e.page.componentChunkName)),[u(t)])}return null},t.isPageNotFound=function(e){const t=(0,d.Hh)(e),n=this.pageDb.get(t);return!n||n.notFound},t.loadAppData=function(e){return void 0===e&&(e=0),this.memoizedGet("/page-d
1ata/app-data.json").then(t=>{const{status:n,responseText:i}=t;let r;if(200!==n&&e<3)return this.loadAppData(e+1);if(200===n)try{const e=JSON.parse(i);if(void 0===e.webpackCompilationHash)throw new Error("not a valid app-data response");r=e}catch(a){}return r})},e}();const f=e=>(window.___chunkMapping[e]||[]).map(e=>""+e);let b,y=function(e){function t(t,n,i){var r;return r=e.call(this,function(e,n){if(void 0===n&&(n="components"),!t[n="components"][e])throw new Error(`We couldn't find the correct component chunk with the name "${e}"`);return t[n][e]().catch(e=>e)},n)||this,i&&r.pageDataDb.set((0,d.Hh)(i.path),{pagePath:i.path,payload:i,status:"success"}),r}(0,i.A)(t,e);var n=t.prototype;return n.doPrefetch=function(t){return e.prototype.doPrefetch.call(this,t).then(e=>{if(e.status!==c.Success)return Promise.resolve();const t=e.payload,n=t.componentChunkName,i=f(n);return Promise.all(i.map(s)).then(()=>t)})},n.loadPageDataJson=function(t){return e.prototype.loadPageDataJson.call(this,t).then(e=>e.notFound?h(t)?e:m(t,"HEAD").then(t=>200===t.status?{status:c.Error}:e):e)},n.loadPartialHydrationJson=function(t){return e.prototype.loadPartialHydrationJson.call(this,t).then(e=>e.notFound?h(t)?e:m(t,"HEAD").then(t=>200===t.status?{status:c.Error}:e):e)},t}(g);const w=e=>{b=e},A={enqueue:e=>b.prefetch(e),getResourceURLsForPathname:e=>b.getResourceURLsForPathname(e),loadPage:e=>b.loadPage(e),loadPageSync:function(e,t){return void 0===t&&(t={}),b.loadPageSync(e,t)},prefetch:e=>b.prefetch(e),isPageNotFound:e=>b.isPageNotFound(e),hovering:e=>b.hovering(e),loadAppData:()=>b.loadAppData()};var _=A;function I(){return b?b.staticQueryDb:{}}function k(){return b?b.slicesDb:{}}},6877:function(e,t,n){t.components={"component---src-pages-404-js":()=>n.e(125).then(n.bind(n,3331)),"component---src-pages-about-js":()=>Promise.all([n.e(64),n.e(432)]).then(n.bind(n,9434)),"component---src-pages-ai-transparency-js":()=>n.e(774).then(n.bind(n,532)),"component---src-pages-index-js":()=>n.e(57).then(n.bind(n,1902)),"component---src-pages-ja-about-js":()=>n.e(266).then(n.bind(n,1760)),"component---src-pages-ja-index-js":()=>Promise.all([n.e(57),n.e(371)]).then(n.bind(n,7185)),"component---src-pages-ja-recommendations-js":()=>Promise.all([n.e(675),n.e(687)]).then(n.bind(n,1341)),"component---src-pages-ja-stats-js":()=>Promise.all([n.e(916),n.e(88)]).then(n.bind(n,2613)),"component---src-pages-recommendations-js":()=>n.e(675).then(n.bind(n,5899)),"component---src-pages-resume-js":()=>Promise.all([n.e(64),n.e(480)]).then(n.bind(n,3116)),"component---src-pages-stats-js":()=>n.e(916).then(n.bind(n,3292)),"component---src-pages-til-js":()=>Promise.all([n.e(155),n.e(32)]).then(n.bind(n,150)),"component---src-pages-uses-js":()=>n.e(879).then(n.bind(n,8371)),"component---src-pages-values-js":()=>n.e(789).then(n.bind(n,2709)),"component---src-templates-blog-post-js":()=>n.e(751).then(n.bind(n,6093)),"component---src-templates-til-post-js":()=>Promise.all([n.e(155),n.e(340)]).then(n.bind(n,2972)),"component---src-templates-topic-page-js":()=>n.e(739).then(n.bind(n,4851))}},7035:function(e,t,n){"use strict";t.RV=t.z_=void 0;var i=n(3215);t.z_=i.ScrollHandler;var r=n(3721);t.RV=r.useScrollRestoration},7078:function(e,t,n){"use strict";n.d(t,{Fe:function(){return m},N_:function(){return A},Rr:function(){return l},Zf:function(){return f},oo:function(){return _}});
1var i=n(5556),r=n(6540),a=n(6462),o=n(6395);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(this,arguments)}function l(e){let t=e||"/",n="",i="";const r=t.indexOf("#");-1!==r&&(i=t.slice(r),t=t.slice(0,r));const a=t.indexOf("?");return-1!==a&&(n=t.slice(a),t=t.slice(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===i?"":i}}const d=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,c=e=>{if("string"==typeof e)return!(e=>d.test(e))(e)},u=()=>"",h=()=>"";function m(e,t=u()){var n;if(!c(e))return e;if(e.startsWith("./")||e.startsWith("../"))return e;const i=null!=(n=null!=t?t:h())?n:"/";return`${null!=i&&i.endsWith("/")?i.slice(0,-1):i}${e.startsWith("/")?e:`/${e}`}`}const p=e=>null==e?void 0:e.startsWith("/");function v(e,t){const{pathname:n,search:i,hash:r}=l(e);return`${(0,o.T)(n,t)}${i}${r}`}const E=(e,t)=>"number"==typeof e?e:c(e)?p(e)?function(e){const t=m(e),n="always";return v(t,n)}(e):function(e,t){if(p(e))return e;const n="always",i=(0,a.resolve)(e,t);return v(i,n)}(e,t):e,g=["to","getProps","onClick","onMouseEnter","activeClassName","activeStyle","innerRef","partiallyActive","state","replace","_location"];function f(e){return m(e,h())}const b={activeClassName:i.string,activeStyle:i.object,partiallyActive:i.bool};function y(e){return r.createElement(a.Location,null,({location:t})=>r.createElement(w,s({},e,{_location:t})))}class w extends r.Component{constructor(e){super(e),this.defaultGetProps=({isPartiallyCurrent:e,isCurrent:t})=>(this.props.partiallyActive?e:t)?{className:[this.props.className,this.props.activeClassName].filter(Boolean).join(" "),style:s({},this.props.style,this.props.activeStyle)}:null;let t=!1;"undefined"!=typeof window&&window.IntersectionObserver&&(t=!0),this.state={IOSupported:t},this.abortPrefetch=null,this.handleRef=this.handleRef.bind(this)}_prefetch(){let e=window.location.pathname+window.location.search;this.props._location&&this.props._location.pathname&&(e=this.props._location.pathname+this.props._location.search);const t=l(E(this.props.to,e)),n=t.pathname+t.search;if(e!==n)return ___loader.enqueue(n)}componentWillUnmount(){if(!this.io)return;const{instance:e,el:t}=this.io;this.abortPrefetch&&this.abortPrefetch.abort(),e.unobserve(t),e.disconnect()}handleRef(e){this.props.innerRef&&Object.prototype.hasOwnProperty.call(this.props.innerRef,"current")?this.props.innerRef.current=e:this.props.innerRef&&this.props.innerRef(e),this.state.IOSupported&&e&&(this.io=((e,t)=>{const n=new window.IntersectionObserver(n=>{n.forEach(n=>{e===n.target&&t(n.isIntersecting||n.intersectionRatio>0)})});return n.observe(e),{instance:n,el:e}})(e,e=>{e?this.abortPrefetch=this._prefetch():this.abortPrefetch&&this.abortPrefetch.abort()}))}render(){const e=this.props,{to:t,getProps:n=this.defaultGetProps,onClick:i,onMouseEnter:o,state:d,replace:u,_location:h}=e,m=function(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)t.indexOf(n=a[i])>=0||(r[n]=e[n]);return r}(e,g),p=E(t,h.pathname);return c(p)?r.createElement(a.Link,s({to:p,state:d,getProps:n,innerRef:this.handleRef,onMouseEnter:e=>{o&&o(e);const t=l(p);___loader.hovering(t.pathname+t.search)},onClick:e=>{if(i&&i(e),!(0!==e.button||this.props.target||e.defaultPrevented||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault();let t=u;const n=encodeURI(p)===h.pathname;"boolean"!=typeof u&&n&&(t=!0),window.___navigate(p,{state:d,replace:t})}return!0}},m)):r.createElement("a",s({href:p},m))}}w.propTypes=s({},b,{onClick:i.func,to:i.string.isRequired,replace:i.bool,state:i.object});const A=r.forwardRef((e,t)=>r.createElement(y,s({innerRef:t},e))),_=(e,t)=>
1{window.___navigate(E(e,window.location.pathname),t)}},7231:function(e,t,n){"use strict";n.d(t,{de:function(){return l},G:function(){return r},GR:function(){return d}});var i=n(6540);const r=(a="StaticQuery",o={},i.createServerContext?function(e,t){return void 0===t&&(t=null),globalThis.__SERVER_CONTEXT||(globalThis.__SERVER_CONTEXT={}),globalThis.__SERVER_CONTEXT[e]||(globalThis.__SERVER_CONTEXT[e]=i.createServerContext(e,t)),globalThis.__SERVER_CONTEXT[e]}(a,o):i.createContext(o));var a,o;function s(e){let{staticQueryData:t,data:n,query:r,render:a}=e;const o=n?n.data:t[r]&&t[r].data;return i.createElement(i.Fragment,null,o&&a(o),!o&&i.createElement("div",null,"Loading (StaticQuery)"))}const l=e=>{const{data:t,query:n,render:a,children:o}=e;return i.createElement(r.Consumer,null,e=>i.createElement(s,{data:t,query:n,render:a||o,staticQueryData:e}))},d=e=>{var t;i.useContext;const n=i.useContext(r);if(isNaN(Number(e)))throw new Error(`useStaticQuery was called with a string but expects to be called using \`graphql\`. Try this:\n\nimport { useStaticQuery, graphql } from 'gatsby';\n\nuseStaticQuery(graphql\`${e}\`);\n`);if(null!==(t=n[e])&&void 0!==t&&t.data)return n[e].data;throw new Error("The result of this StaticQuery could not be fetched.\n\nThis is likely a bug in Gatsby and if refreshing the page does not fix it, please open an issue in https://github.com/gatsbyjs/gatsby/issues")}},7387:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});var i=n(3662);function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,i.A)(e,t)}},7514:function(){"use strict"},7688:function(e,t){"use strict";t.DEFAULT_OPTIONS={maxWidth:650,wrapperStyle:"",backgroundColor:"white",linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,withWebp:!1,withAvif:!1,tracedSVG:!1,loading:"lazy",decoding:"async",disableBgImageOnAlpha:!1,disableBgImage:!1},t.EMPTY_ALT="GATSBY_EMPTY_ALT",t.imageClass="gatsby-resp-image-image",t.imageWrapperClass="gatsby-resp-image-wrapper",t.imageBackgroundClass="gatsby-resp-image-background-image"},7914:function(e,t,n){"use strict";n.r(t),n.d(t,{onRouteUpdate:function(){return i}});n(4794),n(4598);const i=function(e,t){let{location:n}=e}},8428:function(e,t,n){"use strict";n.d(t,{A:function(){return R}});var i=n(6540),r=n(5556),a=n.n(r),o=n(20),s=n(8990),l=n(4506),d=n(4794),c=n(6462),u=n(9732);function h(e){let{children:t,callback:n}=e;return(0,i.useEffect)(()=>{n()}),t}const m=["link","meta","style","title","base","noscript","script","html","body"],p="itemProp",v="gatsby-do-not-hoist-me-react",E="data-original-tag",g=i.createContext(!1);function f(e){0}function b(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){const n=t.getAttribute("nonce");if(n&&!e.getAttribute("nonce")){const i=t.cloneNode(!0);return i.setAttribute("nonce",""),i.nonce=n,n===e.nonce&&e.isEqualNode(i)}}return e.isEqualNode(t)}function y(e,t){void 0===t&&(t={html:{},body:{}});const n=new Map,i=[];for(const h of e.childNodes){var r,a,o,s,d;if(!_(h))continue;const e=null!==(r=null===(a=h.attributes)||void 0===a||null===(o=a.getNamedItem(E))||void 0===o?void 0:o.value)&&void 0!==r?r:h.nodeName.toLowerCase(),m=null===(s=h.attributes)||void 0===s||null===(d=s.id)||void 0===d?void 0:d.value;if(A(e))if("html"===e||"body"===e)for(const n of h.attributes){if(n.name===E)continue;const i="style"===n.name;var c;if(t[e]={...t[e]},i||(t[e][n.name]=n.value),i)t[e].style=`${null!==(c=t[e])&&void 0!==c&&c.style?t[e].style:""}${n.value} `}else{let e=h.cloneNode(!0);if(e.setAttribute("data-gatsby-head",!0),e.getAttribute(p)===v&&e.removeAttribute(p),"script"===e.nodeName.toLowerCase()&&(e=w(e)),m)if(n.has(m)){var u;const t=n.get(m);null===(u=i[t].parentNode)||void 0===u||u.removeChild(i[t]),i[t]=e}else i.push(e),n.set(m,i.length-1);else i.push(e)}else f();h.childNodes.length&&i.push.apply(i,(0,l.A)(y(h,t).validHeadNodes))}return{validHeadNodes:i,htmlAndBodyAttributes:t}}function w(e){const t=document.createElement(e.nodeName);for(const n of e.attributes)t.setAttribute(n.name,n.value);return t.innerHTML=e.innerHTML,t}function A(e){return m.includes(e)}function _(e){return 1===e.nodeType}const I=document.createElement("div"),k={html:[],body:[]},T=()=>{var e;const{validHeadNodes:t,htmlAndBodyAttributes:n}=y(I);k.html=Object.keys(n.html),k.body=Object.keys(n.body),function(e){if(!e)return;const{html:t,body:n}=e,i=document.querySelector("html");
1i&&Object.entries(t).forEach(e=>{let[t,n]=e;i.setAttribute(t,n)});const r=document.querySelector("body");r&&Object.entries(n).forEach(e=>{let[t,n]=e;r.setAttribute(t,n)})}(n);const i=document.querySelectorAll("[data-gatsby-head]");var r;if(0===i.length)return void(r=document.head).append.apply(r,(0,l.A)(t));const a=[];!function(e){let{oldNodes:t,newNodes:n,onStale:i,onNew:r}=e;for(const a of t){const e=n.findIndex(e=>b(e,a));-1===e?i(a):n.splice(e,1)}for(const a of n)r(a)}({oldNodes:i,newNodes:t,onStale:e=>e.parentNode.removeChild(e),onNew:e=>a.push(e)}),(e=document.head).append.apply(e,a)};if(18!==parseInt(i.version.split(".")[0],10)&&!i.createElement.headPatched){const e=i.createElement,t=function(e,t){function n(){return!!t||i.useContext(g)}return new Map(m.map(t=>[t,"html"===t||"body"===t?function(t){const i=i=>{if(n()){const n={...i,[E]:t};return e("div",n)}return e(t,i)};return i.displayName=`React19HeadAPICompat${t}`,i}(t):function(t){const i=i=>{if(n()&&!(p in i)){const n={...i,[p]:v};return e(t,n)}return e(t,i)};return i.displayName=`React19HeadAPICompat${t}`,i}(t)]))}(e,!1);i.createElement=function(n,r){const a=t.get(n);a&&(n=a);for(var o=arguments.length,s=new Array(o>2?o-2:0),l=2;l<o;l++)s[l-2]=arguments[l];return e.call.apply(e,[i,n,r].concat(s))},i.createElement.headPatched=!0}function S(e){let{pageComponent:t,staticQueryResults:n,pageComponentProps:r}=e;(0,i.useEffect)(()=>{if(null!=t&&t.Head){!function(e){if("function"!=typeof e)throw new Error(`Expected "Head" export to be a function got "${typeof e}".`)}(t.Head);const{render:a}=(0,u.n)(),s=i.createElement(t.Head,{location:{pathname:(e=r).location.pathname},params:e.params,data:e.data||{},serverData:e.serverData,pageContext:e.pageContext}),l=(0,o.N)("wrapRootElement",{element:s},s,e=>{let{result:t}=e;return{element:t}}).pop();a(i.createElement(h,{callback:T},i.createElement(g.Provider,{value:!0},i.createElement(d.StaticQueryContext.Provider,{value:n},i.createElement(c.LocationProvider,null,l)))),I)}var e;return()=>{!function(){const e=document.querySelectorAll("[data-gatsby-head]");for(const t of e)t.parentNode.removeChild(t)}(),function(e){if(!e)return;const{html:t,body:n}=e;if(t){const e=document.querySelector("html");t.forEach(t=>{e&&e.removeAttribute(t)})}if(n){const e=document.querySelector("body");n.forEach(t=>{e&&e.removeAttribute(t)})}}(k)}})}function M(e){const t={...e,params:{...(0,s.UA)(e.location.pathname),...e.pageResources.json.pageContext.__params}};let n;var r;n=e.pageResources.partialHydration?e.pageResources.partialHydration:(0,i.createElement)((r=e.pageResources.component)&&r.default||r,{...t,key:e.path||e.pageResources.page.path});S({pageComponent:e.pageResources.head,staticQueryResults:e.pageResources.staticQueryResults,pageComponentProps:t});return(0,o.N)("wrapPageElement",{element:n,props:t},n,e=>{let{result:n}=e;return{element:n,props:t}}).pop()}M.propTypes={location:a().object.isRequired,pageResources:a().object.isRequired,data:a().object,pageContext:a().object.isRequired};var R=M},8710:function(e,t){"use strict";t.onRouteUpdate=function(e,t){var n=e.location;if(void 0===t&&(t={}),"function"!=typeof gtag)return null;var i=t.pluginConfig||{};if(n&&void 0!==window.excludeGtagPaths&&window.excludeGtagPaths.some(function(e){return e.test(n.pathname)}))return null;var r=function(){var e=n?n.pathname+n.search+n.hash:void 0;window.gtag("event","page_view",{page_path:e})},a=i.delayOnRouteUpdate,o=void 0===a?0:a;return"requestAnimationFrame"in window?requestAnimationFrame(function(){requestAnimationFrame(function(){return setTimeout(r,o)})}):setTimeout(r,32+o),null}},8797:function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=""),t?e===t?"/":e.startsWith(`${t}/`)?e.slice(t.length):e:e}n.d(t,{A:function(){return i}})},8990:function(e,t,n){"use strict";n.d(t,{Yl:function(){return h},Hh:function(){return p},UA:function(){return m},QX:function(){return u}});var i=n(6462),r=n(8797),a=e=>{if(void 0===e)return e;let[t,n=""]=e.split("?");return n&&(n="?"+n),"/"===t?"/"+n:"/"===t.charAt(t.length-1)?t.slice(0,-1)+n:t+n},o=n(6491);const s=new Map;let l=[];const d=e=>{let t=e;if(-1!==e.indexOf("?")){const[n,i]=e.split("?");t=`${n}?${encodeURIComponent(i)}`}const n=decodeURIComponent(t);return(0,r.A)(n,decodeURIComponent("")).split("#")[0]};function c(e){return e.startsWith("/")||e.startsWith("https://")||e.startsWith("http://")?e:new URL(e,window.location.href+(window.location.href.endsWith("/")?"":"/")).pathname}const u=e=>{l=e},h=e=>{const t=v(e),n=l.map(e=>{let{path:t,matchPath:n}=e;return{path:n,originalPath:t}}),r=(0,i.pick)(n,t);return r?a(r.route.originalPath):null},m=e=>{const t=v(e),n=l.map(e=>{let{path:t,matchPath:n}=e;return{path:n,originalPath:t}}),r=(0,i.pick)(n,t);return r?r.params:{}},p=e=>{const t=d(c(e));if(s.has(t))return s.get(t);const n=(0,o.X)(e);if(n)return p(n.toPath);let i=h(t);
1return i||(i=v(e)),s.set(t,i),i},v=e=>{let t=d(c(e));return"/index.html"===t&&(t="/"),t=a(t),t}},9300:function(e,t,n){"use strict";t.__esModule=!0,t.injectPartytownSnippet=function(e){if(!e.length)return;const t=document.querySelector("script[data-partytown]"),n=document.querySelector('iframe[src*="~partytown/partytown-sandbox-sw"]');t&&t.remove();n&&n.remove();const a=(0,r.getForwards)(e),o=document.createElement("script");o.dataset.partytown="",o.innerHTML=(0,i.partytownSnippet)({forward:a}),document.head.appendChild(o)};var i=n(4656),r=n(3309)},9369:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var i=function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}()},9377:function(e,t,n){e.exports=[{plugin:n(6774),options:{plugins:[],icon:!1,offsetY:0,className:"anchor"}},{plugin:n(5616),options:{plugins:[],maxWidth:1600,backgroundColor:"transparent",linkImagesToOriginal:!0,showCaptions:!1,markdownCaptions:!1,quality:50,withWebp:!1,withAvif:!1,loading:"lazy",decoding:"async",disableBgImageOnAlpha:!1,disableBgImage:!1}},{plugin:n(8710),options:{plugins:[],trackingIds:["G-FGECNRP32R"],gtagConfig:{anonymize_ip:!0,cookie_expires:0},pluginConfig:{head:!1,respectDNT:!0,exclude:[],origin:"https://www.googletagmanager.com",delayOnRouteUpdate:0}}},{plugin:n(7914),options:{plugins:[],name:"Vinit's blog",short_name:"Vinit Kumar",start_url:"/",background_color:"#FFF8E7",theme_color:"#FFF8E7",display:"minimal-ui",icon:"src/images/favicon-32x32.png",legacy:!0,theme_color_in_head:!0,cache_busting_mode:"query",crossOrigin:"anonymous",include_favicon:!0,cacheDigest:"2a29b860387b7d9b9cbc80f850e7996b"}},{plugin:n(4860),options:{plugins:[]}},{plugin:n(7514),options:{plugins:[],pathToConfigModule:"src/utils/typography"}},{plugin:n(213),options:{plugins:[]}},{plugin:n(2311),options:{plugins:[]}}]},9732:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});const i=new WeakMap;function r(){const e=n(5338);return{render:function(t,n,r){void 0===r&&(r={});let a=i.get(n);if(!a){const t=r.onUncaughtError||r.onCaughtError?{onUncaughtError:r.onUncaughtError,onCaughtError:r.onCaughtError}:void 0;i.set(n,a=e.createRoot(n,t))}a.render(t)},hydrate:function(t,n,i){void 0===i&&(i={});const r=i.onUncaughtError||i.onCaughtError?{onUncaughtError:i.onUncaughtError,onCaughtError:i.onCaughtError}:void 0;return e.hydrateRoot(n,t,r)}}}}},function(e){e.O(0,[593,869],function(){return t=6498,e(e.s=t);var t});e.O()}]);
2//# sourceMappingURL=app-749b4e5b03dfc6c263e8.js.map

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