import{r as U,d as lt,b as Ot,u as ot,t as Dt,X as jt,a as d,B as Bt,Y as qt,G as Pe,e as R,g as F,j as K,F as ye,P as Ke,H as ze,Z as Rt,_ as Ht,w as Vt,h as Ut,i as re,S as Qt,E as Wt,M as Kt,k as Ge,o as zt,$ as Gt,l as Xe,m as Ze,n as Xt,p as Zt,q as Yt,v as _t,x as Jt,y as $t,z as ei,C as ti,c as ii}from"./App.03d0734f.js";import"./lib-flexible.08f197e6.js";import{h as si,N as Q,c as ee}from"./index.aaeaa9d5.js";import{s as ni}from"./state.731c32e9.js";import"./index.04ceacbb.js";import"./music.b35eb5be.js";import"./index.a0d4ab04.js";import"./index.270b5f1c.js";function Is(){import("data:text/javascript,")}const ai="_musicSheet_kzmj4_1",li="_headTitle_kzmj4_7",oi="_btn_kzmj4_13",ri="_btnCont_kzmj4_20",ci="_popup_kzmj4_26";var ui={musicSheet:ai,headTitle:li,btn:oi,btnCont:ri,popup:ci};const hi="_header_seljm_1",di="_leftButton_seljm_18",mi="_back_seljm_22",pi="_info_seljm_29",gi="_musicName_seljm_43",fi="_demos_seljm_52",yi="_line_seljm_115",bi="_btns_seljm_129",vi="_pop_seljm_140",wi="_close_seljm_176",Ti="_trybtn_seljm_196",Ai="_videoContent_seljm_207",ki="_box_seljm_213";var H={header:hi,leftButton:di,back:mi,info:pi,musicName:gi,demos:fi,line:yi,btns:bi,pop:vi,close:wi,try:"_try_seljm_190",trybtn:Ti,videoContent:Ai,box:ki},Ci="/orchestra-music-score/assets/again.78a8b607.svg",Ei="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAAAXNSR0IArs4c6QAAD5BJREFUeF69nAt0VcW5x39zEiDyaKWlVZekiiIFWqu0UhEQRbAqvlIEGyRgUURRgVvwitVqT13Kqzw0kECLFkulIC+htQkUlba8ulDitfWCgs+C9XorUk0BgWRP1+xXZs+effY5PLrXysrJOXtmz/zn+/7f//tmTgT/gUtWDm1PJtMbhy4IOiFlJ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Qz8r3Ls8A/T/rCNvAeDY28C6aUC2Jb6knc2YTosaF7uM+J8tPVK6EuDJgWGeZ9yGTmbgF4Grb3TAvvYC8JF4f0w1qIT9bKoIuP52R94njgAH/5wDq8asmqak44SPkC0eRA9vE6832l8K4Hv6gYsPA9zLXHmFmIROXgHpKv1e0mdOpmdS8n3yt5hCixrzRZUK2D5ncelkwFrpBaVuQXLMhR43PqWP8fQgcZ71mxnxQfyr+1Cqq8vKBhN8IJ7JpFDy+gvI4mbfFaLq2cDxy9DP6jo5Odzye9SMlDWMFu6ynyeFAnZYHjUA6PBKvvpKKuOEYOP2s+7KfXNz+SFB7r6U+iVVNyxXwQZiWP4APzzmu7B4OxjOK4ahTXhIwxHVvBdaw8uKkr0DqKNFO8fqwIYCtq9RPfrHANaCOS/9RGWdGoeqUhL2szpJ+8DSPnS+eIebcxMx7KmnevQMMC8MsqzI1peGohQRVdxori2bu041TIeAluG0+C/KqwcxYljdGV4wegqIl4HZqS60BpUwz3psyZYvXdtY4mpUAtqHposjadleaUSiF3Xku5Ye0/NHlYKwHoyuyuv65mdScuwnqdGNbKrM2zeoQ+emijAZR7q0KeB5wT2DwbQJYPHGQPDBdABgWLXVxjwLbgalppncuCDT0p3EU0eUoFe3alg8GeAO+mfKkkx1zCYyPvd9ccngRFFB/BNdnjUBdf8eW9KBuJ77/a+AUivA0r8BaOM77D0vL2D072Cp0xdRGzNm4+1utWoFFQW0zYC9pc77wQhYXAngm9rpYrvkWfoAxEvRWrxKbgTigiw4hsNuwJm7rweK0gBPAHM/57NtyLP2WAa7kcJTKL64Na4pRW1CwZI2GltmeBHQYygItyFr3Qai6+wN8MWtNoc3gfEWiPbDsp4HOj8vZlBRAJIeb3fAWqObflcvFBddA7J6g9EdsLqBqBlZ6xyYziCVehdF2/9DGST+t5ykgP8HFBpqjHlpbdQAAAAASUVORK5CYII=",Pi="/orchestra-music-score/assets/videobg.2d19d627.png";function g(e,i,t){return i in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function Ii(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}function _e(e,i){for(var t=0;ti){var t=Ri(i);return parseFloat(e.toFixed(t))}return Math.round(e/i)*i}var Vi=function(){function e(i,t){Ii(this,e),V.element(i)?this.element=i:V.string(i)&&(this.element=document.querySelector(i)),V.element(this.element)&&V.empty(this.element.rangeTouch)&&(this.config=$e({},et,{},t),this.init())}return Ni(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(i){var t=this,s=i?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(n){t.element[s](n,function(a){return t.set(a)},!1)})}},{key:"get",value:function(i){if(!e.enabled||!V.event(i))return null;var t,s=i.target,n=i.changedTouches[0],a=parseFloat(s.getAttribute("min"))||0,o=parseFloat(s.getAttribute("max"))||100,r=parseFloat(s.getAttribute("step"))||1,c=s.getBoundingClientRect(),m=100/c.width*(this.config.thumbWidth/2)/100;return 0>(t=100/c.width*(n.clientX-c.left))?t=0:100t?t-=(100-2*t)*m:50e!=null?e.constructor:null,_=(e,i)=>Boolean(e&&i&&e instanceof i),Re=e=>e==null,mt=e=>oe(e)===Object,Ui=e=>oe(e)===Number&&!Number.isNaN(e),Ce=e=>oe(e)===String,Qi=e=>oe(e)===Boolean,pt=e=>oe(e)===Function,gt=e=>Array.isArray(e),Wi=e=>_(e,WeakMap),ft=e=>_(e,NodeList),Ki=e=>oe(e)===Text,zi=e=>_(e,Event),Gi=e=>_(e,KeyboardEvent),Xi=e=>_(e,window.TextTrackCue)||_(e,window.VTTCue),Zi=e=>_(e,TextTrack)||!Re(e)&&Ce(e.kind),Yi=e=>_(e,Promise)&&pt(e.then),_i=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",yt=e=>Re(e)||(Ce(e)||gt(e)||ft(e))&&!e.length||mt(e)&&!Object.keys(e).length,Ji=e=>{if(_(e,window.URL))return!0;if(!Ce(e))return!1;let i=e;e.startsWith("http://")&&e.startsWith("https://")||(i=`http://${e}`);try{return!yt(new URL(i).hostname)}catch{return!1}};var l={nullOrUndefined:Re,object:mt,number:Ui,string:Ce,boolean:Qi,function:pt,array:gt,weakMap:Wi,nodeList:ft,element:_i,textNode:Ki,event:zi,keyboardEvent:Gi,cue:Xi,track:Zi,promise:Yi,url:Ji,empty:yt};const Fe=(()=>{const e=document.createElement("span"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(i).find(s=>e.style[s]!==void 0);return!!l.string(t)&&i[t]})();function bt(e,i){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch{}},i)}const q={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function $i(e){return JSON.parse(JSON.stringify(e))}function vt(e,i){return i.split(".").reduce((t,s)=>t&&t[s],e)}function D(e={},...i){if(!i.length)return e;const t=i.shift();return l.object(t)?(Object.keys(t).forEach(s=>{l.object(t[s])?(Object.keys(e).includes(s)||Object.assign(e,{[s]:{}}),D(e[s],t[s])):Object.assign(e,{[s]:t[s]})}),D(e,...i)):e}function wt(e,i){const t=e.length?e:[e];Array.from(t).reverse().forEach((s,n)=>{const a=n>0?i.cloneNode(!0):i,o=s.parentNode,r=s.nextSibling;a.appendChild(s),r?o.insertBefore(a,r):o.appendChild(a)})}function Le(e,i){l.element(e)&&!l.empty(i)&&Object.entries(i).filter(([,t])=>!l.nullOrUndefined(t)).forEach(([t,s])=>e.setAttribute(t,s))}function T(e,i,t){const s=document.createElement(e);return l.object(i)&&Le(s,i),l.string(t)&&(s.innerText=t),s}function es(e,i){l.element(e)&&l.element(i)&&i.parentNode.insertBefore(e,i.nextSibling)}function tt(e,i,t,s){l.element(i)&&i.appendChild(T(e,t,s))}function Y(e){l.nodeList(e)||l.array(e)?Array.from(e).forEach(Y):l.element(e)&&l.element(e.parentNode)&&e.parentNode.removeChild(e)}function be(e){if(!l.element(e))return;let{length:i}=e.childNodes;for(;i>0;)e.removeChild(e.lastChild),i-=1}function Te(e,i){return l.element(i)&&l.element(i.parentNode)&&l.element(e)?(i.parentNode.replaceChild(e,i),e):null}function z(e,i){if(!l.string(e)||l.empty(e))return{};const t={},s=D({},i);return e.split(",").forEach(n=>{const a=n.trim(),o=a.replace(".",""),r=a.replace(/[[\]]/g,"").split("="),[c]=r,m=r.length>1?r[1].replace(/["']/g,""):"";switch(a.charAt(0)){case".":l.string(s.class)?t.class=`${s.class} ${o}`:t.class=o;break;case"#":t.id=a.replace("#","");break;case"[":t[c]=m}}),D(s,t)}function te(e,i){if(!l.element(e))return;let t=i;l.boolean(t)||(t=!e.hidden),e.hidden=t}function P(e,i,t){if(l.nodeList(e))return Array.from(e).map(s=>P(s,i,t));if(l.element(e)){let s="toggle";return t!==void 0&&(s=t?"add":"remove"),e.classList[s](i),e.classList.contains(i)}return!1}function Ae(e,i){return l.element(e)&&e.classList.contains(i)}function ie(e,i){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(e,i)}function ts(e,i){const{prototype:t}=Element;return(t.closest||function(){let s=this;do{if(ie.matches(s,i))return s;s=s.parentElement||s.parentNode}while(s!==null&&s.nodeType===1);return null}).call(e,i)}function ne(e){return this.elements.container.querySelectorAll(e)}function j(e){return this.elements.container.querySelector(e)}function Ie(e=null,i=!1){l.element(e)&&(e.focus({preventScroll:!0}),i&&P(e,this.config.classNames.tabFocus))}const it={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},O={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,i,t){const s=q.isIPhone&&t&&O.playsinline,n=O[e]||i!=="html5";return{api:n,ui:n&&O.rangeInput&&(e!=="video"||!q.isIPhone||s)}},pip:!(q.isIPhone||!l.function(T("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||T("video").disablePictureInPicture)),airplay:l.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(l.empty(e))return!1;const[i]=e.split("/");let t=e;if(!this.isHTML5||i!==this.type)return!1;Object.keys(it).includes(t)&&(t+=`; codecs="${it[e]}"`);try{return Boolean(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const e=document.createElement("input");return e.type="range",e.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:Fe!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},is=(()=>{let e=!1;try{const i=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch{}return e})();function ae(e,i,t,s=!1,n=!0,a=!1){if(!e||!("addEventListener"in e)||l.empty(i)||!l.function(t))return;const o=i.split(" ");let r=a;is&&(r={passive:n,capture:a}),o.forEach(c=>{this&&this.eventListeners&&s&&this.eventListeners.push({element:e,type:c,callback:t,options:r}),e[s?"addEventListener":"removeEventListener"](c,t,r)})}function S(e,i="",t,s=!0,n=!1){ae.call(this,e,i,t,!0,s,n)}function Ee(e,i="",t,s=!0,n=!1){ae.call(this,e,i,t,!1,s,n)}function He(e,i="",t,s=!0,n=!1){const a=(...o)=>{Ee(e,i,a,s,n),t.apply(this,o)};ae.call(this,e,i,a,!0,s,n)}function w(e,i="",t=!1,s={}){if(!l.element(e)||l.empty(i))return;const n=new CustomEvent(i,{bubbles:t,detail:{...s,plyr:this}});e.dispatchEvent(n)}function ss(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:i,type:t,callback:s,options:n}=e;i.removeEventListener(t,s,n)}),this.eventListeners=[])}function ns(){return new Promise(e=>this.ready?setTimeout(e,0):S.call(this,this.elements.container,"ready",e)).then(()=>{})}function X(e){l.promise(e)&&e.then(null,()=>{})}function Oe(e){return l.array(e)?e.filter((i,t)=>e.indexOf(i)===t):e}function Tt(e,i){return l.array(e)&&e.length?e.reduce((t,s)=>Math.abs(s-i)({...e,[i/t]:[i,t]}),{});function kt(e){return l.array(e)||l.string(e)&&e.includes(":")?(l.array(e)?e:e.split(":")).map(Number).every(l.number):!1}function ke(e){if(!l.array(e)||!e.every(l.number))return null;const[i,t]=e,s=(a,o)=>o===0?a:s(o,a%o),n=s(i,t);return[i/n,t/n]}function Ve(e){const i=s=>kt(s)?s.split(":").map(Number):null;let t=i(e);if(t===null&&(t=i(this.config.ratio)),t===null&&!l.empty(this.embed)&&l.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:s,videoHeight:n}=this.media;t=[s,n]}return ke(t)}function le(e){if(!this.isVideo)return{};const{wrapper:i}=this.elements,t=Ve.call(this,e);if(!l.array(t))return{};const[s,n]=ke(t),a=100/s*n;if(At(`aspect-ratio: ${s}/${n}`)?i.style.aspectRatio=`${s}/${n}`:i.style.paddingBottom=`${a}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const o=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),r=(o-a)/(o/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform=`translateY(-${r}%)`}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:a,ratio:t}}function Ct(e,i,t=.05){const s=e/i,n=Tt(Object.keys(st),s);return Math.abs(n-s)<=t?st[n]:[e,i]}function as(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const $={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const i=e.getAttribute("type");return!!l.empty(i)||O.mime.call(this,i)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:$.getSources.call(this).map(e=>Number(e.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const e=this;e.options.speed=e.config.speed.options,l.empty(this.config.ratio)||le.call(e),Object.defineProperty(e.media,"quality",{get(){const i=$.getSources.call(e).find(t=>t.getAttribute("src")===e.source);return i&&Number(i.getAttribute("size"))},set(i){if(e.quality!==i){if(e.config.quality.forced&&l.function(e.config.quality.onChange))e.config.quality.onChange(i);else{const t=$.getSources.call(e).find(c=>Number(c.getAttribute("size"))===i);if(!t)return;const{currentTime:s,paused:n,preload:a,readyState:o,playbackRate:r}=e.media;e.media.src=t.getAttribute("src"),(a!=="none"||o)&&(e.once("loadedmetadata",()=>{e.speed=r,e.currentTime=s,n||X(e.play())}),e.media.load())}w.call(e,e.media,"qualitychange",!1,{quality:i})}}})},cancelRequests(){this.isHTML5&&(Y($.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function ls(e){return`${e}-${Math.floor(1e4*Math.random())}`}function De(e,...i){return l.empty(e)?e:e.toString().replace(/{(\d+)}/g,(t,s)=>i[s].toString())}function os(e,i){return e===0||i===0||Number.isNaN(e)||Number.isNaN(i)?0:(e/i*100).toFixed(2)}const he=(e="",i="",t="")=>e.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Et=(e="")=>e.toString().replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.substr(1).toLowerCase());function rs(e=""){let i=e.toString();return i=he(i,"-"," "),i=he(i,"_"," "),i=Et(i),he(i," ","")}function cs(e=""){let i=e.toString();return i=rs(i),i.charAt(0).toLowerCase()+i.slice(1)}function us(e){const i=document.createDocumentFragment(),t=document.createElement("div");return i.appendChild(t),t.innerHTML=e,i.firstChild.innerText}function hs(e){const i=document.createElement("div");return i.appendChild(e),i.innerHTML}const nt={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},B={get(e="",i={}){if(l.empty(e)||l.empty(i))return"";let t=vt(i.i18n,e);if(l.empty(t))return Object.keys(nt).includes(e)?nt[e]:"";const s={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(s).forEach(([n,a])=>{t=he(t,n,a)}),t}};class de{constructor(i){g(this,"get",t=>{if(!de.supported||!this.enabled)return null;const s=window.localStorage.getItem(this.key);if(l.empty(s))return null;const n=JSON.parse(s);return l.string(t)&&t.length?n[t]:n}),g(this,"set",t=>{if(!de.supported||!this.enabled||!l.object(t))return;let s=this.get();l.empty(s)&&(s={}),D(s,t),window.localStorage.setItem(this.key,JSON.stringify(s))}),this.enabled=i.config.storage.enabled,this.key=i.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const i="___test";return window.localStorage.setItem(i,i),window.localStorage.removeItem(i),!0}catch{return!1}}}function ge(e,i="text"){return new Promise((t,s)=>{try{const n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",()=>{if(i==="text")try{t(JSON.parse(n.responseText))}catch{t(n.responseText)}else t(n.response)}),n.addEventListener("error",()=>{throw new Error(n.status)}),n.open("GET",e,!0),n.responseType=i,n.send()}catch(n){s(n)}})}function St(e,i){if(!l.string(e))return;const t=l.string(i);let s=!1;const n=()=>document.getElementById(i)!==null,a=(o,r)=>{o.innerHTML=r,t&&n()||document.body.insertAdjacentElement("afterbegin",o)};if(!t||!n()){const o=de.supported,r=document.createElement("div");if(r.setAttribute("hidden",""),t&&r.setAttribute("id",i),o){const c=window.localStorage.getItem(`cache-${i}`);if(s=c!==null,s){const m=JSON.parse(c);a(r,m.content)}}ge(e).then(c=>{l.empty(c)||(o&&window.localStorage.setItem(`cache-${i}`,JSON.stringify({content:c})),a(r,c))}).catch(()=>{})}}const Pt=e=>Math.trunc(e/60/60%60,10),ds=e=>Math.trunc(e%60,10);function Se(e=0,i=!1,t=!1){if(!l.number(e))return Se(void 0,i,t);const s=c=>`0${c}`.slice(-2);let n=Pt(e);const a=(o=e,Math.trunc(o/60%60,10));var o;const r=ds(e);return n=i||n>0?`${n}:`:"",`${t&&e>0?"-":""}${n}${s(a)}:${s(r)}`}const f={getIconUrl(){const e=new URL(this.config.iconUrl,window.location).host!==window.location.host||q.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:e}},findElements(){try{return this.elements.controls=j.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ne.call(this,this.config.selectors.buttons.play),pause:j.call(this,this.config.selectors.buttons.pause),restart:j.call(this,this.config.selectors.buttons.restart),rewind:j.call(this,this.config.selectors.buttons.rewind),fastForward:j.call(this,this.config.selectors.buttons.fastForward),mute:j.call(this,this.config.selectors.buttons.mute),pip:j.call(this,this.config.selectors.buttons.pip),airplay:j.call(this,this.config.selectors.buttons.airplay),settings:j.call(this,this.config.selectors.buttons.settings),captions:j.call(this,this.config.selectors.buttons.captions),fullscreen:j.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=j.call(this,this.config.selectors.progress),this.elements.inputs={seek:j.call(this,this.config.selectors.inputs.seek),volume:j.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:j.call(this,this.config.selectors.display.buffer),currentTime:j.call(this,this.config.selectors.display.currentTime),duration:j.call(this,this.config.selectors.display.duration)},l.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon(e,i){const t="http://www.w3.org/2000/svg",s=f.getIconUrl.call(this),n=`${s.cors?"":s.url}#${this.config.iconPrefix}`,a=document.createElementNS(t,"svg");Le(a,D(i,{"aria-hidden":"true",focusable:"false"}));const o=document.createElementNS(t,"use"),r=`${n}-${e}`;return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",r),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),a.appendChild(o),a},createLabel(e,i={}){const t=B.get(e,this.config);return T("span",{...i,class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(e){if(l.empty(e))return null;const i=T("span",{class:this.config.classNames.menu.value});return i.appendChild(T("span",{class:this.config.classNames.menu.badge},e)),i},createButton(e,i){const t=D({},i);let s=cs(e);const n={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(o=>{Object.keys(t).includes(o)&&(n[o]=t[o],delete t[o])}),n.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(o=>o===this.config.classNames.control)||D(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,e){case"play":n.toggle=!0,n.label="play",n.labelPressed="pause",n.icon="play",n.iconPressed="pause";break;case"mute":n.toggle=!0,n.label="mute",n.labelPressed="unmute",n.icon="volume",n.iconPressed="muted";break;case"captions":n.toggle=!0,n.label="enableCaptions",n.labelPressed="disableCaptions",n.icon="captions-off",n.iconPressed="captions-on";break;case"fullscreen":n.toggle=!0,n.label="enterFullscreen",n.labelPressed="exitFullscreen",n.icon="enter-fullscreen",n.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,s="play",n.label="play",n.icon="play";break;default:l.empty(n.label)&&(n.label=s),l.empty(n.icon)&&(n.icon=e)}const a=T(n.element);return n.toggle?(a.appendChild(f.createIcon.call(this,n.iconPressed,{class:"icon--pressed"})),a.appendChild(f.createIcon.call(this,n.icon,{class:"icon--not-pressed"})),a.appendChild(f.createLabel.call(this,n.labelPressed,{class:"label--pressed"})),a.appendChild(f.createLabel.call(this,n.label,{class:"label--not-pressed"}))):(a.appendChild(f.createIcon.call(this,n.icon)),a.appendChild(f.createLabel.call(this,n.label))),D(t,z(this.config.selectors.buttons[s],t)),Le(a,t),s==="play"?(l.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(a)):this.elements.buttons[s]=a,a},createRange(e,i){const t=T("input",D(z(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":B.get(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},i));return this.elements.inputs[e]=t,f.updateRangeFill.call(this,t),Vi.setup(t),t},createProgress(e,i){const t=T("progress",D(z(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if(e!=="volume"){t.appendChild(T("span",null,"0"));const s={played:"played",buffer:"buffered"}[e],n=s?B.get(s,this.config):"";t.innerText=`% ${n.toLowerCase()}`}return this.elements.display[e]=t,t},createTime(e,i){const t=z(this.config.selectors.display[e],i),s=T("div",D(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":B.get(e,this.config)}),"00:00");return this.elements.display[e]=s,s},bindMenuItemShortcuts(e,i){S.call(this,e,"keydown keyup",t=>{if(![32,38,39,40].includes(t.which)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const s=ie(e,'[role="menuitemradio"]');if(!s&&[32,39].includes(t.which))f.showMenuPanel.call(this,i,!0);else{let n;t.which!==32&&(t.which===40||s&&t.which===39?(n=e.nextElementSibling,l.element(n)||(n=e.parentNode.firstElementChild)):(n=e.previousElementSibling,l.element(n)||(n=e.parentNode.lastElementChild)),Ie.call(this,n,!0))}},!1),S.call(this,e,"keyup",t=>{t.which===13&&f.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:i,type:t,title:s,badge:n=null,checked:a=!1}){const o=z(this.config.selectors.inputs[t]),r=T("button",D(o,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${o.class?o.class:""}`.trim(),"aria-checked":a,value:e})),c=T("span");c.innerHTML=s,l.element(n)&&c.appendChild(n),r.appendChild(c),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>r.getAttribute("aria-checked")==="true",set(m){m&&Array.from(r.parentNode.children).filter(y=>ie(y,'[role="menuitemradio"]')).forEach(y=>y.setAttribute("aria-checked","false")),r.setAttribute("aria-checked",m?"true":"false")}}),this.listeners.bind(r,"click keyup",m=>{if(!l.keyboardEvent(m)||m.which===32){switch(m.preventDefault(),m.stopPropagation(),r.checked=!0,t){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}f.showMenuPanel.call(this,"home",l.keyboardEvent(m))}},t,!1),f.bindMenuItemShortcuts.call(this,r,t),i.appendChild(r)},formatTime(e=0,i=!1){return l.number(e)?Se(e,Pt(this.duration)>0,i):e},updateTimeDisplay(e=null,i=0,t=!1){l.element(e)&&l.number(i)&&(e.innerText=f.formatTime(i,t))},updateVolume(){this.supported.ui&&(l.element(this.elements.inputs.volume)&&f.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),l.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,i=0){l.element(e)&&(e.value=i,f.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!l.event(e))return;let i=0;const t=(s,n)=>{const a=l.number(n)?n:0,o=l.element(s)?s:this.elements.display.buffer;if(l.element(o)){o.value=a;const r=o.getElementsByTagName("span")[0];l.element(r)&&(r.childNodes[0].nodeValue=a)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":i=os(this.currentTime,this.duration),e.type==="timeupdate"&&f.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(e){const i=l.event(e)?e.target:e;if(l.element(i)&&i.getAttribute("type")==="range"){if(ie(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);const t=f.formatTime(this.currentTime),s=f.formatTime(this.duration),n=B.get("seekLabel",this.config);i.setAttribute("aria-valuetext",n.replace("{currentTime}",t).replace("{duration}",s))}else if(ie(i,this.config.selectors.inputs.volume)){const t=100*i.value;i.setAttribute("aria-valuenow",t),i.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else i.setAttribute("aria-valuenow",i.value);q.isWebkit&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip(e){if(!this.config.tooltips.seek||!l.element(this.elements.inputs.seek)||!l.element(this.elements.display.seekTooltip)||this.duration===0)return;const i=`${this.config.classNames.tooltip}--visible`,t=a=>P(this.elements.display.seekTooltip,i,a);if(this.touch)return void t(!1);let s=0;const n=this.elements.progress.getBoundingClientRect();if(l.event(e))s=100/n.width*(e.pageX-n.left);else{if(!Ae(this.elements.display.seekTooltip,i))return;s=parseFloat(this.elements.display.seekTooltip.style.left,10)}s<0?s=0:s>100&&(s=100),f.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*s),this.elements.display.seekTooltip.style.left=`${s}%`,l.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&t(e.type==="mouseenter")},timeUpdate(e){const i=!l.element(this.elements.display.duration)&&this.config.invertTime;f.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),e&&e.type==="timeupdate"&&this.media.seeking||f.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return te(this.elements.display.currentTime,!0),void te(this.elements.progress,!0);l.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=l.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&f.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&f.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),f.updateSeekTooltip.call(this)},toggleMenuButton(e,i){te(this.elements.settings.buttons[e],!i)},updateSetting(e,i,t){const s=this.elements.settings.panels[e];let n=null,a=i;if(e==="captions")n=this.currentTrack;else{if(n=l.empty(t)?this[e]:t,l.empty(n)&&(n=this.config[e].default),!l.empty(this.options[e])&&!this.options[e].includes(n))return void this.debug.warn(`Unsupported value of '${n}' for ${e}`);if(!this.config[e].options.includes(n))return void this.debug.warn(`Disabled value of '${n}' for ${e}`)}if(l.element(a)||(a=s&&s.querySelector('[role="menu"]')),!l.element(a))return;this.elements.settings.buttons[e].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=f.getLabel.call(this,e,n);const o=a&&a.querySelector(`[value="${n}"]`);l.element(o)&&(o.checked=!0)},getLabel(e,i){switch(e){case"speed":return i===1?B.get("normal",this.config):`${i}×`;case"quality":if(l.number(i)){const t=B.get(`qualityLabel.${i}`,this.config);return t.length?t:`${i}p`}return Et(i);case"captions":return N.getLabel.call(this);default:return null}},setQualityMenu(e){if(!l.element(this.elements.settings.panels.quality))return;const i="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');l.array(e)&&(this.options.quality=Oe(e).filter(a=>this.config.quality.options.includes(a)));const s=!l.empty(this.options.quality)&&this.options.quality.length>1;if(f.toggleMenuButton.call(this,i,s),be(t),f.checkMenu.call(this),!s)return;const n=a=>{const o=B.get(`qualityBadge.${a}`,this.config);return o.length?f.createBadge.call(this,o):null};this.options.quality.sort((a,o)=>{const r=this.config.quality.options;return r.indexOf(a)>r.indexOf(o)?1:-1}).forEach(a=>{f.createMenuItem.call(this,{value:a,list:t,type:i,title:f.getLabel.call(this,"quality",a),badge:n(a)})}),f.updateSetting.call(this,i,t)},setCaptionsMenu(){if(!l.element(this.elements.settings.panels.captions))return;const e="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=N.getTracks.call(this),s=Boolean(t.length);if(f.toggleMenuButton.call(this,e,s),be(i),f.checkMenu.call(this),!s)return;const n=t.map((a,o)=>({value:o,checked:this.captions.toggled&&this.currentTrack===o,title:N.getLabel.call(this,a),badge:a.language&&f.createBadge.call(this,a.language.toUpperCase()),list:i,type:"language"}));n.unshift({value:-1,checked:!this.captions.toggled,title:B.get("disabled",this.config),list:i,type:"language"}),n.forEach(f.createMenuItem.bind(this)),f.updateSetting.call(this,e,i)},setSpeedMenu(){if(!l.element(this.elements.settings.panels.speed))return;const e="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(s=>s>=this.minimumSpeed&&s<=this.maximumSpeed);const t=!l.empty(this.options.speed)&&this.options.speed.length>1;f.toggleMenuButton.call(this,e,t),be(i),f.checkMenu.call(this),t&&(this.options.speed.forEach(s=>{f.createMenuItem.call(this,{value:s,list:i,type:e,title:f.getLabel.call(this,"speed",s)})}),f.updateSetting.call(this,e,i))},checkMenu(){const{buttons:e}=this.elements.settings,i=!l.empty(e)&&Object.values(e).some(t=>!t.hidden);te(this.elements.settings.menu,!i)},focusFirstMenuItem(e,i=!1){if(this.elements.settings.popup.hidden)return;let t=e;l.element(t)||(t=Object.values(this.elements.settings.panels).find(n=>!n.hidden));const s=t.querySelector('[role^="menuitem"]');Ie.call(this,s,i)},toggleMenu(e){const{popup:i}=this.elements.settings,t=this.elements.buttons.settings;if(!l.element(i)||!l.element(t))return;const{hidden:s}=i;let n=s;if(l.boolean(e))n=e;else if(l.keyboardEvent(e)&&e.which===27)n=!1;else if(l.event(e)){const a=l.function(e.composedPath)?e.composedPath()[0]:e.target,o=i.contains(a);if(o||!o&&e.target!==t&&n)return}t.setAttribute("aria-expanded",n),te(i,!n),P(this.elements.container,this.config.classNames.menu.open,n),n&&l.keyboardEvent(e)?f.focusFirstMenuItem.call(this,null,!0):n||s||Ie.call(this,t,l.keyboardEvent(e))},getMenuSize(e){const i=e.cloneNode(!0);i.style.position="absolute",i.style.opacity=0,i.removeAttribute("hidden"),e.parentNode.appendChild(i);const t=i.scrollWidth,s=i.scrollHeight;return Y(i),{width:t,height:s}},showMenuPanel(e="",i=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${e}`);if(!l.element(t))return;const s=t.parentNode,n=Array.from(s.children).find(a=>!a.hidden);if(O.transitions&&!O.reducedMotion){s.style.width=`${n.scrollWidth}px`,s.style.height=`${n.scrollHeight}px`;const a=f.getMenuSize.call(this,t),o=r=>{r.target===s&&["width","height"].includes(r.propertyName)&&(s.style.width="",s.style.height="",Ee.call(this,s,Fe,o))};S.call(this,s,Fe,o),s.style.width=`${a.width}px`,s.style.height=`${a.height}px`}te(n,!0),te(t,!1),f.focusFirstMenuItem.call(this,t,i)},setDownloadUrl(){const e=this.elements.buttons.download;l.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:i,createButton:t,createProgress:s,createRange:n,createTime:a,setQualityMenu:o,setSpeedMenu:r,showMenuPanel:c}=f;this.elements.controls=null,l.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const m=T("div",z(this.config.selectors.controls.wrapper));this.elements.controls=m;const y={class:"plyr__controls__item"};return Oe(l.array(this.config.controls)?this.config.controls:[]).forEach(b=>{if(b==="restart"&&m.appendChild(t.call(this,"restart",y)),b==="rewind"&&m.appendChild(t.call(this,"rewind",y)),b==="play"&&m.appendChild(t.call(this,"play",y)),b==="fast-forward"&&m.appendChild(t.call(this,"fast-forward",y)),b==="progress"){const p=T("div",{class:`${y.class} plyr__progress__container`}),k=T("div",z(this.config.selectors.progress));if(k.appendChild(n.call(this,"seek",{id:`plyr-seek-${e.id}`})),k.appendChild(s.call(this,"buffer")),this.config.tooltips.seek){const C=T("span",{class:this.config.classNames.tooltip},"00:00");k.appendChild(C),this.elements.display.seekTooltip=C}this.elements.progress=k,p.appendChild(this.elements.progress),m.appendChild(p)}if(b==="current-time"&&m.appendChild(a.call(this,"currentTime",y)),b==="duration"&&m.appendChild(a.call(this,"duration",y)),b==="mute"||b==="volume"){let{volume:p}=this.elements;if(l.element(p)&&m.contains(p)||(p=T("div",D({},y,{class:`${y.class} plyr__volume`.trim()})),this.elements.volume=p,m.appendChild(p)),b==="mute"&&p.appendChild(t.call(this,"mute")),b==="volume"&&!q.isIos){const k={max:1,step:.05,value:this.config.volume};p.appendChild(n.call(this,"volume",D(k,{id:`plyr-volume-${e.id}`})))}}if(b==="captions"&&m.appendChild(t.call(this,"captions",y)),b==="settings"&&!l.empty(this.config.settings)){const p=T("div",D({},y,{class:`${y.class} plyr__menu`.trim(),hidden:""}));p.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${e.id}`,"aria-expanded":!1}));const k=T("div",{class:"plyr__menu__container",id:`plyr-settings-${e.id}`,hidden:""}),C=T("div"),A=T("div",{id:`plyr-settings-${e.id}-home`}),h=T("div",{role:"menu"});A.appendChild(h),C.appendChild(A),this.elements.settings.panels.home=A,this.config.settings.forEach(u=>{const v=T("button",D(z(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(this,v,u),S.call(this,v,"click",()=>{c.call(this,u,!1)});const E=T("span",null,B.get(u,this.config)),I=T("span",{class:this.config.classNames.menu.value});I.innerHTML=e[u],E.appendChild(I),v.appendChild(E),h.appendChild(v);const M=T("div",{id:`plyr-settings-${e.id}-${u}`,hidden:""}),L=T("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});L.appendChild(T("span",{"aria-hidden":!0},B.get(u,this.config))),L.appendChild(T("span",{class:this.config.classNames.hidden},B.get("menuBack",this.config))),S.call(this,M,"keydown",Z=>{Z.which===37&&(Z.preventDefault(),Z.stopPropagation(),c.call(this,"home",!0))},!1),S.call(this,L,"click",()=>{c.call(this,"home",!1)}),M.appendChild(L),M.appendChild(T("div",{role:"menu"})),C.appendChild(M),this.elements.settings.buttons[u]=v,this.elements.settings.panels[u]=M}),k.appendChild(C),p.appendChild(k),m.appendChild(p),this.elements.settings.popup=k,this.elements.settings.menu=p}if(b==="pip"&&O.pip&&m.appendChild(t.call(this,"pip",y)),b==="airplay"&&O.airplay&&m.appendChild(t.call(this,"airplay",y)),b==="download"){const p=D({},y,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(p.download="");const{download:k}=this.config.urls;!l.url(k)&&this.isEmbed&&D(p,{icon:`logo-${this.provider}`,label:this.provider}),m.appendChild(t.call(this,"download",p))}b==="fullscreen"&&m.appendChild(t.call(this,"fullscreen",y))}),this.isHTML5&&o.call(this,$.getQualityOptions.call(this)),r.call(this),m},inject(){if(this.config.loadSprite){const n=f.getIconUrl.call(this);n.cors&&St(n.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let e=null;this.elements.controls=null;const i={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;l.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),l.element(this.config.controls)||l.string(this.config.controls)?e=this.config.controls:(e=f.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:N.getLabel.call(this)}),t=!1);let s;if(t&&l.string(this.config.controls)&&(e=(n=>{let a=n;return Object.entries(i).forEach(([o,r])=>{a=he(a,`{${o}}`,r)}),a})(e)),l.string(this.config.selectors.controls.container)&&(s=document.querySelector(this.config.selectors.controls.container)),l.element(s)||(s=this.elements.container),s[l.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),l.element(this.elements.controls)||f.findElements.call(this),!l.empty(this.elements.buttons)){const n=a=>{const o=this.config.classNames.controlPressed;Object.defineProperty(a,"pressed",{enumerable:!0,get:()=>Ae(a,o),set(r=!1){P(a,o,r)}})};Object.values(this.elements.buttons).filter(Boolean).forEach(a=>{l.array(a)||l.nodeList(a)?Array.from(a).filter(Boolean).forEach(n):n(a)})}if(q.isEdge&&bt(s),this.config.tooltips.controls){const{classNames:n,selectors:a}=this.config,o=`${a.controls.wrapper} ${a.labels} .${n.hidden}`,r=ne.call(this,o);Array.from(r).forEach(c=>{P(c,this.config.classNames.hidden,!1),P(c,this.config.classNames.tooltip,!0)})}}};function It(e,i=!0){let t=e;if(i){const s=document.createElement("a");s.href=t,t=s.href}try{return new URL(t)}catch{return null}}function Nt(e){const i=new URLSearchParams;return l.object(e)&&Object.entries(e).forEach(([t,s])=>{i.set(t,s)}),i}const N={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!O.textTracks)return void(l.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this));if(l.element(this.elements.captions)||(this.elements.captions=T("div",z(this.config.selectors.captions)),es(this.elements.captions,this.elements.wrapper)),q.isIE&&window.URL){const s=this.media.querySelectorAll("track");Array.from(s).forEach(n=>{const a=n.getAttribute("src"),o=It(a);o!==null&&o.hostname!==window.location.href.hostname&&["http:","https:"].includes(o.protocol)&&ge(a,"blob").then(r=>{n.setAttribute("src",window.URL.createObjectURL(r))}).catch(()=>{Y(n)})})}const e=Oe((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(s=>s.split("-")[0]));let i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();i==="auto"&&([i]=e);let t=this.storage.get("captions");if(l.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:i,languages:e}),this.isHTML5){const s=this.config.captions.update?"addtrack removetrack":"removetrack";S.call(this,this.media.textTracks,s,N.update.bind(this))}setTimeout(N.update.bind(this),0)},update(){const e=N.getTracks.call(this,!0),{active:i,language:t,meta:s,currentTrackNode:n}=this.captions,a=Boolean(e.find(o=>o.language===t));this.isHTML5&&this.isVideo&&e.filter(o=>!s.get(o)).forEach(o=>{this.debug.log("Track added",o),s.set(o,{default:o.mode==="showing"}),o.mode==="showing"&&(o.mode="hidden"),S.call(this,o,"cuechange",()=>N.updateCues.call(this))}),(a&&this.language!==t||!e.includes(n))&&(N.setLanguage.call(this,t),N.toggle.call(this,i&&a)),P(this.elements.container,this.config.classNames.captions.enabled,!l.empty(e)),l.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&f.setCaptionsMenu.call(this)},toggle(e,i=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,s=this.config.classNames.captions.active,n=l.nullOrUndefined(e)?!t:e;if(n!==t){if(i||(this.captions.active=n,this.storage.set({captions:n})),!this.language&&n&&!i){const a=N.getTracks.call(this),o=N.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=o.language,void N.set.call(this,a.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=n),P(this.elements.container,s,n),this.captions.toggled=n,f.updateSetting.call(this,"captions"),w.call(this,this.media,n?"captionsenabled":"captionsdisabled")}setTimeout(()=>{n&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,i=!0){const t=N.getTracks.call(this);if(e!==-1)if(l.number(e))if(e in t){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const s=t[e],{language:n}=s||{};this.captions.currentTrackNode=s,f.updateSetting.call(this,"captions"),i||(this.captions.language=n,this.storage.set({language:n})),this.isVimeo&&this.embed.enableTextTrack(n),w.call(this,this.media,"languagechange")}N.toggle.call(this,!0,i),this.isHTML5&&this.isVideo&&N.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else N.toggle.call(this,!1,i)},setLanguage(e,i=!0){if(!l.string(e))return void this.debug.warn("Invalid language argument",e);const t=e.toLowerCase();this.captions.language=t;const s=N.getTracks.call(this),n=N.findTrack.call(this,[t]);N.set.call(this,s.indexOf(n),i)},getTracks(e=!1){return Array.from((this.media||{}).textTracks||[]).filter(i=>!this.isHTML5||e||this.captions.meta.has(i)).filter(i=>["captions","subtitles"].includes(i.kind))},findTrack(e,i=!1){const t=N.getTracks.call(this),s=o=>Number((this.captions.meta.get(o)||{}).default),n=Array.from(t).sort((o,r)=>s(r)-s(o));let a;return e.every(o=>(a=n.find(r=>r.language===o),!a)),a||(i?n[0]:void 0)},getCurrentTrack(){return N.getTracks.call(this)[this.currentTrack]},getLabel(e){let i=e;return!l.track(i)&&O.textTracks&&this.captions.toggled&&(i=N.getCurrentTrack.call(this)),l.track(i)?l.empty(i.label)?l.empty(i.language)?B.get("enabled",this.config):e.language.toUpperCase():i.label:B.get("disabled",this.config)},updateCues(e){if(!this.supported.ui)return;if(!l.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!l.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let i=e;if(!i){const s=N.getCurrentTrack.call(this);i=Array.from((s||{}).activeCues||[]).map(n=>n.getCueAsHTML()).map(hs)}const t=i.map(s=>s.trim()).join(` `);if(t!==this.elements.captions.innerHTML){be(this.elements.captions);const s=T("span",z(this.config.selectors.caption));s.innerHTML=t,this.elements.captions.appendChild(s),w.call(this,this.media,"cuechange")}}},xt={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},Ne={active:"picture-in-picture",inactive:"inline"},J={html5:"html5",youtube:"youtube",vimeo:"vimeo"},xe={audio:"audio",video:"video"};function ms(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?J.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?J.vimeo:null}const Me=()=>{};class ps{constructor(i=!1){this.enabled=window.console&&i,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Me}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Me}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Me}}class G{constructor(i){g(this,"onChange",()=>{if(!this.enabled)return;const t=this.player.elements.buttons.fullscreen;l.element(t)&&(t.pressed=this.active);const s=this.target===this.player.media?this.target:this.player.elements.container;w.call(this.player,s,this.active?"enterfullscreen":"exitfullscreen",!0)}),g(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",P(this.target,this.player.config.classNames.fullscreen.fallback,t),q.isIos){let s=document.head.querySelector('meta[name="viewport"]');const n="viewport-fit=cover";s||(s=document.createElement("meta"),s.setAttribute("name","viewport"));const a=l.string(s.content)&&s.content.includes(n);t?(this.cleanupViewport=!a,a||(s.content+=`,${n}`)):this.cleanupViewport&&(s.content=s.content.split(",").filter(o=>o.trim()!==n).join(","))}this.onChange()}),g(this,"trapFocus",t=>{if(q.isIos||!this.active||t.key!=="Tab"||t.keyCode!==9)return;const s=document.activeElement,n=ne.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[a]=n,o=n[n.length-1];s!==o||t.shiftKey?s===a&&t.shiftKey&&(o.focus(),t.preventDefault()):(a.focus(),t.preventDefault())}),g(this,"update",()=>{if(this.enabled){let t;t=this.forceFallback?"Fallback (forced)":G.native?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");P(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.enabled)}),g(this,"enter",()=>{this.enabled&&(q.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!G.native||this.forceFallback?this.toggleFallback(!0):this.prefix?l.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),g(this,"exit",()=>{if(this.enabled)if(q.isIos&&this.player.config.fullscreen.iosNative)this.target.webkitExitFullscreen(),X(this.player.play());else if(!G.native||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!l.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),g(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=i,this.prefix=G.prefix,this.property=G.property,this.scrollPosition={x:0,y:0},this.forceFallback=i.config.fullscreen.fallback==="force",this.player.elements.fullscreen=i.config.fullscreen.container&&ts(this.player.elements.container,i.config.fullscreen.container),S.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),S.call(this.player,this.player.elements.container,"dblclick",t=>{l.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),S.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get native(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get usingNative(){return G.native&&!this.forceFallback}static get prefix(){if(l.function(document.exitFullscreen))return"";let i="";return["webkit","moz","ms"].some(t=>!(!l.function(document[`${t}ExitFullscreen`])&&!l.function(document[`${t}CancelFullScreen`]))&&(i=t,!0)),i}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get enabled(){return(G.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}get active(){if(!this.enabled)return!1;if(!G.native||this.forceFallback)return Ae(this.target,this.player.config.classNames.fullscreen.fallback);const i=this.prefix?document[`${this.prefix}${this.property}Element`]:document.fullscreenElement;return i&&i.shadowRoot?i===this.target.getRootNode().host:i===this.target}get target(){return q.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}function ve(e,i=1){return new Promise((t,s)=>{const n=new Image,a=()=>{delete n.onload,delete n.onerror,(n.naturalWidth>=i?t:s)(n)};Object.assign(n,{onload:a,onerror:a,src:e})})}const x={addStyleHook(){P(this.elements.container,this.config.selectors.container.replace(".",""),!0),P(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(e=!1){e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void x.toggleNativeControls.call(this,!0);l.element(this.elements.controls)||(f.inject.call(this),this.listeners.controls()),x.toggleNativeControls.call(this),this.isHTML5&&N.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,f.updateVolume.call(this),f.timeUpdate.call(this),x.checkPlaying.call(this),P(this.elements.container,this.config.classNames.pip.supported,O.pip&&this.isHTML5&&this.isVideo),P(this.elements.container,this.config.classNames.airplay.supported,O.airplay&&this.isHTML5),P(this.elements.container,this.config.classNames.isIos,q.isIos),P(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{w.call(this,this.media,"ready")},0),x.setTitle.call(this),this.poster&&x.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&f.durationUpdate.call(this)},setTitle(){let e=B.get("play",this.config);if(l.string(this.config.title)&&!l.empty(this.config.title)&&(e+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(i=>{i.setAttribute("aria-label",e)}),this.isEmbed){const i=j.call(this,"iframe");if(!l.element(i))return;const t=l.empty(this.config.title)?"video":this.config.title,s=B.get("frameTitle",this.config);i.setAttribute("title",s.replace("{title}",t))}},togglePoster(e){P(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster(e,i=!0){return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),ns.call(this).then(()=>ve(e)).catch(t=>{throw e===this.poster&&x.togglePoster.call(this,!1),t}).then(()=>{if(e!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${e}')`,backgroundSize:""}),x.togglePoster.call(this,!0),e)))},checkPlaying(e){P(this.elements.container,this.config.classNames.playing,this.playing),P(this.elements.container,this.config.classNames.paused,this.paused),P(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(i=>{Object.assign(i,{pressed:this.playing}),i.setAttribute("aria-label",B.get(this.playing?"pause":"play",this.config))}),l.event(e)&&e.type==="timeupdate"||x.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{P(this.elements.container,this.config.classNames.loading,this.loading),x.toggleControls.call(this)},this.loading?250:0)},toggleControls(e){const{controls:i}=this.elements;if(i&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||i.pressed||i.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!l.empty(e)&&l.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),l.empty(this.media.style)&&this.media.removeAttribute("style")}};class gs{constructor(i){g(this,"firstTouch",()=>{const{player:t}=this,{elements:s}=t;t.touch=!0,P(s.container,t.config.classNames.isTouch,!0)}),g(this,"setTabFocus",t=>{const{player:s}=this,{elements:n}=s;if(clearTimeout(this.focusTimer),t.type==="keydown"&&t.which!==9)return;t.type==="keydown"&&(this.lastKeyDown=t.timeStamp);const a=t.timeStamp-this.lastKeyDown<=20;(t.type!=="focus"||a)&&((()=>{const o=s.config.classNames.tabFocus;P(ne.call(s,`.${o}`),o,!1)})(),t.type!=="focusout"&&(this.focusTimer=setTimeout(()=>{const o=document.activeElement;n.container.contains(o)&&P(document.activeElement,s.config.classNames.tabFocus,!0)},10)))}),g(this,"global",(t=!0)=>{const{player:s}=this;s.config.keyboard.global&&ae.call(s,window,"keydown keyup",this.handleKey,t,!1),ae.call(s,document.body,"click",this.toggleMenu,t),He.call(s,document.body,"touchstart",this.firstTouch),ae.call(s,document.body,"keydown focus blur focusout",this.setTabFocus,t,!1,!0)}),g(this,"container",()=>{const{player:t}=this,{config:s,elements:n,timers:a}=t;!s.keyboard.global&&s.keyboard.focused&&S.call(t,n.container,"keydown keyup",this.handleKey,!1),S.call(t,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",c=>{const{controls:m}=n;m&&c.type==="enterfullscreen"&&(m.pressed=!1,m.hover=!1);let y=0;["touchstart","touchmove","mousemove"].includes(c.type)&&(x.toggleControls.call(t,!0),y=t.touch?3e3:2e3),clearTimeout(a.controls),a.controls=setTimeout(()=>x.toggleControls.call(t,!1),y)});const o=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const c=n.wrapper,{active:m}=t.fullscreen,[y,b]=Ve.call(t),p=At(`aspect-ratio: ${y} / ${b}`);if(!m)return void(p?(c.style.width=null,c.style.height=null):(c.style.maxWidth=null,c.style.margin=null));const[k,C]=as(),A=k/C>y/b;p?(c.style.width=A?"auto":"100%",c.style.height=A?"100%":"auto"):(c.style.maxWidth=A?C/b*y+"px":null,c.style.margin=A?"0 auto":null)},r=()=>{clearTimeout(a.resized),a.resized=setTimeout(o,50)};S.call(t,n.container,"enterfullscreen exitfullscreen",c=>{const{target:m}=t.fullscreen;m===n.container&&(!t.isEmbed&&l.empty(t.config.ratio)||(o(),(c.type==="enterfullscreen"?S:Ee).call(t,window,"resize",r)))})}),g(this,"media",()=>{const{player:t}=this,{elements:s}=t;if(S.call(t,t.media,"timeupdate seeking seeked",a=>f.timeUpdate.call(t,a)),S.call(t,t.media,"durationchange loadeddata loadedmetadata",a=>f.durationUpdate.call(t,a)),S.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),S.call(t,t.media,"progress playing seeking seeked",a=>f.updateProgress.call(t,a)),S.call(t,t.media,"volumechange",a=>f.updateVolume.call(t,a)),S.call(t,t.media,"playing play pause ended emptied timeupdate",a=>x.checkPlaying.call(t,a)),S.call(t,t.media,"waiting canplay seeked playing",a=>x.checkLoading.call(t,a)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const a=j.call(t,`.${t.config.classNames.video}`);if(!l.element(a))return;S.call(t,s.container,"click",o=>{([s.container,a].includes(o.target)||a.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(o,t.restart,"restart"),this.proxy(o,()=>{X(t.play())},"play")):this.proxy(o,()=>{X(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&S.call(t,s.wrapper,"contextmenu",a=>{a.preventDefault()},!1),S.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),S.call(t,t.media,"ratechange",()=>{f.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),S.call(t,t.media,"qualitychange",a=>{f.updateSetting.call(t,"quality",null,a.detail.quality)}),S.call(t,t.media,"ready qualitychange",()=>{f.setDownloadUrl.call(t)});const n=t.config.events.concat(["keyup","keydown"]).join(" ");S.call(t,t.media,n,a=>{let{detail:o={}}=a;a.type==="error"&&(o=t.media.error),w.call(t,s.container,a.type,!0,o)})}),g(this,"proxy",(t,s,n)=>{const{player:a}=this,o=a.config.listeners[n];let r=!0;l.function(o)&&(r=o.call(a,t)),r!==!1&&l.function(s)&&s.call(a,t)}),g(this,"bind",(t,s,n,a,o=!0)=>{const{player:r}=this,c=r.config.listeners[a],m=l.function(c);S.call(r,t,s,y=>this.proxy(y,n,a),o&&!m)}),g(this,"controls",()=>{const{player:t}=this,{elements:s}=t,n=q.isIE?"change":"input";if(s.buttons.play&&Array.from(s.buttons.play).forEach(a=>{this.bind(a,"click",()=>{X(t.togglePlay())},"play")}),this.bind(s.buttons.restart,"click",t.restart,"restart"),this.bind(s.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(s.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(s.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(s.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(s.buttons.download,"click",()=>{w.call(t,t.media,"download")},"download"),this.bind(s.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(s.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(s.buttons.airplay,"click",t.airplay,"airplay"),this.bind(s.buttons.settings,"click",a=>{a.stopPropagation(),a.preventDefault(),f.toggleMenu.call(t,a)},null,!1),this.bind(s.buttons.settings,"keyup",a=>{const o=a.which;[13,32].includes(o)&&(o!==13?(a.preventDefault(),a.stopPropagation(),f.toggleMenu.call(t,a)):f.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(s.settings.menu,"keydown",a=>{a.which===27&&f.toggleMenu.call(t,a)}),this.bind(s.inputs.seek,"mousedown mousemove",a=>{const o=s.progress.getBoundingClientRect(),r=100/o.width*(a.pageX-o.left);a.currentTarget.setAttribute("seek-value",r)}),this.bind(s.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",a=>{const o=a.currentTarget,r=a.keyCode?a.keyCode:a.which,c="play-on-seeked";if(l.keyboardEvent(a)&&r!==39&&r!==37)return;t.lastSeekTime=Date.now();const m=o.hasAttribute(c),y=["mouseup","touchend","keyup"].includes(a.type);m&&y?(o.removeAttribute(c),X(t.play())):!y&&t.playing&&(o.setAttribute(c,""),t.pause())}),q.isIos){const a=ne.call(t,'input[type="range"]');Array.from(a).forEach(o=>this.bind(o,n,r=>bt(r.target)))}this.bind(s.inputs.seek,n,a=>{const o=a.currentTarget;let r=o.getAttribute("seek-value");l.empty(r)&&(r=o.value),o.removeAttribute("seek-value"),t.currentTime=r/o.max*t.duration},"seek"),this.bind(s.progress,"mouseenter mouseleave mousemove",a=>f.updateSeekTooltip.call(t,a)),this.bind(s.progress,"mousemove touchmove",a=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startMove(a)}),this.bind(s.progress,"mouseleave touchend click",()=>{const{previewThumbnails:a}=t;a&&a.loaded&&a.endMove(!1,!0)}),this.bind(s.progress,"mousedown touchstart",a=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startScrubbing(a)}),this.bind(s.progress,"mouseup touchend",a=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endScrubbing(a)}),q.isWebkit&&Array.from(ne.call(t,'input[type="range"]')).forEach(a=>{this.bind(a,"input",o=>f.updateRangeFill.call(t,o.target))}),t.config.toggleInvert&&!l.element(s.display.duration)&&this.bind(s.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,f.timeUpdate.call(t))}),this.bind(s.inputs.volume,n,a=>{t.volume=a.target.value},"volume"),this.bind(s.controls,"mouseenter mouseleave",a=>{s.controls.hover=!t.touch&&a.type==="mouseenter"}),s.fullscreen&&Array.from(s.fullscreen.children).filter(a=>!a.contains(s.container)).forEach(a=>{this.bind(a,"mouseenter mouseleave",o=>{s.controls.hover=!t.touch&&o.type==="mouseenter"})}),this.bind(s.controls,"mousedown mouseup touchstart touchend touchcancel",a=>{s.controls.pressed=["mousedown","touchstart"].includes(a.type)}),this.bind(s.controls,"focusin",()=>{const{config:a,timers:o}=t;P(s.controls,a.classNames.noTransition,!0),x.toggleControls.call(t,!0),setTimeout(()=>{P(s.controls,a.classNames.noTransition,!1)},0);const r=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>x.toggleControls.call(t,!1),r)}),this.bind(s.inputs.volume,"wheel",a=>{const o=a.webkitDirectionInvertedFromDevice,[r,c]=[a.deltaX,-a.deltaY].map(b=>o?-b:b),m=Math.sign(Math.abs(r)>Math.abs(c)?r:c);t.increaseVolume(m/50);const{volume:y}=t.media;(m===1&&y<1||m===-1&&y>0)&&a.preventDefault()},"volume",!1)}),this.player=i,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(i){const{player:t}=this,{elements:s}=t,n=i.keyCode?i.keyCode:i.which,a=i.type==="keydown",o=a&&n===this.lastKey;if(!(i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)&&!!l.number(n))if(a){const r=document.activeElement;if(l.element(r)){const{editable:c}=t.config.selectors,{seek:m}=s.inputs;if(r!==m&&ie(r,c)||i.which===32&&ie(r,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(n)&&(i.preventDefault(),i.stopPropagation()),n){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:o||(t.currentTime=t.duration/10*(n-48));break;case 32:case 75:o||X(t.togglePlay());break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:o||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:o||t.toggleCaptions();break;case 76:t.loop=!t.loop}n===27&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null}toggleMenu(i){f.toggleMenu.call(this.player,i)}}function fs(e,i){return e(i={exports:{}},i.exports),i.exports}var ys=fs(function(e,i){e.exports=function(){var t=function(){},s={},n={},a={};function o(p,k){p=p.push?p:[p];var C,A,h,u=[],v=p.length,E=v;for(C=function(I,M){M.length&&u.push(I),--E||k(u)};v--;)A=p[v],(h=n[A])?C(A,h):(a[A]=a[A]||[]).push(C)}function r(p,k){if(p){var C=a[p];if(n[p]=k,C)for(;C.length;)C[0](p,k),C.splice(0,1)}}function c(p,k){p.call&&(p={success:p}),k.length?(p.error||t)(k):(p.success||t)(p)}function m(p,k,C,A){var h,u,v=document,E=C.async,I=(C.numRetries||0)+1,M=C.before||t,L=p.replace(/[\?|#].*$/,""),Z=p.replace(/^(css|img)!/,"");A=A||0,/(^css!|\.css$)/.test(L)?((u=v.createElement("link")).rel="stylesheet",u.href=Z,(h="hideFocus"in u)&&u.relList&&(h=0,u.rel="preload",u.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(L)?(u=v.createElement("img")).src=Z:((u=v.createElement("script")).src=p,u.async=E===void 0||E),u.onload=u.onerror=u.onbeforeload=function(We){var fe=We.type[0];if(h)try{u.sheet.cssText.length||(fe="e")}catch(Lt){Lt.code!=18&&(fe="e")}if(fe=="e"){if((A+=1){ys(e,{success:i,error:t})})}function bs(e){return l.empty(e)?null:l.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function ce(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,w.call(this,this.media,e?"play":"pause"))}const je={setup(){const e=this;P(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,le.call(e),l.object(window.Vimeo)?je.ready.call(e):Ue(e.config.urls.vimeo.sdk).then(()=>{je.ready.call(e)}).catch(i=>{e.debug.warn("Vimeo SDK (player.js) failed to load",i)})},ready(){const e=this,i=e.config.vimeo,{premium:t,referrerPolicy:s,...n}=i;t&&Object.assign(n,{controls:!1,sidedock:!1});const a=Nt({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative,...n});let o=e.media.getAttribute("src");l.empty(o)&&(o=e.media.getAttribute(e.config.attributes.embed.id));const r=bs(o),c=T("iframe"),m=De(e.config.urls.vimeo.iframe,r,a);if(c.setAttribute("src",m),c.setAttribute("allowfullscreen",""),c.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),l.empty(s)||c.setAttribute("referrerPolicy",s),t||!i.customControls)c.setAttribute("data-poster",e.poster),e.media=Te(c,e.media);else{const h=T("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});h.appendChild(c),e.media=Te(h,e.media)}i.customControls||ge(De(e.config.urls.vimeo.api,m)).then(h=>{!l.empty(h)&&h.thumbnail_url&&x.setPoster.call(e,h.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(c,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(ce.call(e,!0),e.embed.play()),e.media.pause=()=>(ce.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:y}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>y,set(h){const{embed:u,media:v,paused:E,volume:I}=e,M=E&&!u.hasPlayed;v.seeking=!0,w.call(e,v,"seeking"),Promise.resolve(M&&u.setVolume(0)).then(()=>u.setCurrentTime(h)).then(()=>M&&u.pause()).then(()=>M&&u.setVolume(I)).catch(()=>{})}});let b=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>b,set(h){e.embed.setPlaybackRate(h).then(()=>{b=h,w.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:p}=e.config;Object.defineProperty(e.media,"volume",{get:()=>p,set(h){e.embed.setVolume(h).then(()=>{p=h,w.call(e,e.media,"volumechange")})}});let{muted:k}=e.config;Object.defineProperty(e.media,"muted",{get:()=>k,set(h){const u=!!l.boolean(h)&&h;e.embed.setVolume(u?0:e.config.volume).then(()=>{k=u,w.call(e,e.media,"volumechange")})}});let C,{loop:A}=e.config;Object.defineProperty(e.media,"loop",{get:()=>A,set(h){const u=l.boolean(h)?h:e.config.loop.active;e.embed.setLoop(u).then(()=>{A=u})}}),e.embed.getVideoUrl().then(h=>{C=h,f.setDownloadUrl.call(e)}).catch(h=>{this.debug.warn(h)}),Object.defineProperty(e.media,"currentSrc",{get:()=>C}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration}),Promise.all([e.embed.getVideoWidth(),e.embed.getVideoHeight()]).then(h=>{const[u,v]=h;e.embed.ratio=Ct(u,v),le.call(this)}),e.embed.setAutopause(e.config.autopause).then(h=>{e.config.autopause=h}),e.embed.getVideoTitle().then(h=>{e.config.title=h,x.setTitle.call(this)}),e.embed.getCurrentTime().then(h=>{y=h,w.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(h=>{e.media.duration=h,w.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(h=>{e.media.textTracks=h,N.setup.call(e)}),e.embed.on("cuechange",({cues:h=[]})=>{const u=h.map(v=>us(v.text));N.updateCues.call(e,u)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(h=>{ce.call(e,!h),h||w.call(e,e.media,"playing")}),l.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{w.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{w.call(e,e.media,"playing")}),e.embed.on("play",()=>{ce.call(e,!0),w.call(e,e.media,"playing")}),e.embed.on("pause",()=>{ce.call(e,!1)}),e.embed.on("timeupdate",h=>{e.media.seeking=!1,y=h.seconds,w.call(e,e.media,"timeupdate")}),e.embed.on("progress",h=>{e.media.buffered=h.percent,w.call(e,e.media,"progress"),parseInt(h.percent,10)===1&&w.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(u=>{u!==e.media.duration&&(e.media.duration=u,w.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,w.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,w.call(e,e.media,"ended")}),e.embed.on("error",h=>{e.media.error=h,w.call(e,e.media,"error")}),i.customControls&&setTimeout(()=>x.build.call(e),0)}};function vs(e){return l.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function ue(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,w.call(this,this.media,e?"play":"pause"))}function ws(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const we={setup(){if(P(this.elements.wrapper,this.config.classNames.embed,!0),l.object(window.YT)&&l.function(window.YT.Player))we.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{l.function(e)&&e(),we.ready.call(this)},Ue(this.config.urls.youtube.sdk).catch(i=>{this.debug.warn("YouTube API failed to load",i)})}},getTitle(e){ge(De(this.config.urls.youtube.api,e)).then(i=>{if(l.object(i)){const{title:t,height:s,width:n}=i;this.config.title=t,x.setTitle.call(this),this.embed.ratio=Ct(n,s)}le.call(this)}).catch(()=>{le.call(this)})},ready(){const e=this,i=e.config.youtube,t=e.media&&e.media.getAttribute("id");if(!l.empty(t)&&t.startsWith("youtube-"))return;let s=e.media.getAttribute("src");l.empty(s)&&(s=e.media.getAttribute(this.config.attributes.embed.id));const n=vs(s),a=T("div",{id:ls(e.provider),"data-poster":i.customControls?e.poster:void 0});if(e.media=Te(a,e.media),i.customControls){const o=r=>`https://i.ytimg.com/vi/${n}/${r}default.jpg`;ve(o("maxres"),121).catch(()=>ve(o("sd"),121)).catch(()=>ve(o("hq"))).then(r=>x.setPoster.call(e,r.src)).then(r=>{r.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}e.embed=new window.YT.Player(e.media,{videoId:n,host:ws(i),playerVars:D({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&i.customControls?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},i),events:{onError(o){if(!e.media.error){const r=o.data,c={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[r]||"An unknown error occured";e.media.error={code:r,message:c},w.call(e,e.media,"error")}},onPlaybackRateChange(o){const r=o.target;e.media.playbackRate=r.getPlaybackRate(),w.call(e,e.media,"ratechange")},onReady(o){if(l.function(e.media.play))return;const r=o.target;we.getTitle.call(e,n),e.media.play=()=>{ue.call(e,!0),r.playVideo()},e.media.pause=()=>{ue.call(e,!1),r.pauseVideo()},e.media.stop=()=>{r.stopVideo()},e.media.duration=r.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:()=>Number(r.getCurrentTime()),set(b){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,w.call(e,e.media,"seeking"),r.seekTo(b)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>r.getPlaybackRate(),set(b){r.setPlaybackRate(b)}});let{volume:c}=e.config;Object.defineProperty(e.media,"volume",{get:()=>c,set(b){c=b,r.setVolume(100*c),w.call(e,e.media,"volumechange")}});let{muted:m}=e.config;Object.defineProperty(e.media,"muted",{get:()=>m,set(b){const p=l.boolean(b)?b:m;m=p,r[p?"mute":"unMute"](),r.setVolume(100*c),w.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>r.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const y=r.getAvailablePlaybackRates();e.options.speed=y.filter(b=>e.config.speed.options.includes(b)),e.supported.ui&&i.customControls&&e.media.setAttribute("tabindex",-1),w.call(e,e.media,"timeupdate"),w.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=r.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBufferedx.build.call(e),50)},onStateChange(o){const r=o.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(o.data)&&(e.media.seeking=!1,w.call(e,e.media,"seeked")),o.data){case-1:w.call(e,e.media,"timeupdate"),e.media.buffered=r.getVideoLoadedFraction(),w.call(e,e.media,"progress");break;case 0:ue.call(e,!1),e.media.loop?(r.stopVideo(),r.playVideo()):w.call(e,e.media,"ended");break;case 1:i.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(ue.call(e,!0),w.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{w.call(e,e.media,"timeupdate")},50),e.media.duration!==r.getDuration()&&(e.media.duration=r.getDuration(),w.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),ue.call(e,!1);break;case 3:w.call(e,e.media,"waiting")}w.call(e,e.elements.container,"statechange",!1,{code:o.data})}}})}},Mt={setup(){this.media?(P(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),P(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&P(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=T("div",{class:this.config.classNames.video}),wt(this.media,this.elements.wrapper),this.elements.poster=T("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?$.setup.call(this):this.isYouTube?we.setup.call(this):this.isVimeo&&je.setup.call(this)):this.debug.warn("No media element found!")}};class Ts{constructor(i){g(this,"load",()=>{this.enabled&&(l.object(window.google)&&l.object(window.google.ima)?this.ready():Ue(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),g(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),g(this,"setupIMA",()=>{this.elements.container=T("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),g(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const s=new google.ima.AdsRequest;s.adTagUrl=this.tagUrl,s.linearAdSlotWidth=t.offsetWidth,s.linearAdSlotHeight=t.offsetHeight,s.nonLinearAdSlotWidth=t.offsetWidth,s.nonLinearAdSlotHeight=t.offsetHeight,s.forceNonLinearFullSlot=!1,s.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(s)}catch(s){this.onAdError(s)}}),g(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const s=Se(Math.max(this.manager.getRemainingTime(),0)),n=`${B.get("advertisement",this.player.config)} - ${s}`;this.elements.container.setAttribute("data-badge-text",n)},100)}),g(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const s=new google.ima.AdsRenderingSettings;s.restoreCustomPlaybackStateOnAdBreakComplete=!0,s.enablePreloading=!0,this.manager=t.getAdsManager(this.player,s),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,n=>this.onAdError(n)),Object.keys(google.ima.AdEvent.Type).forEach(n=>{this.manager.addEventListener(google.ima.AdEvent.Type[n],a=>this.onAdEvent(a))}),this.trigger("loaded")}),g(this,"addCuePoints",()=>{l.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t{const{container:s}=this.player.elements,n=t.getAd(),a=t.getAdData();switch((o=>{w.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),n.isLinear()||(n.width=s.offsetWidth,n.height=s.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:a.adError&&this.player.debug.warn(`Non-fatal ad error: ${a.adError.getMessage()}`)}}),g(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),g(this,"listeners",()=>{const{container:t}=this.player.elements;let s;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{s=this.player.currentTime}),this.player.on("seeked",()=>{const n=this.player.currentTime;l.empty(this.cuePoints)||this.cuePoints.forEach((a,o)=>{s{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),g(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(s){this.onAdError(s)}}).catch(()=>{})}),g(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,X(this.player.media.play())}),g(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),g(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),g(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),g(this,"trigger",(t,...s)=>{const n=this.events[t];l.array(n)&&n.forEach(a=>{l.function(a)&&a.apply(this,s)})}),g(this,"on",(t,s)=>(l.array(this.events[t])||(this.events[t]=[]),this.events[t].push(s),this)),g(this,"startSafetyTimer",(t,s)=>{this.player.debug.log(`Safety timer invoked from: ${s}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),g(this,"clearSafetyTimer",t=>{l.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=i,this.config=i.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,s)=>{this.on("loaded",t),this.on("error",s)}),this.load()}get enabled(){const{config:i}=this;return this.player.isHTML5&&this.player.isVideo&&i.enabled&&(!l.empty(i.publisherId)||l.url(i.tagUrl))}get tagUrl(){const{config:i}=this;return l.url(i.tagUrl)?i.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Nt({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:i.publisherId})}`}}const As=e=>{const i=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const s={};t.split(/\r\n|\n|\r/).forEach(n=>{if(l.number(s.startTime)){if(!l.empty(n.trim())&&l.empty(s.text)){const a=n.trim().split("#xywh=");[s.text]=a,a[1]&&([s.x,s.y,s.w,s.h]=a[1].split(","))}}else{const a=n.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);a&&(s.startTime=60*Number(a[1]||0)*60+60*Number(a[2])+Number(a[3])+Number(`0.${a[4]}`),s.endTime=60*Number(a[6]||0)*60+60*Number(a[7])+Number(a[8])+Number(`0.${a[9]}`))}}),s.text&&i.push(s)}),i},at=(e,i)=>{const t={};return e>i.width/i.height?(t.width=i.width,t.height=1/e*i.width):(t.height=i.height,t.width=e*i.height),t};class Ft{constructor(i){g(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.loaded=!0)})}),g(this,"getThumbnails",()=>new Promise(t=>{const{src:s}=this.player.config.previewThumbnails;if(l.empty(s))throw new Error("Missing previewThumbnails.src config attribute");const n=()=>{this.thumbnails.sort((a,o)=>a.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(l.function(s))s(a=>{this.thumbnails=a,n()});else{const a=(l.string(s)?[s]:s).map(o=>this.getThumbnail(o));Promise.all(a).then(n)}})),g(this,"getThumbnail",t=>new Promise(s=>{ge(t).then(n=>{const a={frames:As(n),height:null,urlPrefix:""};a.frames[0].text.startsWith("/")||a.frames[0].text.startsWith("http://")||a.frames[0].text.startsWith("https://")||(a.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{a.height=o.naturalHeight,a.width=o.naturalWidth,this.thumbnails.push(a),s()},o.src=a.urlPrefix+a.frames[0].text})})),g(this,"startMove",t=>{if(this.loaded&&l.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{const s=this.player.elements.progress.getBoundingClientRect(),n=100/s.width*(t.pageX-s.left);this.seekTime=this.player.media.duration*(n/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Se(this.seekTime)}this.showImageAtCurrentTime()}}),g(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),g(this,"startScrubbing",t=>{(l.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),g(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):He.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),g(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),g(this,"render",()=>{this.elements.thumb.container=T("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=T("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=T("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=T("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.container.appendChild(t),l.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=T("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),g(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),g(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(a=>this.seekTime>=a.startTime&&this.seekTime<=a.endTime),s=t>=0;let n=0;this.mouseDown||this.toggleThumbContainer(s),s&&(this.thumbnails.forEach((a,o)=>{this.loadedImages.includes(a.frames[t].text)&&(n=o)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(n)))}),g(this,"loadImage",(t=0)=>{const s=this.showingThumb,n=this.thumbnails[t],{urlPrefix:a}=n,o=n.frames[s],r=n.frames[s].text,c=a+r;if(this.currentImageElement&&this.currentImageElement.dataset.filename===r)this.showImage(this.currentImageElement,o,t,s,r,!1),this.currentImageElement.dataset.index=s,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const m=new Image;m.src=c,m.dataset.index=s,m.dataset.filename=r,this.showingThumbFilename=r,this.player.debug.log(`Loading image: ${c}`),m.onload=()=>this.showImage(m,o,t,s,r,!0),this.loadingImage=m,this.removeOldImages(m)}}),g(this,"showImage",(t,s,n,a,o,r=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${a}. qual: ${n}. newimg: ${r}`),this.setImageSizeAndOffset(t,s),r&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(a,!0).then(this.preloadNearby(a,!1)).then(this.getHigherQuality(n,t,s,o))}),g(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(s=>{if(s.tagName.toLowerCase()!=="img")return;const n=this.usingSprites?500:1e3;if(s.dataset.index!==t.dataset.index&&!s.dataset.deleting){s.dataset.deleting=!0;const{currentImageContainer:a}=this;setTimeout(()=>{a.removeChild(s),this.player.debug.log(`Removing thumb: ${s.dataset.filename}`)},n)}})}),g(this,"preloadNearby",(t,s=!0)=>new Promise(n=>{setTimeout(()=>{const a=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===a){let o;o=s?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let r=!1;o.forEach(c=>{const m=c.text;if(m!==a&&!this.loadedImages.includes(m)){r=!0,this.player.debug.log(`Preloading thumb filename: ${m}`);const{urlPrefix:y}=this.thumbnails[0],b=y+m,p=new Image;p.src=b,p.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${m}`),this.loadedImages.includes(m)||this.loadedImages.push(m),n()}}}),r||n()}},300)})),g(this,"getHigherQuality",(t,s,n,a)=>{if(t{this.showingThumbFilename===a&&(this.player.debug.log(`Showing higher quality thumb for: ${a}`),this.loadImage(t+1))},300)}}),g(this,"toggleThumbContainer",(t=!1,s=!1)=>{const n=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(n,t),!t&&s&&(this.showingThumb=null,this.showingThumbFilename=null)}),g(this,"toggleScrubbingContainer",(t=!1)=>{const s=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(s,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),g(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),g(this,"setThumbContainerSizeAndPos",()=>{if(this.sizeSpecifiedInCSS){if(this.elements.thumb.imageContainer.clientHeight>20&&this.elements.thumb.imageContainer.clientWidth<20){const t=Math.floor(this.elements.thumb.imageContainer.clientHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.width=`${t}px`}else if(this.elements.thumb.imageContainer.clientHeight<20&&this.elements.thumb.imageContainer.clientWidth>20){const t=Math.floor(this.elements.thumb.imageContainer.clientWidth/this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${t}px`}}else{const t=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);this.elements.thumb.imageContainer.style.height=`${this.thumbContainerHeight}px`,this.elements.thumb.imageContainer.style.width=`${t}px`}this.setThumbContainerPos()}),g(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),s=this.player.elements.container.getBoundingClientRect(),{container:n}=this.elements.thumb,a=s.left-t.left+10,o=s.right-t.left-n.clientWidth-10;let r=this.mousePosX-t.left-n.clientWidth/2;ro&&(r=o),n.style.left=`${r}px`}),g(this,"setScrubbingContainerSize",()=>{const{width:t,height:s}=at(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${s}px`}),g(this,"setImageSizeAndOffset",(t,s)=>{if(!this.usingSprites)return;const n=this.thumbContainerHeight/s.h;t.style.height=t.naturalHeight*n+"px",t.style.width=t.naturalWidth*n+"px",t.style.left=`-${s.x*n}px`,t.style.top=`-${s.y*n}px`}),this.player=i,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:i}=at(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return i}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(i){this.mouseDown?this.currentScrubbingImageElement=i:this.currentThumbnailImageElement=i}}const Be={insertElements(e,i){l.string(i)?tt(e,this.media,{src:i}):l.array(i)&&i.forEach(t=>{tt(e,this.media,t)})},change(e){vt(e,"sources.length")?($.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],Y(this.media),this.media=null,l.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:i,type:t}=e,[{provider:s=J.html5,src:n}]=i,a=s==="html5"?t:"div",o=s==="html5"?{}:{src:n};Object.assign(this,{provider:s,type:t,supported:O.check(t,s,this.config.playsinline),media:T(a,o)}),this.elements.container.appendChild(this.media),l.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),l.empty(e.poster)||(this.poster=e.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),x.addStyleHook.call(this),this.isHTML5&&Be.insertElements.call(this,"source",i),this.config.title=e.title,Mt.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&Be.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&x.build.call(this),this.isHTML5&&this.media.load(),l.empty(e.previewThumbnails)||(Object.assign(this.config.previewThumbnails,e.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Ft(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};function ks(e=0,i=0,t=255){return Math.min(Math.max(e,i),t)}class me{constructor(i,t){if(g(this,"play",()=>l.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>X(this.media.play())),this.media.play()):null),g(this,"pause",()=>this.playing&&l.function(this.media.pause)?this.media.pause():null),g(this,"togglePlay",r=>(l.boolean(r)?r:!this.playing)?this.play():this.pause()),g(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):l.function(this.media.stop)&&this.media.stop()}),g(this,"restart",()=>{this.currentTime=0}),g(this,"rewind",r=>{this.currentTime-=l.number(r)?r:this.config.seekTime}),g(this,"forward",r=>{this.currentTime+=l.number(r)?r:this.config.seekTime}),g(this,"increaseVolume",r=>{const c=this.media.muted?0:this.volume;this.volume=c+(l.number(r)?r:0)}),g(this,"decreaseVolume",r=>{this.increaseVolume(-r)}),g(this,"airplay",()=>{O.airplay&&this.media.webkitShowPlaybackTargetPicker()}),g(this,"toggleControls",r=>{if(this.supported.ui&&!this.isAudio){const c=Ae(this.elements.container,this.config.classNames.hideControls),m=r===void 0?void 0:!r,y=P(this.elements.container,this.config.classNames.hideControls,m);if(y&&l.array(this.config.controls)&&this.config.controls.includes("settings")&&!l.empty(this.config.settings)&&f.toggleMenu.call(this,!1),y!==c){const b=y?"controlshidden":"controlsshown";w.call(this,this.media,b)}return!y}return!1}),g(this,"on",(r,c)=>{S.call(this,this.elements.container,r,c)}),g(this,"once",(r,c)=>{He.call(this,this.elements.container,r,c)}),g(this,"off",(r,c)=>{Ee(this.elements.container,r,c)}),g(this,"destroy",(r,c=!1)=>{if(!this.ready)return;const m=()=>{document.body.style.overflow="",this.embed=null,c?(Object.keys(this.elements).length&&(Y(this.elements.buttons.play),Y(this.elements.captions),Y(this.elements.controls),Y(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),l.function(r)&&r()):(ss.call(this),$.cancelRequests.call(this),Te(this.elements.original,this.elements.container),w.call(this,this.elements.original,"destroyed",!0),l.function(r)&&r.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(x.toggleNativeControls.call(this,!0),m()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&l.function(this.embed.destroy)&&this.embed.destroy(),m()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(m),setTimeout(m,200))}),g(this,"supports",r=>O.mime.call(this,r)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=O.touch,this.media=i,l.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||l.nodeList(this.media)||l.array(this.media))&&(this.media=this.media[0]),this.config=D({},xt,me.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new ps(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",O),l.nullOrUndefined(this.media)||!l.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!O.check().api)return void this.debug.error("Setup failed: no support");const s=this.media.cloneNode(!0);s.autoplay=!1,this.elements.original=s;const n=this.media.tagName.toLowerCase();let a=null,o=null;switch(n){case"div":if(a=this.media.querySelector("iframe"),l.element(a)){if(o=It(a.getAttribute("src")),this.provider=ms(o.toString()),this.elements.container=this.media,this.media=a,this.elements.container.className="",o.search.length){const r=["1","true"];r.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),r.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=r.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(l.empty(this.provider)||!Object.values(J).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=xe.video;break;case"video":case"audio":this.type=n,this.provider=J.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=O.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new gs(this),this.storage=new de(this),this.media.plyr=this,l.element(this.elements.container)||(this.elements.container=T("div",{tabindex:0}),wt(this.media,this.elements.container)),x.migrateStyles.call(this),x.addStyleHook.call(this),Mt.setup.call(this),this.config.debug&&S.call(this,this.elements.container,this.config.events.join(" "),r=>{this.debug.log(`event: ${r.type}`)}),this.fullscreen=new G(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&x.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Ts(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>X(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Ft(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===J.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===J.youtube}get isVimeo(){return this.provider===J.vimeo}get isVideo(){return this.type===xe.video}get isAudio(){return this.type===xe.audio}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&this.currentTime===0)}get ended(){return Boolean(this.media.ended)}set currentTime(i){if(!this.duration)return;const t=l.number(i)&&i>0;this.media.currentTime=t?Math.min(i,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:i}=this.media;return l.number(i)?i:i&&i.length&&this.duration>0?i.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const i=parseFloat(this.config.duration),t=(this.media||{}).duration,s=l.number(t)&&t!==1/0?t:0;return i||s}set volume(i){let t=i;l.string(t)&&(t=Number(t)),l.number(t)||(t=this.storage.get("volume")),l.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!l.empty(i)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(i){let t=i;l.boolean(t)||(t=this.storage.get("muted")),l.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(i){let t=null;l.number(i)&&(t=i),l.number(t)||(t=this.storage.get("speed")),l.number(t)||(t=this.config.speed.selected);const{minimumSpeed:s,maximumSpeed:n}=this;t=ks(t,s,n),this.config.speed.selected=t,setTimeout(()=>{this.media.playbackRate=t},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(i){const t=this.config.quality,s=this.options.quality;if(!s.length)return;let n=[!l.empty(i)&&Number(i),this.storage.get("quality"),t.selected,t.default].find(l.number),a=!0;if(!s.includes(n)){const o=Tt(s,n);this.debug.warn(`Unsupported quality option: ${n}, using ${o} instead`),n=o,a=!1}t.selected=n,this.media.quality=n,a&&this.storage.set({quality:n})}get quality(){return this.media.quality}set loop(i){const t=l.boolean(i)?i:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return Boolean(this.media.loop)}set source(i){Be.change.call(this,i)}get source(){return this.media.currentSrc}get download(){const{download:i}=this.config.urls;return l.url(i)?i:this.source}set download(i){l.url(i)&&(this.config.urls.download=i,f.setDownloadUrl.call(this))}set poster(i){this.isVideo?x.setPoster.call(this,i,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const i=ke(Ve.call(this));return l.array(i)?i.join(":"):i}set ratio(i){this.isVideo?l.string(i)&&kt(i)?(this.config.ratio=ke(i),le.call(this)):this.debug.error(`Invalid aspect ratio specified (${i})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(i){const t=l.boolean(i)?i:this.config.autoplay;this.config.autoplay=t}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(i){N.toggle.call(this,i,!1)}set currentTrack(i){N.set.call(this,i,!1)}get currentTrack(){const{toggled:i,currentTrack:t}=this.captions;return i?t:-1}set language(i){N.setLanguage.call(this,i,!1)}get language(){return(N.getCurrentTrack.call(this)||{}).language}set pip(i){if(!O.pip)return;const t=l.boolean(i)?i:!this.pip;l.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Ne.active:Ne.inactive),l.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return O.pip?l.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ne.active:null}static supported(i,t,s){return O.check(i,t,s)}static loadSprite(i,t){return St(i,t)}static setup(i,t={}){let s=null;return l.string(i)?s=Array.from(document.querySelectorAll(i)):l.nodeList(i)?s=Array.from(i):l.array(i)&&(s=i.filter(l.element)),l.empty(s)?null:s.map(n=>new me(n,t))}}me.defaults=$i(xt);const W=U("pitch"),se=U(!1);var Cs=lt({name:"ColexiuReportHeader",props:{detail:{type:Object},record:{type:Object},className:{type:String}},emits:["activeChange"],setup(e,{emit:i,expose:t}){const s=Ot(),n=ot(),{detail:a,record:o}=Dt(e),r=U(!1),c=U(!1),m=()=>{ze({api:"back"})},y=U(),b=()=>{localStorage.getItem("explain-view")!="1"&&(se.value=!0,setTimeout(()=>{se.value=!1,localStorage.setItem("explain-view","1")},5e3))},p=()=>{var u;if(n.source=="evaluation"){m();return}const A=sessionStorage.getItem("behaviorId")||""+new Date().valueOf(),h=Rt.stringifyUrl({url:location.origin+"/orchestra-music-score",query:{id:(u=a.value)==null?void 0:u.id,behaviorId:A,client:s.isTeacher?"teacher":"student"}});ze({api:"openAccompanyWebView",content:{url:h,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})},k=jt(()=>{var h;const A=(((h=o.value)==null?void 0:h.videoFilePath)||"").split(".").pop();return A==="wav"||A==="mp3"?"audio":"video"}),C=()=>{r.value=!0,!c.value&&Ht(()=>{const A=k.value==="audio"?"#audioSrc":"#videoSrc";y.value=new me(A,{controls:["play-large","play","progress"],fullscreen:{enabled:!1}}),c.value=!0})};return t({autoShow:b}),()=>{var A,h;return d("header",{class:[H.header,H.className]},[d("div",{class:H.info},[d("div",{class:H.leftButton},[d(Bt,{onClick:m,class:H.back},{default:()=>[d("img",{style:{width:"30px",height:"30px",display:"block"},src:qt,alt:"back"},null)]}),d("span",{class:H.musicName},[(A=o==null?void 0:o.value)==null?void 0:A.sysMusicScoreName])]),o.value&&((h=o.value)==null?void 0:h.heardLevel)?d(Pe,{class:H.center,columnNum:5,style:{alignItems:"center","flex-wrap":"nowrap"}},{default:()=>[d(R,{class:"van-hairline--right"},{icon:()=>{var u;return d("span",null,[si[(u=o.value)==null?void 0:u.heardLevel]])},text:()=>d("span",null,[F("\u96BE\u5EA6")])}),d(R,{class:"van-hairline--right"},{icon:()=>{var u;return d("span",null,[(u=o.value)==null?void 0:u.score,F("\u5206")])},text:()=>d("span",null,[F("\u8BC4\u6D4B\u5206\u6570")])}),K.isPercussion?null:d(R,{class:"van-hairline--right",onClick:()=>{W.value="pitch",i("activeChange","pitch")}},{icon:()=>{var u;return d("span",{style:{color:"var(--van-primary-color)"}},[(u=o.value)==null?void 0:u.intonation,F("\u5206")])},text:()=>d("span",{class:["switch",{active:W.value==="pitch"}]},[F("\u97F3\u51C6")])}),d(R,{class:"van-hairline--right",onClick:()=>{W.value="rhythm",i("activeChange","rhythm")}},{icon:()=>{var u;return d("span",{style:{color:"var(--van-primary-color)"}},[(u=o.value)==null?void 0:u.cadence,F("\u5206")])},text:()=>d("span",{class:["switch",{active:W.value==="rhythm"}]},[F("\u8282\u594F")])}),K.isPercussion?null:d(R,{onClick:()=>{W.value="completion",i("activeChange","completion")}},{icon:()=>{var u;return d("span",{style:{color:"#4EA1FF"}},[(u=o.value)==null?void 0:u.integrity,F("\u5206")])},text:()=>d("span",{class:["switch",{active:W.value==="completion"}]},[F("\u5B8C\u6210\u5EA6")])})]}):null,d(Pe,{class:H.btns,style:{alignItems:"center","flex-wrap":"nowrap"}},{default:()=>{var u;return[(u=o.value)!=null&&u.videoFilePath?d(R,{onClick:C},{icon:()=>d("img",{src:Si},null),text:()=>d("span",null,[F("\u56DE\u653E")])}):null,d(R,{onClick:()=>se.value=!0},{icon:()=>d("img",{src:Ei},null),text:()=>d("span",null,[F("\u91CA\u4E49")])}),s.isStudent?d(R,{onClick:p},{icon:()=>d("img",{src:Ci},null),text:()=>d("span",null,[F("\u518D\u6765\u4E00\u904D")])}):null]}})]),o.value?d("div",{class:H.demos},[W.value==="pitch"&&d(ye,null,[d("div",null,[d(Q,{fill:"#FFAB25",shadow:!0,x:-3,y:0},null),d("span",null,[F("\u97F3\u9AD8\u4E86")])]),d("div",null,[d(Q,{fill:"#FFAB25",shadow:!0,x:-1,y:-2},null),d("span",null,[F("\u97F3\u4F4E\u4E86")])])]),ni.isPercussion?null:d(ye,null,[W.value==="rhythm"&&d(ye,null,[d("div",null,[d(Q,{fill:"#FF4444",shadow:!0,x:0},null),d("span",null,[F("\u8282\u594F\u5FEB\u4E86")])]),d("div",null,[d(Q,{fill:"#FF4444",shadow:!0,x:-3,y:-2},null),d("span",null,[F("\u8282\u594F\u6162\u4E86")])])]),W.value==="completion"&&d("div",null,[d(Q,{fill:"#CC75FF"},null),d("span",null,[F("\u65F6\u503C\u4E0D\u8DB3")])])])]):null,d(Ke,{teleport:"body",show:se.value,class:H.pop,style:{width:"60vw"},onClickOverlay:()=>se.value=!1},{default:()=>[d("div",{class:H.close,onClick:()=>se.value=!1},[d("img",{src:Ye},null)]),d("h2",null,[F("\u56FE\u6807\u91CA\u4E49")]),d(Pe,{columnNum:2,class:H.btns,border:!1},{default:()=>[d(R,null,{text:()=>d("span",null,[F("\u7EFF\u8272\u97F3\u7B26\uFF1A\u6F14\u594F\u6B63\u786E")]),icon:()=>d(Q,{fill:"#01C1B5"},null)}),d(R,null,{text:()=>d("span",null,[F("\u7EA2\u8272\u97F3\u7B26\uFF1A\u9519\u97F3")]),icon:()=>d(Q,{fill:"#FF4444"},null)}),d(R,null,{text:()=>d("span",null,[F("\u97F3\u7B26\u91CD\u5F71(\u7EA2\u8272\u5728\u524D)\uFF1A\u8282\u594F\u8FC7\u5FEB")]),icon:()=>d(Q,{fill:"#FF4444",shadow:!0,x:0},null)}),d(R,null,{text:()=>d("span",null,[F("\u97F3\u7B26\u91CD\u5F71(\u7EA2\u8272\u5728\u540E)\uFF1A\u8282\u594F\u6162\u4E86")]),icon:()=>d(Q,{fill:"#FF4444",shadow:!0,x:-3,y:-2},null)}),d(R,null,{text:()=>d("span",null,[F("\u97F3\u7B26\u91CD\u5F71(\u9EC4\u8272\u5728\u4E0A)\uFF1A\u97F3\u9AD8\u4E86")]),icon:()=>d(Q,{fill:"#FFAB25",shadow:!0,x:-3,y:0},null)}),d(R,null,{text:()=>d("span",null,[F("\u97F3\u7B26\u91CD\u5F71(\u9EC4\u8272\u5728\u4E0B)\uFF1A\u97F3\u4F4E\u4E86")]),icon:()=>d(Q,{fill:"#FFAB25",shadow:!0,x:-1,y:-2},null)}),d(R,null,{text:()=>d("span",null,[F("\u7D2B\u8272\u97F3\u7B26\uFF1A\u5B8C\u6574\u5EA6\u4E0D\u8DB3")]),icon:()=>d(Q,{fill:"#CC75FF"},null)}),d(R,null,{text:()=>d("span",null,[F("\u7070\u8272\u97F3\u7B26\uFF1A\u672A\u6F14\u594F")]),icon:()=>d(Q,{fill:"#AEAEAE"},null)})]})]}),d(Ke,{teleport:"body",show:r.value,"onUpdate:show":u=>r.value=u,class:H.videoContent,onClose:()=>{var u;(u=y.value)==null||u.pause()}},{default:()=>{var u,v;return[d("div",{class:H.close,onClick:()=>r.value=!1},[d("img",{src:Ye},null)]),k.value==="audio"&&d("audio",{id:"audioSrc",src:(u=o.value)==null?void 0:u.videoFilePath,controls:"false",preload:"metadata",playsinline:!0},null),k.value==="video"&&d("div",{class:H.box},[d("video",{id:"videoSrc",class:H.videoBox,src:(v=o.value)==null?void 0:v.videoFilePath,"data-poster":Pi,preload:"metadata",playsinline:!0},null)])]}})])}}});const Qe=ot(),Es=async(e,i)=>{const t=await Yt(e);let s=U("");const n=_t(t);s.value=Jt(n.parsedXML,{title:i.musicSheetName});const a=Number(Qe["part-index"])||0;return s.value=$t(s.value,a),s},Ss=e=>{const i=U("loading"),t=U({}),s=U({});return zt(async()=>{var a,o,r,c,m;const n=sessionStorage.getItem("Authorization");if(console.log("\u7B2C\u4E00\u6B21\u8BF7\u6C42",n),!n){const y=await Gt({api:"getToken"});(a=y==null?void 0:y.content)!=null&&a.accessToken&&sessionStorage.setItem("Authorization",y.content.tokenType+" "+y.content.accessToken)}i.value="loading";try{const y=await Xe.get("/musicPracticeRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:Qe.id}});if(!y.data){i.value="error";return}s.value=y.data;const b=await Xe.get(`/musicSheet/detail/${(o=s.value)==null?void 0:o.musicalNotesPlayStats.examSongId}`);t.value=b.data,K.partIndex=y.data.partIndex||0,K.isPercussion=((m=(c=(r=b.data)==null?void 0:r.background)==null?void 0:c[K.partIndex])==null?void 0:m.musicSubject)==1,i.value="success"}catch(y){i.value="error",console.log(y)}}),[i,t,s]};var Ps=lt({name:"Colexiu",setup(){const e=U(),i=U(!0),t=U(!1),s=U(""),n=U([]),a=U([]),[o,r,c]=Ss(Qe.id);Vt(o,async()=>{if(o.value==="success"&&r.value.xmlFileUrl){const h=await Es(r.value.xmlFileUrl,r.value);s.value=h.value}}),Ut();const m=h=>{switch(h){case"CADENCE_FAST":return"translateX(2px)";case"CADENCE_SLOW":return"translateX(-2px)";case"INTONATION_HIGH":return"translateY(-2px)";case"INTONATION_LOW":return"translateY(2px)";default:return""}},y=()=>{const h=["RIGHT","WRONG","CADENCE_WRONG"];return console.log(W.value),W.value==="pitch"?h.push("CADENCE_FAST","CADENCE_SLOW"):W.value==="rhythm"?h.push("INTONATION_HIGH","INTONATION_LOW"):W.value==="completion"&&h.push("INTEGRITY_WRONG"),c.value.musicalNotesPlayStats.notesData.filter(u=>h.includes(u.musicalErrorType))},b=()=>{k();for(const h of y()){const u=a.value[h.musicalNotesIndex];setTimeout(()=>{if(n.value.includes(u.id))return;n.value.push(u.id);const v=document.getElementById("vf-"+u.id),E=document.getElementById("vf-"+u.id+"-stem"),I=h.musicalErrorType,M=["INTONATION_HIGH","INTONATION_LOW","CADENCE_FAST","CADENCE_SLOW"].includes(I);if(E==null||E.classList.add(ee[I]),v==null||v.classList.add(ee[I]),v&&M){E==null||E.classList.remove(ee[I]),E==null||E.classList.add(ee.RIGHT),v==null||v.classList.remove(ee[I]),v==null||v.classList.add(ee.RIGHT);const L=v.querySelector(".vf-notehead").cloneNode(!0);L.style.transform=m(I),v.style.opacity=".7",E&&(E.style.opacity=".7"),L.id="vf-"+u.id+"-copy",L==null||L.classList.add(ee[I]),osmd==null||osmd.container.querySelector("svg").insertAdjacentElement("afterbegin",L)}},300)}},p=h=>{if(!h)return;const u=h.classList.values();for(const v of u)(v==null?void 0:v.indexOf("vf-"))!==0&&h.classList.remove(v)},k=()=>{for(const h of n.value){p(document.getElementById("vf-"+h)),p(document.getElementById("vf-"+h+"-stem"));const u="vf-"+h+"-copy",v=document.getElementById(u);v&&v.remove()}n.value=[]},C=h=>{var v;i.value=!1,(v=e.value)==null||v.autoShow(),setTimeout(()=>{var E;for(const I of Array.from(document.querySelectorAll(".vf-beam")))(E=I.querySelector("path"))==null||E.setAttribute("fill","#aeaeae")}),Ze.osmd=h,a.value=Xt(Ze.osmd),b();const u=(E,I,M=!0)=>{const L=ei(E);K.evaluatings={...K.evaluatings,[L.measureIndex]:{...L,...ti(I.score),score:I.score,dontTransition:M}}};if(c.value.userMeasureScore){for(const E in c.value.userMeasureScore)if(Object.prototype.hasOwnProperty.call(c.value.userMeasureScore,E)){const I=c.value.userMeasureScore[E];for(const M of a.value)if(I.measureRenderIndex==M.noteElement.sourceMeasure.MeasureNumberXML-1)if(!M.noteElement.tie)u(M,I);else for(const L of M.noteElement.tie.notes){const Z=Zt(L);!Z||u(Z,I,L!==M.noteElement.tie.StartNote)}}}},A=()=>{t.value=!0,i.value=!1};return()=>{const h=i.value||o.value==="loading",u=t.value||o.value==="error";return d("div",{class:[re.container,Ge.sett.eyeProtection&&"eyeProtection"]},[!i.value&&d(Cs,{className:re.header,detail:r.value,record:c,ref:e,style:{paddingLeft:K.isSpecialShapedScreen?K.notchHeight/2+"px":"auto"},onActiveChange:v=>b()},null),d("div",{id:"colexiu-detail-music-sheet",class:[re.musicSheet,ui.musicSheet],style:{paddingLeft:K.isSpecialShapedScreen?K.notchHeight/2+"px":"auto"}},[h&&!u&&d(Qt,{class:re.skeleton,rowWidth:"80%",title:!0,row:3},null),u&&d(Wt,null,null),s.value&&d(ye,null,[d("div",{class:re.headTitle},[r.value.musicSheetName]),d(Kt,{score:s.value,showSection:!0,opotions:{drawTitle:!1,drawComposer:!1,drawLyricist:!1,drawMetronomeMarks:!0,drawMeasureNumbers:!0,autoResize:!1},EngravingRules:{DefaultColorNotehead:"#aeaeae",DefaultColorRest:"#aeaeae",DefaultColorMusic:"#aeaeae",DefaultColorStem:"#aeaeae",DefaultColorChordSymbol:"#aeaeae",DefaultColorLabel:"#aeaeae",DYMusicScoreType:Ge.sett.type},onRerender:C,onRenderError:A},null)])])])}}});ii(Ps).mount("#app");export{Is as __vite_legacy_guard};