1 |
- import{d as X,e as De,f as b,y as se,r as G,k as Ne,j as Se,dw as Bt,F as nt,T as Dt,bL as Ut,n as Ot,C as at,c as Ht,cf as Vt,bK as ze,x as Qe,t as Ft}from"./index-ea33af14.js";import{i as qt,a as zt,N as Qt}from"./icon-collect-active-633bcfa6.js";import{T as Gt}from"./index-739f14e6.js";import{T as Kt}from"./index-36ed9891.js";const Wt="_course_1sy65_17",Jt="_showAddBtn_1sy65_21",Zt="_addBtn_1sy65_25",$t="_isActive_1sy65_31",Yt="_cover_1sy65_34",Xt="_footer_1sy65_51",ei="_title_1sy65_56",ti="_titleType_1sy65_60",ii="_titleContent_1sy65_64",si="_iconCollect_1sy65_72",ni="_isCollect_1sy65_83",ai="_iconDiv_1sy65_86",oi="_iconSelected_1sy65_89",li="_addBtnDisabled_1sy65_113",ri="_offShelfBg_1sy65_123",ci="_offShelfTips_1sy65_137",ui="_offShelfBtn_1sy65_144",I={"card-section":"_card-section_1sy65_7",course:Wt,showAddBtn:Jt,addBtn:Zt,isActive:$t,cover:Yt,footer:Xt,title:ei,titleType:ti,titleContent:ii,iconCollect:si,isCollect:ni,iconDiv:ai,iconSelected:oi,addBtnDisabled:li,offShelfBg:ri,offShelfTips:ci,offShelfBtn:ui},Ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAiCAMAAADLXG9JAAABIFBMVEUAAAD/gE//Xjb/l17/WTL/WDP/jVj/VS//Uy7/US3/l13/jFX/mF//mV7/jVb/mF//iFL/YTj/j1n/ilT/////Xzb/XDT/ilT/hFD/Yjj/fkz/c0T/h1P/WDH/d0j/dUb/cEL/klr/e0r/Zjv/jlf/j1j/jFb/aT3/hlL/gk//bUH/eUn/gE7/WjP/az//lVz/VjD/ZDr/VC//8ez/49r/Uy3/6uT/qIz/on7/lnn//fz/dEz/3tL/wa3/elD/7ef/lHf/9vP/t6H/taD/q5L/7uf/rpX/hmT/gFf/2Mv/yLb/xLP/vqX/uaT/noL/jWL/il7/+ff/0b//zr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JrbWZlgKjSph/3NG1NAxCC0XUue7JKPrVYCiazOahHwUfyAWm2MZUQ6GhCCSkXm0AhTWUxtn57mtMobN158CWFqAZyVNGTk14cgc9jJkMKPdXC5CwhZby64+FZPRNRiLLqOhxBwD8a2FlDCuHx0J0APkSdjfAb4hyHQgn1xJSC9CIrAAjzH9Jz2Q3JEvhCAkNZOMWNb3UFAFCA0RR9tLqGvXth43QPP5lT0D1Iphk6y1UWVEWv8ZpLgjMdovQM24XNlE0QCtoSHzaNSRdCCP4eZ0Y2NjHeDkB9UfT8P6wQGCFuPx+AGsxHUYw3975rBDJOwwzYivv+kQJI3TA4mgKJhFQJykMUfmb00dN1QAmDa06fEYoMsJpnmiFuEIR9O4I7mPRNhXbP2zNKPVMa6kpY/QET1HUh+NH2cYaOfmsJ2sn4MmQTcEU9Y+0ihI6qMdgC0GyuhQpI4EKE1rZJOAxGjckdxH03AkRluHhSsOmkggKBsl+i1Aoo9erv8e4EKAyjrcehjoEGYmgUt2REDWA/mwj4Y4KDKUgnyZZHQJACsTk1BMp0ulUpKDTBnJfTQO+g7WWm/OONnlPKQIaBNgbAZHi84RZRH0Vh9dLJ+q6om+osMRvY5SepaMtg1r1y6XebQ3+2jXrbovAGAyR2+R3Yzx9S8GgwSUiBFNIejtPsLyH8hkMqz8LbfIdvqSrn+vNO940UcVvI/k8h8etvSRfB1JfWRTKi19ZLkgRR+9DhJ9VKtUydeRyh1ZRpOvbLmPqvHKNh9I690f+e9ogUEBEn1ks5NHhLmPREYvHxFB62jmPqr5ZDxrcGvvfx852bOGPbTe/T7iD61/trdMx7JZpHMAAAAASUVORK5CYII=",pi="_audioContainer_1656s_1",gi="_cover_1656s_7",fi="_imgHover_1656s_26",yi="_previewAudio_1656s_31",bi="_previewAudioHover_1656s_60",vi="_imgAnimated_1656s_65",me={audioContainer:pi,cover:gi,imgHover:fi,previewAudio:yi,previewAudioHover:bi,imgAnimated:vi},Ai=X({name:"audio-player",props:{cover:{type:String,default:"https://gyt.ks3-cn-beijing.ksyuncs.com/courseware/1687916228530.png"},content:{type:String,default:""},previewDisabled:{type:Boolean,default:!0}},setup(e){const i=De({status:!1});return()=>b("div",{class:[me.audioContainer,i.status?me.imgAnimated:""]},[b(se,{class:[me.cover,i.status?me.imgHover:""],lazy:!0,previewDisabled:!0,objectFit:"cover",src:e.cover},null)])}}),wi="_audioContainer_1656s_1",ki="_cover_1656s_7",Ti="_imgHover_1656s_26",Si="_previewAudio_1656s_31",Ci="_previewAudioHover_1656s_60",Ei="_imgAnimated_1656s_65",pe={audioContainer:wi,cover:ki,imgHover:Ti,previewAudio:Si,previewAudioHover:Ci,imgAnimated:Ei},Pi=X({name:"audio-player",props:{cover:{type:String,default:""},content:{type:String,default:""},previewDisabled:{type:Boolean,default:!0}},setup(e){const i=De({status:!1});return()=>b("div",{class:[pe.audioContainer,i.status?pe.imgAnimated:""]},[b(se,{class:[pe.cover,i.status?pe.imgHover:""],lazy:!0,previewDisabled:!0,objectFit:"cover",src:e.cover},null)])}}),yn=X({name:"card-type",props:{isActive:{type:Boolean,default:!1},isCollect:{type:Boolean,default:!0},isShowCollect:{type:Boolean,default:!0},isShowAdd:{type:Boolean,default:!1},isShowAddDisabled:{type:Boolean,default:!1},disabledMouseHover:{type:Boolean,default:!0},isPreview:{type:Boolean,default:!0},item:{type:Object,default:()=>({})},offShelf:{type:Boolean,default:!1}},emits:["click","collect","add","offShelf"],setup(e,{emit:i}){const t=G(!1),s=a=>{let n=Ge;switch(a){case"IMG":n=Ge;break;case"VIDEO":n=di;break;case"SONG":n=hi;break;case"MUSIC":n=mi;break}return n};return()=>b("div",{onClick:()=>i("click",e.item),class:[I["card-section"]],onMouseenter:()=>{t.value=!0},onMouseleave:()=>{t.value=!1}},[e.offShelf&&b("div",{class:I.offShelfBg},[b("p",{class:I.offShelfTips},[Ne("该资源已被平台下架")]),b(Se,{type:"primary",class:I.offShelfBtn,onClick:a=>{a.stopPropagation(),i("offShelf")}},{default:()=>[Ne("确认")]})]),b(Bt,{class:[I["card-section"],e.isShowAdd?"":I.course,e.isActive?I.isActive:"",e.item.exist?I.showAddBtn:""]},{cover:()=>b(nt,null,[e.item.type==="IMG"&&b(se,{class:[I.cover,I.image],lazy:!0,previewDisabled:e.disabledMouseHover,objectFit:"cover",src:e.item.coverImg,previewSrc:e.item.content},null),e.item.type==="MUSIC"&&b(se,{class:[I.cover,I.image],lazy:!0,previewDisabled:!0,objectFit:"contain",src:e.item.coverImg},null),e.item.type==="SONG"&&b(Ai,{content:e.item.content,previewDisabled:e.disabledMouseHover},null),e.item.type==="VIDEO"&&b(Pi,{cover:e.item.coverImg,content:e.item.content,previewDisabled:e.disabledMouseHover},null)]),footer:()=>b("div",{class:I.footer},[b("div",{class:I.title},[b(se,{class:[I.titleType],src:s(e.item.type),objectFit:"cover"},null),b("span",{class:I.titleContent},[b(Gt,{isAnimation:t.value,text:e.item.title},null)])]),e.isShowCollect&&b("div",{class:[I.iconCollect,I.iconDiv],onClick:a=>{a.stopPropagation(),a.preventDefault(),e.isCollect&&i("collect",e.item)}},[b(Dt,{name:"favitor",mode:"out-in"},{default:()=>[e.item.isCollect?b("img",{src:qt,key:"1",class:[I.iconCollect,e.isCollect?I.isCollect:""]},null):b("img",{src:zt,key:"2",class:[I.iconCollect,e.isCollect?I.isCollect:""]},null)]})]),e.item.isSelected&&b("span",{class:I.iconSelected},null),e.isShowAdd&&(e.item.exist?b(Se,{type:"primary",class:[I.addBtn,e.item.exist?I.addBtnDisabled:""],disabled:e.item.exist||e.isShowAddDisabled,onClick:a=>{a.stopPropagation(),a.preventDefault(),i("add",e.item)}},{default:()=>[e.item.exist?"已添加":"添加"]}):!e.isShowAddDisabled&&b(Se,{type:"primary",class:[I.addBtn,e.item.exist?I.addBtnDisabled:""],disabled:e.item.exist||e.isShowAddDisabled,onClick:a=>{a.stopPropagation(),a.preventDefault(),i("add",e.item)}},{default:()=>[e.item.exist?"已添加":"添加"]}))])})])}}),Mi="_cardPreview_d1szn_1",Ni={cardPreview:Mi};function g(e,i,t){return(i=Ii(i))in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function _i(e,i){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var s=t.call(e,i||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(e)}function Ii(e){var i=_i(e,"string");return typeof i=="symbol"?i:String(i)}function xi(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}function Ke(e,i){for(var t=0;t<i.length;t++){var s=i[t];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function ji(e,i,t){return i&&Ke(e.prototype,i),t&&Ke(e,t),e}function Li(e,i,t){return i in e?Object.defineProperty(e,i,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[i]=t,e}function We(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);i&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,s)}return t}function Je(e){for(var i=1;i<arguments.length;i++){var t=arguments[i]!=null?arguments[i]:{};i%2?We(Object(t),!0).forEach(function(s){Li(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):We(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}var Ze={addCSS:!0,thumbWidth:15,watch:!0};function Ri(e,i){return(function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(e,i)}function Bi(e,i){if(e&&i){var t=new Event(i,{bubbles:!0});e.dispatchEvent(t)}}var ce=function(e){return e!=null?e.constructor:null},Ue=function(e,i){return!!(e&&i&&e instanceof i)},ot=function(e){return e==null},lt=function(e){return ce(e)===Object},Di=function(e){return ce(e)===Number&&!Number.isNaN(e)},rt=function(e){return ce(e)===String},Ui=function(e){return ce(e)===Boolean},Oi=function(e){return ce(e)===Function},ct=function(e){return Array.isArray(e)},ut=function(e){return Ue(e,NodeList)},Hi=function(e){return Ue(e,Element)},Vi=function(e){return Ue(e,Event)},Fi=function(e){return ot(e)||(rt(e)||ct(e)||ut(e))&&!e.length||lt(e)&&!Object.keys(e).length},H={nullOrUndefined:ot,object:lt,number:Di,string:rt,boolean:Ui,function:Oi,array:ct,nodeList:ut,element:Hi,event:Vi,empty:Fi};function qi(e){var i="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}function zi(e,i){if(1>i){var t=qi(i);return parseFloat(e.toFixed(t))}return Math.round(e/i)*i}var Qi=function(){function e(i,t){xi(this,e),H.element(i)?this.element=i:H.string(i)&&(this.element=document.querySelector(i)),H.element(this.element)&&H.empty(this.element.rangeTouch)&&(this.config=Je({},Ze,{},t),this.init())}return ji(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(a){t.element[s](a,function(n){return t.set(n)},!1)})}},{key:"get",value:function(i){if(!e.enabled||!H.event(i))return null;var t,s=i.target,a=i.changedTouches[0],n=parseFloat(s.getAttribute("min"))||0,l=parseFloat(s.getAttribute("max"))||100,r=parseFloat(s.getAttribute("step"))||1,c=s.getBoundingClientRect(),u=100/c.width*(this.config.thumbWidth/2)/100;return 0>(t=100/c.width*(a.clientX-c.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*u:50<t&&(t+=2*(t-50)*u),n+zi(t/100*(l-n),r)}},{key:"set",value:function(i){e.enabled&&H.event(i)&&!i.target.disabled&&(i.preventDefault(),i.target.value=this.get(i),Bi(i.target,i.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(i){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},s=null;if(H.empty(i)||H.string(i)?s=Array.from(document.querySelectorAll(H.string(i)?i:'input[type="range"]')):H.element(i)?s=[i]:H.nodeList(i)?s=Array.from(i):H.array(i)&&(s=i.filter(H.element)),H.empty(s))return null;var a=Je({},Ze,{},t);if(H.string(i)&&a.watch){var n=new MutationObserver(function(l){Array.from(l).forEach(function(r){Array.from(r.addedNodes).forEach(function(c){H.element(c)&&Ri(c,i)&&new e(c,a)})})});n.observe(document.body,{childList:!0,subtree:!0})}return s.map(function(l){return new e(l,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}();const ue=e=>e!=null?e.constructor:null,W=(e,i)=>!!(e&&i&&e instanceof i),Oe=e=>e==null,dt=e=>ue(e)===Object,Gi=e=>ue(e)===Number&&!Number.isNaN(e),we=e=>ue(e)===String,Ki=e=>ue(e)===Boolean,ht=e=>typeof e=="function",mt=e=>Array.isArray(e),Wi=e=>W(e,WeakMap),pt=e=>W(e,NodeList),Ji=e=>ue(e)===Text,Zi=e=>W(e,Event),$i=e=>W(e,KeyboardEvent),Yi=e=>W(e,window.TextTrackCue)||W(e,window.VTTCue),Xi=e=>W(e,TextTrack)||!Oe(e)&&we(e.kind),es=e=>W(e,Promise)&&ht(e.then),ts=e=>e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object",gt=e=>Oe(e)||(we(e)||mt(e)||pt(e))&&!e.length||dt(e)&&!Object.keys(e).length,is=e=>{if(W(e,window.URL))return!0;if(!we(e))return!1;let i=e;e.startsWith("http://")&&e.startsWith("https://")||(i="http://".concat(e));try{return!gt(new URL(i).hostname)}catch(t){return!1}};var o={nullOrUndefined:Oe,object:dt,number:Gi,string:we,boolean:Ki,function:ht,array:mt,weakMap:Wi,nodeList:pt,element:ts,textNode:Ji,event:Zi,keyboardEvent:$i,cue:Yi,track:Xi,promise:es,url:is,empty:gt};const _e=(()=>{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!!o.string(t)&&i[t]})();function ft(e,i){setTimeout(()=>{try{e.hidden=!0,e.offsetHeight,e.hidden=!1}catch(t){}},i)}const ss=!!window.document.documentMode,ns=/Edge/g.test(navigator.userAgent),as="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),os=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,ls=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,rs=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var D={isIE:ss,isEdge:ns,isWebKit:as,isIPhone:os,isIPadOS:ls,isIos:rs};function cs(e){return JSON.parse(JSON.stringify(e))}function yt(e,i){return i.split(".").reduce((t,s)=>t&&t[s],e)}function x(e={},...i){if(!i.length)return e;const t=i.shift();return o.object(t)?(Object.keys(t).forEach(s=>{o.object(t[s])?(Object.keys(e).includes(s)||Object.assign(e,{[s]:{}}),x(e[s],t[s])):Object.assign(e,{[s]:t[s]})}),x(e,...i)):e}function bt(e,i){const t=e.length?e:[e];Array.from(t).reverse().forEach((s,a)=>{const n=a>0?i.cloneNode(!0):i,l=s.parentNode,r=s.nextSibling;n.appendChild(s),r?l.insertBefore(n,r):l.appendChild(n)})}function Ie(e,i){o.element(e)&&!o.empty(i)&&Object.entries(i).filter(([,t])=>!o.nullOrUndefined(t)).forEach(([t,s])=>e.setAttribute(t,s))}function A(e,i,t){const s=document.createElement(e);return o.object(i)&&Ie(s,i),o.string(t)&&(s.innerText=t),s}function us(e,i){o.element(e)&&o.element(i)&&i.parentNode.insertBefore(e,i.nextSibling)}function $e(e,i,t,s){o.element(i)&&i.appendChild(A(e,t,s))}function K(e){o.nodeList(e)||o.array(e)?Array.from(e).forEach(K):o.element(e)&&o.element(e.parentNode)&&e.parentNode.removeChild(e)}function ge(e){if(!o.element(e))return;let{length:i}=e.childNodes;for(;i>0;)e.removeChild(e.lastChild),i-=1}function be(e,i){return o.element(i)&&o.element(i.parentNode)&&o.element(e)?(i.parentNode.replaceChild(e,i),e):null}function z(e,i){if(!o.string(e)||o.empty(e))return{};const t={},s=x({},i);return e.split(",").forEach(a=>{const n=a.trim(),l=n.replace(".",""),r=n.replace(/[[\]]/g,"").split("="),[c]=r,u=r.length>1?r[1].replace(/["']/g,""):"";switch(n.charAt(0)){case".":o.string(s.class)?t.class="".concat(s.class," ").concat(l):t.class=l;break;case"#":t.id=n.replace("#","");break;case"[":t[c]=u}}),x(s,t)}function $(e,i){if(!o.element(e))return;let t=i;o.boolean(t)||(t=!e.hidden),e.hidden=t}function N(e,i,t){if(o.nodeList(e))return Array.from(e).map(s=>N(s,i,t));if(o.element(e)){let s="toggle";return t!==void 0&&(s=t?"add":"remove"),e.classList[s](i),e.classList.contains(i)}return!1}function ve(e,i){return o.element(e)&&e.classList.contains(i)}function Y(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 ds(e,i){const{prototype:t}=Element;return(t.closest||function(){let s=this;do{if(Y.matches(s,i))return s;s=s.parentElement||s.parentNode}while(s!==null&&s.nodeType===1);return null}).call(e,i)}function ae(e){return this.elements.container.querySelectorAll(e)}function R(e){return this.elements.container.querySelector(e)}function Ce(e=null,i=!1){o.element(e)&&e.focus({preventScroll:!0,focusVisible:i})}const Ye={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},j={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(e,i){const t=j[e]||i!=="html5";return{api:t,ui:t&&j.rangeInput}},pip:!(D.isIPhone||!o.function(A("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||A("video").disablePictureInPicture)),airplay:o.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(e){if(o.empty(e))return!1;const[i]=e.split("/");let t=e;if(!this.isHTML5||i!==this.type)return!1;Object.keys(Ye).includes(t)&&(t+='; codecs="'.concat(Ye[e],'"'));try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch(s){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:_e!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},hs=(()=>{let e=!1;try{const i=Object.defineProperty({},"passive",{get:()=>(e=!0,null)});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(i){}return e})();function oe(e,i,t,s=!1,a=!0,n=!1){if(!e||!("addEventListener"in e)||o.empty(i)||!o.function(t))return;const l=i.split(" ");let r=n;hs&&(r={passive:a,capture:n}),l.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 E(e,i="",t,s=!0,a=!1){oe.call(this,e,i,t,!0,s,a)}function ke(e,i="",t,s=!0,a=!1){oe.call(this,e,i,t,!1,s,a)}function He(e,i="",t,s=!0,a=!1){const n=(...l)=>{ke(e,i,n,s,a),t.apply(this,l)};oe.call(this,e,i,n,!0,s,a)}function T(e,i="",t=!1,s={}){if(!o.element(e)||o.empty(i))return;const a=new CustomEvent(i,{bubbles:t,detail:{...s,plyr:this}});e.dispatchEvent(a)}function ms(){this&&this.eventListeners&&(this.eventListeners.forEach(e=>{const{element:i,type:t,callback:s,options:a}=e;i.removeEventListener(t,s,a)}),this.eventListeners=[])}function ps(){return new Promise(e=>this.ready?setTimeout(e,0):E.call(this,this.elements.container,"ready",e)).then(()=>{})}function Q(e){o.promise(e)&&e.then(null,()=>{})}function xe(e){return o.array(e)?e.filter((i,t)=>e.indexOf(i)===t):e}function vt(e,i){return o.array(e)&&e.length?e.reduce((t,s)=>Math.abs(s-i)<Math.abs(t-i)?s:t):null}function At(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}const Xe=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((e,[i,t])=>({...e,[i/t]:[i,t]}),{});function wt(e){return o.array(e)||o.string(e)&&e.includes(":")?(o.array(e)?e:e.split(":")).map(Number).every(o.number):!1}function Ae(e){if(!o.array(e)||!e.every(o.number))return null;const[i,t]=e,s=(n,l)=>l===0?n:s(l,n%l),a=s(i,t);return[i/a,t/a]}function Ve(e){const i=s=>wt(s)?s.split(":").map(Number):null;let t=i(e);if(t===null&&(t=i(this.config.ratio)),t===null&&!o.empty(this.embed)&&o.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:s,videoHeight:a}=this.media;t=[s,a]}return Ae(t)}function ee(e){if(!this.isVideo)return{};const{wrapper:i}=this.elements,t=Ve.call(this,e);if(!o.array(t))return{};const[s,a]=Ae(t),n=100/s*a;if(At("aspect-ratio: ".concat(s,"/").concat(a))?i.style.aspectRatio="".concat(s,"/").concat(a):i.style.paddingBottom="".concat(n,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const l=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),r=(l-n)/(l/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(r,"%)")}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:n,ratio:t}}function kt(e,i,t=.05){const s=e/i,a=vt(Object.keys(Xe),s);return Math.abs(a-s)<=t?Xe[a]:[e,i]}function gs(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const Z={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(e=>{const i=e.getAttribute("type");return!!o.empty(i)||j.mime.call(this,i)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:Z.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,o.empty(this.config.ratio)||ee.call(e),Object.defineProperty(e.media,"quality",{get(){const i=Z.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&&o.function(e.config.quality.onChange))e.config.quality.onChange(i);else{const t=Z.getSources.call(e).find(c=>Number(c.getAttribute("size"))===i);if(!t)return;const{currentTime:s,paused:a,preload:n,readyState:l,playbackRate:r}=e.media;e.media.src=t.getAttribute("src"),(n!=="none"||l)&&(e.once("loadedmetadata",()=>{e.speed=r,e.currentTime=s,a||Q(e.play())}),e.media.load())}T.call(e,e.media,"qualitychange",!1,{quality:i})}}})},cancelRequests(){this.isHTML5&&(K(Z.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function fs(e){return"".concat(e,"-").concat(Math.floor(1e4*Math.random()))}function je(e,...i){return o.empty(e)?e:e.toString().replace(/{(\d+)}/g,(t,s)=>i[s].toString())}function ys(e,i){return e===0||i===0||Number.isNaN(e)||Number.isNaN(i)?0:(e/i*100).toFixed(2)}const ne=(e="",i="",t="")=>e.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),Tt=(e="")=>e.toString().replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase());function bs(e=""){let i=e.toString();return i=ne(i,"-"," "),i=ne(i,"_"," "),i=Tt(i),ne(i," ","")}function vs(e=""){let i=e.toString();return i=bs(i),i.charAt(0).toLowerCase()+i.slice(1)}function As(e){const i=document.createDocumentFragment(),t=document.createElement("div");return i.appendChild(t),t.innerHTML=e,i.firstChild.innerText}function ws(e){const i=document.createElement("div");return i.appendChild(e),i.innerHTML}const et={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},B={get(e="",i={}){if(o.empty(e)||o.empty(i))return"";let t=yt(i.i18n,e);if(o.empty(t))return Object.keys(et).includes(e)?et[e]:"";const s={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(s).forEach(([a,n])=>{t=ne(t,a,n)}),t}};class le{constructor(i){g(this,"get",t=>{if(!le.supported||!this.enabled)return null;const s=window.localStorage.getItem(this.key);if(o.empty(s))return null;const a=JSON.parse(s);return o.string(t)&&t.length?a[t]:a}),g(this,"set",t=>{if(!le.supported||!this.enabled||!o.object(t))return;let s=this.get();o.empty(s)&&(s={}),x(s,t);try{window.localStorage.setItem(this.key,JSON.stringify(s))}catch(a){}}),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(i){return!1}}}function de(e,i="text"){return new Promise((t,s)=>{try{const a=new XMLHttpRequest;if(!("withCredentials"in a))return;a.addEventListener("load",()=>{if(i==="text")try{t(JSON.parse(a.responseText))}catch(n){t(a.responseText)}else t(a.response)}),a.addEventListener("error",()=>{throw new Error(a.status)}),a.open("GET",e,!0),a.responseType=i,a.send()}catch(a){s(a)}})}function St(e,i){if(!o.string(e))return;const t="cache",s=o.string(i);let a=!1;const n=()=>document.getElementById(i)!==null,l=(r,c)=>{r.innerHTML=c,s&&n()||document.body.insertAdjacentElement("afterbegin",r)};if(!s||!n()){const r=le.supported,c=document.createElement("div");if(c.setAttribute("hidden",""),s&&c.setAttribute("id",i),r){const u=window.localStorage.getItem("".concat(t,"-").concat(i));if(a=u!==null,a){const m=JSON.parse(u);l(c,m.content)}}de(e).then(u=>{if(!o.empty(u)){if(r)try{window.localStorage.setItem("".concat(t,"-").concat(i),JSON.stringify({content:u}))}catch(m){}l(c,u)}}).catch(()=>{})}}const Ct=e=>Math.trunc(e/60/60%60,10),ks=e=>Math.trunc(e/60%60,10),Ts=e=>Math.trunc(e%60,10);function Te(e=0,i=!1,t=!1){if(!o.number(e))return Te(void 0,i,t);const s=r=>"0".concat(r).slice(-2);let a=Ct(e);const n=ks(e),l=Ts(e);return a=i||a>0?"".concat(a,":"):"","".concat(t&&e>0?"-":"").concat(a).concat(s(n),":").concat(s(l))}const p={getIconUrl(){const e=new URL(this.config.iconUrl,window.location),i=window.location.host?window.location.host:window.top.location.host,t=e.host!==i||D.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=R.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:ae.call(this,this.config.selectors.buttons.play),pause:R.call(this,this.config.selectors.buttons.pause),restart:R.call(this,this.config.selectors.buttons.restart),rewind:R.call(this,this.config.selectors.buttons.rewind),fastForward:R.call(this,this.config.selectors.buttons.fastForward),mute:R.call(this,this.config.selectors.buttons.mute),pip:R.call(this,this.config.selectors.buttons.pip),airplay:R.call(this,this.config.selectors.buttons.airplay),settings:R.call(this,this.config.selectors.buttons.settings),captions:R.call(this,this.config.selectors.buttons.captions),fullscreen:R.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=R.call(this,this.config.selectors.progress),this.elements.inputs={seek:R.call(this,this.config.selectors.inputs.seek),volume:R.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:R.call(this,this.config.selectors.display.buffer),currentTime:R.call(this,this.config.selectors.display.currentTime),duration:R.call(this,this.config.selectors.display.duration)},o.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(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=p.getIconUrl.call(this),a="".concat(s.cors?"":s.url,"#").concat(this.config.iconPrefix),n=document.createElementNS(t,"svg");Ie(n,x(i,{"aria-hidden":"true",focusable:"false"}));const l=document.createElementNS(t,"use"),r="".concat(a,"-").concat(e);return"href"in l&&l.setAttributeNS("http://www.w3.org/1999/xlink","href",r),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r),n.appendChild(l),n},createLabel(e,i={}){const t=B.get(e,this.config);return A("span",{...i,class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(e){if(o.empty(e))return null;const i=A("span",{class:this.config.classNames.menu.value});return i.appendChild(A("span",{class:this.config.classNames.menu.badge},e)),i},createButton(e,i){const t=x({},i);let s=vs(e);const a={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(l=>{Object.keys(t).includes(l)&&(a[l]=t[l],delete t[l])}),a.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(l=>l===this.config.classNames.control)||x(t,{class:"".concat(t.class," ").concat(this.config.classNames.control)}):t.class=this.config.classNames.control,e){case"play":a.toggle=!0,a.label="play",a.labelPressed="pause",a.icon="play",a.iconPressed="pause";break;case"mute":a.toggle=!0,a.label="mute",a.labelPressed="unmute",a.icon="volume",a.iconPressed="muted";break;case"captions":a.toggle=!0,a.label="enableCaptions",a.labelPressed="disableCaptions",a.icon="captions-off",a.iconPressed="captions-on";break;case"fullscreen":a.toggle=!0,a.label="enterFullscreen",a.labelPressed="exitFullscreen",a.icon="enter-fullscreen",a.iconPressed="exit-fullscreen";break;case"play-large":t.class+=" ".concat(this.config.classNames.control,"--overlaid"),s="play",a.label="play",a.icon="play";break;default:o.empty(a.label)&&(a.label=s),o.empty(a.icon)&&(a.icon=e)}const n=A(a.element);return a.toggle?(n.appendChild(p.createIcon.call(this,a.iconPressed,{class:"icon--pressed"})),n.appendChild(p.createIcon.call(this,a.icon,{class:"icon--not-pressed"})),n.appendChild(p.createLabel.call(this,a.labelPressed,{class:"label--pressed"})),n.appendChild(p.createLabel.call(this,a.label,{class:"label--not-pressed"}))):(n.appendChild(p.createIcon.call(this,a.icon)),n.appendChild(p.createLabel.call(this,a.label))),x(t,z(this.config.selectors.buttons[s],t)),Ie(n,t),s==="play"?(o.array(this.elements.buttons[s])||(this.elements.buttons[s]=[]),this.elements.buttons[s].push(n)):this.elements.buttons[s]=n,n},createRange(e,i){const t=A("input",x(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,p.updateRangeFill.call(this,t),Qi.setup(t),t},createProgress(e,i){const t=A("progress",x(z(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if(e!=="volume"){t.appendChild(A("span",null,"0"));const s={played:"played",buffer:"buffered"}[e],a=s?B.get(s,this.config):"";t.innerText="% ".concat(a.toLowerCase())}return this.elements.display[e]=t,t},createTime(e,i){const t=z(this.config.selectors.display[e],i),s=A("div",x(t,{class:"".concat(t.class?t.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":B.get(e,this.config),role:"timer"}),"00:00");return this.elements.display[e]=s,s},bindMenuItemShortcuts(e,i){E.call(this,e,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const s=Y(e,'[role="menuitemradio"]');if(!s&&[" ","ArrowRight"].includes(t.key))p.showMenuPanel.call(this,i,!0);else{let a;t.key!==" "&&(t.key==="ArrowDown"||s&&t.key==="ArrowRight"?(a=e.nextElementSibling,o.element(a)||(a=e.parentNode.firstElementChild)):(a=e.previousElementSibling,o.element(a)||(a=e.parentNode.lastElementChild)),Ce.call(this,a,!0))}},!1),E.call(this,e,"keyup",t=>{t.key==="Return"&&p.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:e,list:i,type:t,title:s,badge:a=null,checked:n=!1}){const l=z(this.config.selectors.inputs[t]),r=A("button",x(l,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(l.class?l.class:"").trim(),"aria-checked":n,value:e})),c=A("span");c.innerHTML=s,o.element(a)&&c.appendChild(a),r.appendChild(c),Object.defineProperty(r,"checked",{enumerable:!0,get:()=>r.getAttribute("aria-checked")==="true",set(u){u&&Array.from(r.parentNode.children).filter(m=>Y(m,'[role="menuitemradio"]')).forEach(m=>m.setAttribute("aria-checked","false")),r.setAttribute("aria-checked",u?"true":"false")}}),this.listeners.bind(r,"click keyup",u=>{if(!o.keyboardEvent(u)||u.key===" "){switch(u.preventDefault(),u.stopPropagation(),r.checked=!0,t){case"language":this.currentTrack=Number(e);break;case"quality":this.quality=e;break;case"speed":this.speed=parseFloat(e)}p.showMenuPanel.call(this,"home",o.keyboardEvent(u))}},t,!1),p.bindMenuItemShortcuts.call(this,r,t),i.appendChild(r)},formatTime(e=0,i=!1){return o.number(e)?Te(e,Ct(this.duration)>0,i):e},updateTimeDisplay(e=null,i=0,t=!1){o.element(e)&&o.number(i)&&(e.innerText=p.formatTime(i,t))},updateVolume(){this.supported.ui&&(o.element(this.elements.inputs.volume)&&p.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),o.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(e,i=0){o.element(e)&&(e.value=i,p.updateRangeFill.call(this,e))},updateProgress(e){if(!this.supported.ui||!o.event(e))return;let i=0;const t=(s,a)=>{const n=o.number(a)?a:0,l=o.element(s)?s:this.elements.display.buffer;if(o.element(l)){l.value=n;const r=l.getElementsByTagName("span")[0];o.element(r)&&(r.childNodes[0].nodeValue=n)}};if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":i=ys(this.currentTime,this.duration),e.type==="timeupdate"&&p.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=o.event(e)?e.target:e;if(o.element(i)&&i.getAttribute("type")==="range"){if(Y(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);const t=p.formatTime(this.currentTime),s=p.formatTime(this.duration),a=B.get("seekLabel",this.config);i.setAttribute("aria-valuetext",a.replace("{currentTime}",t).replace("{duration}",s))}else if(Y(i,this.config.selectors.inputs.volume)){const t=100*i.value;i.setAttribute("aria-valuenow",t),i.setAttribute("aria-valuetext","".concat(t.toFixed(1),"%"))}else i.setAttribute("aria-valuenow",i.value);(D.isWebKit||D.isIPadOS)&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip(e){var i,t;if(!this.config.tooltips.seek||!o.element(this.elements.inputs.seek)||!o.element(this.elements.display.seekTooltip)||this.duration===0)return;const s=this.elements.display.seekTooltip,a="".concat(this.config.classNames.tooltip,"--visible"),n=m=>N(s,a,m);if(this.touch)return void n(!1);let l=0;const r=this.elements.progress.getBoundingClientRect();if(o.event(e))l=100/r.width*(e.pageX-r.left);else{if(!ve(s,a))return;l=parseFloat(s.style.left,10)}l<0?l=0:l>100&&(l=100);const c=this.duration/100*l;s.innerText=p.formatTime(c);const u=(i=this.config.markers)===null||i===void 0||(t=i.points)===null||t===void 0?void 0:t.find(({time:m})=>m===Math.round(c));u&&s.insertAdjacentHTML("afterbegin","".concat(u.label,"<br>")),s.style.left="".concat(l,"%"),o.event(e)&&["mouseenter","mouseleave"].includes(e.type)&&n(e.type==="mouseenter")},timeUpdate(e){const i=!o.element(this.elements.display.duration)&&this.config.invertTime;p.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),e&&e.type==="timeupdate"&&this.media.seeking||p.updateProgress.call(this,e)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return $(this.elements.display.currentTime,!0),void $(this.elements.progress,!0);o.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const e=o.element(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&p.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&p.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&p.setMarkers.call(this),p.updateSeekTooltip.call(this)},toggleMenuButton(e,i){$(this.elements.settings.buttons[e],!i)},updateSetting(e,i,t){const s=this.elements.settings.panels[e];let a=null,n=i;if(e==="captions")a=this.currentTrack;else{if(a=o.empty(t)?this[e]:t,o.empty(a)&&(a=this.config[e].default),!o.empty(this.options[e])&&!this.options[e].includes(a))return void this.debug.warn("Unsupported value of '".concat(a,"' for ").concat(e));if(!this.config[e].options.includes(a))return void this.debug.warn("Disabled value of '".concat(a,"' for ").concat(e))}if(o.element(n)||(n=s&&s.querySelector('[role="menu"]')),!o.element(n))return;this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=p.getLabel.call(this,e,a);const l=n&&n.querySelector('[value="'.concat(a,'"]'));o.element(l)&&(l.checked=!0)},getLabel(e,i){switch(e){case"speed":return i===1?B.get("normal",this.config):"".concat(i,"×");case"quality":if(o.number(i)){const t=B.get("qualityLabel.".concat(i),this.config);return t.length?t:"".concat(i,"p")}return Tt(i);case"captions":return P.getLabel.call(this);default:return null}},setQualityMenu(e){if(!o.element(this.elements.settings.panels.quality))return;const i="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');o.array(e)&&(this.options.quality=xe(e).filter(n=>this.config.quality.options.includes(n)));const s=!o.empty(this.options.quality)&&this.options.quality.length>1;if(p.toggleMenuButton.call(this,i,s),ge(t),p.checkMenu.call(this),!s)return;const a=n=>{const l=B.get("qualityBadge.".concat(n),this.config);return l.length?p.createBadge.call(this,l):null};this.options.quality.sort((n,l)=>{const r=this.config.quality.options;return r.indexOf(n)>r.indexOf(l)?1:-1}).forEach(n=>{p.createMenuItem.call(this,{value:n,list:t,type:i,title:p.getLabel.call(this,"quality",n),badge:a(n)})}),p.updateSetting.call(this,i,t)},setCaptionsMenu(){if(!o.element(this.elements.settings.panels.captions))return;const e="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=P.getTracks.call(this),s=!!t.length;if(p.toggleMenuButton.call(this,e,s),ge(i),p.checkMenu.call(this),!s)return;const a=t.map((n,l)=>({value:l,checked:this.captions.toggled&&this.currentTrack===l,title:P.getLabel.call(this,n),badge:n.language&&p.createBadge.call(this,n.language.toUpperCase()),list:i,type:"language"}));a.unshift({value:-1,checked:!this.captions.toggled,title:B.get("disabled",this.config),list:i,type:"language"}),a.forEach(p.createMenuItem.bind(this)),p.updateSetting.call(this,e,i)},setSpeedMenu(){if(!o.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=!o.empty(this.options.speed)&&this.options.speed.length>1;p.toggleMenuButton.call(this,e,t),ge(i),p.checkMenu.call(this),t&&(this.options.speed.forEach(s=>{p.createMenuItem.call(this,{value:s,list:i,type:e,title:p.getLabel.call(this,"speed",s)})}),p.updateSetting.call(this,e,i))},checkMenu(){const{buttons:e}=this.elements.settings,i=!o.empty(e)&&Object.values(e).some(t=>!t.hidden);$(this.elements.settings.menu,!i)},focusFirstMenuItem(e,i=!1){if(this.elements.settings.popup.hidden)return;let t=e;o.element(t)||(t=Object.values(this.elements.settings.panels).find(a=>!a.hidden));const s=t.querySelector('[role^="menuitem"]');Ce.call(this,s,i)},toggleMenu(e){const{popup:i}=this.elements.settings,t=this.elements.buttons.settings;if(!o.element(i)||!o.element(t))return;const{hidden:s}=i;let a=s;if(o.boolean(e))a=e;else if(o.keyboardEvent(e)&&e.key==="Escape")a=!1;else if(o.event(e)){const n=o.function(e.composedPath)?e.composedPath()[0]:e.target,l=i.contains(n);if(l||!l&&e.target!==t&&a)return}t.setAttribute("aria-expanded",a),$(i,!a),N(this.elements.container,this.config.classNames.menu.open,a),a&&o.keyboardEvent(e)?p.focusFirstMenuItem.call(this,null,!0):a||s||Ce.call(this,t,o.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 K(i),{width:t,height:s}},showMenuPanel(e="",i=!1){const t=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(e));if(!o.element(t))return;const s=t.parentNode,a=Array.from(s.children).find(n=>!n.hidden);if(j.transitions&&!j.reducedMotion){s.style.width="".concat(a.scrollWidth,"px"),s.style.height="".concat(a.scrollHeight,"px");const n=p.getMenuSize.call(this,t),l=r=>{r.target===s&&["width","height"].includes(r.propertyName)&&(s.style.width="",s.style.height="",ke.call(this,s,_e,l))};E.call(this,s,_e,l),s.style.width="".concat(n.width,"px"),s.style.height="".concat(n.height,"px")}$(a,!0),$(t,!1),p.focusFirstMenuItem.call(this,t,i)},setDownloadUrl(){const e=this.elements.buttons.download;o.element(e)&&e.setAttribute("href",this.download)},create(e){const{bindMenuItemShortcuts:i,createButton:t,createProgress:s,createRange:a,createTime:n,setQualityMenu:l,setSpeedMenu:r,showMenuPanel:c}=p;this.elements.controls=null,o.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const u=A("div",z(this.config.selectors.controls.wrapper));this.elements.controls=u;const m={class:"plyr__controls__item"};return xe(o.array(this.config.controls)?this.config.controls:[]).forEach(f=>{if(f==="restart"&&u.appendChild(t.call(this,"restart",m)),f==="rewind"&&u.appendChild(t.call(this,"rewind",m)),f==="play"&&u.appendChild(t.call(this,"play",m)),f==="fast-forward"&&u.appendChild(t.call(this,"fast-forward",m)),f==="progress"){const d=A("div",{class:"".concat(m.class," plyr__progress__container")}),y=A("div",z(this.config.selectors.progress));if(y.appendChild(a.call(this,"seek",{id:"plyr-seek-".concat(e.id)})),y.appendChild(s.call(this,"buffer")),this.config.tooltips.seek){const w=A("span",{class:this.config.classNames.tooltip},"00:00");y.appendChild(w),this.elements.display.seekTooltip=w}this.elements.progress=y,d.appendChild(this.elements.progress),u.appendChild(d)}if(f==="current-time"&&u.appendChild(n.call(this,"currentTime",m)),f==="duration"&&u.appendChild(n.call(this,"duration",m)),f==="mute"||f==="volume"){let{volume:d}=this.elements;if(o.element(d)&&u.contains(d)||(d=A("div",x({},m,{class:"".concat(m.class," plyr__volume").trim()})),this.elements.volume=d,u.appendChild(d)),f==="mute"&&d.appendChild(t.call(this,"mute")),f==="volume"&&!D.isIos&&!D.isIPadOS){const y={max:1,step:.05,value:this.config.volume};d.appendChild(a.call(this,"volume",x(y,{id:"plyr-volume-".concat(e.id)})))}}if(f==="captions"&&u.appendChild(t.call(this,"captions",m)),f==="settings"&&!o.empty(this.config.settings)){const d=A("div",x({},m,{class:"".concat(m.class," plyr__menu").trim(),hidden:""}));d.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(e.id),"aria-expanded":!1}));const y=A("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(e.id),hidden:""}),w=A("div"),k=A("div",{id:"plyr-settings-".concat(e.id,"-home")}),C=A("div",{role:"menu"});k.appendChild(C),w.appendChild(k),this.elements.settings.panels.home=k,this.config.settings.forEach(v=>{const h=A("button",x(z(this.config.selectors.buttons.settings),{type:"button",class:"".concat(this.config.classNames.control," ").concat(this.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(this,h,v),E.call(this,h,"click",()=>{c.call(this,v,!1)});const S=A("span",null,B.get(v,this.config)),M=A("span",{class:this.config.classNames.menu.value});M.innerHTML=e[v],S.appendChild(M),h.appendChild(S),C.appendChild(h);const L=A("div",{id:"plyr-settings-".concat(e.id,"-").concat(v),hidden:""}),O=A("button",{type:"button",class:"".concat(this.config.classNames.control," ").concat(this.config.classNames.control,"--back")});O.appendChild(A("span",{"aria-hidden":!0},B.get(v,this.config))),O.appendChild(A("span",{class:this.config.classNames.hidden},B.get("menuBack",this.config))),E.call(this,L,"keydown",q=>{q.key==="ArrowLeft"&&(q.preventDefault(),q.stopPropagation(),c.call(this,"home",!0))},!1),E.call(this,O,"click",()=>{c.call(this,"home",!1)}),L.appendChild(O),L.appendChild(A("div",{role:"menu"})),w.appendChild(L),this.elements.settings.buttons[v]=h,this.elements.settings.panels[v]=L}),y.appendChild(w),d.appendChild(y),u.appendChild(d),this.elements.settings.popup=y,this.elements.settings.menu=d}if(f==="pip"&&j.pip&&u.appendChild(t.call(this,"pip",m)),f==="airplay"&&j.airplay&&u.appendChild(t.call(this,"airplay",m)),f==="download"){const d=x({},m,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(d.download="");const{download:y}=this.config.urls;!o.url(y)&&this.isEmbed&&x(d,{icon:"logo-".concat(this.provider),label:this.provider}),u.appendChild(t.call(this,"download",d))}f==="fullscreen"&&u.appendChild(t.call(this,"fullscreen",m))}),this.isHTML5&&l.call(this,Z.getQualityOptions.call(this)),r.call(this),u},inject(){if(this.config.loadSprite){const a=p.getIconUrl.call(this);a.cors&&St(a.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;o.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),o.element(this.config.controls)||o.string(this.config.controls)?e=this.config.controls:(e=p.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:P.getLabel.call(this)}),t=!1);let s;if(t&&o.string(this.config.controls)&&(e=(a=>{let n=a;return Object.entries(i).forEach(([l,r])=>{n=ne(n,"{".concat(l,"}"),r)}),n})(e)),o.string(this.config.selectors.controls.container)&&(s=document.querySelector(this.config.selectors.controls.container)),o.element(s)||(s=this.elements.container),s[o.element(e)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",e),o.element(this.elements.controls)||p.findElements.call(this),!o.empty(this.elements.buttons)){const a=n=>{const l=this.config.classNames.controlPressed;n.setAttribute("aria-pressed","false"),Object.defineProperty(n,"pressed",{configurable:!0,enumerable:!0,get:()=>ve(n,l),set(r=!1){N(n,l,r),n.setAttribute("aria-pressed",r?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(n=>{o.array(n)||o.nodeList(n)?Array.from(n).filter(Boolean).forEach(a):a(n)})}if(D.isEdge&&ft(s),this.config.tooltips.controls){const{classNames:a,selectors:n}=this.config,l="".concat(n.controls.wrapper," ").concat(n.labels," .").concat(a.hidden),r=ae.call(this,l);Array.from(r).forEach(c=>{N(c,this.config.classNames.hidden,!1),N(c,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch(e){}},setMarkers(){var e,i;if(!this.duration||this.elements.markers)return;const t=(e=this.config.markers)===null||e===void 0||(i=e.points)===null||i===void 0?void 0:i.filter(({time:c})=>c>0&&c<this.duration);if(t==null||!t.length)return;const s=document.createDocumentFragment(),a=document.createDocumentFragment();let n=null;const l="".concat(this.config.classNames.tooltip,"--visible"),r=c=>N(n,l,c);t.forEach(c=>{const u=A("span",{class:this.config.classNames.marker},""),m=c.time/this.duration*100+"%";n&&(u.addEventListener("mouseenter",()=>{c.label||(n.style.left=m,n.innerHTML=c.label,r(!0))}),u.addEventListener("mouseleave",()=>{r(!1)})),u.addEventListener("click",()=>{this.currentTime=c.time}),u.style.left=m,a.appendChild(u)}),s.appendChild(a),this.config.tooltips.seek||(n=A("span",{class:this.config.classNames.tooltip},""),s.appendChild(n)),this.elements.markers={points:a,tip:n},this.elements.progress.appendChild(s)}};function Et(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(s){return null}}function Pt(e){const i=new URLSearchParams;return o.object(e)&&Object.entries(e).forEach(([t,s])=>{i.set(t,s)}),i}const P={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!j.textTracks)return void(o.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&p.setCaptionsMenu.call(this));if(o.element(this.elements.captions)||(this.elements.captions=A("div",z(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),us(this.elements.captions,this.elements.wrapper)),D.isIE&&window.URL){const s=this.media.querySelectorAll("track");Array.from(s).forEach(a=>{const n=a.getAttribute("src"),l=Et(n);l!==null&&l.hostname!==window.location.href.hostname&&["http:","https:"].includes(l.protocol)&&de(n,"blob").then(r=>{a.setAttribute("src",window.URL.createObjectURL(r))}).catch(()=>{K(a)})})}const e=xe((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(o.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";E.call(this,this.media.textTracks,s,P.update.bind(this))}setTimeout(P.update.bind(this),0)},update(){const e=P.getTracks.call(this,!0),{active:i,language:t,meta:s,currentTrackNode:a}=this.captions,n=!!e.find(l=>l.language===t);this.isHTML5&&this.isVideo&&e.filter(l=>!s.get(l)).forEach(l=>{this.debug.log("Track added",l),s.set(l,{default:l.mode==="showing"}),l.mode==="showing"&&(l.mode="hidden"),E.call(this,l,"cuechange",()=>P.updateCues.call(this))}),(n&&this.language!==t||!e.includes(a))&&(P.setLanguage.call(this,t),P.toggle.call(this,i&&n)),this.elements&&N(this.elements.container,this.config.classNames.captions.enabled,!o.empty(e)),o.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&p.setCaptionsMenu.call(this)},toggle(e,i=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,s=this.config.classNames.captions.active,a=o.nullOrUndefined(e)?!t:e;if(a!==t){if(i||(this.captions.active=a,this.storage.set({captions:a})),!this.language&&a&&!i){const n=P.getTracks.call(this),l=P.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=l.language,void P.set.call(this,n.indexOf(l))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=a),N(this.elements.container,s,a),this.captions.toggled=a,p.updateSetting.call(this,"captions"),T.call(this,this.media,a?"captionsenabled":"captionsdisabled")}setTimeout(()=>{a&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(e,i=!0){const t=P.getTracks.call(this);if(e!==-1)if(o.number(e))if(e in t){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;const s=t[e],{language:a}=s||{};this.captions.currentTrackNode=s,p.updateSetting.call(this,"captions"),i||(this.captions.language=a,this.storage.set({language:a})),this.isVimeo&&this.embed.enableTextTrack(a),T.call(this,this.media,"languagechange")}P.toggle.call(this,!0,i),this.isHTML5&&this.isVideo&&P.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else P.toggle.call(this,!1,i)},setLanguage(e,i=!0){if(!o.string(e))return void this.debug.warn("Invalid language argument",e);const t=e.toLowerCase();this.captions.language=t;const s=P.getTracks.call(this),a=P.findTrack.call(this,[t]);P.set.call(this,s.indexOf(a),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=P.getTracks.call(this),s=l=>Number((this.captions.meta.get(l)||{}).default),a=Array.from(t).sort((l,r)=>s(r)-s(l));let n;return e.every(l=>(n=a.find(r=>r.language===l),!n)),n||(i?a[0]:void 0)},getCurrentTrack(){return P.getTracks.call(this)[this.currentTrack]},getLabel(e){let i=e;return!o.track(i)&&j.textTracks&&this.captions.toggled&&(i=P.getCurrentTrack.call(this)),o.track(i)?o.empty(i.label)?o.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(!o.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!o.nullOrUndefined(e)&&!Array.isArray(e))return void this.debug.warn("updateCues: Invalid input",e);let i=e;if(!i){const s=P.getCurrentTrack.call(this);i=Array.from((s||{}).activeCues||[]).map(a=>a.getCueAsHTML()).map(ws)}const t=i.map(s=>s.trim()).join("\n");if(t!==this.elements.captions.innerHTML){ge(this.elements.captions);const s=A("span",z(this.config.selectors.caption));s.innerHTML=t,this.elements.captions.appendChild(s),T.call(this,this.media,"cuechange")}}},Mt={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.7.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",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",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"},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",hash:"data-plyr-embed-hash"}},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},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Ee={active:"picture-in-picture",inactive:"inline"},J={html5:"html5",youtube:"youtube",vimeo:"vimeo"},Pe={audio:"audio",video:"video"};function Ss(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 Cs{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 F{constructor(i){g(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;o.element(t)&&(t.pressed=this.active);const s=this.target===this.player.media?this.target:this.player.elements.container;T.call(this.player,s,this.active?"enterfullscreen":"exitfullscreen",!0)}),g(this,"toggleFallback",(t=!1)=>{var s,a;if(t?this.scrollPosition={x:(s=window.scrollX)!=null?s:0,y:(a=window.scrollY)!=null?a:0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",N(this.target,this.player.config.classNames.fullscreen.fallback,t),D.isIos){let n=document.head.querySelector('meta[name="viewport"]');const l="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const r=o.string(n.content)&&n.content.includes(l);t?(this.cleanupViewport=!r,r||(n.content+=",".concat(l))):this.cleanupViewport&&(n.content=n.content.split(",").filter(c=>c.trim()!==l).join(","))}this.onChange()}),g(this,"trapFocus",t=>{if(D.isIos||D.isIPadOS||!this.active||t.key!=="Tab")return;const s=document.activeElement,a=ae.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[n]=a,l=a[a.length-1];s!==l||t.shiftKey?s===n&&t.shiftKey&&(l.focus(),t.preventDefault()):(n.focus(),t.preventDefault())}),g(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":F.nativeSupported?"Native":"Fallback",this.player.debug.log("".concat(t," fullscreen enabled"))}else this.player.debug.log("Fullscreen not supported and fallback disabled");N(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),g(this,"enter",()=>{this.supported&&(D.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!F.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?o.empty(this.prefix)||this.target["".concat(this.prefix,"Request").concat(this.property)]():this.target.requestFullscreen({navigationUI:"hide"}))}),g(this,"exit",()=>{if(this.supported)if(D.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Q(this.player.play());else if(!F.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!o.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document["".concat(this.prefix).concat(t).concat(this.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),g(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=i,this.prefix=F.prefix,this.property=F.property,this.scrollPosition={x:0,y:0},this.forceFallback=i.config.fullscreen.fallback==="force",this.player.elements.fullscreen=i.config.fullscreen.container&&ds(this.player.elements.container,i.config.fullscreen.container),E.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),()=>{this.onChange()}),E.call(this.player,this.player.elements.container,"dblclick",t=>{o.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),E.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return F.nativeSupported&&!this.forceFallback}static get prefix(){if(o.function(document.exitFullscreen))return"";let i="";return["webkit","moz","ms"].some(t=>!(!o.function(document["".concat(t,"ExitFullscreen")])&&!o.function(document["".concat(t,"CancelFullScreen")]))&&(i=t,!0)),i}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,F.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||F.nativeSupported||!D.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!F.nativeSupported||this.forceFallback)return ve(this.target,this.player.config.classNames.fullscreen.fallback);const i=this.prefix?this.target.getRootNode()["".concat(this.prefix).concat(this.property,"Element")]:this.target.getRootNode().fullscreenElement;return i&&i.shadowRoot?i===this.target.getRootNode().host:i===this.target}get target(){var i;return D.isIos&&this.player.config.fullscreen.iosNative?this.player.media:(i=this.player.elements.fullscreen)!=null?i:this.player.elements.container}}function fe(e,i=1){return new Promise((t,s)=>{const a=new Image,n=()=>{delete a.onload,delete a.onerror,(a.naturalWidth>=i?t:s)(a)};Object.assign(a,{onload:n,onerror:n,src:e})})}const _={addStyleHook(){N(this.elements.container,this.config.selectors.container.replace(".",""),!0),N(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 ".concat(this.provider," ").concat(this.type)),void _.toggleNativeControls.call(this,!0);o.element(this.elements.controls)||(p.inject.call(this),this.listeners.controls()),_.toggleNativeControls.call(this),this.isHTML5&&P.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,p.updateVolume.call(this),p.timeUpdate.call(this),p.durationUpdate.call(this),_.checkPlaying.call(this),N(this.elements.container,this.config.classNames.pip.supported,j.pip&&this.isHTML5&&this.isVideo),N(this.elements.container,this.config.classNames.airplay.supported,j.airplay&&this.isHTML5),N(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{T.call(this,this.media,"ready")},0),_.setTitle.call(this),this.poster&&_.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&p.durationUpdate.call(this),this.config.mediaMetadata&&p.setMediaMetadata.call(this)},setTitle(){let e=B.get("play",this.config);if(o.string(this.config.title)&&!o.empty(this.config.title)&&(e+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach(i=>{i.setAttribute("aria-label",e)}),this.isEmbed){const i=R.call(this,"iframe");if(!o.element(i))return;const t=o.empty(this.config.title)?"video":this.config.title,s=B.get("frameTitle",this.config);i.setAttribute("title",s.replace("{title}",t))}},togglePoster(e){N(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"),ps.call(this).then(()=>fe(e)).catch(t=>{throw e===this.poster&&_.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('".concat(e,"')"),backgroundSize:""}),_.togglePoster.call(this,!0),e)))},checkPlaying(e){N(this.elements.container,this.config.classNames.playing,this.playing),N(this.elements.container,this.config.classNames.paused,this.paused),N(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))}),o.event(e)&&e.type==="timeupdate"||_.toggleControls.call(this)},checkLoading(e){this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{N(this.elements.container,this.config.classNames.loading,this.loading),_.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(!!(e||this.loading||this.paused||i.pressed||i.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(e=>!o.empty(e)&&o.string(e)&&e.startsWith("--plyr")).forEach(e=>{this.elements.container.style.setProperty(e,this.media.style.getPropertyValue(e)),this.media.style.removeProperty(e)}),o.empty(this.media.style)&&this.media.removeAttribute("style")}};class Es{constructor(i){g(this,"firstTouch",()=>{const{player:t}=this,{elements:s}=t;t.touch=!0,N(s.container,t.config.classNames.isTouch,!0)}),g(this,"global",(t=!0)=>{const{player:s}=this;s.config.keyboard.global&&oe.call(s,window,"keydown keyup",this.handleKey,t,!1),oe.call(s,document.body,"click",this.toggleMenu,t),He.call(s,document.body,"touchstart",this.firstTouch)}),g(this,"container",()=>{const{player:t}=this,{config:s,elements:a,timers:n}=t;!s.keyboard.global&&s.keyboard.focused&&E.call(t,a.container,"keydown keyup",this.handleKey,!1),E.call(t,a.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",c=>{const{controls:u}=a;u&&c.type==="enterfullscreen"&&(u.pressed=!1,u.hover=!1);let m=0;["touchstart","touchmove","mousemove"].includes(c.type)&&(_.toggleControls.call(t,!0),m=t.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout(()=>_.toggleControls.call(t,!1),m)});const l=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const c=a.wrapper,{active:u}=t.fullscreen,[m,f]=Ve.call(t),d=At("aspect-ratio: ".concat(m," / ").concat(f));if(!u)return void(d?(c.style.width=null,c.style.height=null):(c.style.maxWidth=null,c.style.margin=null));const[y,w]=gs(),k=y/w>m/f;d?(c.style.width=k?"auto":"100%",c.style.height=k?"100%":"auto"):(c.style.maxWidth=k?w/f*m+"px":null,c.style.margin=k?"0 auto":null)},r=()=>{clearTimeout(n.resized),n.resized=setTimeout(l,50)};E.call(t,a.container,"enterfullscreen exitfullscreen",c=>{const{target:u}=t.fullscreen;u===a.container&&(!t.isEmbed&&o.empty(t.config.ratio)||(l(),(c.type==="enterfullscreen"?E:ke).call(t,window,"resize",r)))})}),g(this,"media",()=>{const{player:t}=this,{elements:s}=t;if(E.call(t,t.media,"timeupdate seeking seeked",n=>p.timeUpdate.call(t,n)),E.call(t,t.media,"durationchange loadeddata loadedmetadata",n=>p.durationUpdate.call(t,n)),E.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),E.call(t,t.media,"progress playing seeking seeked",n=>p.updateProgress.call(t,n)),E.call(t,t.media,"volumechange",n=>p.updateVolume.call(t,n)),E.call(t,t.media,"playing play pause ended emptied timeupdate",n=>_.checkPlaying.call(t,n)),E.call(t,t.media,"waiting canplay seeked playing",n=>_.checkLoading.call(t,n)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const n=R.call(t,".".concat(t.config.classNames.video));if(!o.element(n))return;E.call(t,s.container,"click",l=>{([s.container,n].includes(l.target)||n.contains(l.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(l,t.restart,"restart"),this.proxy(l,()=>{Q(t.play())},"play")):this.proxy(l,()=>{Q(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&E.call(t,s.wrapper,"contextmenu",n=>{n.preventDefault()},!1),E.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),E.call(t,t.media,"ratechange",()=>{p.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),E.call(t,t.media,"qualitychange",n=>{p.updateSetting.call(t,"quality",null,n.detail.quality)}),E.call(t,t.media,"ready qualitychange",()=>{p.setDownloadUrl.call(t)});const a=t.config.events.concat(["keyup","keydown"]).join(" ");E.call(t,t.media,a,n=>{let{detail:l={}}=n;n.type==="error"&&(l=t.media.error),T.call(t,s.container,n.type,!0,l)})}),g(this,"proxy",(t,s,a)=>{const{player:n}=this,l=n.config.listeners[a];let r=!0;o.function(l)&&(r=l.call(n,t)),r!==!1&&o.function(s)&&s.call(n,t)}),g(this,"bind",(t,s,a,n,l=!0)=>{const{player:r}=this,c=r.config.listeners[n],u=o.function(c);E.call(r,t,s,m=>this.proxy(m,a,n),l&&!u)}),g(this,"controls",()=>{const{player:t}=this,{elements:s}=t,a=D.isIE?"change":"input";if(s.buttons.play&&Array.from(s.buttons.play).forEach(n=>{this.bind(n,"click",()=>{Q(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",()=>{T.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",n=>{n.stopPropagation(),n.preventDefault(),p.toggleMenu.call(t,n)},null,!1),this.bind(s.buttons.settings,"keyup",n=>{[" ","Enter"].includes(n.key)&&(n.key!=="Enter"?(n.preventDefault(),n.stopPropagation(),p.toggleMenu.call(t,n)):p.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(s.settings.menu,"keydown",n=>{n.key==="Escape"&&p.toggleMenu.call(t,n)}),this.bind(s.inputs.seek,"mousedown mousemove",n=>{const l=s.progress.getBoundingClientRect(),r=100/l.width*(n.pageX-l.left);n.currentTarget.setAttribute("seek-value",r)}),this.bind(s.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",n=>{const l=n.currentTarget,r="play-on-seeked";if(o.keyboardEvent(n)&&!["ArrowLeft","ArrowRight"].includes(n.key))return;t.lastSeekTime=Date.now();const c=l.hasAttribute(r),u=["mouseup","touchend","keyup"].includes(n.type);c&&u?(l.removeAttribute(r),Q(t.play())):!u&&t.playing&&(l.setAttribute(r,""),t.pause())}),D.isIos){const n=ae.call(t,'input[type="range"]');Array.from(n).forEach(l=>this.bind(l,a,r=>ft(r.target)))}this.bind(s.inputs.seek,a,n=>{const l=n.currentTarget;let r=l.getAttribute("seek-value");o.empty(r)&&(r=l.value),l.removeAttribute("seek-value"),t.currentTime=r/l.max*t.duration},"seek"),this.bind(s.progress,"mouseenter mouseleave mousemove",n=>p.updateSeekTooltip.call(t,n)),this.bind(s.progress,"mousemove touchmove",n=>{const{previewThumbnails:l}=t;l&&l.loaded&&l.startMove(n)}),this.bind(s.progress,"mouseleave touchend click",()=>{const{previewThumbnails:n}=t;n&&n.loaded&&n.endMove(!1,!0)}),this.bind(s.progress,"mousedown touchstart",n=>{const{previewThumbnails:l}=t;l&&l.loaded&&l.startScrubbing(n)}),this.bind(s.progress,"mouseup touchend",n=>{const{previewThumbnails:l}=t;l&&l.loaded&&l.endScrubbing(n)}),D.isWebKit&&Array.from(ae.call(t,'input[type="range"]')).forEach(n=>{this.bind(n,"input",l=>p.updateRangeFill.call(t,l.target))}),t.config.toggleInvert&&!o.element(s.display.duration)&&this.bind(s.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,p.timeUpdate.call(t))}),this.bind(s.inputs.volume,a,n=>{t.volume=n.target.value},"volume"),this.bind(s.controls,"mouseenter mouseleave",n=>{s.controls.hover=!t.touch&&n.type==="mouseenter"}),s.fullscreen&&Array.from(s.fullscreen.children).filter(n=>!n.contains(s.container)).forEach(n=>{this.bind(n,"mouseenter mouseleave",l=>{s.controls&&(s.controls.hover=!t.touch&&l.type==="mouseenter")})}),this.bind(s.controls,"mousedown mouseup touchstart touchend touchcancel",n=>{s.controls.pressed=["mousedown","touchstart"].includes(n.type)}),this.bind(s.controls,"focusin",()=>{const{config:n,timers:l}=t;N(s.controls,n.classNames.noTransition,!0),_.toggleControls.call(t,!0),setTimeout(()=>{N(s.controls,n.classNames.noTransition,!1)},0);const r=this.touch?3e3:4e3;clearTimeout(l.controls),l.controls=setTimeout(()=>_.toggleControls.call(t,!1),r)}),this.bind(s.inputs.volume,"wheel",n=>{const l=n.webkitDirectionInvertedFromDevice,[r,c]=[n.deltaX,-n.deltaY].map(f=>l?-f:f),u=Math.sign(Math.abs(r)>Math.abs(c)?r:c);t.increaseVolume(u/50);const{volume:m}=t.media;(u===1&&m<1||u===-1&&m>0)&&n.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.firstTouch=this.firstTouch.bind(this)}handleKey(i){const{player:t}=this,{elements:s}=t,{key:a,type:n,altKey:l,ctrlKey:r,metaKey:c,shiftKey:u}=i,m=n==="keydown",f=m&&a===this.lastKey;if(!(l||r||c||u)&&a){if(m){const y=document.activeElement;if(o.element(y)){const{editable:w}=t.config.selectors,{seek:k}=s.inputs;if(y!==k&&Y(y,w)||i.key===" "&&Y(y,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(a)&&(i.preventDefault(),i.stopPropagation()),a){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":f||(d=parseInt(a,10),t.currentTime=t.duration/10*d);break;case" ":case"k":f||Q(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":f||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":f||t.toggleCaptions();break;case"l":t.loop=!t.loop}a==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=a}else this.lastKey=null;var d}}toggleMenu(i){p.toggleMenu.call(this.player,i)}}function Ps(e,i){return e(i={exports:{}},i.exports),i.exports}var Ms=Ps(function(e,i){e.exports=function(){var t=function(){},s={},a={},n={};function l(d,y){d=d.push?d:[d];var w,k,C,v=[],h=d.length,S=h;for(w=function(M,L){L.length&&v.push(M),--S||y(v)};h--;)k=d[h],(C=a[k])?w(k,C):(n[k]=n[k]||[]).push(w)}function r(d,y){if(d){var w=n[d];if(a[d]=y,w)for(;w.length;)w[0](d,y),w.splice(0,1)}}function c(d,y){d.call&&(d={success:d}),y.length?(d.error||t)(y):(d.success||t)(d)}function u(d,y,w,k){var C,v,h=document,S=w.async,M=(w.numRetries||0)+1,L=w.before||t,O=d.replace(/[\?|#].*$/,""),q=d.replace(/^(css|img)!/,"");k=k||0,/(^css!|\.css$)/.test(O)?((v=h.createElement("link")).rel="stylesheet",v.href=q,(C="hideFocus"in v)&&v.relList&&(C=0,v.rel="preload",v.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(O)?(v=h.createElement("img")).src=q:((v=h.createElement("script")).src=d,v.async=S===void 0||S),v.onload=v.onerror=v.onbeforeload=function(qe){var he=qe.type[0];if(C)try{v.sheet.cssText.length||(he="e")}catch(Rt){Rt.code!=18&&(he="e")}if(he=="e"){if((k+=1)<M)return u(d,y,w,k)}else if(v.rel=="preload"&&v.as=="style")return v.rel="stylesheet";y(d,he,qe.defaultPrevented)},L(d,v)!==!1&&h.head.appendChild(v)}function m(d,y,w){var k,C,v=(d=d.push?d:[d]).length,h=v,S=[];for(k=function(M,L,O){if(L=="e"&&S.push(M),L=="b"){if(!O)return;S.push(M)}--v||y(S)},C=0;C<h;C++)u(d[C],k,w)}function f(d,y,w){var k,C;if(y&&y.trim&&(k=y),C=(k?w:y)||{},k){if(k in s)throw"LoadJS";s[k]=!0}function v(h,S){m(d,function(M){c(C,M),h&&c({success:h,error:S},M),r(k,M)},C)}if(C.returnPromise)return new Promise(v);v()}return f.ready=function(d,y){return l(d,function(w){c(y,w)}),f},f.done=function(d){r(d,[])},f.reset=function(){s={},a={},n={}},f.isDefined=function(d){return d in s},f}()});function Fe(e){return new Promise((i,t)=>{Ms(e,{success:i,error:t})})}function Ns(e){return o.empty(e)?null:o.number(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}function _s(e){const i=e.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return i&&i.length===5?i[4]:null}function te(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,T.call(this,this.media,e?"play":"pause"))}const Le={setup(){const e=this;N(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,ee.call(e),o.object(window.Vimeo)?Le.ready.call(e):Fe(e.config.urls.vimeo.sdk).then(()=>{Le.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,...a}=i;let n=e.media.getAttribute("src"),l="";o.empty(n)?(n=e.media.getAttribute(e.config.attributes.embed.id),l=e.media.getAttribute(e.config.attributes.embed.hash)):l=_s(n);const r=l?{h:l}:{};t&&Object.assign(a,{controls:!1,sidedock:!1});const c=Pt({loop:e.config.loop.active,autoplay:e.autoplay,muted:e.muted,gesture:"media",playsinline:e.config.playsinline,...r,...a}),u=Ns(n),m=A("iframe"),f=je(e.config.urls.vimeo.iframe,u,c);if(m.setAttribute("src",f),m.setAttribute("allowfullscreen",""),m.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),o.empty(s)||m.setAttribute("referrerPolicy",s),t||!i.customControls)m.setAttribute("data-poster",e.poster),e.media=be(m,e.media);else{const h=A("div",{class:e.config.classNames.embedContainer,"data-poster":e.poster});h.appendChild(m),e.media=be(h,e.media)}i.customControls||de(je(e.config.urls.vimeo.api,f)).then(h=>{!o.empty(h)&&h.thumbnail_url&&_.setPoster.call(e,h.thumbnail_url).catch(()=>{})}),e.embed=new window.Vimeo.Player(m,{autopause:e.config.autopause,muted:e.muted}),e.media.paused=!0,e.media.currentTime=0,e.supported.ui&&e.embed.disableTextTrack(),e.media.play=()=>(te.call(e,!0),e.embed.play()),e.media.pause=()=>(te.call(e,!1),e.embed.pause()),e.media.stop=()=>{e.pause(),e.currentTime=0};let{currentTime:d}=e.media;Object.defineProperty(e.media,"currentTime",{get:()=>d,set(h){const{embed:S,media:M,paused:L,volume:O}=e,q=L&&!S.hasPlayed;M.seeking=!0,T.call(e,M,"seeking"),Promise.resolve(q&&S.setVolume(0)).then(()=>S.setCurrentTime(h)).then(()=>q&&S.pause()).then(()=>q&&S.setVolume(O)).catch(()=>{})}});let y=e.config.speed.selected;Object.defineProperty(e.media,"playbackRate",{get:()=>y,set(h){e.embed.setPlaybackRate(h).then(()=>{y=h,T.call(e,e.media,"ratechange")}).catch(()=>{e.options.speed=[1]})}});let{volume:w}=e.config;Object.defineProperty(e.media,"volume",{get:()=>w,set(h){e.embed.setVolume(h).then(()=>{w=h,T.call(e,e.media,"volumechange")})}});let{muted:k}=e.config;Object.defineProperty(e.media,"muted",{get:()=>k,set(h){const S=!!o.boolean(h)&&h;e.embed.setMuted(!!S||e.config.muted).then(()=>{k=S,T.call(e,e.media,"volumechange")})}});let C,{loop:v}=e.config;Object.defineProperty(e.media,"loop",{get:()=>v,set(h){const S=o.boolean(h)?h:e.config.loop.active;e.embed.setLoop(S).then(()=>{v=S})}}),e.embed.getVideoUrl().then(h=>{C=h,p.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[S,M]=h;e.embed.ratio=kt(S,M),ee.call(this)}),e.embed.setAutopause(e.config.autopause).then(h=>{e.config.autopause=h}),e.embed.getVideoTitle().then(h=>{e.config.title=h,_.setTitle.call(this)}),e.embed.getCurrentTime().then(h=>{d=h,T.call(e,e.media,"timeupdate")}),e.embed.getDuration().then(h=>{e.media.duration=h,T.call(e,e.media,"durationchange")}),e.embed.getTextTracks().then(h=>{e.media.textTracks=h,P.setup.call(e)}),e.embed.on("cuechange",({cues:h=[]})=>{const S=h.map(M=>As(M.text));P.updateCues.call(e,S)}),e.embed.on("loaded",()=>{e.embed.getPaused().then(h=>{te.call(e,!h),h||T.call(e,e.media,"playing")}),o.element(e.embed.element)&&e.supported.ui&&e.embed.element.setAttribute("tabindex",-1)}),e.embed.on("bufferstart",()=>{T.call(e,e.media,"waiting")}),e.embed.on("bufferend",()=>{T.call(e,e.media,"playing")}),e.embed.on("play",()=>{te.call(e,!0),T.call(e,e.media,"playing")}),e.embed.on("pause",()=>{te.call(e,!1)}),e.embed.on("timeupdate",h=>{e.media.seeking=!1,d=h.seconds,T.call(e,e.media,"timeupdate")}),e.embed.on("progress",h=>{e.media.buffered=h.percent,T.call(e,e.media,"progress"),parseInt(h.percent,10)===1&&T.call(e,e.media,"canplaythrough"),e.embed.getDuration().then(S=>{S!==e.media.duration&&(e.media.duration=S,T.call(e,e.media,"durationchange"))})}),e.embed.on("seeked",()=>{e.media.seeking=!1,T.call(e,e.media,"seeked")}),e.embed.on("ended",()=>{e.media.paused=!0,T.call(e,e.media,"ended")}),e.embed.on("error",h=>{e.media.error=h,T.call(e,e.media,"error")}),i.customControls&&setTimeout(()=>_.build.call(e),0)}};function Is(e){return o.empty(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}function ie(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,T.call(this,this.media,e?"play":"pause"))}function xs(e){return e.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const ye={setup(){if(N(this.elements.wrapper,this.config.classNames.embed,!0),o.object(window.YT)&&o.function(window.YT.Player))ye.ready.call(this);else{const e=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{o.function(e)&&e(),ye.ready.call(this)},Fe(this.config.urls.youtube.sdk).catch(i=>{this.debug.warn("YouTube API failed to load",i)})}},getTitle(e){de(je(this.config.urls.youtube.api,e)).then(i=>{if(o.object(i)){const{title:t,height:s,width:a}=i;this.config.title=t,_.setTitle.call(this),this.embed.ratio=kt(a,s)}ee.call(this)}).catch(()=>{ee.call(this)})},ready(){const e=this,i=e.config.youtube,t=e.media&&e.media.getAttribute("id");if(!o.empty(t)&&t.startsWith("youtube-"))return;let s=e.media.getAttribute("src");o.empty(s)&&(s=e.media.getAttribute(this.config.attributes.embed.id));const a=Is(s),n=A("div",{id:fs(e.provider),"data-poster":i.customControls?e.poster:void 0});if(e.media=be(n,e.media),i.customControls){const l=r=>"https://i.ytimg.com/vi/".concat(a,"/").concat(r,"default.jpg");fe(l("maxres"),121).catch(()=>fe(l("sd"),121)).catch(()=>fe(l("hq"))).then(r=>_.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:a,host:xs(i),playerVars:x({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&i.customControls?0:1,disablekb:1,playsinline:e.config.playsinline&&!e.config.fullscreen.iosNative?1:0,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(l){if(!e.media.error){const r=l.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 occurred";e.media.error={code:r,message:c},T.call(e,e.media,"error")}},onPlaybackRateChange(l){const r=l.target;e.media.playbackRate=r.getPlaybackRate(),T.call(e,e.media,"ratechange")},onReady(l){if(o.function(e.media.play))return;const r=l.target;ye.getTitle.call(e,a),e.media.play=()=>{ie.call(e,!0),r.playVideo()},e.media.pause=()=>{ie.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(f){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,T.call(e,e.media,"seeking"),r.seekTo(f)}}),Object.defineProperty(e.media,"playbackRate",{get:()=>r.getPlaybackRate(),set(f){r.setPlaybackRate(f)}});let{volume:c}=e.config;Object.defineProperty(e.media,"volume",{get:()=>c,set(f){c=f,r.setVolume(100*c),T.call(e,e.media,"volumechange")}});let{muted:u}=e.config;Object.defineProperty(e.media,"muted",{get:()=>u,set(f){const d=o.boolean(f)?f:u;u=d,r[d?"mute":"unMute"](),r.setVolume(100*c),T.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:()=>r.getVideoUrl()}),Object.defineProperty(e.media,"ended",{get:()=>e.currentTime===e.duration});const m=r.getAvailablePlaybackRates();e.options.speed=m.filter(f=>e.config.speed.options.includes(f)),e.supported.ui&&i.customControls&&e.media.setAttribute("tabindex",-1),T.call(e,e.media,"timeupdate"),T.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval(()=>{e.media.buffered=r.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&T.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(clearInterval(e.timers.buffering),T.call(e,e.media,"canplaythrough"))},200),i.customControls&&setTimeout(()=>_.build.call(e),50)},onStateChange(l){const r=l.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(l.data)&&(e.media.seeking=!1,T.call(e,e.media,"seeked")),l.data){case-1:T.call(e,e.media,"timeupdate"),e.media.buffered=r.getVideoLoadedFraction(),T.call(e,e.media,"progress");break;case 0:ie.call(e,!1),e.media.loop?(r.stopVideo(),r.playVideo()):T.call(e,e.media,"ended");break;case 1:i.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(ie.call(e,!0),T.call(e,e.media,"playing"),e.timers.playing=setInterval(()=>{T.call(e,e.media,"timeupdate")},50),e.media.duration!==r.getDuration()&&(e.media.duration=r.getDuration(),T.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),ie.call(e,!1);break;case 3:T.call(e,e.media,"waiting")}T.call(e,e.elements.container,"statechange",!1,{code:l.data})}}})}},Nt={setup(){this.media?(N(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),N(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&N(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=A("div",{class:this.config.classNames.video}),bt(this.media,this.elements.wrapper),this.elements.poster=A("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Z.setup.call(this):this.isYouTube?ye.setup.call(this):this.isVimeo&&Le.setup.call(this)):this.debug.warn("No media element found!")}};class js{constructor(i){g(this,"load",()=>{this.enabled&&(o.object(window.google)&&o.object(window.google.ima)?this.ready():Fe(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=A("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=Te(Math.max(this.manager.getRemainingTime(),0)),a="".concat(B.get("advertisement",this.player.config)," - ").concat(s);this.elements.container.setAttribute("data-badge-text",a)},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,a=>this.onAdError(a)),Object.keys(google.ima.AdEvent.Type).forEach(a=>{this.manager.addEventListener(google.ima.AdEvent.Type[a],n=>this.onAdEvent(n))}),this.trigger("loaded")}),g(this,"addCuePoints",()=>{o.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const s=this.player.elements.progress;if(o.element(s)){const a=100/this.player.duration*t,n=A("span",{class:this.player.config.classNames.cues});n.style.left="".concat(a.toString(),"%"),s.appendChild(n)}}})}),g(this,"onAdEvent",t=>{const{container:s}=this.player.elements,a=t.getAd(),n=t.getAdData();switch((l=>{T.call(this.player,this.player.media,"ads".concat(l.replace(/_/g,"").toLowerCase()))})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),a.isLinear()||(a.width=s.offsetWidth,a.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:n.adError&&this.player.debug.warn("Non-fatal ad error: ".concat(n.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 a=this.player.currentTime;o.empty(this.cuePoints)||this.cuePoints.forEach((n,l)=>{s<n&&n<a&&(this.manager.discardAdBreak(),this.cuePoints.splice(l,1))})}),window.addEventListener("resize",()=>{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,Q(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 a=this.events[t];o.array(a)&&a.forEach(n=>{o.function(n)&&n.apply(this,s)})}),g(this,"on",(t,s)=>(o.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: ".concat(s)),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),g(this,"clearSafetyTimer",t=>{o.nullOrUndefined(this.safetyTimer)||(this.player.debug.log("Safety timer cleared from: ".concat(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&&(!o.empty(i.publisherId)||o.url(i.tagUrl))}get tagUrl(){const{config:i}=this;return o.url(i.tagUrl)?i.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(Pt({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:i.publisherId}))}}function _t(e=0,i=0,t=255){return Math.min(Math.max(e,i),t)}const Ls=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(a=>{if(o.number(s.startTime)){if(!o.empty(a.trim())&&o.empty(s.text)){const n=a.trim().split("#xywh=");[s.text]=n,n[1]&&([s.x,s.y,s.w,s.h]=n[1].split(","))}}else{const n=a.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})/);n&&(s.startTime=60*Number(n[1]||0)*60+60*Number(n[2])+Number(n[3])+Number("0.".concat(n[4])),s.endTime=60*Number(n[6]||0)*60+60*Number(n[7])+Number(n[8])+Number("0.".concat(n[9])))}}),s.text&&i.push(s)}),i},tt=(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 Re{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.listeners(),this.loaded=!0)})}),g(this,"getThumbnails",()=>new Promise(t=>{const{src:s}=this.player.config.previewThumbnails;if(o.empty(s))throw new Error("Missing previewThumbnails.src config attribute");const a=()=>{this.thumbnails.sort((n,l)=>n.height-l.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(o.function(s))s(n=>{this.thumbnails=n,a()});else{const n=(o.string(s)?[s]:s).map(l=>this.getThumbnail(l));Promise.all(n).then(a)}})),g(this,"getThumbnail",t=>new Promise(s=>{de(t).then(a=>{const n={frames:Ls(a),height:null,urlPrefix:""};n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const l=new Image;l.onload=()=>{n.height=l.naturalHeight,n.width=l.naturalWidth,this.thumbnails.push(n),s()},l.src=n.urlPrefix+n.frames[0].text})})),g(this,"startMove",t=>{if(this.loaded&&o.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{var s,a;const n=this.player.elements.progress.getBoundingClientRect(),l=100/n.width*(t.pageX-n.left);this.seekTime=this.player.media.duration*(l/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=Te(this.seekTime);const r=(s=this.player.config.markers)===null||s===void 0||(a=s.points)===null||a===void 0?void 0:a.find(({time:c})=>c===Math.round(this.seekTime));r&&this.elements.thumb.time.insertAdjacentHTML("afterbegin","".concat(r.label,"<br>"))}this.showImageAtCurrentTime()}}),g(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),g(this,"startScrubbing",t=>{(o.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=A("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=A("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=A("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=A("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),o.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=A("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(n=>this.seekTime>=n.startTime&&this.seekTime<=n.endTime),s=t>=0;let a=0;this.mouseDown||this.toggleThumbContainer(s),s&&(this.thumbnails.forEach((n,l)=>{this.loadedImages.includes(n.frames[t].text)&&(a=l)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(a)))}),g(this,"loadImage",(t=0)=>{const s=this.showingThumb,a=this.thumbnails[t],{urlPrefix:n}=a,l=a.frames[s],r=a.frames[s].text,c=n+r;if(this.currentImageElement&&this.currentImageElement.dataset.filename===r)this.showImage(this.currentImageElement,l,t,s,r,!1),this.currentImageElement.dataset.index=s,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const u=new Image;u.src=c,u.dataset.index=s,u.dataset.filename=r,this.showingThumbFilename=r,this.player.debug.log("Loading image: ".concat(c)),u.onload=()=>this.showImage(u,l,t,s,r,!0),this.loadingImage=u,this.removeOldImages(u)}}),g(this,"showImage",(t,s,a,n,l,r=!0)=>{this.player.debug.log("Showing thumb: ".concat(l,". num: ").concat(n,". qual: ").concat(a,". newimg: ").concat(r)),this.setImageSizeAndOffset(t,s),r&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(l)||this.loadedImages.push(l)),this.preloadNearby(n,!0).then(this.preloadNearby(n,!1)).then(this.getHigherQuality(a,t,s,l))}),g(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(s=>{if(s.tagName.toLowerCase()!=="img")return;const a=this.usingSprites?500:1e3;if(s.dataset.index!==t.dataset.index&&!s.dataset.deleting){s.dataset.deleting=!0;const{currentImageContainer:n}=this;setTimeout(()=>{n.removeChild(s),this.player.debug.log("Removing thumb: ".concat(s.dataset.filename))},a)}})}),g(this,"preloadNearby",(t,s=!0)=>new Promise(a=>{setTimeout(()=>{const n=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===n){let l;l=s?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let r=!1;l.forEach(c=>{const u=c.text;if(u!==n&&!this.loadedImages.includes(u)){r=!0,this.player.debug.log("Preloading thumb filename: ".concat(u));const{urlPrefix:m}=this.thumbnails[0],f=m+u,d=new Image;d.src=f,d.onload=()=>{this.player.debug.log("Preloaded thumb filename: ".concat(u)),this.loadedImages.includes(u)||this.loadedImages.push(u),a()}}}),r||a()}},300)})),g(this,"getHigherQuality",(t,s,a,n)=>{if(t<this.thumbnails.length-1){let l=s.naturalHeight;this.usingSprites&&(l=a.h),l<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===n&&(this.player.debug.log("Showing higher quality thumb for: ".concat(n)),this.loadImage(t+1))},300)}}),g(this,"toggleThumbContainer",(t=!1,s=!1)=>{const a=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(a,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",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const s=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width="".concat(s,"px")}else if(t.clientHeight<20&&t.clientWidth>20){const s=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height="".concat(s,"px")}}else{const s=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height="".concat(this.thumbContainerHeight,"px"),t.style.width="".concat(s,"px")}this.setThumbContainerPos()}),g(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),s=this.player.elements.container.getBoundingClientRect(),{container:a}=this.elements.thumb,n=s.left-t.left+10,l=s.right-t.left-a.clientWidth-10,r=this.mousePosX-t.left-a.clientWidth/2,c=_t(r,n,l);a.style.left="".concat(c,"px"),a.style.setProperty("--preview-arrow-offset",r-c+"px")}),g(this,"setScrubbingContainerSize",()=>{const{width:t,height:s}=tt(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width="".concat(t,"px"),this.elements.scrubbing.container.style.height="".concat(s,"px")}),g(this,"setImageSizeAndOffset",(t,s)=>{if(!this.usingSprites)return;const a=this.thumbContainerHeight/s.h;t.style.height=t.naturalHeight*a+"px",t.style.width=t.naturalWidth*a+"px",t.style.left="-".concat(s.x*a,"px"),t.style.top="-".concat(s.y*a,"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}=tt(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){o.string(i)?$e(e,this.media,{src:i}):o.array(i)&&i.forEach(t=>{$e(e,this.media,t)})},change(e){yt(e,"sources.length")?(Z.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],K(this.media),this.media=null,o.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:i,type:t}=e,[{provider:s=J.html5,src:a}]=i,n=s==="html5"?t:"div",l=s==="html5"?{}:{src:a};Object.assign(this,{provider:s,type:t,supported:j.check(t,s,this.config.playsinline),media:A(n,l)}),this.elements.container.appendChild(this.media),o.boolean(e.autoplay)&&(this.config.autoplay=e.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),o.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","")),_.addStyleHook.call(this),this.isHTML5&&Be.insertElements.call(this,"source",i),this.config.title=e.title,Nt.setup.call(this),this.isHTML5&&Object.keys(e).includes("tracks")&&Be.insertElements.call(this,"track",e.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&_.build.call(this),this.isHTML5&&this.media.load(),o.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 Re(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class re{constructor(i,t){if(g(this,"play",()=>o.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Q(this.media.play())),this.media.play()):null),g(this,"pause",()=>this.playing&&o.function(this.media.pause)?this.media.pause():null),g(this,"togglePlay",r=>(o.boolean(r)?r:!this.playing)?this.play():this.pause()),g(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):o.function(this.media.stop)&&this.media.stop()}),g(this,"restart",()=>{this.currentTime=0}),g(this,"rewind",r=>{this.currentTime-=o.number(r)?r:this.config.seekTime}),g(this,"forward",r=>{this.currentTime+=o.number(r)?r:this.config.seekTime}),g(this,"increaseVolume",r=>{const c=this.media.muted?0:this.volume;this.volume=c+(o.number(r)?r:0)}),g(this,"decreaseVolume",r=>{this.increaseVolume(-r)}),g(this,"airplay",()=>{j.airplay&&this.media.webkitShowPlaybackTargetPicker()}),g(this,"toggleControls",r=>{if(this.supported.ui&&!this.isAudio){const c=ve(this.elements.container,this.config.classNames.hideControls),u=r===void 0?void 0:!r,m=N(this.elements.container,this.config.classNames.hideControls,u);if(m&&o.array(this.config.controls)&&this.config.controls.includes("settings")&&!o.empty(this.config.settings)&&p.toggleMenu.call(this,!1),m!==c){const f=m?"controlshidden":"controlsshown";T.call(this,this.media,f)}return!m}return!1}),g(this,"on",(r,c)=>{E.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)=>{ke(this.elements.container,r,c)}),g(this,"destroy",(r,c=!1)=>{if(!this.ready)return;const u=()=>{document.body.style.overflow="",this.embed=null,c?(Object.keys(this.elements).length&&(K(this.elements.buttons.play),K(this.elements.captions),K(this.elements.controls),K(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),o.function(r)&&r()):(ms.call(this),Z.cancelRequests.call(this),be(this.elements.original,this.elements.container),T.call(this,this.elements.original,"destroyed",!0),o.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?(_.toggleNativeControls.call(this,!0),u()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&o.function(this.embed.destroy)&&this.embed.destroy(),u()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(u),setTimeout(u,200))}),g(this,"supports",r=>j.mime.call(this,r)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=j.touch,this.media=i,o.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||o.nodeList(this.media)||o.array(this.media))&&(this.media=this.media[0]),this.config=x({},Mt,re.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(r){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 Cs(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",j),o.nullOrUndefined(this.media)||!o.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(!j.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 a=this.media.tagName.toLowerCase();let n=null,l=null;switch(a){case"div":if(n=this.media.querySelector("iframe"),o.element(n)){if(l=Et(n.getAttribute("src")),this.provider=Ss(l.toString()),this.elements.container=this.media,this.media=n,this.elements.container.className="",l.search.length){const r=["1","true"];r.includes(l.searchParams.get("autoplay"))&&(this.config.autoplay=!0),r.includes(l.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=r.includes(l.searchParams.get("playsinline")),this.config.youtube.hl=l.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(o.empty(this.provider)||!Object.values(J).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=Pe.video;break;case"video":case"audio":this.type=a,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=j.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new Es(this),this.storage=new le(this),this.media.plyr=this,o.element(this.elements.container)||(this.elements.container=A("div"),bt(this.media,this.elements.container)),_.migrateStyles.call(this),_.addStyleHook.call(this),Nt.setup.call(this),this.config.debug&&E.call(this,this.elements.container,this.config.events.join(" "),r=>{this.debug.log("event: ".concat(r.type))}),this.fullscreen=new F(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&_.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new js(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Q(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Re(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===Pe.video}get isAudio(){return this.type===Pe.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(i){if(!this.duration)return;const t=o.number(i)&&i>0;this.media.currentTime=t?Math.min(i,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:i}=this.media;return o.number(i)?i:i&&i.length&&this.duration>0?i.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const i=parseFloat(this.config.duration),t=(this.media||{}).duration,s=o.number(t)&&t!==1/0?t:0;return i||s}set volume(i){let t=i;o.string(t)&&(t=Number(t)),o.number(t)||(t=this.storage.get("volume")),o.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!o.empty(i)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(i){let t=i;o.boolean(t)||(t=this.storage.get("muted")),o.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(i){let t=null;o.number(i)&&(t=i),o.number(t)||(t=this.storage.get("speed")),o.number(t)||(t=this.config.speed.selected);const{minimumSpeed:s,maximumSpeed:a}=this;t=_t(t,s,a),this.config.speed.selected=t,setTimeout(()=>{this.media&&(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 a=[!o.empty(i)&&Number(i),this.storage.get("quality"),t.selected,t.default].find(o.number),n=!0;if(!s.includes(a)){const l=vt(s,a);this.debug.warn("Unsupported quality option: ".concat(a,", using ").concat(l," instead")),a=l,n=!1}t.selected=a,this.media.quality=a,n&&this.storage.set({quality:a})}get quality(){return this.media.quality}set loop(i){const t=o.boolean(i)?i:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!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 o.url(i)?i:this.source}set download(i){o.url(i)&&(this.config.urls.download=i,p.setDownloadUrl.call(this))}set poster(i){this.isVideo?_.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=Ae(Ve.call(this));return o.array(i)?i.join(":"):i}set ratio(i){this.isVideo?o.string(i)&&wt(i)?(this.config.ratio=Ae(i),ee.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(i,")")):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(i){this.config.autoplay=o.boolean(i)?i:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(i){P.toggle.call(this,i,!1)}set currentTrack(i){P.set.call(this,i,!1),P.setup.call(this)}get currentTrack(){const{toggled:i,currentTrack:t}=this.captions;return i?t:-1}set language(i){P.setLanguage.call(this,i,!1)}get language(){return(P.getCurrentTrack.call(this)||{}).language}set pip(i){if(!j.pip)return;const t=o.boolean(i)?i:!this.pip;o.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?Ee.active:Ee.inactive),o.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return j.pip?o.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ee.active:null}setPreviewThumbnails(i){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,i),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new Re(this))}static supported(i,t){return j.check(i,t)}static loadSprite(i,t){return St(i,t)}static setup(i,t={}){let s=null;return o.string(i)?s=Array.from(document.querySelectorAll(i)):o.nodeList(i)?s=Array.from(i):o.array(i)&&(s=i.filter(o.element)),o.empty(s)?null:s.map(a=>new re(a,t))}}re.defaults=cs(Mt);const Rs="_videoWrap_1a4yz_1",Bs="_controls_1a4yz_20",Ds="_time_1a4yz_28",Us="_line_1a4yz_38",Os="_slider_1a4yz_45",Hs="_actions_1a4yz_56",Vs="_actionWrap_1a4yz_63",Fs="_actionBtn_1a4yz_66",qs="_playIcon_1a4yz_81",zs="_btnPlay_1a4yz_84",Qs="_btnPause_1a4yz_87",Gs="_loopBtn_1a4yz_94",U={videoWrap:Rs,controls:Bs,time:Ds,line:Us,slider:Os,actions:Hs,actionWrap:Vs,actionBtn:Fs,playIcon:qs,btnPlay:zs,btnPause:Qs,loopBtn:Gs},It="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAACkCAMAAAAua3VzAAAArlBMVEUAAAAajP87nf8Zjf8ajf8Zjf8Zjf8ajf8ajf8ZjP8ajf8cjv8akP8Zjf8hlP8ajP8Zjf8ajf8ajP8Zjf8ZjP8ajf8ajv8Zjf8ajf8dkP8bjf8ekv8hkP8ajP8uov8ZjP7///80mf7l8v76/P71+v693v4jkf7s9v7Q6P6Nxv4+nv4qlP4djv7Y6/7J5P6w1/5arf5Kpf6ZzP6Dwf53u/5ttv6ez/5+vv5os/6q1P42g/o7AAAAH3RSTlMA7QTo2dLJx66MTkke4R/59biyo453bGVXPi8qFxQLZBJdxgAAA35JREFUeNrM2IlO20AUheHr8W5n3/czJJQmNKC2UKm8/4shLEVZHHDCja/v9wS/EuuMPXS52XgYd0K/7jTB0HTqftiJh+MZ3dp0EDm4MScaTOlWTNp1URK3mxrim8QuSuXGE+JJAggIEkbiyIcQf0Tfk3oQ5KV0vVoEYVGNrmP6LYhr9Q1doRGiEmGDLpY4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FED3GogcA2YsIFlNgDXBiocga4b+HqjCACpVEDKKZCaD6QwBameQUp81tchfeLNgcPaKJeIAAAAAElFTkSuQmCC",jt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABOCAMAAACAE2F0AAAApVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+4/eNVAAAANnRSTlMA+/j08ukEC9VOPBjhSRNuZ9CHfHJgHDUH5cqAQsS9qKCPLScg7tyudyS3jA+VWFQwsaWbmFssRkBhAAAD4UlEQVRYw92Xa3ebMAyGkQQBQi5AyL25N/c07drN//+nbQsmJtgYs+WcnbP3G7X6WLJkxbL+E13cJ4E6fm/hbZExBttW9C1pjvKrm6Qb1KE1VzsgZDkRgrf6yNZDYAybprTX6RiBKfSLGV5u+92WnY4RbrMAYqUiXAaWu0s/Dga4wR6QaYXYW7JUrUYVrpEgskoJk2sF7+gRq6WJnvdO8OiJDeDsIm9sAyNQErWJXj2WCXhx+5itBX48QYX7e83xLXI8AK8r1YQbelI1wWsZbzSnHG4+VFsNJ8WcrcqA3wSPIoGT7QpA+6K2+37nAYVWuT6k3CRKu+49EhyvNbyRJ0i64h7eeTTR3s+YyXpXdLwxZP59jrQXSVX3M9luiZl/Z0srl6k0kAK++3eyKrQzui0eB8Kustm3UeZh8dR/UFZSr1al1qv5pGU/AA9lYcCLZapGsGn6/WT6tjh9tYuLPnLPl9ZzNMkC7jyH9wq8YhLrOeoRd9B9ErDFHZwqf+uHnT+NGAaqFs4YvtVE9u3SC2l1bytOvxbwk0ccavI/W9cAjnnER8Waw7hgdTEueX6EjqUE3jW+GgI3HHgqAQrNN0ZAP80JxFogt3FLojzmFsIUaPe1QK7Wu6rnfgHAKcg+E0qBbR1QqCcb3Z4HGGWfU0yrpmkGlIthACkga33n9Bs/zIBMOpq2nQK7/DvmGwwNgdLR9AvAA3KPzYBeQ7qexLNa+H43Ak4CufvhI+AH9zgxAG5V933JHsukydvrshq4VPaxqJD+DreOqoBR01LK5sBG8Q+uFmh3G2reGvglKvY8ait/Hbg+RTLUSWbfilnCN0vWnteK5gEwk/pzE3lQipg2zm/bg2ZaCnjEIHrbiAPJV41p5/10YGl0IF5R+bgg3WNm1VdjzOQDa/NNYFgf2CcOHOZ3yQpnXt/BFhNFIxRn2/h1gQdSPosCZKkctx5vgEz9LPqeJXpfizeKsv+blu1EvTrABZU+LKfE6h/j4e5GKDs/ZlwkXjGm4wB4itWX+6rzYcgjxkQNyjpTRjSLOoE7L1GXaCQsqjPTWIrZdV5WU44gLirqMZiJ2brVKZ2QcgO9ow07JLzztsrZSzRGEUiz9LnmiZ1BXxRNAmGKM1/RV92+l9sWthUlsd5Czprs7/7l4eh+LJCYEI6PlSNGxP8hY8JuPw2vbf8axqcWsyG/SrPA4L6/oTQM2zcBKwimlpF8h5iBqGU8CrtnwCocYm9kmWvzqUcifA3qzn9fJAUukr8KrPpyr3MgkHwjOPki2LrM9tlDRjYhAJJNjKL45a9n6sFLv9uL4163/xJY/0I/Aa8fYGo2MWcIAAAAAElFTkSuQmCC",Ks=X({name:"video-play",props:{src:{type:String,default:""},poster:{type:String,default:""},isEmtry:{type:Boolean,default:!1}},emits:["loadedmetadata","togglePlay","ended","reset"],setup(e,{emit:i,expose:t}){const{src:s,poster:a,isEmtry:n}=Ut(e),l=G(),r=G(),c="v"+Date.now()+Math.floor(Math.random()*100),u="play"+Date.now()+Math.floor(Math.random()*100),m="replay"+Date.now()+Math.floor(Math.random()*100),f=v=>{var h;(h=r.value)==null||h.toggleControls(v)},d=v=>{var h;v.stopPropagation(),(h=r.value)==null||h.togglePlay()},y=()=>{!document.getElementById(m)||!r.value||r.value.restart()},w=()=>{var v,h,S;(v=document.getElementById(c))==null||v.addEventListener("click",M=>{M.stopPropagation(),i("reset")}),(h=document.getElementById(u))==null||h.addEventListener("click",d),(S=document.getElementById(m))==null||S.addEventListener("click",y)},k=v=>{const h=document.getElementById(u);h&&(v=="play"?(h.classList.remove(U.btnPause),h.classList.add(U.btnPlay)):(h.classList.remove(U.btnPlay),h.classList.add(U.btnPause)))},C='\n <div id="'.concat(c,'" class="plyr__controls bottomFixed ').concat(U.controls,'">\n <div class="').concat(U.actions,'">\n <div class="').concat(U.actionWrap,'">\n <button id="').concat(u,'" class="').concat(U.actionBtn,'">\n <div class="van-loading van-loading--circular" aria-live="polite" aria-busy="true"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(255, 255, 255);"><svg class="van-loading__circular" viewBox="25 25 50 50"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>\n <img class="').concat(U.playIcon,'" src="').concat(It,'" />\n <img class="').concat(U.playIcon,'" src="').concat(xt,'" />\n </button>\n </div>\n <div class="').concat(U.time,'">\n <div class="plyr__time plyr__time--current" aria-label="Current time">00:00</div><span class="').concat(U.line,'">/</span>\n <div class="plyr__time plyr__time--duration" aria-label="Duration">00:00</div>\n </div>\n </div>\n <div class="').concat(U.slider,'">\n <div class="plyr__progress">\n <input data-plyr="seek" type="range" min="0" max="100" step="0.01" value="0" aria-label="Seek">\n <progress class="plyr__progress__buffer" min="0" max="100" value="0">% buffered</progress>\n <span role="tooltip" class="plyr__tooltip">00:00</span>\n </div>\n\n </div>\n <div class="').concat(U.actions,'" style="padding-right: 0;">\n <button id="').concat(m,'" class="').concat(U.actionBtn," ").concat(U.loopBtn,'">\n <img class="loop" src="').concat(jt,'" />\n </button>\n </div>\n </div>');return Ot(()=>{r.value=new re(l.value,{autoplay:!1,controls:C,autopause:!0,ratio:"16:9",clickToPlay:!1,fullscreen:{enabled:!1,fallback:!1,iosNative:!1}}),r.value&&(r.value.on("play",()=>{r.value&&(r.value.muted=!1,r.value.volume=1),k("")}),r.value.on("pause",()=>{k("play")}),r.value.on("ended",()=>{i("ended"),k("play")}),r.value.once("loadedmetadata",()=>{k("play")}),at(()=>{w()}))}),t({changePlayBtn:k,toggleHideControl:f}),()=>b("div",{class:U.videoWrap},[b("video",{style:{width:"100%",height:"100%"},src:n.value?"":s.value,poster:a.value,ref:l,playsinline:"false"},null)])}}),Ws="_musicScore_cvsnj_1",it={musicScore:Ws},Js=X({name:"song-modal",props:{item:{type:Object,default:()=>({})}},setup(e){const i=Ht(),t=G(),s=G(!1),a=/(localhost|192)/.test(location.host)?"https://test.lexiaoya.cn":location.origin,n="".concat(a,"/instrument?modelType=practise&id=").concat(e.item.content,"&Authorization=").concat(i.getToken);return()=>b("div",{class:it.musicScore},[b("iframe",{ref:t,onLoad:()=>{s.value=!0},class:[it.container,"musicIframe"],frameborder:"0",src:n},null)])}}),Zs="_audioWrap_195kw_1",$s="_audioContainer_195kw_6",Ys="_audio_195kw_1",Xs="_tempVudio_195kw_22",en="_controls_195kw_34",tn="_time_195kw_49",sn="_line_195kw_59",nn="_actions_195kw_66",an="_actionWrap_195kw_74",on="_actionBtn_195kw_77",ln="_iconReplay_195kw_88",rn="_slider_195kw_97",cn="_sectionAnimate_195kw_105",V={audioWrap:Zs,audioContainer:$s,audio:Ys,tempVudio:Xs,controls:en,time:tn,line:sn,actions:nn,actionWrap:an,actionBtn:on,iconReplay:ln,slider:rn,sectionAnimate:cn};var Lt={exports:{}};(function(e,i){(function(t){e.exports=t()})(function(){var t={effect:"waveform",accuracy:128,width:256,height:100,waveform:{maxHeight:80,minHeight:1,spacing:1,color:"#f00",shadowBlur:0,shadowColor:"#f00",fadeSide:!0,horizontalAlign:"center",verticalAlign:"middle",prettify:!0},lighting:{maxHeight:80,lineWidth:0,color:"#f00",shadowBlur:0,shadowColor:"#f00",fadeSide:!0,horizontalAlign:"center",verticalAlign:"middle"}};function s(n,l,r){if(["[object HTMLAudioSource]","[object HTMLAudioElement]","[object MediaStream]"].indexOf(Object.prototype.toString.call(n))===-1)throw new TypeError("Invaild Audio Source");if(Object.prototype.toString.call(l)!=="[object HTMLCanvasElement]")throw new TypeError("Invaild Canvas Element");this.audioSrc=n,this.canvasEle=l,this.option=a(t,r),this.meta={},this.stat=0,this.freqByteData=null,this.__init()}function a(){var n={};return Array.prototype.forEach.call(arguments,function(l){var r;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(Object.prototype.toString.call(l[r])==="[object Object]"?n[r]=a(n[r],l[r]):n[r]=l[r])}),n}return s.prototype={__init:function(){var n=new(window.AudioContext||window.webkitAudioContext||window.mozAudioContext),l=Object.prototype.toString.call(this.audioSrc)!=="[object MediaStream]"?n.createMediaElementSource(this.audioSrc):n.createMediaStreamSource(this.audioSrc),r=window.devicePixelRatio||1;this.analyser=n.createAnalyser(),this.meta.spr=n.sampleRate,l.connect(this.analyser),this.analyser.fftSize=this.option.accuracy*2,this.analyser.connect(n.destination),this.freqByteData=new Uint8Array(this.analyser.frequencyBinCount),this.context2d=this.canvasEle.getContext("2d"),this.width=this.option.width,this.height=this.option.height,this.context2d.canvas.width=this.width*r,this.context2d.canvas.height=this.height*r,this.context2d.scale(r,r)},__rebuildData:function(n,l){var r;return l==="center"?r=[].concat(Array.from(n).reverse().splice(this.option.accuracy/2,this.option.accuracy/2),Array.from(n).splice(0,this.option.accuracy/2)):l==="left"?r=n:l==="right"?r=Array.from(n).reverse():r=[].concat(Array.from(n).reverse().splice(this.option.accuracy/2,this.option.accuracy/2),Array.from(n).splice(0,this.option.accuracy/2)),r},__animate:function(){this.stat===1&&(this.analyser.getByteFrequencyData(this.freqByteData),typeof this.__effects()[this.option.effect]=="function"&&this.__effects()[this.option.effect](this.freqByteData),requestAnimationFrame(this.__animate.bind(this)))},__testFrame:function(){this.analyser.getByteFrequencyData(this.freqByteData),typeof this.__effects()[this.option.effect]=="function"&&this.__effects()[this.option.effect](this.freqByteData)},__effects:function(){var n=this;return{lighting:function(l){var r=n.option.lighting,c=n.__rebuildData(l,r.horizontalAlign),u=r.maxHeight/2,m=!0,f,d;r.horizontalAlign,n.context2d.clearRect(0,0,n.width,n.height),n.context2d.lineWidth=r.lineWidth,n.context2d.strokeStyle=r.color,n.context2d.beginPath(),c.forEach(function(y,w){f=n.width/n.option.accuracy*w,d=y/256*u,r.verticalAlign==="middle"?d=(n.height-y)/2-u/2:r.verticalAlign==="bottom"?d=n.height-y:r.verticalAlign==="top"?d=y:d=(n.height-y)/2-u/2,m?(n.context2d.moveTo(f,d),m=!1):n.context2d.lineTo(f,d)}),n.context2d.stroke()},waveform:function(l){var r=n.option.waveform,c=r.fadeSide,u=r.prettify,m=n.__rebuildData(l,r.horizontalAlign),f,d,y,w,k,C,v,h;r.horizontalAlign!=="center"&&(c=!1,u=!1),n.context2d.clearRect(0,0,n.width,n.height),m.forEach(function(S,M){d=(n.width-n.option.accuracy*r.spacing)/n.option.accuracy,w=M*(d+r.spacing),r.spacing!==1&&(w+=r.spacing/2),u?M<=n.option.accuracy/2?f=(1-(n.option.accuracy/2-1-M)/(n.option.accuracy/2))*r.maxHeight:f=(1-(M-n.option.accuracy/2)/(n.option.accuracy/2))*r.maxHeight:f=r.maxHeight,y=S/256*f,y=y<r.minHeight?r.minHeight:y,r.verticalAlign==="middle"?k=(n.height-y)/2:r.verticalAlign==="top"?k=0:r.verticalAlign==="bottom"?k=n.height-y:k=(n.height-y)/2,C=r.color,C instanceof Array?(v=n.context2d.createLinearGradient(w,k,w,k+y),C.forEach(function(L,O){L instanceof Array?(h=L[0],L=L[1]):O===0||O===C.length-1?h=O/(C.length-1):h=O/C.length+.5/C.length,v.addColorStop(h,L)}),n.context2d.fillStyle=v):n.context2d.fillStyle=C,r.shadowBlur>0&&(n.context2d.shadowBlur=r.shadowBlur,n.context2d.shadowColor=r.shadowColor),c?M<=n.option.accuracy/2?n.context2d.globalAlpha=1-(n.option.accuracy/2-1-M)/(n.option.accuracy/2):n.context2d.globalAlpha=1-(M-n.option.accuracy/2)/(n.option.accuracy/2):n.context2d.globalAlpha=1,n.context2d.fillRect(w,k,d,y)})}}},dance:function(){return this.stat===0&&(this.stat=1,this.__animate()),this},pause:function(){return this.stat=0,this},setOption:function(n){this.option=a(this.option,n)}},s})})(Lt);var un=Lt.exports;const st=Vt(un),dn=""+new URL("tick-b5f22461.mp3",import.meta.url).href,hn=X({name:"audio-play",props:{item:{type:Object,default:()=>({})},isEmtry:{type:Boolean,default:!1}},setup(e){const i=De({paused:!0,currentTimeNum:0,currentTime:"00:00",durationNum:0,duration:"00:00",showBar:!0,afterMa3:!0}),t=G(),s=G();let a=null;const n=d=>{d==null||d.stopPropagation(),s.value.paused?(l(s.value,t.value),s.value.play(),i.afterMa3=!1):s.value.pause(),i.paused=s.value.paused},l=(d,y)=>{a||(a=new st(d,y,{effect:"waveform",accuracy:256,width:1024,height:600,waveform:{maxHeight:200,color:[[0,"#44D1FF"],[.5,"#44D1FF"],[.5,"#198CFE"],[1,"#198CFE"]],prettify:!1}}),a.dance())},r=d=>{if(d>0){const y=Math.floor(d/60),w=d%60;return(y<10?"0"+y:y)+":"+(w<10?"0"+w:w)}else return"00:00"},c=()=>{s.value&&(s.value.currentTime=0)};let u=null;const m=G(),f=G();return at(()=>{u=new st(f.value,m.value,{effect:"waveform",accuracy:256,width:1024,height:600,waveform:{maxHeight:200,color:[[0,"#44D1FF"],[.5,"#44D1FF"],[.5,"#198CFE"],[1,"#198CFE"]],prettify:!1}}),u.dance()}),()=>b("div",{class:V.audioWrap},[b("div",{class:V.audioContainer},[b("audio",{ref:s,crossorigin:"anonymous",src:e.item.content+"?time=1",onEnded:()=>{i.paused=!0},onTimeupdate:()=>{var d;i.currentTime=r(Math.round(((d=s.value)==null?void 0:d.currentTime)||0)),i.currentTimeNum=s.value.currentTime},onLoadedmetadata:()=>{i.duration=r(Math.round(s.value.duration)),i.durationNum=s.value.duration}},null),b("canvas",{ref:t},null),i.afterMa3&&b("div",{class:V.tempVudio},[b("audio",{ref:f,src:dn},null),b("canvas",{ref:m},null)])]),b("div",{class:[V.controls,i.showBar?"":V.sectionAnimate],onClick:d=>{d.stopPropagation()}},[b("div",{class:V.actions},[b("div",{class:V.actionWrap},[b("button",{class:V.actionBtn,onClick:n},[i.paused?b("img",{class:V.playIcon,src:It},null):b("img",{class:V.playIcon,src:xt},null)])]),b("div",{class:V.time},[b("div",{class:"plyr__time plyr__time--current","aria-label":"Current time"},[i.currentTime]),b("span",{class:V.line},[Ne("/")]),b("div",{class:"plyr__time plyr__time--duration","aria-label":"Duration"},[i.duration])])]),b("div",{class:V.slider},[b(Qt,{value:i.currentTimeNum,step:.01,max:i.durationNum,tooltip:!1,"onUpdate:value":d=>{s.value.currentTime=d,i.currentTimeNum=d,i.currentTime=r(Math.round(d||0))}},null)]),b("div",{class:V.actions},[b("div",{class:V.actionWrap},[b("button",{class:V.iconReplay,onClick:c},[b("img",{src:jt},null)])])])])])}}),bn=X({name:"card-preview",props:{show:{type:Boolean,default:!1},item:{type:Object,default:()=>({})}},emit:["update:show"],setup(e,{emit:i}){const t=ze(e.show),s=ze(e.item);return Qe(()=>e.show,()=>{t.value=e.show}),Qe(()=>e.item,()=>{s.value=e.item}),()=>b(nt,null,[b(Ft,{show:t.value,"onUpdate:show":[a=>t.value=a,()=>{i("update:show",t.value)}],preset:"card",showIcon:!1,class:["modalTitle background",Ni.cardPreview],title:s.value.title,blockScroll:!1},{default:()=>[s.value.type==="VIDEO"&&b(Ks,{poster:s.value.url,src:s.value.content},null),s.value.type==="MUSIC"&&b(Js,{item:s.value},null),s.value.type==="SONG"&&b(hn,{item:s.value},null),!["VIDEO","MUSIC","SONG"].includes(s.value.type)&&b(Kt,null,null)]})])}}),vn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAABPFJREFUeF7tm01sG0UUx///9cbxrhUJRA23tumhoAa4UDg0AkXQSrQHKIVTJCSaIj4uCCiIG22PCFoQF75LhUROqAIkKFILikA5oJYL0KD20KS9UacqUuRdx17vQ7OOjeP4Y71er50svkWZeR+/eTPz5u0M0eOfiGTsQukhujImkDsh3A7KJhGOkBhR6kWwRMoShIugXCZ4STReNJKJn0lme2kieyE8VyjcR5eTIrKH4N0iEkgPSRHInyTPiibT6WTyt7DtDWRYIyNEZMS2neeEMgXBjr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vC0gqD61G516m+14PVizjfbBkNNhDqFoNpX9vkonS+vAZiONBVuFAm1wKIa+YrOcioc8WGoGYSonfciQB2G+nEcrofQF+crx2FFoh8FkfmFa5iZKV/mmJgYx+jWzf6St7BaVQoiSt7/JbG4F0VXpkF8y+LeNIj7h5HYfxorT4MYfxxVAGL/eVxBiPUFiZUoiPcVmfKOEONLUpVMM9bX5CoQYn1RsiYS4ntVdmVRVDfF43tZugZCPK/L1x6/Y/tgohZCrJ/M/LcwxvjRVAVCrJ/N1U6J2D6crK9NxvbpbKMibSwfTzerVg/68/l/AQPEN0oxwhPZAAAAAElFTkSuQmCC";export{yn as C,re as P,st as V,bn as a,Ge as b,mi as c,hi as d,di as e,It as f,xt as g,jt as h,vn as i,dn as t};
|