@webitel/ui-sdk 25.8.32 → 25.8.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui-sdk.js CHANGED
@@ -80005,7 +80005,18 @@ const Kae = {
80005
80005
  colorScheme: L4.colorScheme
80006
80006
  }, Sre = {
80007
80007
  ...B4.sizes,
80008
- colorScheme: B4.colorScheme
80008
+ colorScheme: B4.colorScheme,
80009
+ css: ({ dt: o }) => `
80010
+ .p-tooltip-text {
80011
+ white-space: pre-line;
80012
+ word-break: normal;
80013
+ background: ${o("tooltip.background")};
80014
+ color: ${o("tooltip.color")};
80015
+ padding: ${o("tooltip.padding")};
80016
+ box-shadow: ${o("tooltip.shadow")};
80017
+ border-radius: ${o("tooltip.border.radius")};
80018
+ }
80019
+ `
80009
80020
  }, Ore = {
80010
80021
  button: Ire,
80011
80022
  autocomplete: ure,
@@ -4499,5 +4499,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4499
4499
  .p-button:not(:disabled):hover {
4500
4500
  border: none;
4501
4501
  }
4502
- `},Ute={...a9.sizes,colorScheme:a9.colorScheme},zte={...r9.sizes,colorScheme:r9.colorScheme},Hte=gW(Pte,{semantic:$te,components:{button:Vte,autocomplete:Fte,popover:Ute,tooltip:zte},extend:{spacings:{multiplicator:"8px","3xs":"calc({spacings.multiplicator} / 4)","2xs":"calc({spacings.multiplicator} / 2)",xs:"calc({spacings.multiplicator} * 1)",sm:"calc({spacings.multiplicator} * 2)",md:"calc({spacings.multiplicator} * 3)",lg:"calc({spacings.multiplicator} * 4)",xl:"calc({spacings.multiplicator} * 5)","2xl":"calc({spacings.multiplicator} * 6)","3xl":"calc({spacings.multiplicator} * 7)"}}}),Ul=o=>(o.compatConfig={MODE:3},o),Wte=o=>{o.use(ZH,{theme:{preset:Hte,options:{darkModeSelector:".theme--dark"}}}),o.component("PButton",Ul(zb)),o.component("PAutoComplete",Ul(jb)),o.component("PInputText",Ul(t2)),o.component("PPopover",Ul(Yb)),o.directive("tooltip",yW)},Zte={install(o,{eventBus:i,router:a,globals:r={}}){Object.keys(j5).forEach(s=>{o.directive(s,j5[s])}),Object.keys(L5).forEach(s=>{o.component(s,L5[s])}),Object.keys(r).forEach(s=>{o.provide(s,r[s])}),o.provide("$eventBus",i),a&&o.use(a),Wte(o)},generateInstance:uu};function Ee(o,i,a){return(i=Kte(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a,o}function Yte(o,i){if(typeof o!="object"||o===null)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var r=a.call(o,i);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(o)}function Kte(o){var i=Yte(o,"string");return typeof i=="symbol"?i:String(i)}function Gte(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function l9(o,i){for(var a=0;a<i.length;a++){var r=i[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function Xte(o,i,a){return i&&l9(o.prototype,i),a&&l9(o,a),o}function Qte(o,i,a){return i in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a,o}function s9(o,i){var a=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);i&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable})),a.push.apply(a,r)}return a}function c9(o){for(var i=1;i<arguments.length;i++){var a=arguments[i]!=null?arguments[i]:{};i%2?s9(Object(a),!0).forEach(function(r){Qte(o,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):s9(Object(a)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(a,r))})}return o}var d9={addCSS:!0,thumbWidth:15,watch:!0};function Jte(o,i){return(function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(o,i)}function eoe(o,i){if(o&&i){var a=new Event(i,{bubbles:!0});o.dispatchEvent(a)}}var lr=function(o){return o!=null?o.constructor:null},d2=function(o,i){return!!(o&&i&&o instanceof i)},p9=function(o){return o==null},u9=function(o){return lr(o)===Object},toe=function(o){return lr(o)===Number&&!Number.isNaN(o)},f9=function(o){return lr(o)===String},ooe=function(o){return lr(o)===Boolean},ioe=function(o){return lr(o)===Function},m9=function(o){return Array.isArray(o)},h9=function(o){return d2(o,NodeList)},noe=function(o){return d2(o,Element)},aoe=function(o){return d2(o,Event)},roe=function(o){return p9(o)||(f9(o)||m9(o)||h9(o))&&!o.length||u9(o)&&!Object.keys(o).length},io={nullOrUndefined:p9,object:u9,number:toe,string:f9,boolean:ooe,function:ioe,array:m9,nodeList:h9,element:noe,event:aoe,empty:roe};function loe(o){var i="".concat(o).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}function soe(o,i){if(1>i){var a=loe(i);return parseFloat(o.toFixed(a))}return Math.round(o/i)*i}var coe=function(){function o(i,a){Gte(this,o),io.element(i)?this.element=i:io.string(i)&&(this.element=document.querySelector(i)),io.element(this.element)&&io.empty(this.element.rangeTouch)&&(this.config=c9({},d9,{},a),this.init())}return Xte(o,[{key:"init",value:function(){o.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(){o.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 a=this,r=i?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(s){a.element[r](s,function(c){return a.set(c)},!1)})}},{key:"get",value:function(i){if(!o.enabled||!io.event(i))return null;var a,r=i.target,s=i.changedTouches[0],c=parseFloat(r.getAttribute("min"))||0,p=parseFloat(r.getAttribute("max"))||100,f=parseFloat(r.getAttribute("step"))||1,h=r.getBoundingClientRect(),b=100/h.width*(this.config.thumbWidth/2)/100;return 0>(a=100/h.width*(s.clientX-h.left))?a=0:100<a&&(a=100),50>a?a-=(100-2*a)*b:50<a&&(a+=2*(a-50)*b),c+soe(a/100*(p-c),f)}},{key:"set",value:function(i){o.enabled&&io.event(i)&&!i.target.disabled&&(i.preventDefault(),i.target.value=this.get(i),eoe(i.target,i.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(i){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=null;if(io.empty(i)||io.string(i)?r=Array.from(document.querySelectorAll(io.string(i)?i:'input[type="range"]')):io.element(i)?r=[i]:io.nodeList(i)?r=Array.from(i):io.array(i)&&(r=i.filter(io.element)),io.empty(r))return null;var s=c9({},d9,{},a);if(io.string(i)&&s.watch){var c=new MutationObserver(function(p){Array.from(p).forEach(function(f){Array.from(f.addedNodes).forEach(function(h){io.element(h)&&Jte(h,i)&&new o(h,s)})})});c.observe(document.body,{childList:!0,subtree:!0})}return r.map(function(p){return new o(p,a)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),o}();const sr=o=>o!=null?o.constructor:null,xi=(o,i)=>!!(o&&i&&o instanceof i),p2=o=>o==null,b9=o=>sr(o)===Object,doe=o=>sr(o)===Number&&!Number.isNaN(o),zl=o=>sr(o)===String,poe=o=>sr(o)===Boolean,y9=o=>typeof o=="function",g9=o=>Array.isArray(o),uoe=o=>xi(o,WeakMap),v9=o=>xi(o,NodeList),foe=o=>sr(o)===Text,moe=o=>xi(o,Event),hoe=o=>xi(o,KeyboardEvent),boe=o=>xi(o,window.TextTrackCue)||xi(o,window.VTTCue),yoe=o=>xi(o,TextTrack)||!p2(o)&&zl(o.kind),goe=o=>xi(o,Promise)&&y9(o.then),voe=o=>o!==null&&typeof o=="object"&&o.nodeType===1&&typeof o.style=="object"&&typeof o.ownerDocument=="object",w9=o=>p2(o)||(zl(o)||g9(o)||v9(o))&&!o.length||b9(o)&&!Object.keys(o).length;var z={nullOrUndefined:p2,object:b9,number:doe,string:zl,boolean:poe,function:y9,array:g9,weakMap:uoe,nodeList:v9,element:voe,textNode:foe,event:moe,keyboardEvent:hoe,cue:boe,track:yoe,promise:goe,url:o=>{if(xi(o,window.URL))return!0;if(!zl(o))return!1;let i=o;o.startsWith("http://")&&o.startsWith("https://")||(i=`http://${o}`);try{return!w9(new URL(i).hostname)}catch{return!1}},empty:w9};const u2=(()=>{const o=document.createElement("span"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},a=Object.keys(i).find(r=>o.style[r]!==void 0);return!!z.string(a)&&i[a]})();function C9(o,i){setTimeout(()=>{try{o.hidden=!0,o.offsetHeight,o.hidden=!1}catch{}},i)}const woe=!!window.document.documentMode,Coe=/Edge/g.test(navigator.userAgent),koe="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),xoe=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,_oe=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,Ioe=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var Ht={isIE:woe,isEdge:Coe,isWebKit:koe,isIPhone:xoe,isIPadOS:_oe,isIos:Ioe};function Soe(o){return JSON.parse(JSON.stringify(o))}function k9(o,i){return i.split(".").reduce((a,r)=>a&&a[r],o)}function Nt(o={},...i){if(!i.length)return o;const a=i.shift();return z.object(a)?(Object.keys(a).forEach(r=>{z.object(a[r])?(Object.keys(o).includes(r)||Object.assign(o,{[r]:{}}),Nt(o[r],a[r])):Object.assign(o,{[r]:a[r]})}),Nt(o,...i)):o}function x9(o,i){const a=o.length?o:[o];Array.from(a).reverse().forEach((r,s)=>{const c=s>0?i.cloneNode(!0):i,p=r.parentNode,f=r.nextSibling;c.appendChild(r),f?p.insertBefore(c,f):p.appendChild(c)})}function f2(o,i){z.element(o)&&!z.empty(i)&&Object.entries(i).filter(([,a])=>!z.nullOrUndefined(a)).forEach(([a,r])=>o.setAttribute(a,r))}function Ue(o,i,a){const r=document.createElement(o);return z.object(i)&&f2(r,i),z.string(a)&&(r.innerText=a),r}function Aoe(o,i){z.element(o)&&z.element(i)&&i.parentNode.insertBefore(o,i.nextSibling)}function _9(o,i,a,r){z.element(i)&&i.appendChild(Ue(o,a,r))}function _i(o){z.nodeList(o)||z.array(o)?Array.from(o).forEach(_i):z.element(o)&&z.element(o.parentNode)&&o.parentNode.removeChild(o)}function Hl(o){if(!z.element(o))return;let{length:i}=o.childNodes;for(;i>0;)o.removeChild(o.lastChild),i-=1}function Wl(o,i){return z.element(i)&&z.element(i.parentNode)&&z.element(o)?(i.parentNode.replaceChild(o,i),o):null}function ri(o,i){if(!z.string(o)||z.empty(o))return{};const a={},r=Nt({},i);return o.split(",").forEach(s=>{const c=s.trim(),p=c.replace(".",""),f=c.replace(/[[\]]/g,"").split("="),[h]=f,b=f.length>1?f[1].replace(/["']/g,""):"";switch(c.charAt(0)){case".":z.string(r.class)?a.class=`${r.class} ${p}`:a.class=p;break;case"#":a.id=c.replace("#","");break;case"[":a[h]=b}}),Nt(r,a)}function _n(o,i){if(!z.element(o))return;let a=i;z.boolean(a)||(a=!o.hidden),o.hidden=a}function dt(o,i,a){if(z.nodeList(o))return Array.from(o).map(r=>dt(r,i,a));if(z.element(o)){let r="toggle";return a!==void 0&&(r=a?"add":"remove"),o.classList[r](i),o.classList.contains(i)}return!1}function Zl(o,i){return z.element(o)&&o.classList.contains(i)}function In(o,i){const{prototype:a}=Element;return(a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(o,i)}function Toe(o,i){const{prototype:a}=Element;return(a.closest||function(){let r=this;do{if(In.matches(r,i))return r;r=r.parentElement||r.parentNode}while(r!==null&&r.nodeType===1);return null}).call(o,i)}function cr(o){return this.elements.container.querySelectorAll(o)}function Vt(o){return this.elements.container.querySelector(o)}function m2(o=null,i=!1){z.element(o)&&o.focus({preventScroll:!0,focusVisible:i})}const I9={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Pt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(o,i){const a=Pt[o]||i!=="html5";return{api:a,ui:a&&Pt.rangeInput}},pip:!(Ht.isIPhone||!z.function(Ue("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Ue("video").disablePictureInPicture)),airplay:z.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(o){if(z.empty(o))return!1;const[i]=o.split("/");let a=o;if(!this.isHTML5||i!==this.type)return!1;Object.keys(I9).includes(a)&&(a+=`; codecs="${I9[o]}"`);try{return!!(a&&this.media.canPlayType(a).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const o=document.createElement("input");return o.type="range",o.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:u2!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Eoe=(()=>{let o=!1;try{const i=Object.defineProperty({},"passive",{get:()=>(o=!0,null)});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch{}return o})();function dr(o,i,a,r=!1,s=!0,c=!1){if(!o||!("addEventListener"in o)||z.empty(i)||!z.function(a))return;const p=i.split(" ");let f=c;Eoe&&(f={passive:s,capture:c}),p.forEach(h=>{this&&this.eventListeners&&r&&this.eventListeners.push({element:o,type:h,callback:a,options:f}),o[r?"addEventListener":"removeEventListener"](h,a,f)})}function it(o,i="",a,r=!0,s=!1){dr.call(this,o,i,a,!0,r,s)}function Yl(o,i="",a,r=!0,s=!1){dr.call(this,o,i,a,!1,r,s)}function h2(o,i="",a,r=!0,s=!1){const c=(...p)=>{Yl(o,i,c,r,s),a.apply(this,p)};dr.call(this,o,i,c,!0,r,s)}function ze(o,i="",a=!1,r={}){if(!z.element(o)||z.empty(i))return;const s=new CustomEvent(i,{bubbles:a,detail:{...r,plyr:this}});o.dispatchEvent(s)}function Doe(){this&&this.eventListeners&&(this.eventListeners.forEach(o=>{const{element:i,type:a,callback:r,options:s}=o;i.removeEventListener(a,r,s)}),this.eventListeners=[])}function Ooe(){return new Promise(o=>this.ready?setTimeout(o,0):it.call(this,this.elements.container,"ready",o)).then(()=>{})}function li(o){z.promise(o)&&o.then(null,()=>{})}function b2(o){return z.array(o)?o.filter((i,a)=>o.indexOf(i)===a):o}function S9(o,i){return z.array(o)&&o.length?o.reduce((a,r)=>Math.abs(r-i)<Math.abs(a-i)?r:a):null}function A9(o){return!(!window||!window.CSS)&&window.CSS.supports(o)}const T9=[[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((o,[i,a])=>({...o,[i/a]:[i,a]}),{});function E9(o){return z.array(o)||z.string(o)&&o.includes(":")?(z.array(o)?o:o.split(":")).map(Number).every(z.number):!1}function Kl(o){if(!z.array(o)||!o.every(z.number))return null;const[i,a]=o,r=(c,p)=>p===0?c:r(p,c%p),s=r(i,a);return[i/s,a/s]}function y2(o){const i=r=>E9(r)?r.split(":").map(Number):null;let a=i(o);if(a===null&&(a=i(this.config.ratio)),a===null&&!z.empty(this.embed)&&z.array(this.embed.ratio)&&({ratio:a}=this.embed),a===null&&this.isHTML5){const{videoWidth:r,videoHeight:s}=this.media;a=[r,s]}return Kl(a)}function Qn(o){if(!this.isVideo)return{};const{wrapper:i}=this.elements,a=y2.call(this,o);if(!z.array(a))return{};const[r,s]=Kl(a),c=100/r*s;if(A9(`aspect-ratio: ${r}/${s}`)?i.style.aspectRatio=`${r}/${s}`:i.style.paddingBottom=`${c}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),f=(p-c)/(p/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform=`translateY(-${f}%)`}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:c,ratio:a}}function D9(o,i,a=.05){const r=o/i,s=S9(Object.keys(T9),r);return Math.abs(s-r)<=a?T9[s]:[o,i]}function Roe(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const Fi={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(o=>{const i=o.getAttribute("type");return!!z.empty(i)||Pt.mime.call(this,i)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:Fi.getSources.call(this).map(o=>Number(o.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const o=this;o.options.speed=o.config.speed.options,z.empty(this.config.ratio)||Qn.call(o),Object.defineProperty(o.media,"quality",{get(){const i=Fi.getSources.call(o).find(a=>a.getAttribute("src")===o.source);return i&&Number(i.getAttribute("size"))},set(i){if(o.quality!==i){if(o.config.quality.forced&&z.function(o.config.quality.onChange))o.config.quality.onChange(i);else{const a=Fi.getSources.call(o).find(h=>Number(h.getAttribute("size"))===i);if(!a)return;const{currentTime:r,paused:s,preload:c,readyState:p,playbackRate:f}=o.media;o.media.src=a.getAttribute("src"),(c!=="none"||p)&&(o.once("loadedmetadata",()=>{o.speed=f,o.currentTime=r,s||li(o.play())}),o.media.load())}ze.call(o,o.media,"qualitychange",!1,{quality:i})}}})},cancelRequests(){this.isHTML5&&(_i(Fi.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Boe(o){return`${o}-${Math.floor(1e4*Math.random())}`}function g2(o,...i){return z.empty(o)?o:o.toString().replace(/{(\d+)}/g,(a,r)=>i[r].toString())}function Loe(o,i){return o===0||i===0||Number.isNaN(o)||Number.isNaN(i)?0:(o/i*100).toFixed(2)}const pr=(o="",i="",a="")=>o.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),a.toString()),O9=(o="")=>o.toString().replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase());function Noe(o=""){let i=o.toString();return i=pr(i,"-"," "),i=pr(i,"_"," "),i=O9(i),pr(i," ","")}function Poe(o=""){let i=o.toString();return i=Noe(i),i.charAt(0).toLowerCase()+i.slice(1)}function qoe(o){const i=document.createDocumentFragment(),a=document.createElement("div");return i.appendChild(a),a.innerHTML=o,i.firstChild.innerText}function Moe(o){const i=document.createElement("div");return i.appendChild(o),i.innerHTML}const R9={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Wt={get(o="",i={}){if(z.empty(o)||z.empty(i))return"";let a=k9(i.i18n,o);if(z.empty(a))return Object.keys(R9).includes(o)?R9[o]:"";const r={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(r).forEach(([s,c])=>{a=pr(a,s,c)}),a}};class ur{constructor(i){Ee(this,"get",a=>{if(!ur.supported||!this.enabled)return null;const r=window.localStorage.getItem(this.key);if(z.empty(r))return null;const s=JSON.parse(r);return z.string(a)&&a.length?s[a]:s}),Ee(this,"set",a=>{if(!ur.supported||!this.enabled||!z.object(a))return;let r=this.get();z.empty(r)&&(r={}),Nt(r,a);try{window.localStorage.setItem(this.key,JSON.stringify(r))}catch{}}),this.enabled=i.config.storage.enabled,this.key=i.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const i="___test";return window.localStorage.setItem(i,i),window.localStorage.removeItem(i),!0}catch{return!1}}}function fr(o,i="text"){return new Promise((a,r)=>{try{const s=new XMLHttpRequest;if(!("withCredentials"in s))return;s.addEventListener("load",()=>{if(i==="text")try{a(JSON.parse(s.responseText))}catch{a(s.responseText)}else a(s.response)}),s.addEventListener("error",()=>{throw new Error(s.status)}),s.open("GET",o,!0),s.responseType=i,s.send()}catch(s){r(s)}})}function B9(o,i){if(!z.string(o))return;const a="cache",r=z.string(i);let s=!1;const c=()=>document.getElementById(i)!==null,p=(f,h)=>{f.innerHTML=h,r&&c()||document.body.insertAdjacentElement("afterbegin",f)};if(!r||!c()){const f=ur.supported,h=document.createElement("div");if(h.setAttribute("hidden",""),r&&h.setAttribute("id",i),f){const b=window.localStorage.getItem(`${a}-${i}`);if(s=b!==null,s){const y=JSON.parse(b);p(h,y.content)}}fr(o).then(b=>{if(!z.empty(b)){if(f)try{window.localStorage.setItem(`${a}-${i}`,JSON.stringify({content:b}))}catch{}p(h,b)}}).catch(()=>{})}}const L9=o=>Math.trunc(o/60/60%60,10),joe=o=>Math.trunc(o/60%60,10),$oe=o=>Math.trunc(o%60,10);function Gl(o=0,i=!1,a=!1){if(!z.number(o))return Gl(void 0,i,a);const r=f=>`0${f}`.slice(-2);let s=L9(o);const c=joe(o),p=$oe(o);return s=i||s>0?`${s}:`:"",`${a&&o>0?"-":""}${s}${r(c)}:${r(p)}`}const Se={getIconUrl(){const o=new URL(this.config.iconUrl,window.location),i=window.location.host?window.location.host:window.top.location.host,a=o.host!==i||Ht.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:a}},findElements(){try{return this.elements.controls=Vt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:cr.call(this,this.config.selectors.buttons.play),pause:Vt.call(this,this.config.selectors.buttons.pause),restart:Vt.call(this,this.config.selectors.buttons.restart),rewind:Vt.call(this,this.config.selectors.buttons.rewind),fastForward:Vt.call(this,this.config.selectors.buttons.fastForward),mute:Vt.call(this,this.config.selectors.buttons.mute),pip:Vt.call(this,this.config.selectors.buttons.pip),airplay:Vt.call(this,this.config.selectors.buttons.airplay),settings:Vt.call(this,this.config.selectors.buttons.settings),captions:Vt.call(this,this.config.selectors.buttons.captions),fullscreen:Vt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Vt.call(this,this.config.selectors.progress),this.elements.inputs={seek:Vt.call(this,this.config.selectors.inputs.seek),volume:Vt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Vt.call(this,this.config.selectors.display.buffer),currentTime:Vt.call(this,this.config.selectors.display.currentTime),duration:Vt.call(this,this.config.selectors.display.duration)},z.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(o){return this.debug.warn("It looks like there is a problem with your custom controls HTML",o),this.toggleNativeControls(!0),!1}},createIcon(o,i){const a="http://www.w3.org/2000/svg",r=Se.getIconUrl.call(this),s=`${r.cors?"":r.url}#${this.config.iconPrefix}`,c=document.createElementNS(a,"svg");f2(c,Nt(i,{"aria-hidden":"true",focusable:"false"}));const p=document.createElementNS(a,"use"),f=`${s}-${o}`;return"href"in p&&p.setAttributeNS("http://www.w3.org/1999/xlink","href",f),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f),c.appendChild(p),c},createLabel(o,i={}){const a=Wt.get(o,this.config);return Ue("span",{...i,class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")},a)},createBadge(o){if(z.empty(o))return null;const i=Ue("span",{class:this.config.classNames.menu.value});return i.appendChild(Ue("span",{class:this.config.classNames.menu.badge},o)),i},createButton(o,i){const a=Nt({},i);let r=Poe(o);const s={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(p=>{Object.keys(a).includes(p)&&(s[p]=a[p],delete a[p])}),s.element!=="button"||Object.keys(a).includes("type")||(a.type="button"),Object.keys(a).includes("class")?a.class.split(" ").some(p=>p===this.config.classNames.control)||Nt(a,{class:`${a.class} ${this.config.classNames.control}`}):a.class=this.config.classNames.control,o){case"play":s.toggle=!0,s.label="play",s.labelPressed="pause",s.icon="play",s.iconPressed="pause";break;case"mute":s.toggle=!0,s.label="mute",s.labelPressed="unmute",s.icon="volume",s.iconPressed="muted";break;case"captions":s.toggle=!0,s.label="enableCaptions",s.labelPressed="disableCaptions",s.icon="captions-off",s.iconPressed="captions-on";break;case"fullscreen":s.toggle=!0,s.label="enterFullscreen",s.labelPressed="exitFullscreen",s.icon="enter-fullscreen",s.iconPressed="exit-fullscreen";break;case"play-large":a.class+=` ${this.config.classNames.control}--overlaid`,r="play",s.label="play",s.icon="play";break;default:z.empty(s.label)&&(s.label=r),z.empty(s.icon)&&(s.icon=o)}const c=Ue(s.element);return s.toggle?(c.appendChild(Se.createIcon.call(this,s.iconPressed,{class:"icon--pressed"})),c.appendChild(Se.createIcon.call(this,s.icon,{class:"icon--not-pressed"})),c.appendChild(Se.createLabel.call(this,s.labelPressed,{class:"label--pressed"})),c.appendChild(Se.createLabel.call(this,s.label,{class:"label--not-pressed"}))):(c.appendChild(Se.createIcon.call(this,s.icon)),c.appendChild(Se.createLabel.call(this,s.label))),Nt(a,ri(this.config.selectors.buttons[r],a)),f2(c,a),r==="play"?(z.array(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(c)):this.elements.buttons[r]=c,c},createRange(o,i){const a=Ue("input",Nt(ri(this.config.selectors.inputs[o]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Wt.get(o,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},i));return this.elements.inputs[o]=a,Se.updateRangeFill.call(this,a),coe.setup(a),a},createProgress(o,i){const a=Ue("progress",Nt(ri(this.config.selectors.display[o]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if(o!=="volume"){a.appendChild(Ue("span",null,"0"));const r={played:"played",buffer:"buffered"}[o],s=r?Wt.get(r,this.config):"";a.innerText=`% ${s.toLowerCase()}`}return this.elements.display[o]=a,a},createTime(o,i){const a=ri(this.config.selectors.display[o],i),r=Ue("div",Nt(a,{class:`${a.class?a.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Wt.get(o,this.config),role:"timer"}),"00:00");return this.elements.display[o]=r,r},bindMenuItemShortcuts(o,i){it.call(this,o,"keydown keyup",a=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(a.key)||(a.preventDefault(),a.stopPropagation(),a.type==="keydown"))return;const r=In(o,'[role="menuitemradio"]');if(!r&&[" ","ArrowRight"].includes(a.key))Se.showMenuPanel.call(this,i,!0);else{let s;a.key!==" "&&(a.key==="ArrowDown"||r&&a.key==="ArrowRight"?(s=o.nextElementSibling,z.element(s)||(s=o.parentNode.firstElementChild)):(s=o.previousElementSibling,z.element(s)||(s=o.parentNode.lastElementChild)),m2.call(this,s,!0))}},!1),it.call(this,o,"keyup",a=>{a.key==="Return"&&Se.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:o,list:i,type:a,title:r,badge:s=null,checked:c=!1}){const p=ri(this.config.selectors.inputs[a]),f=Ue("button",Nt(p,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${p.class?p.class:""}`.trim(),"aria-checked":c,value:o})),h=Ue("span");h.innerHTML=r,z.element(s)&&h.appendChild(s),f.appendChild(h),Object.defineProperty(f,"checked",{enumerable:!0,get:()=>f.getAttribute("aria-checked")==="true",set(b){b&&Array.from(f.parentNode.children).filter(y=>In(y,'[role="menuitemradio"]')).forEach(y=>y.setAttribute("aria-checked","false")),f.setAttribute("aria-checked",b?"true":"false")}}),this.listeners.bind(f,"click keyup",b=>{if(!z.keyboardEvent(b)||b.key===" "){switch(b.preventDefault(),b.stopPropagation(),f.checked=!0,a){case"language":this.currentTrack=Number(o);break;case"quality":this.quality=o;break;case"speed":this.speed=parseFloat(o)}Se.showMenuPanel.call(this,"home",z.keyboardEvent(b))}},a,!1),Se.bindMenuItemShortcuts.call(this,f,a),i.appendChild(f)},formatTime(o=0,i=!1){return z.number(o)?Gl(o,L9(this.duration)>0,i):o},updateTimeDisplay(o=null,i=0,a=!1){z.element(o)&&z.number(i)&&(o.innerText=Se.formatTime(i,a))},updateVolume(){this.supported.ui&&(z.element(this.elements.inputs.volume)&&Se.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),z.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(o,i=0){z.element(o)&&(o.value=i,Se.updateRangeFill.call(this,o))},updateProgress(o){if(!this.supported.ui||!z.event(o))return;let i=0;const a=(r,s)=>{const c=z.number(s)?s:0,p=z.element(r)?r:this.elements.display.buffer;if(z.element(p)){p.value=c;const f=p.getElementsByTagName("span")[0];z.element(f)&&(f.childNodes[0].nodeValue=c)}};if(o)switch(o.type){case"timeupdate":case"seeking":case"seeked":i=Loe(this.currentTime,this.duration),o.type==="timeupdate"&&Se.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":a(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(o){const i=z.event(o)?o.target:o;if(z.element(i)&&i.getAttribute("type")==="range"){if(In(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);const a=Se.formatTime(this.currentTime),r=Se.formatTime(this.duration),s=Wt.get("seekLabel",this.config);i.setAttribute("aria-valuetext",s.replace("{currentTime}",a).replace("{duration}",r))}else if(In(i,this.config.selectors.inputs.volume)){const a=100*i.value;i.setAttribute("aria-valuenow",a),i.setAttribute("aria-valuetext",`${a.toFixed(1)}%`)}else i.setAttribute("aria-valuenow",i.value);(Ht.isWebKit||Ht.isIPadOS)&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip(o){var i,a;if(!this.config.tooltips.seek||!z.element(this.elements.inputs.seek)||!z.element(this.elements.display.seekTooltip)||this.duration===0)return;const r=this.elements.display.seekTooltip,s=`${this.config.classNames.tooltip}--visible`,c=y=>dt(r,s,y);if(this.touch)return void c(!1);let p=0;const f=this.elements.progress.getBoundingClientRect();if(z.event(o))p=100/f.width*(o.pageX-f.left);else{if(!Zl(r,s))return;p=parseFloat(r.style.left,10)}p<0?p=0:p>100&&(p=100);const h=this.duration/100*p;r.innerText=Se.formatTime(h);const b=(i=this.config.markers)===null||i===void 0||(a=i.points)===null||a===void 0?void 0:a.find(({time:y})=>y===Math.round(h));b&&r.insertAdjacentHTML("afterbegin",`${b.label}<br>`),r.style.left=`${p}%`,z.event(o)&&["mouseenter","mouseleave"].includes(o.type)&&c(o.type==="mouseenter")},timeUpdate(o){const i=!z.element(this.elements.display.duration)&&this.config.invertTime;Se.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),o&&o.type==="timeupdate"&&this.media.seeking||Se.updateProgress.call(this,o)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return _n(this.elements.display.currentTime,!0),void _n(this.elements.progress,!0);z.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const o=z.element(this.elements.display.duration);!o&&this.config.displayDuration&&this.paused&&Se.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),o&&Se.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Se.setMarkers.call(this),Se.updateSeekTooltip.call(this)},toggleMenuButton(o,i){_n(this.elements.settings.buttons[o],!i)},updateSetting(o,i,a){const r=this.elements.settings.panels[o];let s=null,c=i;if(o==="captions")s=this.currentTrack;else{if(s=z.empty(a)?this[o]:a,z.empty(s)&&(s=this.config[o].default),!z.empty(this.options[o])&&!this.options[o].includes(s))return void this.debug.warn(`Unsupported value of '${s}' for ${o}`);if(!this.config[o].options.includes(s))return void this.debug.warn(`Disabled value of '${s}' for ${o}`)}if(z.element(c)||(c=r&&r.querySelector('[role="menu"]')),!z.element(c))return;this.elements.settings.buttons[o].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Se.getLabel.call(this,o,s);const p=c&&c.querySelector(`[value="${s}"]`);z.element(p)&&(p.checked=!0)},getLabel(o,i){switch(o){case"speed":return i===1?Wt.get("normal",this.config):`${i}&times;`;case"quality":if(z.number(i)){const a=Wt.get(`qualityLabel.${i}`,this.config);return a.length?a:`${i}p`}return O9(i);case"captions":return rt.getLabel.call(this);default:return null}},setQualityMenu(o){if(!z.element(this.elements.settings.panels.quality))return;const i="quality",a=this.elements.settings.panels.quality.querySelector('[role="menu"]');z.array(o)&&(this.options.quality=b2(o).filter(c=>this.config.quality.options.includes(c)));const r=!z.empty(this.options.quality)&&this.options.quality.length>1;if(Se.toggleMenuButton.call(this,i,r),Hl(a),Se.checkMenu.call(this),!r)return;const s=c=>{const p=Wt.get(`qualityBadge.${c}`,this.config);return p.length?Se.createBadge.call(this,p):null};this.options.quality.sort((c,p)=>{const f=this.config.quality.options;return f.indexOf(c)>f.indexOf(p)?1:-1}).forEach(c=>{Se.createMenuItem.call(this,{value:c,list:a,type:i,title:Se.getLabel.call(this,"quality",c),badge:s(c)})}),Se.updateSetting.call(this,i,a)},setCaptionsMenu(){if(!z.element(this.elements.settings.panels.captions))return;const o="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),a=rt.getTracks.call(this),r=!!a.length;if(Se.toggleMenuButton.call(this,o,r),Hl(i),Se.checkMenu.call(this),!r)return;const s=a.map((c,p)=>({value:p,checked:this.captions.toggled&&this.currentTrack===p,title:rt.getLabel.call(this,c),badge:c.language&&Se.createBadge.call(this,c.language.toUpperCase()),list:i,type:"language"}));s.unshift({value:-1,checked:!this.captions.toggled,title:Wt.get("disabled",this.config),list:i,type:"language"}),s.forEach(Se.createMenuItem.bind(this)),Se.updateSetting.call(this,o,i)},setSpeedMenu(){if(!z.element(this.elements.settings.panels.speed))return;const o="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(r=>r>=this.minimumSpeed&&r<=this.maximumSpeed);const a=!z.empty(this.options.speed)&&this.options.speed.length>1;Se.toggleMenuButton.call(this,o,a),Hl(i),Se.checkMenu.call(this),a&&(this.options.speed.forEach(r=>{Se.createMenuItem.call(this,{value:r,list:i,type:o,title:Se.getLabel.call(this,"speed",r)})}),Se.updateSetting.call(this,o,i))},checkMenu(){const{buttons:o}=this.elements.settings,i=!z.empty(o)&&Object.values(o).some(a=>!a.hidden);_n(this.elements.settings.menu,!i)},focusFirstMenuItem(o,i=!1){if(this.elements.settings.popup.hidden)return;let a=o;z.element(a)||(a=Object.values(this.elements.settings.panels).find(s=>!s.hidden));const r=a.querySelector('[role^="menuitem"]');m2.call(this,r,i)},toggleMenu(o){const{popup:i}=this.elements.settings,a=this.elements.buttons.settings;if(!z.element(i)||!z.element(a))return;const{hidden:r}=i;let s=r;if(z.boolean(o))s=o;else if(z.keyboardEvent(o)&&o.key==="Escape")s=!1;else if(z.event(o)){const c=z.function(o.composedPath)?o.composedPath()[0]:o.target,p=i.contains(c);if(p||!p&&o.target!==a&&s)return}a.setAttribute("aria-expanded",s),_n(i,!s),dt(this.elements.container,this.config.classNames.menu.open,s),s&&z.keyboardEvent(o)?Se.focusFirstMenuItem.call(this,null,!0):s||r||m2.call(this,a,z.keyboardEvent(o))},getMenuSize(o){const i=o.cloneNode(!0);i.style.position="absolute",i.style.opacity=0,i.removeAttribute("hidden"),o.parentNode.appendChild(i);const a=i.scrollWidth,r=i.scrollHeight;return _i(i),{width:a,height:r}},showMenuPanel(o="",i=!1){const a=this.elements.container.querySelector(`#plyr-settings-${this.id}-${o}`);if(!z.element(a))return;const r=a.parentNode,s=Array.from(r.children).find(c=>!c.hidden);if(Pt.transitions&&!Pt.reducedMotion){r.style.width=`${s.scrollWidth}px`,r.style.height=`${s.scrollHeight}px`;const c=Se.getMenuSize.call(this,a),p=f=>{f.target===r&&["width","height"].includes(f.propertyName)&&(r.style.width="",r.style.height="",Yl.call(this,r,u2,p))};it.call(this,r,u2,p),r.style.width=`${c.width}px`,r.style.height=`${c.height}px`}_n(s,!0),_n(a,!1),Se.focusFirstMenuItem.call(this,a,i)},setDownloadUrl(){const o=this.elements.buttons.download;z.element(o)&&o.setAttribute("href",this.download)},create(o){const{bindMenuItemShortcuts:i,createButton:a,createProgress:r,createRange:s,createTime:c,setQualityMenu:p,setSpeedMenu:f,showMenuPanel:h}=Se;this.elements.controls=null,z.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(a.call(this,"play-large"));const b=Ue("div",ri(this.config.selectors.controls.wrapper));this.elements.controls=b;const y={class:"plyr__controls__item"};return b2(z.array(this.config.controls)?this.config.controls:[]).forEach(v=>{if(v==="restart"&&b.appendChild(a.call(this,"restart",y)),v==="rewind"&&b.appendChild(a.call(this,"rewind",y)),v==="play"&&b.appendChild(a.call(this,"play",y)),v==="fast-forward"&&b.appendChild(a.call(this,"fast-forward",y)),v==="progress"){const g=Ue("div",{class:`${y.class} plyr__progress__container`}),C=Ue("div",ri(this.config.selectors.progress));if(C.appendChild(s.call(this,"seek",{id:`plyr-seek-${o.id}`})),C.appendChild(r.call(this,"buffer")),this.config.tooltips.seek){const A=Ue("span",{class:this.config.classNames.tooltip},"00:00");C.appendChild(A),this.elements.display.seekTooltip=A}this.elements.progress=C,g.appendChild(this.elements.progress),b.appendChild(g)}if(v==="current-time"&&b.appendChild(c.call(this,"currentTime",y)),v==="duration"&&b.appendChild(c.call(this,"duration",y)),v==="mute"||v==="volume"){let{volume:g}=this.elements;if(z.element(g)&&b.contains(g)||(g=Ue("div",Nt({},y,{class:`${y.class} plyr__volume`.trim()})),this.elements.volume=g,b.appendChild(g)),v==="mute"&&g.appendChild(a.call(this,"mute")),v==="volume"&&!Ht.isIos&&!Ht.isIPadOS){const C={max:1,step:.05,value:this.config.volume};g.appendChild(s.call(this,"volume",Nt(C,{id:`plyr-volume-${o.id}`})))}}if(v==="captions"&&b.appendChild(a.call(this,"captions",y)),v==="settings"&&!z.empty(this.config.settings)){const g=Ue("div",Nt({},y,{class:`${y.class} plyr__menu`.trim(),hidden:""}));g.appendChild(a.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${o.id}`,"aria-expanded":!1}));const C=Ue("div",{class:"plyr__menu__container",id:`plyr-settings-${o.id}`,hidden:""}),A=Ue("div"),S=Ue("div",{id:`plyr-settings-${o.id}-home`}),I=Ue("div",{role:"menu"});S.appendChild(I),A.appendChild(S),this.elements.settings.panels.home=S,this.config.settings.forEach(_=>{const k=Ue("button",Nt(ri(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(this,k,_),it.call(this,k,"click",()=>{h.call(this,_,!1)});const E=Ue("span",null,Wt.get(_,this.config)),T=Ue("span",{class:this.config.classNames.menu.value});T.innerHTML=o[_],E.appendChild(T),k.appendChild(E),I.appendChild(k);const D=Ue("div",{id:`plyr-settings-${o.id}-${_}`,hidden:""}),q=Ue("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});q.appendChild(Ue("span",{"aria-hidden":!0},Wt.get(_,this.config))),q.appendChild(Ue("span",{class:this.config.classNames.hidden},Wt.get("menuBack",this.config))),it.call(this,D,"keydown",R=>{R.key==="ArrowLeft"&&(R.preventDefault(),R.stopPropagation(),h.call(this,"home",!0))},!1),it.call(this,q,"click",()=>{h.call(this,"home",!1)}),D.appendChild(q),D.appendChild(Ue("div",{role:"menu"})),A.appendChild(D),this.elements.settings.buttons[_]=k,this.elements.settings.panels[_]=D}),C.appendChild(A),g.appendChild(C),b.appendChild(g),this.elements.settings.popup=C,this.elements.settings.menu=g}if(v==="pip"&&Pt.pip&&b.appendChild(a.call(this,"pip",y)),v==="airplay"&&Pt.airplay&&b.appendChild(a.call(this,"airplay",y)),v==="download"){const g=Nt({},y,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(g.download="");const{download:C}=this.config.urls;!z.url(C)&&this.isEmbed&&Nt(g,{icon:`logo-${this.provider}`,label:this.provider}),b.appendChild(a.call(this,"download",g))}v==="fullscreen"&&b.appendChild(a.call(this,"fullscreen",y))}),this.isHTML5&&p.call(this,Fi.getQualityOptions.call(this)),f.call(this),b},inject(){if(this.config.loadSprite){const s=Se.getIconUrl.call(this);s.cors&&B9(s.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let o=null;this.elements.controls=null;const i={id:this.id,seektime:this.config.seekTime,title:this.config.title};let a=!0;z.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),z.element(this.config.controls)||z.string(this.config.controls)?o=this.config.controls:(o=Se.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:rt.getLabel.call(this)}),a=!1);let r;if(a&&z.string(this.config.controls)&&(o=(s=>{let c=s;return Object.entries(i).forEach(([p,f])=>{c=pr(c,`{${p}}`,f)}),c})(o)),z.string(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),z.element(r)||(r=this.elements.container),r[z.element(o)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",o),z.element(this.elements.controls)||Se.findElements.call(this),!z.empty(this.elements.buttons)){const s=c=>{const p=this.config.classNames.controlPressed;c.setAttribute("aria-pressed","false"),Object.defineProperty(c,"pressed",{configurable:!0,enumerable:!0,get:()=>Zl(c,p),set(f=!1){dt(c,p,f),c.setAttribute("aria-pressed",f?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(c=>{z.array(c)||z.nodeList(c)?Array.from(c).filter(Boolean).forEach(s):s(c)})}if(Ht.isEdge&&C9(r),this.config.tooltips.controls){const{classNames:s,selectors:c}=this.config,p=`${c.controls.wrapper} ${c.labels} .${s.hidden}`,f=cr.call(this,p);Array.from(f).forEach(h=>{dt(h,this.config.classNames.hidden,!1),dt(h,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{}},setMarkers(){var o,i;if(!this.duration||this.elements.markers)return;const a=(o=this.config.markers)===null||o===void 0||(i=o.points)===null||i===void 0?void 0:i.filter(({time:h})=>h>0&&h<this.duration);if(a==null||!a.length)return;const r=document.createDocumentFragment(),s=document.createDocumentFragment();let c=null;const p=`${this.config.classNames.tooltip}--visible`,f=h=>dt(c,p,h);a.forEach(h=>{const b=Ue("span",{class:this.config.classNames.marker},""),y=h.time/this.duration*100+"%";c&&(b.addEventListener("mouseenter",()=>{h.label||(c.style.left=y,c.innerHTML=h.label,f(!0))}),b.addEventListener("mouseleave",()=>{f(!1)})),b.addEventListener("click",()=>{this.currentTime=h.time}),b.style.left=y,s.appendChild(b)}),r.appendChild(s),this.config.tooltips.seek||(c=Ue("span",{class:this.config.classNames.tooltip},""),r.appendChild(c)),this.elements.markers={points:s,tip:c},this.elements.progress.appendChild(r)}};function N9(o,i=!0){let a=o;if(i){const r=document.createElement("a");r.href=a,a=r.href}try{return new URL(a)}catch{return null}}function P9(o){const i=new URLSearchParams;return z.object(o)&&Object.entries(o).forEach(([a,r])=>{i.set(a,r)}),i}const rt={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!Pt.textTracks)return void(z.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Se.setCaptionsMenu.call(this));if(z.element(this.elements.captions)||(this.elements.captions=Ue("div",ri(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),Aoe(this.elements.captions,this.elements.wrapper)),Ht.isIE&&window.URL){const r=this.media.querySelectorAll("track");Array.from(r).forEach(s=>{const c=s.getAttribute("src"),p=N9(c);p!==null&&p.hostname!==window.location.href.hostname&&["http:","https:"].includes(p.protocol)&&fr(c,"blob").then(f=>{s.setAttribute("src",window.URL.createObjectURL(f))}).catch(()=>{_i(s)})})}const o=b2((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(r=>r.split("-")[0]));let i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();i==="auto"&&([i]=o);let a=this.storage.get("captions");if(z.boolean(a)||({active:a}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:a,language:i,languages:o}),this.isHTML5){const r=this.config.captions.update?"addtrack removetrack":"removetrack";it.call(this,this.media.textTracks,r,rt.update.bind(this))}setTimeout(rt.update.bind(this),0)},update(){const o=rt.getTracks.call(this,!0),{active:i,language:a,meta:r,currentTrackNode:s}=this.captions,c=!!o.find(p=>p.language===a);this.isHTML5&&this.isVideo&&o.filter(p=>!r.get(p)).forEach(p=>{this.debug.log("Track added",p),r.set(p,{default:p.mode==="showing"}),p.mode==="showing"&&(p.mode="hidden"),it.call(this,p,"cuechange",()=>rt.updateCues.call(this))}),(c&&this.language!==a||!o.includes(s))&&(rt.setLanguage.call(this,a),rt.toggle.call(this,i&&c)),this.elements&&dt(this.elements.container,this.config.classNames.captions.enabled,!z.empty(o)),z.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Se.setCaptionsMenu.call(this)},toggle(o,i=!0){if(!this.supported.ui)return;const{toggled:a}=this.captions,r=this.config.classNames.captions.active,s=z.nullOrUndefined(o)?!a:o;if(s!==a){if(i||(this.captions.active=s,this.storage.set({captions:s})),!this.language&&s&&!i){const c=rt.getTracks.call(this),p=rt.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=p.language,void rt.set.call(this,c.indexOf(p))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=s),dt(this.elements.container,r,s),this.captions.toggled=s,Se.updateSetting.call(this,"captions"),ze.call(this,this.media,s?"captionsenabled":"captionsdisabled")}setTimeout(()=>{s&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(o,i=!0){const a=rt.getTracks.call(this);if(o!==-1)if(z.number(o))if(o in a){if(this.captions.currentTrack!==o){this.captions.currentTrack=o;const r=a[o],{language:s}=r||{};this.captions.currentTrackNode=r,Se.updateSetting.call(this,"captions"),i||(this.captions.language=s,this.storage.set({language:s})),this.isVimeo&&this.embed.enableTextTrack(s),ze.call(this,this.media,"languagechange")}rt.toggle.call(this,!0,i),this.isHTML5&&this.isVideo&&rt.updateCues.call(this)}else this.debug.warn("Track not found",o);else this.debug.warn("Invalid caption argument",o);else rt.toggle.call(this,!1,i)},setLanguage(o,i=!0){if(!z.string(o))return void this.debug.warn("Invalid language argument",o);const a=o.toLowerCase();this.captions.language=a;const r=rt.getTracks.call(this),s=rt.findTrack.call(this,[a]);rt.set.call(this,r.indexOf(s),i)},getTracks(o=!1){return Array.from((this.media||{}).textTracks||[]).filter(i=>!this.isHTML5||o||this.captions.meta.has(i)).filter(i=>["captions","subtitles"].includes(i.kind))},findTrack(o,i=!1){const a=rt.getTracks.call(this),r=p=>Number((this.captions.meta.get(p)||{}).default),s=Array.from(a).sort((p,f)=>r(f)-r(p));let c;return o.every(p=>(c=s.find(f=>f.language===p),!c)),c||(i?s[0]:void 0)},getCurrentTrack(){return rt.getTracks.call(this)[this.currentTrack]},getLabel(o){let i=o;return!z.track(i)&&Pt.textTracks&&this.captions.toggled&&(i=rt.getCurrentTrack.call(this)),z.track(i)?z.empty(i.label)?z.empty(i.language)?Wt.get("enabled",this.config):o.language.toUpperCase():i.label:Wt.get("disabled",this.config)},updateCues(o){if(!this.supported.ui)return;if(!z.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!z.nullOrUndefined(o)&&!Array.isArray(o))return void this.debug.warn("updateCues: Invalid input",o);let i=o;if(!i){const r=rt.getCurrentTrack.call(this);i=Array.from((r||{}).activeCues||[]).map(s=>s.getCueAsHTML()).map(Moe)}const a=i.map(r=>r.trim()).join(`
4502
+ `},Ute={...a9.sizes,colorScheme:a9.colorScheme},zte={...r9.sizes,colorScheme:r9.colorScheme,css:({dt:o})=>`
4503
+ .p-tooltip-text {
4504
+ white-space: pre-line;
4505
+ word-break: normal;
4506
+ background: ${o("tooltip.background")};
4507
+ color: ${o("tooltip.color")};
4508
+ padding: ${o("tooltip.padding")};
4509
+ box-shadow: ${o("tooltip.shadow")};
4510
+ border-radius: ${o("tooltip.border.radius")};
4511
+ }
4512
+ `},Hte=gW(Pte,{semantic:$te,components:{button:Vte,autocomplete:Fte,popover:Ute,tooltip:zte},extend:{spacings:{multiplicator:"8px","3xs":"calc({spacings.multiplicator} / 4)","2xs":"calc({spacings.multiplicator} / 2)",xs:"calc({spacings.multiplicator} * 1)",sm:"calc({spacings.multiplicator} * 2)",md:"calc({spacings.multiplicator} * 3)",lg:"calc({spacings.multiplicator} * 4)",xl:"calc({spacings.multiplicator} * 5)","2xl":"calc({spacings.multiplicator} * 6)","3xl":"calc({spacings.multiplicator} * 7)"}}}),Ul=o=>(o.compatConfig={MODE:3},o),Wte=o=>{o.use(ZH,{theme:{preset:Hte,options:{darkModeSelector:".theme--dark"}}}),o.component("PButton",Ul(zb)),o.component("PAutoComplete",Ul(jb)),o.component("PInputText",Ul(t2)),o.component("PPopover",Ul(Yb)),o.directive("tooltip",yW)},Zte={install(o,{eventBus:i,router:a,globals:r={}}){Object.keys(j5).forEach(s=>{o.directive(s,j5[s])}),Object.keys(L5).forEach(s=>{o.component(s,L5[s])}),Object.keys(r).forEach(s=>{o.provide(s,r[s])}),o.provide("$eventBus",i),a&&o.use(a),Wte(o)},generateInstance:uu};function Ee(o,i,a){return(i=Kte(i))in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a,o}function Yte(o,i){if(typeof o!="object"||o===null)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var r=a.call(o,i);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(o)}function Kte(o){var i=Yte(o,"string");return typeof i=="symbol"?i:String(i)}function Gte(o,i){if(!(o instanceof i))throw new TypeError("Cannot call a class as a function")}function l9(o,i){for(var a=0;a<i.length;a++){var r=i[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(o,r.key,r)}}function Xte(o,i,a){return i&&l9(o.prototype,i),a&&l9(o,a),o}function Qte(o,i,a){return i in o?Object.defineProperty(o,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[i]=a,o}function s9(o,i){var a=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);i&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(o,s).enumerable})),a.push.apply(a,r)}return a}function c9(o){for(var i=1;i<arguments.length;i++){var a=arguments[i]!=null?arguments[i]:{};i%2?s9(Object(a),!0).forEach(function(r){Qte(o,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(a)):s9(Object(a)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(a,r))})}return o}var d9={addCSS:!0,thumbWidth:15,watch:!0};function Jte(o,i){return(function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(o,i)}function eoe(o,i){if(o&&i){var a=new Event(i,{bubbles:!0});o.dispatchEvent(a)}}var lr=function(o){return o!=null?o.constructor:null},d2=function(o,i){return!!(o&&i&&o instanceof i)},p9=function(o){return o==null},u9=function(o){return lr(o)===Object},toe=function(o){return lr(o)===Number&&!Number.isNaN(o)},f9=function(o){return lr(o)===String},ooe=function(o){return lr(o)===Boolean},ioe=function(o){return lr(o)===Function},m9=function(o){return Array.isArray(o)},h9=function(o){return d2(o,NodeList)},noe=function(o){return d2(o,Element)},aoe=function(o){return d2(o,Event)},roe=function(o){return p9(o)||(f9(o)||m9(o)||h9(o))&&!o.length||u9(o)&&!Object.keys(o).length},io={nullOrUndefined:p9,object:u9,number:toe,string:f9,boolean:ooe,function:ioe,array:m9,nodeList:h9,element:noe,event:aoe,empty:roe};function loe(o){var i="".concat(o).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return i?Math.max(0,(i[1]?i[1].length:0)-(i[2]?+i[2]:0)):0}function soe(o,i){if(1>i){var a=loe(i);return parseFloat(o.toFixed(a))}return Math.round(o/i)*i}var coe=function(){function o(i,a){Gte(this,o),io.element(i)?this.element=i:io.string(i)&&(this.element=document.querySelector(i)),io.element(this.element)&&io.empty(this.element.rangeTouch)&&(this.config=c9({},d9,{},a),this.init())}return Xte(o,[{key:"init",value:function(){o.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(){o.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 a=this,r=i?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(s){a.element[r](s,function(c){return a.set(c)},!1)})}},{key:"get",value:function(i){if(!o.enabled||!io.event(i))return null;var a,r=i.target,s=i.changedTouches[0],c=parseFloat(r.getAttribute("min"))||0,p=parseFloat(r.getAttribute("max"))||100,f=parseFloat(r.getAttribute("step"))||1,h=r.getBoundingClientRect(),b=100/h.width*(this.config.thumbWidth/2)/100;return 0>(a=100/h.width*(s.clientX-h.left))?a=0:100<a&&(a=100),50>a?a-=(100-2*a)*b:50<a&&(a+=2*(a-50)*b),c+soe(a/100*(p-c),f)}},{key:"set",value:function(i){o.enabled&&io.event(i)&&!i.target.disabled&&(i.preventDefault(),i.target.value=this.get(i),eoe(i.target,i.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(i){var a=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=null;if(io.empty(i)||io.string(i)?r=Array.from(document.querySelectorAll(io.string(i)?i:'input[type="range"]')):io.element(i)?r=[i]:io.nodeList(i)?r=Array.from(i):io.array(i)&&(r=i.filter(io.element)),io.empty(r))return null;var s=c9({},d9,{},a);if(io.string(i)&&s.watch){var c=new MutationObserver(function(p){Array.from(p).forEach(function(f){Array.from(f.addedNodes).forEach(function(h){io.element(h)&&Jte(h,i)&&new o(h,s)})})});c.observe(document.body,{childList:!0,subtree:!0})}return r.map(function(p){return new o(p,a)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),o}();const sr=o=>o!=null?o.constructor:null,xi=(o,i)=>!!(o&&i&&o instanceof i),p2=o=>o==null,b9=o=>sr(o)===Object,doe=o=>sr(o)===Number&&!Number.isNaN(o),zl=o=>sr(o)===String,poe=o=>sr(o)===Boolean,y9=o=>typeof o=="function",g9=o=>Array.isArray(o),uoe=o=>xi(o,WeakMap),v9=o=>xi(o,NodeList),foe=o=>sr(o)===Text,moe=o=>xi(o,Event),hoe=o=>xi(o,KeyboardEvent),boe=o=>xi(o,window.TextTrackCue)||xi(o,window.VTTCue),yoe=o=>xi(o,TextTrack)||!p2(o)&&zl(o.kind),goe=o=>xi(o,Promise)&&y9(o.then),voe=o=>o!==null&&typeof o=="object"&&o.nodeType===1&&typeof o.style=="object"&&typeof o.ownerDocument=="object",w9=o=>p2(o)||(zl(o)||g9(o)||v9(o))&&!o.length||b9(o)&&!Object.keys(o).length;var z={nullOrUndefined:p2,object:b9,number:doe,string:zl,boolean:poe,function:y9,array:g9,weakMap:uoe,nodeList:v9,element:voe,textNode:foe,event:moe,keyboardEvent:hoe,cue:boe,track:yoe,promise:goe,url:o=>{if(xi(o,window.URL))return!0;if(!zl(o))return!1;let i=o;o.startsWith("http://")&&o.startsWith("https://")||(i=`http://${o}`);try{return!w9(new URL(i).hostname)}catch{return!1}},empty:w9};const u2=(()=>{const o=document.createElement("span"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},a=Object.keys(i).find(r=>o.style[r]!==void 0);return!!z.string(a)&&i[a]})();function C9(o,i){setTimeout(()=>{try{o.hidden=!0,o.offsetHeight,o.hidden=!1}catch{}},i)}const woe=!!window.document.documentMode,Coe=/Edge/g.test(navigator.userAgent),koe="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),xoe=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,_oe=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,Ioe=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var Ht={isIE:woe,isEdge:Coe,isWebKit:koe,isIPhone:xoe,isIPadOS:_oe,isIos:Ioe};function Soe(o){return JSON.parse(JSON.stringify(o))}function k9(o,i){return i.split(".").reduce((a,r)=>a&&a[r],o)}function Nt(o={},...i){if(!i.length)return o;const a=i.shift();return z.object(a)?(Object.keys(a).forEach(r=>{z.object(a[r])?(Object.keys(o).includes(r)||Object.assign(o,{[r]:{}}),Nt(o[r],a[r])):Object.assign(o,{[r]:a[r]})}),Nt(o,...i)):o}function x9(o,i){const a=o.length?o:[o];Array.from(a).reverse().forEach((r,s)=>{const c=s>0?i.cloneNode(!0):i,p=r.parentNode,f=r.nextSibling;c.appendChild(r),f?p.insertBefore(c,f):p.appendChild(c)})}function f2(o,i){z.element(o)&&!z.empty(i)&&Object.entries(i).filter(([,a])=>!z.nullOrUndefined(a)).forEach(([a,r])=>o.setAttribute(a,r))}function Ue(o,i,a){const r=document.createElement(o);return z.object(i)&&f2(r,i),z.string(a)&&(r.innerText=a),r}function Aoe(o,i){z.element(o)&&z.element(i)&&i.parentNode.insertBefore(o,i.nextSibling)}function _9(o,i,a,r){z.element(i)&&i.appendChild(Ue(o,a,r))}function _i(o){z.nodeList(o)||z.array(o)?Array.from(o).forEach(_i):z.element(o)&&z.element(o.parentNode)&&o.parentNode.removeChild(o)}function Hl(o){if(!z.element(o))return;let{length:i}=o.childNodes;for(;i>0;)o.removeChild(o.lastChild),i-=1}function Wl(o,i){return z.element(i)&&z.element(i.parentNode)&&z.element(o)?(i.parentNode.replaceChild(o,i),o):null}function ri(o,i){if(!z.string(o)||z.empty(o))return{};const a={},r=Nt({},i);return o.split(",").forEach(s=>{const c=s.trim(),p=c.replace(".",""),f=c.replace(/[[\]]/g,"").split("="),[h]=f,b=f.length>1?f[1].replace(/["']/g,""):"";switch(c.charAt(0)){case".":z.string(r.class)?a.class=`${r.class} ${p}`:a.class=p;break;case"#":a.id=c.replace("#","");break;case"[":a[h]=b}}),Nt(r,a)}function _n(o,i){if(!z.element(o))return;let a=i;z.boolean(a)||(a=!o.hidden),o.hidden=a}function dt(o,i,a){if(z.nodeList(o))return Array.from(o).map(r=>dt(r,i,a));if(z.element(o)){let r="toggle";return a!==void 0&&(r=a?"add":"remove"),o.classList[r](i),o.classList.contains(i)}return!1}function Zl(o,i){return z.element(o)&&o.classList.contains(i)}function In(o,i){const{prototype:a}=Element;return(a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||function(){return Array.from(document.querySelectorAll(i)).includes(this)}).call(o,i)}function Toe(o,i){const{prototype:a}=Element;return(a.closest||function(){let r=this;do{if(In.matches(r,i))return r;r=r.parentElement||r.parentNode}while(r!==null&&r.nodeType===1);return null}).call(o,i)}function cr(o){return this.elements.container.querySelectorAll(o)}function Vt(o){return this.elements.container.querySelector(o)}function m2(o=null,i=!1){z.element(o)&&o.focus({preventScroll:!0,focusVisible:i})}const I9={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},Pt={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(o,i){const a=Pt[o]||i!=="html5";return{api:a,ui:a&&Pt.rangeInput}},pip:!(Ht.isIPhone||!z.function(Ue("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||Ue("video").disablePictureInPicture)),airplay:z.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(o){if(z.empty(o))return!1;const[i]=o.split("/");let a=o;if(!this.isHTML5||i!==this.type)return!1;Object.keys(I9).includes(a)&&(a+=`; codecs="${I9[o]}"`);try{return!!(a&&this.media.canPlayType(a).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const o=document.createElement("input");return o.type="range",o.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:u2!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},Eoe=(()=>{let o=!1;try{const i=Object.defineProperty({},"passive",{get:()=>(o=!0,null)});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch{}return o})();function dr(o,i,a,r=!1,s=!0,c=!1){if(!o||!("addEventListener"in o)||z.empty(i)||!z.function(a))return;const p=i.split(" ");let f=c;Eoe&&(f={passive:s,capture:c}),p.forEach(h=>{this&&this.eventListeners&&r&&this.eventListeners.push({element:o,type:h,callback:a,options:f}),o[r?"addEventListener":"removeEventListener"](h,a,f)})}function it(o,i="",a,r=!0,s=!1){dr.call(this,o,i,a,!0,r,s)}function Yl(o,i="",a,r=!0,s=!1){dr.call(this,o,i,a,!1,r,s)}function h2(o,i="",a,r=!0,s=!1){const c=(...p)=>{Yl(o,i,c,r,s),a.apply(this,p)};dr.call(this,o,i,c,!0,r,s)}function ze(o,i="",a=!1,r={}){if(!z.element(o)||z.empty(i))return;const s=new CustomEvent(i,{bubbles:a,detail:{...r,plyr:this}});o.dispatchEvent(s)}function Doe(){this&&this.eventListeners&&(this.eventListeners.forEach(o=>{const{element:i,type:a,callback:r,options:s}=o;i.removeEventListener(a,r,s)}),this.eventListeners=[])}function Ooe(){return new Promise(o=>this.ready?setTimeout(o,0):it.call(this,this.elements.container,"ready",o)).then(()=>{})}function li(o){z.promise(o)&&o.then(null,()=>{})}function b2(o){return z.array(o)?o.filter((i,a)=>o.indexOf(i)===a):o}function S9(o,i){return z.array(o)&&o.length?o.reduce((a,r)=>Math.abs(r-i)<Math.abs(a-i)?r:a):null}function A9(o){return!(!window||!window.CSS)&&window.CSS.supports(o)}const T9=[[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((o,[i,a])=>({...o,[i/a]:[i,a]}),{});function E9(o){return z.array(o)||z.string(o)&&o.includes(":")?(z.array(o)?o:o.split(":")).map(Number).every(z.number):!1}function Kl(o){if(!z.array(o)||!o.every(z.number))return null;const[i,a]=o,r=(c,p)=>p===0?c:r(p,c%p),s=r(i,a);return[i/s,a/s]}function y2(o){const i=r=>E9(r)?r.split(":").map(Number):null;let a=i(o);if(a===null&&(a=i(this.config.ratio)),a===null&&!z.empty(this.embed)&&z.array(this.embed.ratio)&&({ratio:a}=this.embed),a===null&&this.isHTML5){const{videoWidth:r,videoHeight:s}=this.media;a=[r,s]}return Kl(a)}function Qn(o){if(!this.isVideo)return{};const{wrapper:i}=this.elements,a=y2.call(this,o);if(!z.array(a))return{};const[r,s]=Kl(a),c=100/r*s;if(A9(`aspect-ratio: ${r}/${s}`)?i.style.aspectRatio=`${r}/${s}`:i.style.paddingBottom=`${c}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const p=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),f=(p-c)/(p/50);this.fullscreen.active?i.style.paddingBottom=null:this.media.style.transform=`translateY(-${f}%)`}else this.isHTML5&&i.classList.add(this.config.classNames.videoFixedRatio);return{padding:c,ratio:a}}function D9(o,i,a=.05){const r=o/i,s=S9(Object.keys(T9),r);return Math.abs(s-r)<=a?T9[s]:[o,i]}function Roe(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const Fi={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(o=>{const i=o.getAttribute("type");return!!z.empty(i)||Pt.mime.call(this,i)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:Fi.getSources.call(this).map(o=>Number(o.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const o=this;o.options.speed=o.config.speed.options,z.empty(this.config.ratio)||Qn.call(o),Object.defineProperty(o.media,"quality",{get(){const i=Fi.getSources.call(o).find(a=>a.getAttribute("src")===o.source);return i&&Number(i.getAttribute("size"))},set(i){if(o.quality!==i){if(o.config.quality.forced&&z.function(o.config.quality.onChange))o.config.quality.onChange(i);else{const a=Fi.getSources.call(o).find(h=>Number(h.getAttribute("size"))===i);if(!a)return;const{currentTime:r,paused:s,preload:c,readyState:p,playbackRate:f}=o.media;o.media.src=a.getAttribute("src"),(c!=="none"||p)&&(o.once("loadedmetadata",()=>{o.speed=f,o.currentTime=r,s||li(o.play())}),o.media.load())}ze.call(o,o.media,"qualitychange",!1,{quality:i})}}})},cancelRequests(){this.isHTML5&&(_i(Fi.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Boe(o){return`${o}-${Math.floor(1e4*Math.random())}`}function g2(o,...i){return z.empty(o)?o:o.toString().replace(/{(\d+)}/g,(a,r)=>i[r].toString())}function Loe(o,i){return o===0||i===0||Number.isNaN(o)||Number.isNaN(i)?0:(o/i*100).toFixed(2)}const pr=(o="",i="",a="")=>o.replace(new RegExp(i.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),a.toString()),O9=(o="")=>o.toString().replace(/\w\S*/g,i=>i.charAt(0).toUpperCase()+i.slice(1).toLowerCase());function Noe(o=""){let i=o.toString();return i=pr(i,"-"," "),i=pr(i,"_"," "),i=O9(i),pr(i," ","")}function Poe(o=""){let i=o.toString();return i=Noe(i),i.charAt(0).toLowerCase()+i.slice(1)}function qoe(o){const i=document.createDocumentFragment(),a=document.createElement("div");return i.appendChild(a),a.innerHTML=o,i.firstChild.innerText}function Moe(o){const i=document.createElement("div");return i.appendChild(o),i.innerHTML}const R9={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Wt={get(o="",i={}){if(z.empty(o)||z.empty(i))return"";let a=k9(i.i18n,o);if(z.empty(a))return Object.keys(R9).includes(o)?R9[o]:"";const r={"{seektime}":i.seekTime,"{title}":i.title};return Object.entries(r).forEach(([s,c])=>{a=pr(a,s,c)}),a}};class ur{constructor(i){Ee(this,"get",a=>{if(!ur.supported||!this.enabled)return null;const r=window.localStorage.getItem(this.key);if(z.empty(r))return null;const s=JSON.parse(r);return z.string(a)&&a.length?s[a]:s}),Ee(this,"set",a=>{if(!ur.supported||!this.enabled||!z.object(a))return;let r=this.get();z.empty(r)&&(r={}),Nt(r,a);try{window.localStorage.setItem(this.key,JSON.stringify(r))}catch{}}),this.enabled=i.config.storage.enabled,this.key=i.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const i="___test";return window.localStorage.setItem(i,i),window.localStorage.removeItem(i),!0}catch{return!1}}}function fr(o,i="text"){return new Promise((a,r)=>{try{const s=new XMLHttpRequest;if(!("withCredentials"in s))return;s.addEventListener("load",()=>{if(i==="text")try{a(JSON.parse(s.responseText))}catch{a(s.responseText)}else a(s.response)}),s.addEventListener("error",()=>{throw new Error(s.status)}),s.open("GET",o,!0),s.responseType=i,s.send()}catch(s){r(s)}})}function B9(o,i){if(!z.string(o))return;const a="cache",r=z.string(i);let s=!1;const c=()=>document.getElementById(i)!==null,p=(f,h)=>{f.innerHTML=h,r&&c()||document.body.insertAdjacentElement("afterbegin",f)};if(!r||!c()){const f=ur.supported,h=document.createElement("div");if(h.setAttribute("hidden",""),r&&h.setAttribute("id",i),f){const b=window.localStorage.getItem(`${a}-${i}`);if(s=b!==null,s){const y=JSON.parse(b);p(h,y.content)}}fr(o).then(b=>{if(!z.empty(b)){if(f)try{window.localStorage.setItem(`${a}-${i}`,JSON.stringify({content:b}))}catch{}p(h,b)}}).catch(()=>{})}}const L9=o=>Math.trunc(o/60/60%60,10),joe=o=>Math.trunc(o/60%60,10),$oe=o=>Math.trunc(o%60,10);function Gl(o=0,i=!1,a=!1){if(!z.number(o))return Gl(void 0,i,a);const r=f=>`0${f}`.slice(-2);let s=L9(o);const c=joe(o),p=$oe(o);return s=i||s>0?`${s}:`:"",`${a&&o>0?"-":""}${s}${r(c)}:${r(p)}`}const Se={getIconUrl(){const o=new URL(this.config.iconUrl,window.location),i=window.location.host?window.location.host:window.top.location.host,a=o.host!==i||Ht.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:a}},findElements(){try{return this.elements.controls=Vt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:cr.call(this,this.config.selectors.buttons.play),pause:Vt.call(this,this.config.selectors.buttons.pause),restart:Vt.call(this,this.config.selectors.buttons.restart),rewind:Vt.call(this,this.config.selectors.buttons.rewind),fastForward:Vt.call(this,this.config.selectors.buttons.fastForward),mute:Vt.call(this,this.config.selectors.buttons.mute),pip:Vt.call(this,this.config.selectors.buttons.pip),airplay:Vt.call(this,this.config.selectors.buttons.airplay),settings:Vt.call(this,this.config.selectors.buttons.settings),captions:Vt.call(this,this.config.selectors.buttons.captions),fullscreen:Vt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Vt.call(this,this.config.selectors.progress),this.elements.inputs={seek:Vt.call(this,this.config.selectors.inputs.seek),volume:Vt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Vt.call(this,this.config.selectors.display.buffer),currentTime:Vt.call(this,this.config.selectors.display.currentTime),duration:Vt.call(this,this.config.selectors.display.duration)},z.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(o){return this.debug.warn("It looks like there is a problem with your custom controls HTML",o),this.toggleNativeControls(!0),!1}},createIcon(o,i){const a="http://www.w3.org/2000/svg",r=Se.getIconUrl.call(this),s=`${r.cors?"":r.url}#${this.config.iconPrefix}`,c=document.createElementNS(a,"svg");f2(c,Nt(i,{"aria-hidden":"true",focusable:"false"}));const p=document.createElementNS(a,"use"),f=`${s}-${o}`;return"href"in p&&p.setAttributeNS("http://www.w3.org/1999/xlink","href",f),p.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f),c.appendChild(p),c},createLabel(o,i={}){const a=Wt.get(o,this.config);return Ue("span",{...i,class:[i.class,this.config.classNames.hidden].filter(Boolean).join(" ")},a)},createBadge(o){if(z.empty(o))return null;const i=Ue("span",{class:this.config.classNames.menu.value});return i.appendChild(Ue("span",{class:this.config.classNames.menu.badge},o)),i},createButton(o,i){const a=Nt({},i);let r=Poe(o);const s={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(p=>{Object.keys(a).includes(p)&&(s[p]=a[p],delete a[p])}),s.element!=="button"||Object.keys(a).includes("type")||(a.type="button"),Object.keys(a).includes("class")?a.class.split(" ").some(p=>p===this.config.classNames.control)||Nt(a,{class:`${a.class} ${this.config.classNames.control}`}):a.class=this.config.classNames.control,o){case"play":s.toggle=!0,s.label="play",s.labelPressed="pause",s.icon="play",s.iconPressed="pause";break;case"mute":s.toggle=!0,s.label="mute",s.labelPressed="unmute",s.icon="volume",s.iconPressed="muted";break;case"captions":s.toggle=!0,s.label="enableCaptions",s.labelPressed="disableCaptions",s.icon="captions-off",s.iconPressed="captions-on";break;case"fullscreen":s.toggle=!0,s.label="enterFullscreen",s.labelPressed="exitFullscreen",s.icon="enter-fullscreen",s.iconPressed="exit-fullscreen";break;case"play-large":a.class+=` ${this.config.classNames.control}--overlaid`,r="play",s.label="play",s.icon="play";break;default:z.empty(s.label)&&(s.label=r),z.empty(s.icon)&&(s.icon=o)}const c=Ue(s.element);return s.toggle?(c.appendChild(Se.createIcon.call(this,s.iconPressed,{class:"icon--pressed"})),c.appendChild(Se.createIcon.call(this,s.icon,{class:"icon--not-pressed"})),c.appendChild(Se.createLabel.call(this,s.labelPressed,{class:"label--pressed"})),c.appendChild(Se.createLabel.call(this,s.label,{class:"label--not-pressed"}))):(c.appendChild(Se.createIcon.call(this,s.icon)),c.appendChild(Se.createLabel.call(this,s.label))),Nt(a,ri(this.config.selectors.buttons[r],a)),f2(c,a),r==="play"?(z.array(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(c)):this.elements.buttons[r]=c,c},createRange(o,i){const a=Ue("input",Nt(ri(this.config.selectors.inputs[o]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Wt.get(o,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},i));return this.elements.inputs[o]=a,Se.updateRangeFill.call(this,a),coe.setup(a),a},createProgress(o,i){const a=Ue("progress",Nt(ri(this.config.selectors.display[o]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},i));if(o!=="volume"){a.appendChild(Ue("span",null,"0"));const r={played:"played",buffer:"buffered"}[o],s=r?Wt.get(r,this.config):"";a.innerText=`% ${s.toLowerCase()}`}return this.elements.display[o]=a,a},createTime(o,i){const a=ri(this.config.selectors.display[o],i),r=Ue("div",Nt(a,{class:`${a.class?a.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Wt.get(o,this.config),role:"timer"}),"00:00");return this.elements.display[o]=r,r},bindMenuItemShortcuts(o,i){it.call(this,o,"keydown keyup",a=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(a.key)||(a.preventDefault(),a.stopPropagation(),a.type==="keydown"))return;const r=In(o,'[role="menuitemradio"]');if(!r&&[" ","ArrowRight"].includes(a.key))Se.showMenuPanel.call(this,i,!0);else{let s;a.key!==" "&&(a.key==="ArrowDown"||r&&a.key==="ArrowRight"?(s=o.nextElementSibling,z.element(s)||(s=o.parentNode.firstElementChild)):(s=o.previousElementSibling,z.element(s)||(s=o.parentNode.lastElementChild)),m2.call(this,s,!0))}},!1),it.call(this,o,"keyup",a=>{a.key==="Return"&&Se.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:o,list:i,type:a,title:r,badge:s=null,checked:c=!1}){const p=ri(this.config.selectors.inputs[a]),f=Ue("button",Nt(p,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${p.class?p.class:""}`.trim(),"aria-checked":c,value:o})),h=Ue("span");h.innerHTML=r,z.element(s)&&h.appendChild(s),f.appendChild(h),Object.defineProperty(f,"checked",{enumerable:!0,get:()=>f.getAttribute("aria-checked")==="true",set(b){b&&Array.from(f.parentNode.children).filter(y=>In(y,'[role="menuitemradio"]')).forEach(y=>y.setAttribute("aria-checked","false")),f.setAttribute("aria-checked",b?"true":"false")}}),this.listeners.bind(f,"click keyup",b=>{if(!z.keyboardEvent(b)||b.key===" "){switch(b.preventDefault(),b.stopPropagation(),f.checked=!0,a){case"language":this.currentTrack=Number(o);break;case"quality":this.quality=o;break;case"speed":this.speed=parseFloat(o)}Se.showMenuPanel.call(this,"home",z.keyboardEvent(b))}},a,!1),Se.bindMenuItemShortcuts.call(this,f,a),i.appendChild(f)},formatTime(o=0,i=!1){return z.number(o)?Gl(o,L9(this.duration)>0,i):o},updateTimeDisplay(o=null,i=0,a=!1){z.element(o)&&z.number(i)&&(o.innerText=Se.formatTime(i,a))},updateVolume(){this.supported.ui&&(z.element(this.elements.inputs.volume)&&Se.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),z.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(o,i=0){z.element(o)&&(o.value=i,Se.updateRangeFill.call(this,o))},updateProgress(o){if(!this.supported.ui||!z.event(o))return;let i=0;const a=(r,s)=>{const c=z.number(s)?s:0,p=z.element(r)?r:this.elements.display.buffer;if(z.element(p)){p.value=c;const f=p.getElementsByTagName("span")[0];z.element(f)&&(f.childNodes[0].nodeValue=c)}};if(o)switch(o.type){case"timeupdate":case"seeking":case"seeked":i=Loe(this.currentTime,this.duration),o.type==="timeupdate"&&Se.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":a(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(o){const i=z.event(o)?o.target:o;if(z.element(i)&&i.getAttribute("type")==="range"){if(In(i,this.config.selectors.inputs.seek)){i.setAttribute("aria-valuenow",this.currentTime);const a=Se.formatTime(this.currentTime),r=Se.formatTime(this.duration),s=Wt.get("seekLabel",this.config);i.setAttribute("aria-valuetext",s.replace("{currentTime}",a).replace("{duration}",r))}else if(In(i,this.config.selectors.inputs.volume)){const a=100*i.value;i.setAttribute("aria-valuenow",a),i.setAttribute("aria-valuetext",`${a.toFixed(1)}%`)}else i.setAttribute("aria-valuenow",i.value);(Ht.isWebKit||Ht.isIPadOS)&&i.style.setProperty("--value",i.value/i.max*100+"%")}},updateSeekTooltip(o){var i,a;if(!this.config.tooltips.seek||!z.element(this.elements.inputs.seek)||!z.element(this.elements.display.seekTooltip)||this.duration===0)return;const r=this.elements.display.seekTooltip,s=`${this.config.classNames.tooltip}--visible`,c=y=>dt(r,s,y);if(this.touch)return void c(!1);let p=0;const f=this.elements.progress.getBoundingClientRect();if(z.event(o))p=100/f.width*(o.pageX-f.left);else{if(!Zl(r,s))return;p=parseFloat(r.style.left,10)}p<0?p=0:p>100&&(p=100);const h=this.duration/100*p;r.innerText=Se.formatTime(h);const b=(i=this.config.markers)===null||i===void 0||(a=i.points)===null||a===void 0?void 0:a.find(({time:y})=>y===Math.round(h));b&&r.insertAdjacentHTML("afterbegin",`${b.label}<br>`),r.style.left=`${p}%`,z.event(o)&&["mouseenter","mouseleave"].includes(o.type)&&c(o.type==="mouseenter")},timeUpdate(o){const i=!z.element(this.elements.display.duration)&&this.config.invertTime;Se.updateTimeDisplay.call(this,this.elements.display.currentTime,i?this.duration-this.currentTime:this.currentTime,i),o&&o.type==="timeupdate"&&this.media.seeking||Se.updateProgress.call(this,o)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return _n(this.elements.display.currentTime,!0),void _n(this.elements.progress,!0);z.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const o=z.element(this.elements.display.duration);!o&&this.config.displayDuration&&this.paused&&Se.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),o&&Se.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Se.setMarkers.call(this),Se.updateSeekTooltip.call(this)},toggleMenuButton(o,i){_n(this.elements.settings.buttons[o],!i)},updateSetting(o,i,a){const r=this.elements.settings.panels[o];let s=null,c=i;if(o==="captions")s=this.currentTrack;else{if(s=z.empty(a)?this[o]:a,z.empty(s)&&(s=this.config[o].default),!z.empty(this.options[o])&&!this.options[o].includes(s))return void this.debug.warn(`Unsupported value of '${s}' for ${o}`);if(!this.config[o].options.includes(s))return void this.debug.warn(`Disabled value of '${s}' for ${o}`)}if(z.element(c)||(c=r&&r.querySelector('[role="menu"]')),!z.element(c))return;this.elements.settings.buttons[o].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Se.getLabel.call(this,o,s);const p=c&&c.querySelector(`[value="${s}"]`);z.element(p)&&(p.checked=!0)},getLabel(o,i){switch(o){case"speed":return i===1?Wt.get("normal",this.config):`${i}&times;`;case"quality":if(z.number(i)){const a=Wt.get(`qualityLabel.${i}`,this.config);return a.length?a:`${i}p`}return O9(i);case"captions":return rt.getLabel.call(this);default:return null}},setQualityMenu(o){if(!z.element(this.elements.settings.panels.quality))return;const i="quality",a=this.elements.settings.panels.quality.querySelector('[role="menu"]');z.array(o)&&(this.options.quality=b2(o).filter(c=>this.config.quality.options.includes(c)));const r=!z.empty(this.options.quality)&&this.options.quality.length>1;if(Se.toggleMenuButton.call(this,i,r),Hl(a),Se.checkMenu.call(this),!r)return;const s=c=>{const p=Wt.get(`qualityBadge.${c}`,this.config);return p.length?Se.createBadge.call(this,p):null};this.options.quality.sort((c,p)=>{const f=this.config.quality.options;return f.indexOf(c)>f.indexOf(p)?1:-1}).forEach(c=>{Se.createMenuItem.call(this,{value:c,list:a,type:i,title:Se.getLabel.call(this,"quality",c),badge:s(c)})}),Se.updateSetting.call(this,i,a)},setCaptionsMenu(){if(!z.element(this.elements.settings.panels.captions))return;const o="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),a=rt.getTracks.call(this),r=!!a.length;if(Se.toggleMenuButton.call(this,o,r),Hl(i),Se.checkMenu.call(this),!r)return;const s=a.map((c,p)=>({value:p,checked:this.captions.toggled&&this.currentTrack===p,title:rt.getLabel.call(this,c),badge:c.language&&Se.createBadge.call(this,c.language.toUpperCase()),list:i,type:"language"}));s.unshift({value:-1,checked:!this.captions.toggled,title:Wt.get("disabled",this.config),list:i,type:"language"}),s.forEach(Se.createMenuItem.bind(this)),Se.updateSetting.call(this,o,i)},setSpeedMenu(){if(!z.element(this.elements.settings.panels.speed))return;const o="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(r=>r>=this.minimumSpeed&&r<=this.maximumSpeed);const a=!z.empty(this.options.speed)&&this.options.speed.length>1;Se.toggleMenuButton.call(this,o,a),Hl(i),Se.checkMenu.call(this),a&&(this.options.speed.forEach(r=>{Se.createMenuItem.call(this,{value:r,list:i,type:o,title:Se.getLabel.call(this,"speed",r)})}),Se.updateSetting.call(this,o,i))},checkMenu(){const{buttons:o}=this.elements.settings,i=!z.empty(o)&&Object.values(o).some(a=>!a.hidden);_n(this.elements.settings.menu,!i)},focusFirstMenuItem(o,i=!1){if(this.elements.settings.popup.hidden)return;let a=o;z.element(a)||(a=Object.values(this.elements.settings.panels).find(s=>!s.hidden));const r=a.querySelector('[role^="menuitem"]');m2.call(this,r,i)},toggleMenu(o){const{popup:i}=this.elements.settings,a=this.elements.buttons.settings;if(!z.element(i)||!z.element(a))return;const{hidden:r}=i;let s=r;if(z.boolean(o))s=o;else if(z.keyboardEvent(o)&&o.key==="Escape")s=!1;else if(z.event(o)){const c=z.function(o.composedPath)?o.composedPath()[0]:o.target,p=i.contains(c);if(p||!p&&o.target!==a&&s)return}a.setAttribute("aria-expanded",s),_n(i,!s),dt(this.elements.container,this.config.classNames.menu.open,s),s&&z.keyboardEvent(o)?Se.focusFirstMenuItem.call(this,null,!0):s||r||m2.call(this,a,z.keyboardEvent(o))},getMenuSize(o){const i=o.cloneNode(!0);i.style.position="absolute",i.style.opacity=0,i.removeAttribute("hidden"),o.parentNode.appendChild(i);const a=i.scrollWidth,r=i.scrollHeight;return _i(i),{width:a,height:r}},showMenuPanel(o="",i=!1){const a=this.elements.container.querySelector(`#plyr-settings-${this.id}-${o}`);if(!z.element(a))return;const r=a.parentNode,s=Array.from(r.children).find(c=>!c.hidden);if(Pt.transitions&&!Pt.reducedMotion){r.style.width=`${s.scrollWidth}px`,r.style.height=`${s.scrollHeight}px`;const c=Se.getMenuSize.call(this,a),p=f=>{f.target===r&&["width","height"].includes(f.propertyName)&&(r.style.width="",r.style.height="",Yl.call(this,r,u2,p))};it.call(this,r,u2,p),r.style.width=`${c.width}px`,r.style.height=`${c.height}px`}_n(s,!0),_n(a,!1),Se.focusFirstMenuItem.call(this,a,i)},setDownloadUrl(){const o=this.elements.buttons.download;z.element(o)&&o.setAttribute("href",this.download)},create(o){const{bindMenuItemShortcuts:i,createButton:a,createProgress:r,createRange:s,createTime:c,setQualityMenu:p,setSpeedMenu:f,showMenuPanel:h}=Se;this.elements.controls=null,z.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(a.call(this,"play-large"));const b=Ue("div",ri(this.config.selectors.controls.wrapper));this.elements.controls=b;const y={class:"plyr__controls__item"};return b2(z.array(this.config.controls)?this.config.controls:[]).forEach(v=>{if(v==="restart"&&b.appendChild(a.call(this,"restart",y)),v==="rewind"&&b.appendChild(a.call(this,"rewind",y)),v==="play"&&b.appendChild(a.call(this,"play",y)),v==="fast-forward"&&b.appendChild(a.call(this,"fast-forward",y)),v==="progress"){const g=Ue("div",{class:`${y.class} plyr__progress__container`}),C=Ue("div",ri(this.config.selectors.progress));if(C.appendChild(s.call(this,"seek",{id:`plyr-seek-${o.id}`})),C.appendChild(r.call(this,"buffer")),this.config.tooltips.seek){const A=Ue("span",{class:this.config.classNames.tooltip},"00:00");C.appendChild(A),this.elements.display.seekTooltip=A}this.elements.progress=C,g.appendChild(this.elements.progress),b.appendChild(g)}if(v==="current-time"&&b.appendChild(c.call(this,"currentTime",y)),v==="duration"&&b.appendChild(c.call(this,"duration",y)),v==="mute"||v==="volume"){let{volume:g}=this.elements;if(z.element(g)&&b.contains(g)||(g=Ue("div",Nt({},y,{class:`${y.class} plyr__volume`.trim()})),this.elements.volume=g,b.appendChild(g)),v==="mute"&&g.appendChild(a.call(this,"mute")),v==="volume"&&!Ht.isIos&&!Ht.isIPadOS){const C={max:1,step:.05,value:this.config.volume};g.appendChild(s.call(this,"volume",Nt(C,{id:`plyr-volume-${o.id}`})))}}if(v==="captions"&&b.appendChild(a.call(this,"captions",y)),v==="settings"&&!z.empty(this.config.settings)){const g=Ue("div",Nt({},y,{class:`${y.class} plyr__menu`.trim(),hidden:""}));g.appendChild(a.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${o.id}`,"aria-expanded":!1}));const C=Ue("div",{class:"plyr__menu__container",id:`plyr-settings-${o.id}`,hidden:""}),A=Ue("div"),S=Ue("div",{id:`plyr-settings-${o.id}-home`}),I=Ue("div",{role:"menu"});S.appendChild(I),A.appendChild(S),this.elements.settings.panels.home=S,this.config.settings.forEach(_=>{const k=Ue("button",Nt(ri(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(this,k,_),it.call(this,k,"click",()=>{h.call(this,_,!1)});const E=Ue("span",null,Wt.get(_,this.config)),T=Ue("span",{class:this.config.classNames.menu.value});T.innerHTML=o[_],E.appendChild(T),k.appendChild(E),I.appendChild(k);const D=Ue("div",{id:`plyr-settings-${o.id}-${_}`,hidden:""}),q=Ue("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});q.appendChild(Ue("span",{"aria-hidden":!0},Wt.get(_,this.config))),q.appendChild(Ue("span",{class:this.config.classNames.hidden},Wt.get("menuBack",this.config))),it.call(this,D,"keydown",R=>{R.key==="ArrowLeft"&&(R.preventDefault(),R.stopPropagation(),h.call(this,"home",!0))},!1),it.call(this,q,"click",()=>{h.call(this,"home",!1)}),D.appendChild(q),D.appendChild(Ue("div",{role:"menu"})),A.appendChild(D),this.elements.settings.buttons[_]=k,this.elements.settings.panels[_]=D}),C.appendChild(A),g.appendChild(C),b.appendChild(g),this.elements.settings.popup=C,this.elements.settings.menu=g}if(v==="pip"&&Pt.pip&&b.appendChild(a.call(this,"pip",y)),v==="airplay"&&Pt.airplay&&b.appendChild(a.call(this,"airplay",y)),v==="download"){const g=Nt({},y,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(g.download="");const{download:C}=this.config.urls;!z.url(C)&&this.isEmbed&&Nt(g,{icon:`logo-${this.provider}`,label:this.provider}),b.appendChild(a.call(this,"download",g))}v==="fullscreen"&&b.appendChild(a.call(this,"fullscreen",y))}),this.isHTML5&&p.call(this,Fi.getQualityOptions.call(this)),f.call(this),b},inject(){if(this.config.loadSprite){const s=Se.getIconUrl.call(this);s.cors&&B9(s.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let o=null;this.elements.controls=null;const i={id:this.id,seektime:this.config.seekTime,title:this.config.title};let a=!0;z.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,i)),this.config.controls||(this.config.controls=[]),z.element(this.config.controls)||z.string(this.config.controls)?o=this.config.controls:(o=Se.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:rt.getLabel.call(this)}),a=!1);let r;if(a&&z.string(this.config.controls)&&(o=(s=>{let c=s;return Object.entries(i).forEach(([p,f])=>{c=pr(c,`{${p}}`,f)}),c})(o)),z.string(this.config.selectors.controls.container)&&(r=document.querySelector(this.config.selectors.controls.container)),z.element(r)||(r=this.elements.container),r[z.element(o)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",o),z.element(this.elements.controls)||Se.findElements.call(this),!z.empty(this.elements.buttons)){const s=c=>{const p=this.config.classNames.controlPressed;c.setAttribute("aria-pressed","false"),Object.defineProperty(c,"pressed",{configurable:!0,enumerable:!0,get:()=>Zl(c,p),set(f=!1){dt(c,p,f),c.setAttribute("aria-pressed",f?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(c=>{z.array(c)||z.nodeList(c)?Array.from(c).filter(Boolean).forEach(s):s(c)})}if(Ht.isEdge&&C9(r),this.config.tooltips.controls){const{classNames:s,selectors:c}=this.config,p=`${c.controls.wrapper} ${c.labels} .${s.hidden}`,f=cr.call(this,p);Array.from(f).forEach(h=>{dt(h,this.config.classNames.hidden,!1),dt(h,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{}},setMarkers(){var o,i;if(!this.duration||this.elements.markers)return;const a=(o=this.config.markers)===null||o===void 0||(i=o.points)===null||i===void 0?void 0:i.filter(({time:h})=>h>0&&h<this.duration);if(a==null||!a.length)return;const r=document.createDocumentFragment(),s=document.createDocumentFragment();let c=null;const p=`${this.config.classNames.tooltip}--visible`,f=h=>dt(c,p,h);a.forEach(h=>{const b=Ue("span",{class:this.config.classNames.marker},""),y=h.time/this.duration*100+"%";c&&(b.addEventListener("mouseenter",()=>{h.label||(c.style.left=y,c.innerHTML=h.label,f(!0))}),b.addEventListener("mouseleave",()=>{f(!1)})),b.addEventListener("click",()=>{this.currentTime=h.time}),b.style.left=y,s.appendChild(b)}),r.appendChild(s),this.config.tooltips.seek||(c=Ue("span",{class:this.config.classNames.tooltip},""),r.appendChild(c)),this.elements.markers={points:s,tip:c},this.elements.progress.appendChild(r)}};function N9(o,i=!0){let a=o;if(i){const r=document.createElement("a");r.href=a,a=r.href}try{return new URL(a)}catch{return null}}function P9(o){const i=new URLSearchParams;return z.object(o)&&Object.entries(o).forEach(([a,r])=>{i.set(a,r)}),i}const rt={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!Pt.textTracks)return void(z.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Se.setCaptionsMenu.call(this));if(z.element(this.elements.captions)||(this.elements.captions=Ue("div",ri(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),Aoe(this.elements.captions,this.elements.wrapper)),Ht.isIE&&window.URL){const r=this.media.querySelectorAll("track");Array.from(r).forEach(s=>{const c=s.getAttribute("src"),p=N9(c);p!==null&&p.hostname!==window.location.href.hostname&&["http:","https:"].includes(p.protocol)&&fr(c,"blob").then(f=>{s.setAttribute("src",window.URL.createObjectURL(f))}).catch(()=>{_i(s)})})}const o=b2((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(r=>r.split("-")[0]));let i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();i==="auto"&&([i]=o);let a=this.storage.get("captions");if(z.boolean(a)||({active:a}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:a,language:i,languages:o}),this.isHTML5){const r=this.config.captions.update?"addtrack removetrack":"removetrack";it.call(this,this.media.textTracks,r,rt.update.bind(this))}setTimeout(rt.update.bind(this),0)},update(){const o=rt.getTracks.call(this,!0),{active:i,language:a,meta:r,currentTrackNode:s}=this.captions,c=!!o.find(p=>p.language===a);this.isHTML5&&this.isVideo&&o.filter(p=>!r.get(p)).forEach(p=>{this.debug.log("Track added",p),r.set(p,{default:p.mode==="showing"}),p.mode==="showing"&&(p.mode="hidden"),it.call(this,p,"cuechange",()=>rt.updateCues.call(this))}),(c&&this.language!==a||!o.includes(s))&&(rt.setLanguage.call(this,a),rt.toggle.call(this,i&&c)),this.elements&&dt(this.elements.container,this.config.classNames.captions.enabled,!z.empty(o)),z.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Se.setCaptionsMenu.call(this)},toggle(o,i=!0){if(!this.supported.ui)return;const{toggled:a}=this.captions,r=this.config.classNames.captions.active,s=z.nullOrUndefined(o)?!a:o;if(s!==a){if(i||(this.captions.active=s,this.storage.set({captions:s})),!this.language&&s&&!i){const c=rt.getTracks.call(this),p=rt.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=p.language,void rt.set.call(this,c.indexOf(p))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=s),dt(this.elements.container,r,s),this.captions.toggled=s,Se.updateSetting.call(this,"captions"),ze.call(this,this.media,s?"captionsenabled":"captionsdisabled")}setTimeout(()=>{s&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(o,i=!0){const a=rt.getTracks.call(this);if(o!==-1)if(z.number(o))if(o in a){if(this.captions.currentTrack!==o){this.captions.currentTrack=o;const r=a[o],{language:s}=r||{};this.captions.currentTrackNode=r,Se.updateSetting.call(this,"captions"),i||(this.captions.language=s,this.storage.set({language:s})),this.isVimeo&&this.embed.enableTextTrack(s),ze.call(this,this.media,"languagechange")}rt.toggle.call(this,!0,i),this.isHTML5&&this.isVideo&&rt.updateCues.call(this)}else this.debug.warn("Track not found",o);else this.debug.warn("Invalid caption argument",o);else rt.toggle.call(this,!1,i)},setLanguage(o,i=!0){if(!z.string(o))return void this.debug.warn("Invalid language argument",o);const a=o.toLowerCase();this.captions.language=a;const r=rt.getTracks.call(this),s=rt.findTrack.call(this,[a]);rt.set.call(this,r.indexOf(s),i)},getTracks(o=!1){return Array.from((this.media||{}).textTracks||[]).filter(i=>!this.isHTML5||o||this.captions.meta.has(i)).filter(i=>["captions","subtitles"].includes(i.kind))},findTrack(o,i=!1){const a=rt.getTracks.call(this),r=p=>Number((this.captions.meta.get(p)||{}).default),s=Array.from(a).sort((p,f)=>r(f)-r(p));let c;return o.every(p=>(c=s.find(f=>f.language===p),!c)),c||(i?s[0]:void 0)},getCurrentTrack(){return rt.getTracks.call(this)[this.currentTrack]},getLabel(o){let i=o;return!z.track(i)&&Pt.textTracks&&this.captions.toggled&&(i=rt.getCurrentTrack.call(this)),z.track(i)?z.empty(i.label)?z.empty(i.language)?Wt.get("enabled",this.config):o.language.toUpperCase():i.label:Wt.get("disabled",this.config)},updateCues(o){if(!this.supported.ui)return;if(!z.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!z.nullOrUndefined(o)&&!Array.isArray(o))return void this.debug.warn("updateCues: Invalid input",o);let i=o;if(!i){const r=rt.getCurrentTrack.call(this);i=Array.from((r||{}).activeCues||[]).map(s=>s.getCueAsHTML()).map(Moe)}const a=i.map(r=>r.trim()).join(`
4503
4513
  `);if(a!==this.elements.captions.innerHTML){Hl(this.elements.captions);const r=Ue("span",ri(this.config.selectors.caption));r.innerHTML=a,this.elements.captions.appendChild(r),ze.call(this,this.media,"cuechange")}}},q9={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:[]}},v2={active:"picture-in-picture",inactive:"inline"},Vi={html5:"html5",youtube:"youtube",vimeo:"vimeo"},w2={audio:"audio",video:"video"};function Foe(o){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(o)?Vi.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(o)?Vi.vimeo:null}const C2=()=>{};class Voe{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):C2}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):C2}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):C2}}class qo{constructor(i){Ee(this,"onChange",()=>{if(!this.supported)return;const a=this.player.elements.buttons.fullscreen;z.element(a)&&(a.pressed=this.active);const r=this.target===this.player.media?this.target:this.player.elements.container;ze.call(this.player,r,this.active?"enterfullscreen":"exitfullscreen",!0)}),Ee(this,"toggleFallback",(a=!1)=>{if(a?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=a?"hidden":"",dt(this.target,this.player.config.classNames.fullscreen.fallback,a),Ht.isIos){let r=document.head.querySelector('meta[name="viewport"]');const s="viewport-fit=cover";r||(r=document.createElement("meta"),r.setAttribute("name","viewport"));const c=z.string(r.content)&&r.content.includes(s);a?(this.cleanupViewport=!c,c||(r.content+=`,${s}`)):this.cleanupViewport&&(r.content=r.content.split(",").filter(p=>p.trim()!==s).join(","))}this.onChange()}),Ee(this,"trapFocus",a=>{if(Ht.isIos||Ht.isIPadOS||!this.active||a.key!=="Tab")return;const r=document.activeElement,s=cr.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[c]=s,p=s[s.length-1];r!==p||a.shiftKey?r===c&&a.shiftKey&&(p.focus(),a.preventDefault()):(c.focus(),a.preventDefault())}),Ee(this,"update",()=>{if(this.supported){let a;a=this.forceFallback?"Fallback (forced)":qo.nativeSupported?"Native":"Fallback",this.player.debug.log(`${a} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");dt(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Ee(this,"enter",()=>{this.supported&&(Ht.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!qo.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?z.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Ee(this,"exit",()=>{if(this.supported)if(Ht.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),li(this.player.play());else if(!qo.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!z.empty(this.prefix)){const a=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${a}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),Ee(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=i,this.prefix=qo.prefix,this.property=qo.property,this.scrollPosition={x:0,y:0},this.forceFallback=i.config.fullscreen.fallback==="force",this.player.elements.fullscreen=i.config.fullscreen.container&&Toe(this.player.elements.container,i.config.fullscreen.container),it.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),it.call(this.player,this.player.elements.container,"dblclick",a=>{z.element(this.player.elements.controls)&&this.player.elements.controls.contains(a.target)||this.player.listeners.proxy(a,this.toggle,"fullscreen")}),it.call(this,this.player.elements.container,"keydown",a=>this.trapFocus(a)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return qo.nativeSupported&&!this.forceFallback}static get prefix(){if(z.function(document.exitFullscreen))return"";let i="";return["webkit","moz","ms"].some(a=>!(!z.function(document[`${a}ExitFullscreen`])&&!z.function(document[`${a}CancelFullScreen`]))&&(i=a,!0)),i}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,qo.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||qo.nativeSupported||!Ht.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!qo.nativeSupported||this.forceFallback)return Zl(this.target,this.player.config.classNames.fullscreen.fallback);const i=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return i&&i.shadowRoot?i===this.target.getRootNode().host:i===this.target}get target(){return Ht.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Xl(o,i=1){return new Promise((a,r)=>{const s=new Image,c=()=>{delete s.onload,delete s.onerror,(s.naturalWidth>=i?a:r)(s)};Object.assign(s,{onload:c,onerror:c,src:o})})}const bt={addStyleHook(){dt(this.elements.container,this.config.selectors.container.replace(".",""),!0),dt(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(o=!1){o&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void bt.toggleNativeControls.call(this,!0);z.element(this.elements.controls)||(Se.inject.call(this),this.listeners.controls()),bt.toggleNativeControls.call(this),this.isHTML5&&rt.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Se.updateVolume.call(this),Se.timeUpdate.call(this),Se.durationUpdate.call(this),bt.checkPlaying.call(this),dt(this.elements.container,this.config.classNames.pip.supported,Pt.pip&&this.isHTML5&&this.isVideo),dt(this.elements.container,this.config.classNames.airplay.supported,Pt.airplay&&this.isHTML5),dt(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{ze.call(this,this.media,"ready")},0),bt.setTitle.call(this),this.poster&&bt.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&Se.durationUpdate.call(this),this.config.mediaMetadata&&Se.setMediaMetadata.call(this)},setTitle(){let o=Wt.get("play",this.config);if(z.string(this.config.title)&&!z.empty(this.config.title)&&(o+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(i=>{i.setAttribute("aria-label",o)}),this.isEmbed){const i=Vt.call(this,"iframe");if(!z.element(i))return;const a=z.empty(this.config.title)?"video":this.config.title,r=Wt.get("frameTitle",this.config);i.setAttribute("title",r.replace("{title}",a))}},togglePoster(o){dt(this.elements.container,this.config.classNames.posterEnabled,o)},setPoster(o,i=!0){return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",o),this.elements.poster.removeAttribute("hidden"),Ooe.call(this).then(()=>Xl(o)).catch(a=>{throw o===this.poster&&bt.togglePoster.call(this,!1),a}).then(()=>{if(o!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${o}')`,backgroundSize:""}),bt.togglePoster.call(this,!0),o)))},checkPlaying(o){dt(this.elements.container,this.config.classNames.playing,this.playing),dt(this.elements.container,this.config.classNames.paused,this.paused),dt(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",Wt.get(this.playing?"pause":"play",this.config))}),z.event(o)&&o.type==="timeupdate"||bt.toggleControls.call(this)},checkLoading(o){this.loading=["stalled","waiting"].includes(o.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{dt(this.elements.container,this.config.classNames.loading,this.loading),bt.toggleControls.call(this)},this.loading?250:0)},toggleControls(o){const{controls:i}=this.elements;if(i&&this.config.hideControls){const a=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(o||this.loading||this.paused||i.pressed||i.hover||a))}},migrateStyles(){Object.values({...this.media.style}).filter(o=>!z.empty(o)&&z.string(o)&&o.startsWith("--plyr")).forEach(o=>{this.elements.container.style.setProperty(o,this.media.style.getPropertyValue(o)),this.media.style.removeProperty(o)}),z.empty(this.media.style)&&this.media.removeAttribute("style")}};class Uoe{constructor(i){Ee(this,"firstTouch",()=>{const{player:a}=this,{elements:r}=a;a.touch=!0,dt(r.container,a.config.classNames.isTouch,!0)}),Ee(this,"global",(a=!0)=>{const{player:r}=this;r.config.keyboard.global&&dr.call(r,window,"keydown keyup",this.handleKey,a,!1),dr.call(r,document.body,"click",this.toggleMenu,a),h2.call(r,document.body,"touchstart",this.firstTouch)}),Ee(this,"container",()=>{const{player:a}=this,{config:r,elements:s,timers:c}=a;!r.keyboard.global&&r.keyboard.focused&&it.call(a,s.container,"keydown keyup",this.handleKey,!1),it.call(a,s.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",h=>{const{controls:b}=s;b&&h.type==="enterfullscreen"&&(b.pressed=!1,b.hover=!1);let y=0;["touchstart","touchmove","mousemove"].includes(h.type)&&(bt.toggleControls.call(a,!0),y=a.touch?3e3:2e3),clearTimeout(c.controls),c.controls=setTimeout(()=>bt.toggleControls.call(a,!1),y)});const p=()=>{if(!a.isVimeo||a.config.vimeo.premium)return;const h=s.wrapper,{active:b}=a.fullscreen,[y,v]=y2.call(a),g=A9(`aspect-ratio: ${y} / ${v}`);if(!b)return void(g?(h.style.width=null,h.style.height=null):(h.style.maxWidth=null,h.style.margin=null));const[C,A]=Roe(),S=C/A>y/v;g?(h.style.width=S?"auto":"100%",h.style.height=S?"100%":"auto"):(h.style.maxWidth=S?A/v*y+"px":null,h.style.margin=S?"0 auto":null)},f=()=>{clearTimeout(c.resized),c.resized=setTimeout(p,50)};it.call(a,s.container,"enterfullscreen exitfullscreen",h=>{const{target:b}=a.fullscreen;b===s.container&&(!a.isEmbed&&z.empty(a.config.ratio)||(p(),(h.type==="enterfullscreen"?it:Yl).call(a,window,"resize",f)))})}),Ee(this,"media",()=>{const{player:a}=this,{elements:r}=a;if(it.call(a,a.media,"timeupdate seeking seeked",c=>Se.timeUpdate.call(a,c)),it.call(a,a.media,"durationchange loadeddata loadedmetadata",c=>Se.durationUpdate.call(a,c)),it.call(a,a.media,"ended",()=>{a.isHTML5&&a.isVideo&&a.config.resetOnEnd&&(a.restart(),a.pause())}),it.call(a,a.media,"progress playing seeking seeked",c=>Se.updateProgress.call(a,c)),it.call(a,a.media,"volumechange",c=>Se.updateVolume.call(a,c)),it.call(a,a.media,"playing play pause ended emptied timeupdate",c=>bt.checkPlaying.call(a,c)),it.call(a,a.media,"waiting canplay seeked playing",c=>bt.checkLoading.call(a,c)),a.supported.ui&&a.config.clickToPlay&&!a.isAudio){const c=Vt.call(a,`.${a.config.classNames.video}`);if(!z.element(c))return;it.call(a,r.container,"click",p=>{([r.container,c].includes(p.target)||c.contains(p.target))&&(a.touch&&a.config.hideControls||(a.ended?(this.proxy(p,a.restart,"restart"),this.proxy(p,()=>{li(a.play())},"play")):this.proxy(p,()=>{li(a.togglePlay())},"play")))})}a.supported.ui&&a.config.disableContextMenu&&it.call(a,r.wrapper,"contextmenu",c=>{c.preventDefault()},!1),it.call(a,a.media,"volumechange",()=>{a.storage.set({volume:a.volume,muted:a.muted})}),it.call(a,a.media,"ratechange",()=>{Se.updateSetting.call(a,"speed"),a.storage.set({speed:a.speed})}),it.call(a,a.media,"qualitychange",c=>{Se.updateSetting.call(a,"quality",null,c.detail.quality)}),it.call(a,a.media,"ready qualitychange",()=>{Se.setDownloadUrl.call(a)});const s=a.config.events.concat(["keyup","keydown"]).join(" ");it.call(a,a.media,s,c=>{let{detail:p={}}=c;c.type==="error"&&(p=a.media.error),ze.call(a,r.container,c.type,!0,p)})}),Ee(this,"proxy",(a,r,s)=>{const{player:c}=this,p=c.config.listeners[s];let f=!0;z.function(p)&&(f=p.call(c,a)),f!==!1&&z.function(r)&&r.call(c,a)}),Ee(this,"bind",(a,r,s,c,p=!0)=>{const{player:f}=this,h=f.config.listeners[c],b=z.function(h);it.call(f,a,r,y=>this.proxy(y,s,c),p&&!b)}),Ee(this,"controls",()=>{const{player:a}=this,{elements:r}=a,s=Ht.isIE?"change":"input";if(r.buttons.play&&Array.from(r.buttons.play).forEach(c=>{this.bind(c,"click",()=>{li(a.togglePlay())},"play")}),this.bind(r.buttons.restart,"click",a.restart,"restart"),this.bind(r.buttons.rewind,"click",()=>{a.lastSeekTime=Date.now(),a.rewind()},"rewind"),this.bind(r.buttons.fastForward,"click",()=>{a.lastSeekTime=Date.now(),a.forward()},"fastForward"),this.bind(r.buttons.mute,"click",()=>{a.muted=!a.muted},"mute"),this.bind(r.buttons.captions,"click",()=>a.toggleCaptions()),this.bind(r.buttons.download,"click",()=>{ze.call(a,a.media,"download")},"download"),this.bind(r.buttons.fullscreen,"click",()=>{a.fullscreen.toggle()},"fullscreen"),this.bind(r.buttons.pip,"click",()=>{a.pip="toggle"},"pip"),this.bind(r.buttons.airplay,"click",a.airplay,"airplay"),this.bind(r.buttons.settings,"click",c=>{c.stopPropagation(),c.preventDefault(),Se.toggleMenu.call(a,c)},null,!1),this.bind(r.buttons.settings,"keyup",c=>{[" ","Enter"].includes(c.key)&&(c.key!=="Enter"?(c.preventDefault(),c.stopPropagation(),Se.toggleMenu.call(a,c)):Se.focusFirstMenuItem.call(a,null,!0))},null,!1),this.bind(r.settings.menu,"keydown",c=>{c.key==="Escape"&&Se.toggleMenu.call(a,c)}),this.bind(r.inputs.seek,"mousedown mousemove",c=>{const p=r.progress.getBoundingClientRect(),f=100/p.width*(c.pageX-p.left);c.currentTarget.setAttribute("seek-value",f)}),this.bind(r.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",c=>{const p=c.currentTarget,f="play-on-seeked";if(z.keyboardEvent(c)&&!["ArrowLeft","ArrowRight"].includes(c.key))return;a.lastSeekTime=Date.now();const h=p.hasAttribute(f),b=["mouseup","touchend","keyup"].includes(c.type);h&&b?(p.removeAttribute(f),li(a.play())):!b&&a.playing&&(p.setAttribute(f,""),a.pause())}),Ht.isIos){const c=cr.call(a,'input[type="range"]');Array.from(c).forEach(p=>this.bind(p,s,f=>C9(f.target)))}this.bind(r.inputs.seek,s,c=>{const p=c.currentTarget;let f=p.getAttribute("seek-value");z.empty(f)&&(f=p.value),p.removeAttribute("seek-value"),a.currentTime=f/p.max*a.duration},"seek"),this.bind(r.progress,"mouseenter mouseleave mousemove",c=>Se.updateSeekTooltip.call(a,c)),this.bind(r.progress,"mousemove touchmove",c=>{const{previewThumbnails:p}=a;p&&p.loaded&&p.startMove(c)}),this.bind(r.progress,"mouseleave touchend click",()=>{const{previewThumbnails:c}=a;c&&c.loaded&&c.endMove(!1,!0)}),this.bind(r.progress,"mousedown touchstart",c=>{const{previewThumbnails:p}=a;p&&p.loaded&&p.startScrubbing(c)}),this.bind(r.progress,"mouseup touchend",c=>{const{previewThumbnails:p}=a;p&&p.loaded&&p.endScrubbing(c)}),Ht.isWebKit&&Array.from(cr.call(a,'input[type="range"]')).forEach(c=>{this.bind(c,"input",p=>Se.updateRangeFill.call(a,p.target))}),a.config.toggleInvert&&!z.element(r.display.duration)&&this.bind(r.display.currentTime,"click",()=>{a.currentTime!==0&&(a.config.invertTime=!a.config.invertTime,Se.timeUpdate.call(a))}),this.bind(r.inputs.volume,s,c=>{a.volume=c.target.value},"volume"),this.bind(r.controls,"mouseenter mouseleave",c=>{r.controls.hover=!a.touch&&c.type==="mouseenter"}),r.fullscreen&&Array.from(r.fullscreen.children).filter(c=>!c.contains(r.container)).forEach(c=>{this.bind(c,"mouseenter mouseleave",p=>{r.controls&&(r.controls.hover=!a.touch&&p.type==="mouseenter")})}),this.bind(r.controls,"mousedown mouseup touchstart touchend touchcancel",c=>{r.controls.pressed=["mousedown","touchstart"].includes(c.type)}),this.bind(r.controls,"focusin",()=>{const{config:c,timers:p}=a;dt(r.controls,c.classNames.noTransition,!0),bt.toggleControls.call(a,!0),setTimeout(()=>{dt(r.controls,c.classNames.noTransition,!1)},0);const f=this.touch?3e3:4e3;clearTimeout(p.controls),p.controls=setTimeout(()=>bt.toggleControls.call(a,!1),f)}),this.bind(r.inputs.volume,"wheel",c=>{const p=c.webkitDirectionInvertedFromDevice,[f,h]=[c.deltaX,-c.deltaY].map(v=>p?-v:v),b=Math.sign(Math.abs(f)>Math.abs(h)?f:h);a.increaseVolume(b/50);const{volume:y}=a.media;(b===1&&y<1||b===-1&&y>0)&&c.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:a}=this,{elements:r}=a,{key:s,type:c,altKey:p,ctrlKey:f,metaKey:h,shiftKey:b}=i,y=c==="keydown",v=y&&s===this.lastKey;if(!(p||f||h||b)&&s){if(y){const C=document.activeElement;if(z.element(C)){const{editable:A}=a.config.selectors,{seek:S}=r.inputs;if(C!==S&&In(C,A)||i.key===" "&&In(C,'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(s)&&(i.preventDefault(),i.stopPropagation()),s){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":v||(g=parseInt(s,10),a.currentTime=a.duration/10*g);break;case" ":case"k":v||li(a.togglePlay());break;case"ArrowUp":a.increaseVolume(.1);break;case"ArrowDown":a.decreaseVolume(.1);break;case"m":v||(a.muted=!a.muted);break;case"ArrowRight":a.forward();break;case"ArrowLeft":a.rewind();break;case"f":a.fullscreen.toggle();break;case"c":v||a.toggleCaptions();break;case"l":a.loop=!a.loop}s==="Escape"&&!a.fullscreen.usingNative&&a.fullscreen.active&&a.fullscreen.toggle(),this.lastKey=s}else this.lastKey=null;var g}}toggleMenu(i){Se.toggleMenu.call(this.player,i)}}function zoe(o,i){return o(i={exports:{}},i.exports),i.exports}var Hoe=zoe(function(o,i){o.exports=function(){var a=function(){},r={},s={},c={};function p(g,C){g=g.push?g:[g];var A,S,I,_=[],k=g.length,E=k;for(A=function(T,D){D.length&&_.push(T),--E||C(_)};k--;)S=g[k],(I=s[S])?A(S,I):(c[S]=c[S]||[]).push(A)}function f(g,C){if(g){var A=c[g];if(s[g]=C,A)for(;A.length;)A[0](g,C),A.splice(0,1)}}function h(g,C){g.call&&(g={success:g}),C.length?(g.error||a)(C):(g.success||a)(g)}function b(g,C,A,S){var I,_,k=document,E=A.async,T=(A.numRetries||0)+1,D=A.before||a,q=g.replace(/[\?|#].*$/,""),R=g.replace(/^(css|img)!/,"");S=S||0,/(^css!|\.css$)/.test(q)?((_=k.createElement("link")).rel="stylesheet",_.href=R,(I="hideFocus"in _)&&_.relList&&(I=0,_.rel="preload",_.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(q)?(_=k.createElement("img")).src=R:((_=k.createElement("script")).src=g,_.async=E===void 0||E),_.onload=_.onerror=_.onbeforeload=function(j){var $=j.type[0];if(I)try{_.sheet.cssText.length||($="e")}catch(Q){Q.code!=18&&($="e")}if($=="e"){if((S+=1)<T)return b(g,C,A,S)}else if(_.rel=="preload"&&_.as=="style")return _.rel="stylesheet";C(g,$,j.defaultPrevented)},D(g,_)!==!1&&k.head.appendChild(_)}function y(g,C,A){var S,I,_=(g=g.push?g:[g]).length,k=_,E=[];for(S=function(T,D,q){if(D=="e"&&E.push(T),D=="b"){if(!q)return;E.push(T)}--_||C(E)},I=0;I<k;I++)b(g[I],S,A)}function v(g,C,A){var S,I;if(C&&C.trim&&(S=C),I=(S?A:C)||{},S){if(S in r)throw"LoadJS";r[S]=!0}function _(k,E){y(g,function(T){h(I,T),k&&h({success:k,error:E},T),f(S,T)},I)}if(I.returnPromise)return new Promise(_);_()}return v.ready=function(g,C){return p(g,function(A){h(C,A)}),v},v.done=function(g){f(g,[])},v.reset=function(){r={},s={},c={}},v.isDefined=function(g){return g in r},v}()});function k2(o){return new Promise((i,a)=>{Hoe(o,{success:i,error:a})})}function Woe(o){return z.empty(o)?null:z.number(Number(o))?o:o.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:o}function Zoe(o){const i=o.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return i&&i.length===5?i[4]:null}function mr(o){o&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===o&&(this.media.paused=!o,ze.call(this,this.media,o?"play":"pause"))}const x2={setup(){const o=this;dt(o.elements.wrapper,o.config.classNames.embed,!0),o.options.speed=o.config.speed.options,Qn.call(o),z.object(window.Vimeo)?x2.ready.call(o):k2(o.config.urls.vimeo.sdk).then(()=>{x2.ready.call(o)}).catch(i=>{o.debug.warn("Vimeo SDK (player.js) failed to load",i)})},ready(){const o=this,i=o.config.vimeo,{premium:a,referrerPolicy:r,...s}=i;let c=o.media.getAttribute("src"),p="";z.empty(c)?(c=o.media.getAttribute(o.config.attributes.embed.id),p=o.media.getAttribute(o.config.attributes.embed.hash)):p=Zoe(c);const f=p?{h:p}:{};a&&Object.assign(s,{controls:!1,sidedock:!1});const h=P9({loop:o.config.loop.active,autoplay:o.autoplay,muted:o.muted,gesture:"media",playsinline:o.config.playsinline,...f,...s}),b=Woe(c),y=Ue("iframe"),v=g2(o.config.urls.vimeo.iframe,b,h);if(y.setAttribute("src",v),y.setAttribute("allowfullscreen",""),y.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),z.empty(r)||y.setAttribute("referrerPolicy",r),a||!i.customControls)y.setAttribute("data-poster",o.poster),o.media=Wl(y,o.media);else{const k=Ue("div",{class:o.config.classNames.embedContainer,"data-poster":o.poster});k.appendChild(y),o.media=Wl(k,o.media)}i.customControls||fr(g2(o.config.urls.vimeo.api,v)).then(k=>{!z.empty(k)&&k.thumbnail_url&&bt.setPoster.call(o,k.thumbnail_url).catch(()=>{})}),o.embed=new window.Vimeo.Player(y,{autopause:o.config.autopause,muted:o.muted}),o.media.paused=!0,o.media.currentTime=0,o.supported.ui&&o.embed.disableTextTrack(),o.media.play=()=>(mr.call(o,!0),o.embed.play()),o.media.pause=()=>(mr.call(o,!1),o.embed.pause()),o.media.stop=()=>{o.pause(),o.currentTime=0};let{currentTime:g}=o.media;Object.defineProperty(o.media,"currentTime",{get:()=>g,set(k){const{embed:E,media:T,paused:D,volume:q}=o,R=D&&!E.hasPlayed;T.seeking=!0,ze.call(o,T,"seeking"),Promise.resolve(R&&E.setVolume(0)).then(()=>E.setCurrentTime(k)).then(()=>R&&E.pause()).then(()=>R&&E.setVolume(q)).catch(()=>{})}});let C=o.config.speed.selected;Object.defineProperty(o.media,"playbackRate",{get:()=>C,set(k){o.embed.setPlaybackRate(k).then(()=>{C=k,ze.call(o,o.media,"ratechange")}).catch(()=>{o.options.speed=[1]})}});let{volume:A}=o.config;Object.defineProperty(o.media,"volume",{get:()=>A,set(k){o.embed.setVolume(k).then(()=>{A=k,ze.call(o,o.media,"volumechange")})}});let{muted:S}=o.config;Object.defineProperty(o.media,"muted",{get:()=>S,set(k){const E=!!z.boolean(k)&&k;o.embed.setMuted(!!E||o.config.muted).then(()=>{S=E,ze.call(o,o.media,"volumechange")})}});let I,{loop:_}=o.config;Object.defineProperty(o.media,"loop",{get:()=>_,set(k){const E=z.boolean(k)?k:o.config.loop.active;o.embed.setLoop(E).then(()=>{_=E})}}),o.embed.getVideoUrl().then(k=>{I=k,Se.setDownloadUrl.call(o)}).catch(k=>{this.debug.warn(k)}),Object.defineProperty(o.media,"currentSrc",{get:()=>I}),Object.defineProperty(o.media,"ended",{get:()=>o.currentTime===o.duration}),Promise.all([o.embed.getVideoWidth(),o.embed.getVideoHeight()]).then(k=>{const[E,T]=k;o.embed.ratio=D9(E,T),Qn.call(this)}),o.embed.setAutopause(o.config.autopause).then(k=>{o.config.autopause=k}),o.embed.getVideoTitle().then(k=>{o.config.title=k,bt.setTitle.call(this)}),o.embed.getCurrentTime().then(k=>{g=k,ze.call(o,o.media,"timeupdate")}),o.embed.getDuration().then(k=>{o.media.duration=k,ze.call(o,o.media,"durationchange")}),o.embed.getTextTracks().then(k=>{o.media.textTracks=k,rt.setup.call(o)}),o.embed.on("cuechange",({cues:k=[]})=>{const E=k.map(T=>qoe(T.text));rt.updateCues.call(o,E)}),o.embed.on("loaded",()=>{o.embed.getPaused().then(k=>{mr.call(o,!k),k||ze.call(o,o.media,"playing")}),z.element(o.embed.element)&&o.supported.ui&&o.embed.element.setAttribute("tabindex",-1)}),o.embed.on("bufferstart",()=>{ze.call(o,o.media,"waiting")}),o.embed.on("bufferend",()=>{ze.call(o,o.media,"playing")}),o.embed.on("play",()=>{mr.call(o,!0),ze.call(o,o.media,"playing")}),o.embed.on("pause",()=>{mr.call(o,!1)}),o.embed.on("timeupdate",k=>{o.media.seeking=!1,g=k.seconds,ze.call(o,o.media,"timeupdate")}),o.embed.on("progress",k=>{o.media.buffered=k.percent,ze.call(o,o.media,"progress"),parseInt(k.percent,10)===1&&ze.call(o,o.media,"canplaythrough"),o.embed.getDuration().then(E=>{E!==o.media.duration&&(o.media.duration=E,ze.call(o,o.media,"durationchange"))})}),o.embed.on("seeked",()=>{o.media.seeking=!1,ze.call(o,o.media,"seeked")}),o.embed.on("ended",()=>{o.media.paused=!0,ze.call(o,o.media,"ended")}),o.embed.on("error",k=>{o.media.error=k,ze.call(o,o.media,"error")}),i.customControls&&setTimeout(()=>bt.build.call(o),0)}};function Yoe(o){return z.empty(o)?null:o.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:o}function hr(o){o&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===o&&(this.media.paused=!o,ze.call(this,this.media,o?"play":"pause"))}function Koe(o){return o.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ql={setup(){if(dt(this.elements.wrapper,this.config.classNames.embed,!0),z.object(window.YT)&&z.function(window.YT.Player))Ql.ready.call(this);else{const o=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{z.function(o)&&o(),Ql.ready.call(this)},k2(this.config.urls.youtube.sdk).catch(i=>{this.debug.warn("YouTube API failed to load",i)})}},getTitle(o){fr(g2(this.config.urls.youtube.api,o)).then(i=>{if(z.object(i)){const{title:a,height:r,width:s}=i;this.config.title=a,bt.setTitle.call(this),this.embed.ratio=D9(s,r)}Qn.call(this)}).catch(()=>{Qn.call(this)})},ready(){const o=this,i=o.config.youtube,a=o.media&&o.media.getAttribute("id");if(!z.empty(a)&&a.startsWith("youtube-"))return;let r=o.media.getAttribute("src");z.empty(r)&&(r=o.media.getAttribute(this.config.attributes.embed.id));const s=Yoe(r),c=Ue("div",{id:Boe(o.provider),"data-poster":i.customControls?o.poster:void 0});if(o.media=Wl(c,o.media),i.customControls){const p=f=>`https://i.ytimg.com/vi/${s}/${f}default.jpg`;Xl(p("maxres"),121).catch(()=>Xl(p("sd"),121)).catch(()=>Xl(p("hq"))).then(f=>bt.setPoster.call(o,f.src)).then(f=>{f.includes("maxres")||(o.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}o.embed=new window.YT.Player(o.media,{videoId:s,host:Koe(i),playerVars:Nt({},{autoplay:o.config.autoplay?1:0,hl:o.config.hl,controls:o.supported.ui&&i.customControls?0:1,disablekb:1,playsinline:o.config.playsinline&&!o.config.fullscreen.iosNative?1:0,cc_load_policy:o.captions.active?1:0,cc_lang_pref:o.config.captions.language,widget_referrer:window?window.location.href:null},i),events:{onError(p){if(!o.media.error){const f=p.data,h={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."}[f]||"An unknown error occurred";o.media.error={code:f,message:h},ze.call(o,o.media,"error")}},onPlaybackRateChange(p){const f=p.target;o.media.playbackRate=f.getPlaybackRate(),ze.call(o,o.media,"ratechange")},onReady(p){if(z.function(o.media.play))return;const f=p.target;Ql.getTitle.call(o,s),o.media.play=()=>{hr.call(o,!0),f.playVideo()},o.media.pause=()=>{hr.call(o,!1),f.pauseVideo()},o.media.stop=()=>{f.stopVideo()},o.media.duration=f.getDuration(),o.media.paused=!0,o.media.currentTime=0,Object.defineProperty(o.media,"currentTime",{get:()=>Number(f.getCurrentTime()),set(v){o.paused&&!o.embed.hasPlayed&&o.embed.mute(),o.media.seeking=!0,ze.call(o,o.media,"seeking"),f.seekTo(v)}}),Object.defineProperty(o.media,"playbackRate",{get:()=>f.getPlaybackRate(),set(v){f.setPlaybackRate(v)}});let{volume:h}=o.config;Object.defineProperty(o.media,"volume",{get:()=>h,set(v){h=v,f.setVolume(100*h),ze.call(o,o.media,"volumechange")}});let{muted:b}=o.config;Object.defineProperty(o.media,"muted",{get:()=>b,set(v){const g=z.boolean(v)?v:b;b=g,f[g?"mute":"unMute"](),f.setVolume(100*h),ze.call(o,o.media,"volumechange")}}),Object.defineProperty(o.media,"currentSrc",{get:()=>f.getVideoUrl()}),Object.defineProperty(o.media,"ended",{get:()=>o.currentTime===o.duration});const y=f.getAvailablePlaybackRates();o.options.speed=y.filter(v=>o.config.speed.options.includes(v)),o.supported.ui&&i.customControls&&o.media.setAttribute("tabindex",-1),ze.call(o,o.media,"timeupdate"),ze.call(o,o.media,"durationchange"),clearInterval(o.timers.buffering),o.timers.buffering=setInterval(()=>{o.media.buffered=f.getVideoLoadedFraction(),(o.media.lastBuffered===null||o.media.lastBuffered<o.media.buffered)&&ze.call(o,o.media,"progress"),o.media.lastBuffered=o.media.buffered,o.media.buffered===1&&(clearInterval(o.timers.buffering),ze.call(o,o.media,"canplaythrough"))},200),i.customControls&&setTimeout(()=>bt.build.call(o),50)},onStateChange(p){const f=p.target;switch(clearInterval(o.timers.playing),o.media.seeking&&[1,2].includes(p.data)&&(o.media.seeking=!1,ze.call(o,o.media,"seeked")),p.data){case-1:ze.call(o,o.media,"timeupdate"),o.media.buffered=f.getVideoLoadedFraction(),ze.call(o,o.media,"progress");break;case 0:hr.call(o,!1),o.media.loop?(f.stopVideo(),f.playVideo()):ze.call(o,o.media,"ended");break;case 1:i.customControls&&!o.config.autoplay&&o.media.paused&&!o.embed.hasPlayed?o.media.pause():(hr.call(o,!0),ze.call(o,o.media,"playing"),o.timers.playing=setInterval(()=>{ze.call(o,o.media,"timeupdate")},50),o.media.duration!==f.getDuration()&&(o.media.duration=f.getDuration(),ze.call(o,o.media,"durationchange")));break;case 2:o.muted||o.embed.unMute(),hr.call(o,!1);break;case 3:ze.call(o,o.media,"waiting")}ze.call(o,o.elements.container,"statechange",!1,{code:p.data})}}})}},M9={setup(){this.media?(dt(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),dt(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&dt(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=Ue("div",{class:this.config.classNames.video}),x9(this.media,this.elements.wrapper),this.elements.poster=Ue("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Fi.setup.call(this):this.isYouTube?Ql.setup.call(this):this.isVimeo&&x2.setup.call(this)):this.debug.warn("No media element found!")}};class Goe{constructor(i){Ee(this,"load",()=>{this.enabled&&(z.object(window.google)&&z.object(window.google.ima)?this.ready():k2(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Ee(this,"ready",()=>{var a;this.enabled||((a=this).manager&&a.manager.destroy(),a.elements.displayContainer&&a.elements.displayContainer.destroy(),a.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),Ee(this,"setupIMA",()=>{this.elements.container=Ue("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,a=>this.onAdsManagerLoaded(a),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,a=>this.onAdError(a),!1),this.requestAds()}),Ee(this,"requestAds",()=>{const{container:a}=this.player.elements;try{const r=new google.ima.AdsRequest;r.adTagUrl=this.tagUrl,r.linearAdSlotWidth=a.offsetWidth,r.linearAdSlotHeight=a.offsetHeight,r.nonLinearAdSlotWidth=a.offsetWidth,r.nonLinearAdSlotHeight=a.offsetHeight,r.forceNonLinearFullSlot=!1,r.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(r)}catch(r){this.onAdError(r)}}),Ee(this,"pollCountdown",(a=!1)=>{if(!a)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const r=Gl(Math.max(this.manager.getRemainingTime(),0)),s=`${Wt.get("advertisement",this.player.config)} - ${r}`;this.elements.container.setAttribute("data-badge-text",s)},100)}),Ee(this,"onAdsManagerLoaded",a=>{if(!this.enabled)return;const r=new google.ima.AdsRenderingSettings;r.restoreCustomPlaybackStateOnAdBreakComplete=!0,r.enablePreloading=!0,this.manager=a.getAdsManager(this.player,r),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,s=>this.onAdError(s)),Object.keys(google.ima.AdEvent.Type).forEach(s=>{this.manager.addEventListener(google.ima.AdEvent.Type[s],c=>this.onAdEvent(c))}),this.trigger("loaded")}),Ee(this,"addCuePoints",()=>{z.empty(this.cuePoints)||this.cuePoints.forEach(a=>{if(a!==0&&a!==-1&&a<this.player.duration){const r=this.player.elements.progress;if(z.element(r)){const s=100/this.player.duration*a,c=Ue("span",{class:this.player.config.classNames.cues});c.style.left=`${s.toString()}%`,r.appendChild(c)}}})}),Ee(this,"onAdEvent",a=>{const{container:r}=this.player.elements,s=a.getAd(),c=a.getAdData();switch((p=>{ze.call(this.player,this.player.media,`ads${p.replace(/_/g,"").toLowerCase()}`)})(a.type),a.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),s.isLinear()||(s.width=r.offsetWidth,s.height=r.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:c.adError&&this.player.debug.warn(`Non-fatal ad error: ${c.adError.getMessage()}`)}}),Ee(this,"onAdError",a=>{this.cancel(),this.player.debug.warn("Ads error",a)}),Ee(this,"listeners",()=>{const{container:a}=this.player.elements;let r;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{r=this.player.currentTime}),this.player.on("seeked",()=>{const s=this.player.currentTime;z.empty(this.cuePoints)||this.cuePoints.forEach((c,p)=>{r<c&&c<s&&(this.manager.discardAdBreak(),this.cuePoints.splice(p,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(a.offsetWidth,a.offsetHeight,google.ima.ViewMode.NORMAL)})}),Ee(this,"play",()=>{const{container:a}=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(a.offsetWidth,a.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(r){this.onAdError(r)}}).catch(()=>{})}),Ee(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,li(this.player.media.play())}),Ee(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Ee(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Ee(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(a=>{this.on("loaded",a),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),Ee(this,"trigger",(a,...r)=>{const s=this.events[a];z.array(s)&&s.forEach(c=>{z.function(c)&&c.apply(this,r)})}),Ee(this,"on",(a,r)=>(z.array(this.events[a])||(this.events[a]=[]),this.events[a].push(r),this)),Ee(this,"startSafetyTimer",(a,r)=>{this.player.debug.log(`Safety timer invoked from: ${r}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},a)}),Ee(this,"clearSafetyTimer",a=>{z.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${a}`),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((a,r)=>{this.on("loaded",a),this.on("error",r)}),this.load()}get enabled(){const{config:i}=this;return this.player.isHTML5&&this.player.isVideo&&i.enabled&&(!z.empty(i.publisherId)||z.url(i.tagUrl))}get tagUrl(){const{config:i}=this;return z.url(i.tagUrl)?i.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${P9({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 j9(o=0,i=0,a=255){return Math.min(Math.max(o,i),a)}const Xoe=o=>{const i=[];return o.split(/\r\n\r\n|\n\n|\r\r/).forEach(a=>{const r={};a.split(/\r\n|\n|\r/).forEach(s=>{if(z.number(r.startTime)){if(!z.empty(s.trim())&&z.empty(r.text)){const c=s.trim().split("#xywh=");[r.text]=c,c[1]&&([r.x,r.y,r.w,r.h]=c[1].split(","))}}else{const c=s.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})/);c&&(r.startTime=60*Number(c[1]||0)*60+60*Number(c[2])+Number(c[3])+ +`0.${c[4]}`,r.endTime=60*Number(c[6]||0)*60+60*Number(c[7])+Number(c[8])+ +`0.${c[9]}`)}}),r.text&&i.push(r)}),i},$9=(o,i)=>{const a={};return o>i.width/i.height?(a.width=i.width,a.height=1/o*i.width):(a.height=i.height,a.width=o*i.height),a};class _2{constructor(i){Ee(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)})}),Ee(this,"getThumbnails",()=>new Promise(a=>{const{src:r}=this.player.config.previewThumbnails;if(z.empty(r))throw new Error("Missing previewThumbnails.src config attribute");const s=()=>{this.thumbnails.sort((c,p)=>c.height-p.height),this.player.debug.log("Preview thumbnails",this.thumbnails),a()};if(z.function(r))r(c=>{this.thumbnails=c,s()});else{const c=(z.string(r)?[r]:r).map(p=>this.getThumbnail(p));Promise.all(c).then(s)}})),Ee(this,"getThumbnail",a=>new Promise(r=>{fr(a).then(s=>{const c={frames:Xoe(s),height:null,urlPrefix:""};c.frames[0].text.startsWith("/")||c.frames[0].text.startsWith("http://")||c.frames[0].text.startsWith("https://")||(c.urlPrefix=a.substring(0,a.lastIndexOf("/")+1));const p=new Image;p.onload=()=>{c.height=p.naturalHeight,c.width=p.naturalWidth,this.thumbnails.push(c),r()},p.src=c.urlPrefix+c.frames[0].text})})),Ee(this,"startMove",a=>{if(this.loaded&&z.event(a)&&["touchmove","mousemove"].includes(a.type)&&this.player.media.duration){if(a.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var r,s;const c=this.player.elements.progress.getBoundingClientRect(),p=100/c.width*(a.pageX-c.left);this.seekTime=this.player.media.duration*(p/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=a.pageX,this.elements.thumb.time.innerText=Gl(this.seekTime);const f=(r=this.player.config.markers)===null||r===void 0||(s=r.points)===null||s===void 0?void 0:s.find(({time:h})=>h===Math.round(this.seekTime));f&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${f.label}<br>`)}this.showImageAtCurrentTime()}}),Ee(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Ee(this,"startScrubbing",a=>{(z.nullOrUndefined(a.button)||a.button===!1||a.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),Ee(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):h2.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Ee(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})}),Ee(this,"render",()=>{this.elements.thumb.container=Ue("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=Ue("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const a=Ue("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=Ue("span",{},"00:00"),a.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(a),z.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=Ue("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Ee(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Ee(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const a=this.thumbnails[0].frames.findIndex(c=>this.seekTime>=c.startTime&&this.seekTime<=c.endTime),r=a>=0;let s=0;this.mouseDown||this.toggleThumbContainer(r),r&&(this.thumbnails.forEach((c,p)=>{this.loadedImages.includes(c.frames[a].text)&&(s=p)}),a!==this.showingThumb&&(this.showingThumb=a,this.loadImage(s)))}),Ee(this,"loadImage",(a=0)=>{const r=this.showingThumb,s=this.thumbnails[a],{urlPrefix:c}=s,p=s.frames[r],f=s.frames[r].text,h=c+f;if(this.currentImageElement&&this.currentImageElement.dataset.filename===f)this.showImage(this.currentImageElement,p,a,r,f,!1),this.currentImageElement.dataset.index=r,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const b=new Image;b.src=h,b.dataset.index=r,b.dataset.filename=f,this.showingThumbFilename=f,this.player.debug.log(`Loading image: ${h}`),b.onload=()=>this.showImage(b,p,a,r,f,!0),this.loadingImage=b,this.removeOldImages(b)}}),Ee(this,"showImage",(a,r,s,c,p,f=!0)=>{this.player.debug.log(`Showing thumb: ${p}. num: ${c}. qual: ${s}. newimg: ${f}`),this.setImageSizeAndOffset(a,r),f&&(this.currentImageContainer.appendChild(a),this.currentImageElement=a,this.loadedImages.includes(p)||this.loadedImages.push(p)),this.preloadNearby(c,!0).then(this.preloadNearby(c,!1)).then(this.getHigherQuality(s,a,r,p))}),Ee(this,"removeOldImages",a=>{Array.from(this.currentImageContainer.children).forEach(r=>{if(r.tagName.toLowerCase()!=="img")return;const s=this.usingSprites?500:1e3;if(r.dataset.index!==a.dataset.index&&!r.dataset.deleting){r.dataset.deleting=!0;const{currentImageContainer:c}=this;setTimeout(()=>{c.removeChild(r),this.player.debug.log(`Removing thumb: ${r.dataset.filename}`)},s)}})}),Ee(this,"preloadNearby",(a,r=!0)=>new Promise(s=>{setTimeout(()=>{const c=this.thumbnails[0].frames[a].text;if(this.showingThumbFilename===c){let p;p=r?this.thumbnails[0].frames.slice(a):this.thumbnails[0].frames.slice(0,a).reverse();let f=!1;p.forEach(h=>{const b=h.text;if(b!==c&&!this.loadedImages.includes(b)){f=!0,this.player.debug.log(`Preloading thumb filename: ${b}`);const{urlPrefix:y}=this.thumbnails[0],v=y+b,g=new Image;g.src=v,g.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${b}`),this.loadedImages.includes(b)||this.loadedImages.push(b),s()}}}),f||s()}},300)})),Ee(this,"getHigherQuality",(a,r,s,c)=>{if(a<this.thumbnails.length-1){let p=r.naturalHeight;this.usingSprites&&(p=s.h),p<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===c&&(this.player.debug.log(`Showing higher quality thumb for: ${c}`),this.loadImage(a+1))},300)}}),Ee(this,"toggleThumbContainer",(a=!1,r=!1)=>{const s=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(s,a),!a&&r&&(this.showingThumb=null,this.showingThumbFilename=null)}),Ee(this,"toggleScrubbingContainer",(a=!1)=>{const r=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(r,a),a||(this.showingThumb=null,this.showingThumbFilename=null)}),Ee(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Ee(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:a}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(a.clientHeight>20&&a.clientWidth<20){const r=Math.floor(a.clientHeight*this.thumbAspectRatio);a.style.width=`${r}px`}else if(a.clientHeight<20&&a.clientWidth>20){const r=Math.floor(a.clientWidth/this.thumbAspectRatio);a.style.height=`${r}px`}}else{const r=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);a.style.height=`${this.thumbContainerHeight}px`,a.style.width=`${r}px`}this.setThumbContainerPos()}),Ee(this,"setThumbContainerPos",()=>{const a=this.player.elements.progress.getBoundingClientRect(),r=this.player.elements.container.getBoundingClientRect(),{container:s}=this.elements.thumb,c=r.left-a.left+10,p=r.right-a.left-s.clientWidth-10,f=this.mousePosX-a.left-s.clientWidth/2,h=j9(f,c,p);s.style.left=`${h}px`,s.style.setProperty("--preview-arrow-offset",f-h+"px")}),Ee(this,"setScrubbingContainerSize",()=>{const{width:a,height:r}=$9(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${a}px`,this.elements.scrubbing.container.style.height=`${r}px`}),Ee(this,"setImageSizeAndOffset",(a,r)=>{if(!this.usingSprites)return;const s=this.thumbContainerHeight/r.h;a.style.height=a.naturalHeight*s+"px",a.style.width=a.naturalWidth*s+"px",a.style.left=`-${r.x*s}px`,a.style.top=`-${r.y*s}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}=$9(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 I2={insertElements(o,i){z.string(i)?_9(o,this.media,{src:i}):z.array(i)&&i.forEach(a=>{_9(o,this.media,a)})},change(o){k9(o,"sources.length")?(Fi.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],_i(this.media),this.media=null,z.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:i,type:a}=o,[{provider:r=Vi.html5,src:s}]=i,c=r==="html5"?a:"div",p=r==="html5"?{}:{src:s};Object.assign(this,{provider:r,type:a,supported:Pt.check(a,r,this.config.playsinline),media:Ue(c,p)}),this.elements.container.appendChild(this.media),z.boolean(o.autoplay)&&(this.config.autoplay=o.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),z.empty(o.poster)||(this.poster=o.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),bt.addStyleHook.call(this),this.isHTML5&&I2.insertElements.call(this,"source",i),this.config.title=o.title,M9.setup.call(this),this.isHTML5&&Object.keys(o).includes("tracks")&&I2.insertElements.call(this,"track",o.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&bt.build.call(this),this.isHTML5&&this.media.load(),z.empty(o.previewThumbnails)||(Object.assign(this.config.previewThumbnails,o.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new _2(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class br{constructor(i,a){if(Ee(this,"play",()=>z.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>li(this.media.play())),this.media.play()):null),Ee(this,"pause",()=>this.playing&&z.function(this.media.pause)?this.media.pause():null),Ee(this,"togglePlay",f=>(z.boolean(f)?f:!this.playing)?this.play():this.pause()),Ee(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):z.function(this.media.stop)&&this.media.stop()}),Ee(this,"restart",()=>{this.currentTime=0}),Ee(this,"rewind",f=>{this.currentTime-=z.number(f)?f:this.config.seekTime}),Ee(this,"forward",f=>{this.currentTime+=z.number(f)?f:this.config.seekTime}),Ee(this,"increaseVolume",f=>{const h=this.media.muted?0:this.volume;this.volume=h+(z.number(f)?f:0)}),Ee(this,"decreaseVolume",f=>{this.increaseVolume(-f)}),Ee(this,"airplay",()=>{Pt.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Ee(this,"toggleControls",f=>{if(this.supported.ui&&!this.isAudio){const h=Zl(this.elements.container,this.config.classNames.hideControls),b=f===void 0?void 0:!f,y=dt(this.elements.container,this.config.classNames.hideControls,b);if(y&&z.array(this.config.controls)&&this.config.controls.includes("settings")&&!z.empty(this.config.settings)&&Se.toggleMenu.call(this,!1),y!==h){const v=y?"controlshidden":"controlsshown";ze.call(this,this.media,v)}return!y}return!1}),Ee(this,"on",(f,h)=>{it.call(this,this.elements.container,f,h)}),Ee(this,"once",(f,h)=>{h2.call(this,this.elements.container,f,h)}),Ee(this,"off",(f,h)=>{Yl(this.elements.container,f,h)}),Ee(this,"destroy",(f,h=!1)=>{if(!this.ready)return;const b=()=>{document.body.style.overflow="",this.embed=null,h?(Object.keys(this.elements).length&&(_i(this.elements.buttons.play),_i(this.elements.captions),_i(this.elements.controls),_i(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),z.function(f)&&f()):(Doe.call(this),Fi.cancelRequests.call(this),Wl(this.elements.original,this.elements.container),ze.call(this,this.elements.original,"destroyed",!0),z.function(f)&&f.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?(bt.toggleNativeControls.call(this,!0),b()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&z.function(this.embed.destroy)&&this.embed.destroy(),b()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(b),setTimeout(b,200))}),Ee(this,"supports",f=>Pt.mime.call(this,f)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=Pt.touch,this.media=i,z.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||z.nodeList(this.media)||z.array(this.media))&&(this.media=this.media[0]),this.config=Nt({},q9,br.defaults,a||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new Voe(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",Pt),z.nullOrUndefined(this.media)||!z.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(!Pt.check().api)return void this.debug.error("Setup failed: no support");const r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;const s=this.media.tagName.toLowerCase();let c=null,p=null;switch(s){case"div":if(c=this.media.querySelector("iframe"),z.element(c)){if(p=N9(c.getAttribute("src")),this.provider=Foe(p.toString()),this.elements.container=this.media,this.media=c,this.elements.container.className="",p.search.length){const f=["1","true"];f.includes(p.searchParams.get("autoplay"))&&(this.config.autoplay=!0),f.includes(p.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=f.includes(p.searchParams.get("playsinline")),this.config.youtube.hl=p.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(z.empty(this.provider)||!Object.values(Vi).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=w2.video;break;case"video":case"audio":this.type=s,this.provider=Vi.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=Pt.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new Uoe(this),this.storage=new ur(this),this.media.plyr=this,z.element(this.elements.container)||(this.elements.container=Ue("div"),x9(this.media,this.elements.container)),bt.migrateStyles.call(this),bt.addStyleHook.call(this),M9.setup.call(this),this.config.debug&&it.call(this,this.elements.container,this.config.events.join(" "),f=>{this.debug.log(`event: ${f.type}`)}),this.fullscreen=new qo(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&bt.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Goe(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>li(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new _2(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Vi.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Vi.youtube}get isVimeo(){return this.provider===Vi.vimeo}get isVideo(){return this.type===w2.video}get isAudio(){return this.type===w2.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 a=z.number(i)&&i>0;this.media.currentTime=a?Math.min(i,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:i}=this.media;return z.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),a=(this.media||{}).duration,r=z.number(a)&&a!==1/0?a:0;return i||r}set volume(i){let a=i;z.string(a)&&(a=Number(a)),z.number(a)||(a=this.storage.get("volume")),z.number(a)||({volume:a}=this.config),a>1&&(a=1),a<0&&(a=0),this.config.volume=a,this.media.volume=a,!z.empty(i)&&this.muted&&a>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(i){let a=i;z.boolean(a)||(a=this.storage.get("muted")),z.boolean(a)||(a=this.config.muted),this.config.muted=a,this.media.muted=a}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 a=null;z.number(i)&&(a=i),z.number(a)||(a=this.storage.get("speed")),z.number(a)||(a=this.config.speed.selected);const{minimumSpeed:r,maximumSpeed:s}=this;a=j9(a,r,s),this.config.speed.selected=a,setTimeout(()=>{this.media&&(this.media.playbackRate=a)},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 a=this.config.quality,r=this.options.quality;if(!r.length)return;let s=[!z.empty(i)&&Number(i),this.storage.get("quality"),a.selected,a.default].find(z.number),c=!0;if(!r.includes(s)){const p=S9(r,s);this.debug.warn(`Unsupported quality option: ${s}, using ${p} instead`),s=p,c=!1}a.selected=s,this.media.quality=s,c&&this.storage.set({quality:s})}get quality(){return this.media.quality}set loop(i){const a=z.boolean(i)?i:this.config.loop.active;this.config.loop.active=a,this.media.loop=a}get loop(){return!!this.media.loop}set source(i){I2.change.call(this,i)}get source(){return this.media.currentSrc}get download(){const{download:i}=this.config.urls;return z.url(i)?i:this.source}set download(i){z.url(i)&&(this.config.urls.download=i,Se.setDownloadUrl.call(this))}set poster(i){this.isVideo?bt.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=Kl(y2.call(this));return z.array(i)?i.join(":"):i}set ratio(i){this.isVideo?z.string(i)&&E9(i)?(this.config.ratio=Kl(i),Qn.call(this)):this.debug.error(`Invalid aspect ratio specified (${i})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(i){this.config.autoplay=z.boolean(i)?i:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(i){rt.toggle.call(this,i,!1)}set currentTrack(i){rt.set.call(this,i,!1),rt.setup.call(this)}get currentTrack(){const{toggled:i,currentTrack:a}=this.captions;return i?a:-1}set language(i){rt.setLanguage.call(this,i,!1)}get language(){return(rt.getCurrentTrack.call(this)||{}).language}set pip(i){if(!Pt.pip)return;const a=z.boolean(i)?i:!this.pip;z.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(a?v2.active:v2.inactive),z.function(this.media.requestPictureInPicture)&&(!this.pip&&a?this.media.requestPictureInPicture():this.pip&&!a&&document.exitPictureInPicture())}get pip(){return Pt.pip?z.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===v2.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 _2(this))}static supported(i,a){return Pt.check(i,a)}static loadSprite(i,a){return B9(i,a)}static setup(i,a={}){let r=null;return z.string(i)?r=Array.from(document.querySelectorAll(i)):z.nodeList(i)?r=Array.from(i):z.array(i)&&(r=i.filter(z.element)),z.empty(r)?null:r.map(s=>new br(s,a))}}br.defaults=Soe(q9);const Qoe=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));return Zte});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.8.32",
3
+ "version": "25.8.34",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
@@ -33,6 +33,7 @@ export const SpecialGlobalAction = {
33
33
  ViewCdrPhoneNumbers: 'view_cdr_phone_numbers',
34
34
  ChangeUserPassword: 'change_user_password',
35
35
  EavesdropCall: 'eavesdrop_call',
36
+ ControlAgentScreen: 'control_agent_screen',
36
37
  } as const;
37
38
 
38
39
  export type SpecialGlobalAction =
@@ -3,6 +3,18 @@ import { TooltipScheme } from '@webitel/styleguide/component-schemes';
3
3
  const tooltip = {
4
4
  ...TooltipScheme.sizes,
5
5
  colorScheme: TooltipScheme.colorScheme,
6
+
7
+ css: ({ dt }) => `
8
+ .p-tooltip-text {
9
+ white-space: pre-line;
10
+ word-break: normal;
11
+ background: ${dt(`tooltip.background`)};
12
+ color: ${dt('tooltip.color')};
13
+ padding: ${dt('tooltip.padding')};
14
+ box-shadow: ${dt('tooltip.shadow')};
15
+ border-radius: ${dt('tooltip.border.radius')};
16
+ }
17
+ `,
6
18
  };
7
19
 
8
20
  export default tooltip;
@@ -30,5 +30,6 @@ export declare const SpecialGlobalAction: {
30
30
  readonly ViewCdrPhoneNumbers: "view_cdr_phone_numbers";
31
31
  readonly ChangeUserPassword: "change_user_password";
32
32
  readonly EavesdropCall: "eavesdrop_call";
33
+ readonly ControlAgentScreen: "control_agent_screen";
33
34
  };
34
35
  export type SpecialGlobalAction = (typeof SpecialGlobalAction)[keyof typeof SpecialGlobalAction];
@@ -14,6 +14,9 @@ declare const tooltip: {
14
14
  };
15
15
  };
16
16
  };
17
+ css: ({ dt }: {
18
+ dt: any;
19
+ }) => string;
17
20
  maxWidth: string;
18
21
  gutter: string;
19
22
  padding: string;