Agriculture-front-end/dist/assets/video.92d64f38.js
2023-07-09 20:38:38 +08:00

67 lines
624 KiB
JavaScript

import{X as Mn,a3 as dd,z as Hp,r as qp,V as jp,U as Gp,a0 as Wp,o as zp,c as $p,l as Mu,J as Kp,_ as Xp}from"./index.955aa49e.js";var _i;typeof window<"u"?_i=window:typeof Mn<"u"?_i=Mn:typeof self<"u"?_i=self:_i={};var A=_i;const Yp=new Proxy({},{get(a,t){throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${t}" in client code.`)}}),Qp=Object.freeze(Object.defineProperty({__proto__:null,default:Yp},Symbol.toStringTag,{value:"Module"})),Jp=dd(Qp);var Nu=typeof Mn<"u"?Mn:typeof window<"u"?window:{},Zp=Jp,Ti;typeof document<"u"?Ti=document:(Ti=Nu["__GLOBAL_DOCUMENT_CACHE@4"],Ti||(Ti=Nu["__GLOBAL_DOCUMENT_CACHE@4"]=Zp));var G=Ti;function ot(){return ot=Object.assign?Object.assign.bind():function(a){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(a[n]=r[n])}return a},ot.apply(this,arguments)}const em=Object.freeze(Object.defineProperty({__proto__:null,default:ot},Symbol.toStringTag,{value:"Module"}));var hs={exports:{}};(function(a,t){function r(u){if(u&&typeof u=="object"){var l=u.which||u.keyCode||u.charCode;l&&(u=l)}if(typeof u=="number")return s[u];var c=String(u),g=n[c.toLowerCase()];if(g)return g;var g=e[c.toLowerCase()];if(g)return g;if(c.length===1)return c.charCodeAt(0)}r.isEventKey=function(l,c){if(l&&typeof l=="object"){var g=l.which||l.keyCode||l.charCode;if(g==null)return!1;if(typeof c=="string"){var m=n[c.toLowerCase()];if(m)return m===g;var m=e[c.toLowerCase()];if(m)return m===g}else if(typeof c=="number")return c===g;return!1}},t=a.exports=r;var n=t.code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},e=t.aliases={windows:91,"\u21E7":16,"\u2325":18,"\u2303":17,"\u2318":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*!
* Programatically add the following
*/for(i=97;i<123;i++)n[String.fromCharCode(i)]=i-32;for(var i=48;i<58;i++)n[i-48]=i;for(i=1;i<13;i++)n["f"+i]=i+111;for(i=0;i<10;i++)n["numpad "+i]=i+96;var s=t.names=t.title={};for(i in n)s[n[i]]=i;for(var o in e)n[o]=e[o]})(hs,hs.exports);const te=hs.exports;function ee(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Nr(a,t){return Nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},Nr(a,t)}function W(a,t){a.prototype=Object.create(t.prototype),a.prototype.constructor=a,Nr(a,t)}var tm=rm;function rm(a,t){var r,n=null;try{r=JSON.parse(a,t)}catch(e){n=e}return[n,r]}var oa={exports:{}};const im=dd(em);var nm=sm,am=Object.prototype.toString;function sm(a){if(!a)return!1;var t=am.call(a);return t==="[object Function]"||typeof a=="function"&&t!=="[object RegExp]"||typeof window<"u"&&(a===window.setTimeout||a===window.alert||a===window.confirm||a===window.prompt)}var om=A,um=function(t,r){return r===void 0&&(r=!1),function(n,e,i){if(n){t(n);return}if(e.statusCode>=400&&e.statusCode<=599){var s=i;if(r)if(om.TextDecoder){var o=lm(e.headers&&e.headers["content-type"]);try{s=new TextDecoder(o).decode(i)}catch{}}else s=String.fromCharCode.apply(null,new Uint8Array(i));t({cause:s});return}t(null,i)}};function lm(a){return a===void 0&&(a=""),a.toLowerCase().split(";").reduce(function(t,r){var n=r.split("="),e=n[0],i=n[1];return e.trim()==="charset"?i.trim():t},"utf-8")}var dm=um,cd=A,cm=im,fm=nm;xt.httpHandler=dm;/**
* @license
* slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
* Copyright (c) 2014 David Björklund
* Available under the MIT license
* <https://github.com/kesla/parse-headers/blob/master/LICENCE>
*/var hm=function(t){var r={};return t&&t.trim().split(`
`).forEach(function(n){var e=n.indexOf(":"),i=n.slice(0,e).trim().toLowerCase(),s=n.slice(e+1).trim();typeof r[i]>"u"?r[i]=s:Array.isArray(r[i])?r[i].push(s):r[i]=[r[i],s]}),r};oa.exports=xt;oa.exports.default=xt;xt.XMLHttpRequest=cd.XMLHttpRequest||vm;xt.XDomainRequest="withCredentials"in new xt.XMLHttpRequest?xt.XMLHttpRequest:cd.XDomainRequest;pm(["get","put","post","patch","head","delete"],function(a){xt[a==="delete"?"del":a]=function(t,r,n){return r=fd(t,r,n),r.method=a.toUpperCase(),hd(r)}});function pm(a,t){for(var r=0;r<a.length;r++)t(a[r])}function mm(a){for(var t in a)if(a.hasOwnProperty(t))return!1;return!0}function fd(a,t,r){var n=a;return fm(t)?(r=t,typeof a=="string"&&(n={uri:a})):n=cm({},t,{uri:a}),n.callback=r,n}function xt(a,t,r){return t=fd(a,t,r),hd(t)}function hd(a){if(typeof a.callback>"u")throw new Error("callback argument missing");var t=!1,r=function(H,L,F){t||(t=!0,a.callback(H,L,F))};function n(){o.readyState===4&&setTimeout(s,0)}function e(){var O=void 0;if(o.response?O=o.response:O=o.responseText||gm(o),S)try{O=JSON.parse(O)}catch{}return O}function i(O){return clearTimeout(x),O instanceof Error||(O=new Error(""+(O||"Unknown XMLHttpRequest Error"))),O.statusCode=0,r(O,w)}function s(){if(!l){var O;clearTimeout(x),a.useXDR&&o.status===void 0?O=200:O=o.status===1223?204:o.status;var H=w,L=null;return O!==0?(H={body:e(),statusCode:O,method:g,headers:{},url:c,rawRequest:o},o.getAllResponseHeaders&&(H.headers=hm(o.getAllResponseHeaders()))):L=new Error("Internal XMLHttpRequest Error"),r(L,H,H.body)}}var o=a.xhr||null;o||(a.cors||a.useXDR?o=new xt.XDomainRequest:o=new xt.XMLHttpRequest);var u,l,c=o.url=a.uri||a.url,g=o.method=a.method||"GET",m=a.body||a.data,_=o.headers=a.headers||{},b=!!a.sync,S=!1,x,w={body:void 0,headers:{},statusCode:0,method:g,url:c,rawRequest:o};if("json"in a&&a.json!==!1&&(S=!0,_.accept||_.Accept||(_.Accept="application/json"),g!=="GET"&&g!=="HEAD"&&(_["content-type"]||_["Content-Type"]||(_["Content-Type"]="application/json"),m=JSON.stringify(a.json===!0?m:a.json))),o.onreadystatechange=n,o.onload=s,o.onerror=i,o.onprogress=function(){},o.onabort=function(){l=!0},o.ontimeout=i,o.open(g,c,!b,a.username,a.password),b||(o.withCredentials=!!a.withCredentials),!b&&a.timeout>0&&(x=setTimeout(function(){if(!l){l=!0,o.abort("timeout");var O=new Error("XMLHttpRequest timeout");O.code="ETIMEDOUT",i(O)}},a.timeout)),o.setRequestHeader)for(u in _)_.hasOwnProperty(u)&&o.setRequestHeader(u,_[u]);else if(a.headers&&!mm(a.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in a&&(o.responseType=a.responseType),"beforeSend"in a&&typeof a.beforeSend=="function"&&a.beforeSend(o),o.send(m||null),o}function gm(a){try{if(a.responseType==="document")return a.responseXML;var t=a.responseXML&&a.responseXML.documentElement.nodeName==="parsererror";if(a.responseType===""&&!t)return a.responseXML}catch{}return null}function vm(){}var ps={exports:{}},Bu=G,Gs=Object.create||function(){function a(){}return function(t){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return a.prototype=t,new a}}();function rt(a,t){this.name="ParsingError",this.code=a.code,this.message=t||a.message}rt.prototype=Gs(Error.prototype);rt.prototype.constructor=rt;rt.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function Ws(a){function t(n,e,i,s){return(n|0)*3600+(e|0)*60+(i|0)+(s|0)/1e3}var r=a.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return r?r[3]?t(r[1],r[2],r[3].replace(":",""),r[4]):r[1]>59?t(r[1],r[2],0,r[4]):t(0,r[1],r[2],r[4]):null}function Ci(){this.values=Gs(null)}Ci.prototype={set:function(a,t){!this.get(a)&&t!==""&&(this.values[a]=t)},get:function(a,t,r){return r?this.has(a)?this.values[a]:t[r]:this.has(a)?this.values[a]:t},has:function(a){return a in this.values},alt:function(a,t,r){for(var n=0;n<r.length;++n)if(t===r[n]){this.set(a,t);break}},integer:function(a,t){/^-?\d+$/.test(t)&&this.set(a,parseInt(t,10))},percent:function(a,t){return t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t),t>=0&&t<=100)?(this.set(a,t),!0):!1}};function bi(a,t,r,n){var e=n?a.split(n):[a];for(var i in e)if(typeof e[i]=="string"){var s=e[i].split(r);if(s.length===2){var o=s[0].trim(),u=s[1].trim();t(o,u)}}}function ym(a,t,r){var n=a;function e(){var o=Ws(a);if(o===null)throw new rt(rt.Errors.BadTimeStamp,"Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),o}function i(o,u){var l=new Ci;bi(o,function(c,g){switch(c){case"region":for(var m=r.length-1;m>=0;m--)if(r[m].id===g){l.set(c,r[m].region);break}break;case"vertical":l.alt(c,g,["rl","lr"]);break;case"line":var _=g.split(","),b=_[0];l.integer(c,b),l.percent(c,b)&&l.set("snapToLines",!1),l.alt(c,b,["auto"]),_.length===2&&l.alt("lineAlign",_[1],["start","center","end"]);break;case"position":_=g.split(","),l.percent(c,_[0]),_.length===2&&l.alt("positionAlign",_[1],["start","center","end"]);break;case"size":l.percent(c,g);break;case"align":l.alt(c,g,["start","center","end","left","right"]);break}},/:/,/\s/),u.region=l.get("region",null),u.vertical=l.get("vertical","");try{u.line=l.get("line","auto")}catch{}u.lineAlign=l.get("lineAlign","start"),u.snapToLines=l.get("snapToLines",!0),u.size=l.get("size",100);try{u.align=l.get("align","center")}catch{u.align=l.get("align","middle")}try{u.position=l.get("position","auto")}catch{u.position=l.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},u.align)}u.positionAlign=l.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},u.align)}function s(){a=a.replace(/^\s+/,"")}if(s(),t.startTime=e(),s(),a.substr(0,3)!=="-->")throw new rt(rt.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.substr(3),s(),t.endTime=e(),s(),i(a,t)}var Ga=Bu.createElement&&Bu.createElement("textarea"),_m={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Uu={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Tm={v:"title",lang:"lang"},Vu={rt:"ruby"};function pd(a,t){function r(){if(!t)return null;function b(x){return t=t.substr(x.length),x}var S=t.match(/^([^<]*)(<[^>]*>?)?/);return b(S[1]?S[1]:S[2])}function n(b){return Ga.innerHTML=b,b=Ga.textContent,Ga.textContent="",b}function e(b,S){return!Vu[S.localName]||Vu[S.localName]===b.localName}function i(b,S){var x=_m[b];if(!x)return null;var w=a.document.createElement(x),O=Tm[b];return O&&S&&(w[O]=S.trim()),w}for(var s=a.document.createElement("div"),o=s,u,l=[];(u=r())!==null;){if(u[0]==="<"){if(u[1]==="/"){l.length&&l[l.length-1]===u.substr(2).replace(">","")&&(l.pop(),o=o.parentNode);continue}var c=Ws(u.substr(1,u.length-2)),g;if(c){g=a.document.createProcessingInstruction("timestamp",c),o.appendChild(g);continue}var m=u.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!m||(g=i(m[1],m[3]),!g)||!e(o,g))continue;if(m[2]){var _=m[2].split(".");_.forEach(function(b){var S=/^bg_/.test(b),x=S?b.slice(3):b;if(Uu.hasOwnProperty(x)){var w=S?"background-color":"color",O=Uu[x];g.style[w]=O}}),g.className=_.join(" ")}l.push(m[1]),o.appendChild(g),o=g;continue}o.appendChild(a.document.createTextNode(n(u)))}return s}var Hu=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function bm(a){for(var t=0;t<Hu.length;t++){var r=Hu[t];if(a>=r[0]&&a<=r[1])return!0}return!1}function xm(a){var t=[],r="",n;if(!a||!a.childNodes)return"ltr";function e(o,u){for(var l=u.childNodes.length-1;l>=0;l--)o.push(u.childNodes[l])}function i(o){if(!o||!o.length)return null;var u=o.pop(),l=u.textContent||u.innerText;if(l){var c=l.match(/^.*(\n|\r)/);return c?(o.length=0,c[0]):l}if(u.tagName==="ruby")return i(o);if(u.childNodes)return e(o,u),i(o)}for(e(t,a);r=i(t);)for(var s=0;s<r.length;s++)if(n=r.charCodeAt(s),bm(n))return"rtl";return"ltr"}function Sm(a){if(typeof a.line=="number"&&(a.snapToLines||a.line>=0&&a.line<=100))return a.line;if(!a.track||!a.track.textTrackList||!a.track.textTrackList.mediaElement)return-1;for(var t=a.track,r=t.textTrackList,n=0,e=0;e<r.length&&r[e]!==t;e++)r[e].mode==="showing"&&n++;return++n*-1}function ua(){}ua.prototype.applyStyles=function(a,t){t=t||this.div;for(var r in a)a.hasOwnProperty(r)&&(t.style[r]=a[r])};ua.prototype.formatStyle=function(a,t){return a===0?0:a+t};function Nn(a,t,r){ua.call(this),this.cue=t,this.cueDiv=pd(a,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=a.document.createElement("div"),n={direction:xm(this.cueDiv),writingMode:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:t.align==="middle"?"center":t.align,font:r.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var e=0;switch(t.positionAlign){case"start":e=t.position;break;case"center":e=t.position-t.size/2;break;case"end":e=t.position-t.size;break}t.vertical===""?this.applyStyles({left:this.formatStyle(e,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(e,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(i){this.applyStyles({top:this.formatStyle(i.top,"px"),bottom:this.formatStyle(i.bottom,"px"),left:this.formatStyle(i.left,"px"),right:this.formatStyle(i.right,"px"),height:this.formatStyle(i.height,"px"),width:this.formatStyle(i.width,"px")})}}Nn.prototype=Gs(ua.prototype);Nn.prototype.constructor=Nn;function je(a){var t,r,n,e;if(a.div){r=a.div.offsetHeight,n=a.div.offsetWidth,e=a.div.offsetTop;var i=(i=a.div.childNodes)&&(i=i[0])&&i.getClientRects&&i.getClientRects();a=a.div.getBoundingClientRect(),t=i?Math.max(i[0]&&i[0].height||0,a.height/i.length):0}this.left=a.left,this.right=a.right,this.top=a.top||e,this.height=a.height||r,this.bottom=a.bottom||e+(a.height||r),this.width=a.width||n,this.lineHeight=t!==void 0?t:a.lineHeight}je.prototype.move=function(a,t){switch(t=t!==void 0?t:this.lineHeight,a){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t;break}};je.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top};je.prototype.overlapsAny=function(a){for(var t=0;t<a.length;t++)if(this.overlaps(a[t]))return!0;return!1};je.prototype.within=function(a){return this.top>=a.top&&this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right};je.prototype.overlapsOppositeAxis=function(a,t){switch(t){case"+x":return this.left<a.left;case"-x":return this.right>a.right;case"+y":return this.top<a.top;case"-y":return this.bottom>a.bottom}};je.prototype.intersectPercentage=function(a){var t=Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left)),r=Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top)),n=t*r;return n/(this.height*this.width)};je.prototype.toCSSCompatValues=function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}};je.getSimpleBoxPosition=function(a){var t=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,r=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,n=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;var e={left:a.left,right:a.right,top:a.top||n,height:a.height||t,bottom:a.bottom||n+(a.height||t),width:a.width||r};return e};function Em(a,t,r,n){function e(x,w){for(var O,H=new je(x),L=1,F=0;F<w.length;F++){for(;x.overlapsOppositeAxis(r,w[F])||x.within(r)&&x.overlapsAny(n);)x.move(w[F]);if(x.within(r))return x;var q=x.intersectPercentage(r);L>q&&(O=new je(x),L=q),x=new je(H)}return O||H}var i=new je(t),s=t.cue,o=Sm(s),u=[];if(s.snapToLines){var l;switch(s.vertical){case"":u=["+y","-y"],l="height";break;case"rl":u=["+x","-x"],l="width";break;case"lr":u=["-x","+x"],l="width";break}var c=i.lineHeight,g=c*Math.round(o),m=r[l]+c,_=u[0];Math.abs(g)>m&&(g=g<0?-1:1,g*=Math.ceil(m/c)*c),o<0&&(g+=s.vertical===""?r.height:r.width,u=u.reverse()),i.move(_,g)}else{var b=i.lineHeight/r.height*100;switch(s.lineAlign){case"center":o-=b/2;break;case"end":o-=b;break}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")});break}u=["+y","-x","+x","-y"],i=new je(t)}var S=e(i,u);t.move(S.toCSSCompatValues(r))}function Xr(){}Xr.StringDecoder=function(){return{decode:function(a){if(!a)return"";if(typeof a!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}};Xr.convertCueToDOMTree=function(a,t){return!a||!t?null:pd(a,t)};var Cm=.05,Am="sans-serif",Dm="1.5%";Xr.processCues=function(a,t,r){if(!a||!t||!r)return null;for(;r.firstChild;)r.removeChild(r.firstChild);var n=a.document.createElement("div");n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin=Dm,r.appendChild(n);function e(c){for(var g=0;g<c.length;g++)if(c[g].hasBeenReset||!c[g].displayState)return!0;return!1}if(!e(t)){for(var i=0;i<t.length;i++)n.appendChild(t[i].displayState);return}var s=[],o=je.getSimpleBoxPosition(n),u=Math.round(o.height*Cm*100)/100,l={font:u+"px "+Am};(function(){for(var c,g,m=0;m<t.length;m++)g=t[m],c=new Nn(a,g,l),n.appendChild(c.div),Em(a,c,o,s),g.displayState=c.div,s.push(je.getSimpleBoxPosition(c))})()};Xr.Parser=function(a,t,r){r||(r=t,t={}),t||(t={}),this.window=a,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=r||new TextDecoder("utf8"),this.regionList=[]};Xr.Parser.prototype={reportOrThrowError:function(a){if(a instanceof rt)this.onparsingerror&&this.onparsingerror(a);else throw a},parse:function(a){var t=this;a&&(t.buffer+=t.decoder.decode(a,{stream:!0}));function r(){for(var c=t.buffer,g=0;g<c.length&&c[g]!=="\r"&&c[g]!==`
`;)++g;var m=c.substr(0,g);return c[g]==="\r"&&++g,c[g]===`
`&&++g,t.buffer=c.substr(g),m}function n(c){var g=new Ci;if(bi(c,function(_,b){switch(_){case"id":g.set(_,b);break;case"width":g.percent(_,b);break;case"lines":g.integer(_,b);break;case"regionanchor":case"viewportanchor":var S=b.split(",");if(S.length!==2)break;var x=new Ci;if(x.percent("x",S[0]),x.percent("y",S[1]),!x.has("x")||!x.has("y"))break;g.set(_+"X",x.get("x")),g.set(_+"Y",x.get("y"));break;case"scroll":g.alt(_,b,["up"]);break}},/=/,/\s/),g.has("id")){var m=new(t.vttjs.VTTRegion||t.window.VTTRegion);m.width=g.get("width",100),m.lines=g.get("lines",3),m.regionAnchorX=g.get("regionanchorX",0),m.regionAnchorY=g.get("regionanchorY",100),m.viewportAnchorX=g.get("viewportanchorX",0),m.viewportAnchorY=g.get("viewportanchorY",100),m.scroll=g.get("scroll",""),t.onregion&&t.onregion(m),t.regionList.push({id:g.get("id"),region:m})}}function e(c){var g=new Ci;bi(c,function(m,_){switch(m){case"MPEGT":g.integer(m+"S",_);break;case"LOCA":g.set(m+"L",Ws(_));break}},/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:g.get("MPEGTS"),LOCAL:g.get("LOCAL")})}function i(c){c.match(/X-TIMESTAMP-MAP/)?bi(c,function(g,m){switch(g){case"X-TIMESTAMP-MAP":e(m);break}},/=/):bi(c,function(g,m){switch(g){case"Region":n(m);break}},/:/)}try{var s;if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;s=r();var o=s.match(/^WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new rt(rt.Errors.BadSignature);t.state="HEADER"}for(var u=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(u?u=!1:s=r(),t.state){case"HEADER":/:/.test(s)?i(s):s||(t.state="ID");continue;case"NOTE":s||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){t.state="NOTE";break}if(!s)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch{t.cue.align="middle"}if(t.state="CUE",s.indexOf("-->")===-1){t.cue.id=s;continue}case"CUE":try{ym(s,t.cue,t.regionList)}catch(c){t.reportOrThrowError(c),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var l=s.indexOf("-->")!==-1;if(!s||l&&(u=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+=`
`),t.cue.text+=s.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":s||(t.state="ID");continue}}}catch(c){t.reportOrThrowError(c),t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var a=this;try{if(a.buffer+=a.decoder.decode(),(a.cue||a.state==="HEADER")&&(a.buffer+=`
`,a.parse()),a.state==="INITIAL")throw new rt(rt.Errors.BadSignature)}catch(t){a.reportOrThrowError(t)}return a.onflush&&a.onflush(),this}};var wm=Xr,km="auto",Pm={"":1,lr:1,rl:1},Im={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function Om(a){if(typeof a!="string")return!1;var t=Pm[a.toLowerCase()];return t?a.toLowerCase():!1}function Wa(a){if(typeof a!="string")return!1;var t=Im[a.toLowerCase()];return t?a.toLowerCase():!1}function md(a,t,r){this.hasBeenReset=!1;var n="",e=!1,i=a,s=t,o=r,u=null,l="",c=!0,g="auto",m="start",_="auto",b="auto",S=100,x="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return n},set:function(w){n=""+w}},pauseOnExit:{enumerable:!0,get:function(){return e},set:function(w){e=!!w}},startTime:{enumerable:!0,get:function(){return i},set:function(w){if(typeof w!="number")throw new TypeError("Start time must be set to a number.");i=w,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(w){if(typeof w!="number")throw new TypeError("End time must be set to a number.");s=w,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(w){o=""+w,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(w){u=w,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(w){var O=Om(w);if(O===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");l=O,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(w){c=!!w,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return g},set:function(w){if(typeof w!="number"&&w!==km)throw new SyntaxError("Line: an invalid number or illegal string was specified.");g=w,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return m},set:function(w){var O=Wa(w);O?(m=O,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return _},set:function(w){if(w<0||w>100)throw new Error("Position must be between 0 and 100.");_=w,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return b},set:function(w){var O=Wa(w);O?(b=O,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return S},set:function(w){if(w<0||w>100)throw new Error("Size must be between 0 and 100.");S=w,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return x},set:function(w){var O=Wa(w);if(!O)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");x=O,this.hasBeenReset=!0}}}),this.displayState=void 0}md.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Lm=md,Fm={"":!0,up:!0};function Rm(a){if(typeof a!="string")return!1;var t=Fm[a.toLowerCase()];return t?a.toLowerCase():!1}function fi(a){return typeof a=="number"&&a>=0&&a<=100}function Mm(){var a=100,t=3,r=0,n=100,e=0,i=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(o){if(!fi(o))throw new Error("Width must be between 0 and 100.");a=o}},lines:{enumerable:!0,get:function(){return t},set:function(o){if(typeof o!="number")throw new TypeError("Lines must be set to a number.");t=o}},regionAnchorY:{enumerable:!0,get:function(){return n},set:function(o){if(!fi(o))throw new Error("RegionAnchorX must be between 0 and 100.");n=o}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(o){if(!fi(o))throw new Error("RegionAnchorY must be between 0 and 100.");r=o}},viewportAnchorY:{enumerable:!0,get:function(){return i},set:function(o){if(!fi(o))throw new Error("ViewportAnchorY must be between 0 and 100.");i=o}},viewportAnchorX:{enumerable:!0,get:function(){return e},set:function(o){if(!fi(o))throw new Error("ViewportAnchorX must be between 0 and 100.");e=o}},scroll:{enumerable:!0,get:function(){return s},set:function(o){var u=Rm(o);u===!1?console.warn("Scroll: an invalid or illegal string was specified."):s=u}}})}var Nm=Mm,Mt=A,pr=ps.exports={WebVTT:wm,VTTCue:Lm,VTTRegion:Nm};Mt.vttjs=pr;Mt.WebVTT=pr.WebVTT;var Bm=pr.VTTCue,Um=pr.VTTRegion,Vm=Mt.VTTCue,Hm=Mt.VTTRegion;pr.shim=function(){Mt.VTTCue=Bm,Mt.VTTRegion=Um};pr.restore=function(){Mt.VTTCue=Vm,Mt.VTTRegion=Hm};Mt.VTTCue||pr.shim();function qm(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ai(a,t,r){return qm()?Ai=Reflect.construct.bind():Ai=function(e,i,s){var o=[null];o.push.apply(o,i);var u=Function.bind.apply(e,o),l=new u;return s&&Nr(l,s.prototype),l},Ai.apply(null,arguments)}function jm(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&Nr(a,t)}var gd={exports:{}};(function(a,t){(function(r){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,e=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(u,l,c){if(c=c||{},u=u.trim(),l=l.trim(),!l){if(!c.alwaysNormalize)return u;var g=o.parseURL(u);if(!g)throw new Error("Error trying to parse base URL.");return g.path=o.normalizePath(g.path),o.buildURLFromParts(g)}var m=o.parseURL(l);if(!m)throw new Error("Error trying to parse relative URL.");if(m.scheme)return c.alwaysNormalize?(m.path=o.normalizePath(m.path),o.buildURLFromParts(m)):l;var _=o.parseURL(u);if(!_)throw new Error("Error trying to parse base URL.");if(!_.netLoc&&_.path&&_.path[0]!=="/"){var b=e.exec(_.path);_.netLoc=b[1],_.path=b[2]}_.netLoc&&!_.path&&(_.path="/");var S={scheme:_.scheme,netLoc:m.netLoc,path:null,params:m.params,query:m.query,fragment:m.fragment};if(!m.netLoc&&(S.netLoc=_.netLoc,m.path[0]!=="/"))if(!m.path)S.path=_.path,m.params||(S.params=_.params,m.query||(S.query=_.query));else{var x=_.path,w=x.substring(0,x.lastIndexOf("/")+1)+m.path;S.path=o.normalizePath(w)}return S.path===null&&(S.path=c.alwaysNormalize?o.normalizePath(m.path):m.path),o.buildURLFromParts(S)},parseURL:function(u){var l=n.exec(u);return l?{scheme:l[1]||"",netLoc:l[2]||"",path:l[3]||"",params:l[4]||"",query:l[5]||"",fragment:l[6]||""}:null},normalizePath:function(u){for(u=u.split("").reverse().join("").replace(i,"");u.length!==(u=u.replace(s,"")).length;);return u.split("").reverse().join("")},buildURLFromParts:function(u){return u.scheme+u.netLoc+u.path+u.params+u.query+u.fragment}};a.exports=o})()})(gd);const qu=gd.exports;var ju="http://example.com",la=function(t,r){if(/^[a-z]+:/i.test(r))return r;/^data:/.test(t)&&(t=A.location&&A.location.href||"");var n=typeof A.URL=="function",e=/^\/\//.test(t),i=!A.location&&!/\/\//i.test(t);if(n?t=new A.URL(t,A.location||ju):/\/\//i.test(t)||(t=qu.buildAbsoluteURL(A.location&&A.location.href||"",t)),n){var s=new URL(r,t);return i?s.href.slice(ju.length):e?s.href.slice(s.protocol.length):s.href}return qu.buildAbsoluteURL(t,r)},zs=function(){function a(){this.listeners={}}var t=a.prototype;return t.on=function(n,e){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(e)},t.off=function(n,e){if(!this.listeners[n])return!1;var i=this.listeners[n].indexOf(e);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(i,1),i>-1},t.trigger=function(n){var e=this.listeners[n];if(!!e)if(arguments.length===2)for(var i=e.length,s=0;s<i;++s)e[s].call(this,arguments[1]);else for(var o=Array.prototype.slice.call(arguments,1),u=e.length,l=0;l<u;++l)e[l].apply(this,o)},t.dispose=function(){this.listeners={}},t.pipe=function(n){this.on("data",function(e){n.push(e)})},a}(),Gm=function(t){return A.atob?A.atob(t):Buffer.from(t,"base64").toString("binary")};function vd(a){for(var t=Gm(a),r=new Uint8Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}/*! @name m3u8-parser @version 4.8.0 @license Apache-2.0 */var Wm=function(a){W(t,a);function t(){var n;return n=a.call(this)||this,n.buffer="",n}var r=t.prototype;return r.push=function(e){var i;for(this.buffer+=e,i=this.buffer.indexOf(`
`);i>-1;i=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)},t}(zs),zm=String.fromCharCode(9),za=function(t){var r=/([0-9.]*)?@?([0-9.]*)?/.exec(t||""),n={};return r[1]&&(n.length=parseInt(r[1],10)),r[2]&&(n.offset=parseInt(r[2],10)),n},$m=function(){var t="[^=]*",r='"[^"]*"|[^,]*',n="(?:"+t+")=(?:"+r+")";return new RegExp("(?:^|,)("+n+")")},lt=function(t){for(var r=t.split($m()),n={},e=r.length,i;e--;)r[e]!==""&&(i=/([^=]*)=(.*)/.exec(r[e]).slice(1),i[0]=i[0].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^\s+|\s+$/g,""),i[1]=i[1].replace(/^['"](.*)['"]$/g,"$1"),n[i[0]]=i[1]);return n},Km=function(a){W(t,a);function t(){var n;return n=a.call(this)||this,n.customParsers=[],n.tagMappers=[],n}var r=t.prototype;return r.push=function(e){var i=this,s,o;if(e=e.trim(),e.length!==0){if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}var u=this.tagMappers.reduce(function(l,c){var g=c(e);return g===e?l:l.concat([g])},[e]);u.forEach(function(l){for(var c=0;c<i.customParsers.length;c++)if(i.customParsers[c].call(i,l))return;if(l.indexOf("#EXT")!==0){i.trigger("data",{type:"comment",text:l.slice(1)});return}if(l=l.replace("\r",""),s=/^#EXTM3U/.exec(l),s){i.trigger("data",{type:"tag",tagType:"m3u"});return}if(s=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(l),s){o={type:"tag",tagType:"inf"},s[1]&&(o.duration=parseFloat(s[1])),s[2]&&(o.title=s[2]),i.trigger("data",o);return}if(s=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(l),s){o={type:"tag",tagType:"targetduration"},s[1]&&(o.duration=parseInt(s[1],10)),i.trigger("data",o);return}if(s=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(l),s){o={type:"tag",tagType:"version"},s[1]&&(o.version=parseInt(s[1],10)),i.trigger("data",o);return}if(s=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(l),s){o={type:"tag",tagType:"media-sequence"},s[1]&&(o.number=parseInt(s[1],10)),i.trigger("data",o);return}if(s=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(l),s){o={type:"tag",tagType:"discontinuity-sequence"},s[1]&&(o.number=parseInt(s[1],10)),i.trigger("data",o);return}if(s=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(l),s){o={type:"tag",tagType:"playlist-type"},s[1]&&(o.playlistType=s[1]),i.trigger("data",o);return}if(s=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(l),s){o=ot(za(s[1]),{type:"tag",tagType:"byterange"}),i.trigger("data",o);return}if(s=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(l),s){o={type:"tag",tagType:"allow-cache"},s[1]&&(o.allowed=!/NO/.test(s[1])),i.trigger("data",o);return}if(s=/^#EXT-X-MAP:?(.*)$/.exec(l),s){if(o={type:"tag",tagType:"map"},s[1]){var g=lt(s[1]);g.URI&&(o.uri=g.URI),g.BYTERANGE&&(o.byterange=za(g.BYTERANGE))}i.trigger("data",o);return}if(s=/^#EXT-X-STREAM-INF:?(.*)$/.exec(l),s){if(o={type:"tag",tagType:"stream-inf"},s[1]){if(o.attributes=lt(s[1]),o.attributes.RESOLUTION){var m=o.attributes.RESOLUTION.split("x"),_={};m[0]&&(_.width=parseInt(m[0],10)),m[1]&&(_.height=parseInt(m[1],10)),o.attributes.RESOLUTION=_}o.attributes.BANDWIDTH&&(o.attributes.BANDWIDTH=parseInt(o.attributes.BANDWIDTH,10)),o.attributes["FRAME-RATE"]&&(o.attributes["FRAME-RATE"]=parseFloat(o.attributes["FRAME-RATE"])),o.attributes["PROGRAM-ID"]&&(o.attributes["PROGRAM-ID"]=parseInt(o.attributes["PROGRAM-ID"],10))}i.trigger("data",o);return}if(s=/^#EXT-X-MEDIA:?(.*)$/.exec(l),s){o={type:"tag",tagType:"media"},s[1]&&(o.attributes=lt(s[1])),i.trigger("data",o);return}if(s=/^#EXT-X-ENDLIST/.exec(l),s){i.trigger("data",{type:"tag",tagType:"endlist"});return}if(s=/^#EXT-X-DISCONTINUITY/.exec(l),s){i.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(s=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(l),s){o={type:"tag",tagType:"program-date-time"},s[1]&&(o.dateTimeString=s[1],o.dateTimeObject=new Date(s[1])),i.trigger("data",o);return}if(s=/^#EXT-X-KEY:?(.*)$/.exec(l),s){o={type:"tag",tagType:"key"},s[1]&&(o.attributes=lt(s[1]),o.attributes.IV&&(o.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(o.attributes.IV=o.attributes.IV.substring(2)),o.attributes.IV=o.attributes.IV.match(/.{8}/g),o.attributes.IV[0]=parseInt(o.attributes.IV[0],16),o.attributes.IV[1]=parseInt(o.attributes.IV[1],16),o.attributes.IV[2]=parseInt(o.attributes.IV[2],16),o.attributes.IV[3]=parseInt(o.attributes.IV[3],16),o.attributes.IV=new Uint32Array(o.attributes.IV))),i.trigger("data",o);return}if(s=/^#EXT-X-START:?(.*)$/.exec(l),s){o={type:"tag",tagType:"start"},s[1]&&(o.attributes=lt(s[1]),o.attributes["TIME-OFFSET"]=parseFloat(o.attributes["TIME-OFFSET"]),o.attributes.PRECISE=/YES/.test(o.attributes.PRECISE)),i.trigger("data",o);return}if(s=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(l),s){o={type:"tag",tagType:"cue-out-cont"},s[1]?o.data=s[1]:o.data="",i.trigger("data",o);return}if(s=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(l),s){o={type:"tag",tagType:"cue-out"},s[1]?o.data=s[1]:o.data="",i.trigger("data",o);return}if(s=/^#EXT-X-CUE-IN:?(.*)?$/.exec(l),s){o={type:"tag",tagType:"cue-in"},s[1]?o.data=s[1]:o.data="",i.trigger("data",o);return}if(s=/^#EXT-X-SKIP:(.*)$/.exec(l),s&&s[1]){o={type:"tag",tagType:"skip"},o.attributes=lt(s[1]),o.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(o.attributes["SKIPPED-SEGMENTS"]=parseInt(o.attributes["SKIPPED-SEGMENTS"],10)),o.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(o.attributes["RECENTLY-REMOVED-DATERANGES"]=o.attributes["RECENTLY-REMOVED-DATERANGES"].split(zm)),i.trigger("data",o);return}if(s=/^#EXT-X-PART:(.*)$/.exec(l),s&&s[1]){o={type:"tag",tagType:"part"},o.attributes=lt(s[1]),["DURATION"].forEach(function(b){o.attributes.hasOwnProperty(b)&&(o.attributes[b]=parseFloat(o.attributes[b]))}),["INDEPENDENT","GAP"].forEach(function(b){o.attributes.hasOwnProperty(b)&&(o.attributes[b]=/YES/.test(o.attributes[b]))}),o.attributes.hasOwnProperty("BYTERANGE")&&(o.attributes.byterange=za(o.attributes.BYTERANGE)),i.trigger("data",o);return}if(s=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(l),s&&s[1]){o={type:"tag",tagType:"server-control"},o.attributes=lt(s[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(b){o.attributes.hasOwnProperty(b)&&(o.attributes[b]=parseFloat(o.attributes[b]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(b){o.attributes.hasOwnProperty(b)&&(o.attributes[b]=/YES/.test(o.attributes[b]))}),i.trigger("data",o);return}if(s=/^#EXT-X-PART-INF:(.*)$/.exec(l),s&&s[1]){o={type:"tag",tagType:"part-inf"},o.attributes=lt(s[1]),["PART-TARGET"].forEach(function(b){o.attributes.hasOwnProperty(b)&&(o.attributes[b]=parseFloat(o.attributes[b]))}),i.trigger("data",o);return}if(s=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(l),s&&s[1]){o={type:"tag",tagType:"preload-hint"},o.attributes=lt(s[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(b){if(o.attributes.hasOwnProperty(b)){o.attributes[b]=parseInt(o.attributes[b],10);var S=b==="BYTERANGE-LENGTH"?"length":"offset";o.attributes.byterange=o.attributes.byterange||{},o.attributes.byterange[S]=o.attributes[b],delete o.attributes[b]}}),i.trigger("data",o);return}if(s=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(l),s&&s[1]){o={type:"tag",tagType:"rendition-report"},o.attributes=lt(s[1]),["LAST-MSN","LAST-PART"].forEach(function(b){o.attributes.hasOwnProperty(b)&&(o.attributes[b]=parseInt(o.attributes[b],10))}),i.trigger("data",o);return}i.trigger("data",{type:"tag",data:l.slice(4)})})}},r.addParser=function(e){var i=this,s=e.expression,o=e.customType,u=e.dataParser,l=e.segment;typeof u!="function"&&(u=function(g){return g}),this.customParsers.push(function(c){var g=s.exec(c);if(g)return i.trigger("data",{type:"custom",data:u(c),customType:o,segment:l}),!0})},r.addTagMapper=function(e){var i=e.expression,s=e.map,o=function(l){return i.test(l)?s(l):l};this.tagMappers.push(o)},t}(zs),Xm=function(t){return t.toLowerCase().replace(/-(\w)/g,function(r){return r[1].toUpperCase()})},xr=function(t){var r={};return Object.keys(t).forEach(function(n){r[Xm(n)]=t[n]}),r},$a=function(t){var r=t.serverControl,n=t.targetDuration,e=t.partTargetDuration;if(!!r){var i="#EXT-X-SERVER-CONTROL",s="holdBack",o="partHoldBack",u=n&&n*3,l=e&&e*2;n&&!r.hasOwnProperty(s)&&(r[s]=u,this.trigger("info",{message:i+" defaulting HOLD-BACK to targetDuration * 3 ("+u+")."})),u&&r[s]<u&&(this.trigger("warn",{message:i+" clamping HOLD-BACK ("+r[s]+") to targetDuration * 3 ("+u+")"}),r[s]=u),e&&!r.hasOwnProperty(o)&&(r[o]=e*3,this.trigger("info",{message:i+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+r[o]+")."})),e&&r[o]<l&&(this.trigger("warn",{message:i+" clamping PART-HOLD-BACK ("+r[o]+") to partTargetDuration * 2 ("+l+")."}),r[o]=l)}},Ym=function(a){W(t,a);function t(){var n;n=a.call(this)||this,n.lineStream=new Wm,n.parseStream=new Km,n.lineStream.pipe(n.parseStream);var e=ee(n),i=[],s={},o,u,l=!1,c=function(){},g={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},m="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",_=0;n.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var b=0,S=0;return n.on("end",function(){s.uri||!s.parts&&!s.preloadHints||(!s.map&&o&&(s.map=o),!s.key&&u&&(s.key=u),!s.timeline&&typeof _=="number"&&(s.timeline=_),n.manifest.preloadSegment=s)}),n.parseStream.on("data",function(x){var w,O;({tag:function(){({version:function(){x.version&&(this.manifest.version=x.version)},"allow-cache":function(){this.manifest.allowCache=x.allowed,"allowed"in x||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var F={};"length"in x&&(s.byterange=F,F.length=x.length,"offset"in x||(x.offset=b)),"offset"in x&&(s.byterange=F,F.offset=x.offset),b=F.offset+F.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),x.duration>0&&(s.duration=x.duration),x.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key:function(){if(!x.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(x.attributes.METHOD==="NONE"){u=null;return}if(!x.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(x.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:x.attributes};return}if(x.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:x.attributes.URI};return}if(x.attributes.KEYFORMAT===m){var F=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];if(F.indexOf(x.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(x.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),x.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(x.attributes.KEYID&&x.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:x.attributes.KEYFORMAT,keyId:x.attributes.KEYID.substring(2)},pssh:vd(x.attributes.URI.split(",")[1])};return}x.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),u={method:x.attributes.METHOD||"AES-128",uri:x.attributes.URI},typeof x.attributes.IV<"u"&&(u.iv=x.attributes.IV)},"media-sequence":function(){if(!isFinite(x.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+x.number});return}this.manifest.mediaSequence=x.number},"discontinuity-sequence":function(){if(!isFinite(x.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+x.number});return}this.manifest.discontinuitySequence=x.number,_=x.number},"playlist-type":function(){if(!/VOD|EVENT/.test(x.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+x.playlist});return}this.manifest.playlistType=x.playlistType},map:function(){o={},x.uri&&(o.uri=x.uri),x.byterange&&(o.byterange=x.byterange),u&&(o.key=u)},"stream-inf":function(){if(this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||g,!x.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),ot(s.attributes,x.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||g,!(x.attributes&&x.attributes.TYPE&&x.attributes["GROUP-ID"]&&x.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var F=this.manifest.mediaGroups[x.attributes.TYPE];F[x.attributes["GROUP-ID"]]=F[x.attributes["GROUP-ID"]]||{},w=F[x.attributes["GROUP-ID"]],O={default:/yes/i.test(x.attributes.DEFAULT)},O.default?O.autoselect=!0:O.autoselect=/yes/i.test(x.attributes.AUTOSELECT),x.attributes.LANGUAGE&&(O.language=x.attributes.LANGUAGE),x.attributes.URI&&(O.uri=x.attributes.URI),x.attributes["INSTREAM-ID"]&&(O.instreamId=x.attributes["INSTREAM-ID"]),x.attributes.CHARACTERISTICS&&(O.characteristics=x.attributes.CHARACTERISTICS),x.attributes.FORCED&&(O.forced=/yes/i.test(x.attributes.FORCED)),w[x.attributes.NAME]=O},discontinuity:function(){_+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=x.dateTimeString,this.manifest.dateTimeObject=x.dateTimeObject),s.dateTimeString=x.dateTimeString,s.dateTimeObject=x.dateTimeObject},targetduration:function(){if(!isFinite(x.duration)||x.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+x.duration});return}this.manifest.targetDuration=x.duration,$a.call(this,this.manifest)},start:function(){if(!x.attributes||isNaN(x.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:x.attributes["TIME-OFFSET"],precise:x.attributes.PRECISE}},"cue-out":function(){s.cueOut=x.data},"cue-out-cont":function(){s.cueOutCont=x.data},"cue-in":function(){s.cueIn=x.data},skip:function(){this.manifest.skip=xr(x.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",x.attributes,["SKIPPED-SEGMENTS"])},part:function(){var F=this;l=!0;var q=this.manifest.segments.length,B=xr(x.attributes);s.parts=s.parts||[],s.parts.push(B),B.byterange&&(B.byterange.hasOwnProperty("offset")||(B.byterange.offset=S),S=B.byterange.offset+B.byterange.length);var R=s.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+R+" for segment #"+q,x.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(U,N){U.hasOwnProperty("lastPart")||F.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+N+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var F=this.manifest.serverControl=xr(x.attributes);F.hasOwnProperty("canBlockReload")||(F.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),$a.call(this,this.manifest),F.canSkipDateranges&&!F.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var F=this.manifest.segments.length,q=xr(x.attributes),B=q.type&&q.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(q),q.byterange&&(q.byterange.hasOwnProperty("offset")||(q.byterange.offset=B?S:0,B&&(S=q.byterange.offset+q.byterange.length)));var R=s.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+R+" for segment #"+F,x.attributes,["TYPE","URI"]),!!q.type)for(var U=0;U<s.preloadHints.length-1;U++){var N=s.preloadHints[U];!N.type||N.type===q.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+R+" for segment #"+F+" has the same TYPE "+q.type+" as preload hint #"+U})}},"rendition-report":function(){var F=xr(x.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(F);var q=this.manifest.renditionReports.length-1,B=["LAST-MSN","URI"];l&&B.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+q,x.attributes,B)},"part-inf":function(){this.manifest.partInf=xr(x.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",x.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),$a.call(this,this.manifest)}}[x.tagType]||c).call(e)},uri:function(){s.uri=x.uri,i.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),u&&(s.key=u),s.timeline=_,o&&(s.map=o),S=0,s={}},comment:function(){},custom:function(){x.segment?(s.custom=s.custom||{},s.custom[x.customType]=x.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[x.customType]=x.data)}})[x.type].call(e)}),n}var r=t.prototype;return r.warnOnMissingAttributes_=function(e,i,s){var o=[];s.forEach(function(u){i.hasOwnProperty(u)||o.push(u)}),o.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+o.join(", ")})},r.push=function(e){this.lineStream.push(e)},r.end=function(){this.lineStream.push(`
`),this.trigger("end")},r.addParser=function(e){this.parseStream.addParser(e)},r.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(zs),lr={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},Qm=["video","audio","text"],Gu=["Video","Audio","Text"],yd=function(t){return t&&t.replace(/avc1\.(\d+)\.(\d+)/i,function(r,n,e){var i=("00"+Number(n).toString(16)).slice(-2),s=("00"+Number(e).toString(16)).slice(-2);return"avc1."+i+"00"+s})},vt=function(t){t===void 0&&(t="");var r=t.split(","),n=[];return r.forEach(function(e){e=e.trim();var i;Qm.forEach(function(s){var o=lr[s].exec(e.toLowerCase());if(!(!o||o.length<=1)){i=s;var u=e.substring(0,o[1].length),l=e.replace(u,"");n.push({type:u,details:l,mediaType:s})}}),i||n.push({type:e,details:"",mediaType:"unknown"})}),n},Jm=function(t,r){if(!t.mediaGroups.AUDIO||!r)return null;var n=t.mediaGroups.AUDIO[r];if(!n)return null;for(var e in n){var i=n[e];if(i.default&&i.playlists)return vt(i.playlists[0].attributes.CODECS)}return null},_d=function(t){return t===void 0&&(t=""),lr.audio.test(t.trim().toLowerCase())},Zm=function(t){return t===void 0&&(t=""),lr.text.test(t.trim().toLowerCase())},Pi=function(t){if(!(!t||typeof t!="string")){var r=t.toLowerCase().split(",").map(function(i){return yd(i.trim())}),n="video";r.length===1&&_d(r[0])?n="audio":r.length===1&&Zm(r[0])&&(n="application");var e="mp4";return r.every(function(i){return lr.mp4.test(i)})?e="mp4":r.every(function(i){return lr.webm.test(i)})?e="webm":r.every(function(i){return lr.ogg.test(i)})&&(e="ogg"),n+"/"+e+';codecs="'+t+'"'}},In=function(t){return t===void 0&&(t=""),A.MediaSource&&A.MediaSource.isTypeSupported&&A.MediaSource.isTypeSupported(Pi(t))||!1},Ka=function(t){return t===void 0&&(t=""),t.toLowerCase().split(",").every(function(r){r=r.trim();for(var n=0;n<Gu.length;n++){var e=Gu[n];if(lr["muxer"+e].test(r))return!0}return!1})},Wu="mp4a.40.2",eg="avc1.4d400d",tg=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,rg=/^application\/dash\+xml/i,Td=function(t){return tg.test(t)?"hls":rg.test(t)?"dash":t==="application/vnd.videojs.vhs+json"?"vhs-json":null},ig=function(t){return t.toString(2).length},ng=function(t){return Math.ceil(ig(t)/8)},bd=function(t){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer},ag=function(t){return bd(t)},Q=function(t){return t instanceof Uint8Array?t:(!Array.isArray(t)&&!ag(t)&&!(t instanceof ArrayBuffer)&&(typeof t!="number"||typeof t=="number"&&t!==t?t=0:t=[t]),new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0))},Le=A.BigInt||Number,ms=[Le("0x1"),Le("0x100"),Le("0x10000"),Le("0x1000000"),Le("0x100000000"),Le("0x10000000000"),Le("0x1000000000000"),Le("0x100000000000000"),Le("0x10000000000000000")];(function(){var a=new Uint16Array([65484]),t=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);return t[0]===255?"big":t[0]===204?"little":"unknown"})();var sg=function(t,r){var n=r===void 0?{}:r,e=n.signed,i=e===void 0?!1:e,s=n.le,o=s===void 0?!1:s;t=Q(t);var u=o?"reduce":"reduceRight",l=t[u]?t[u]:Array.prototype[u],c=l.call(t,function(m,_,b){var S=o?b:Math.abs(b+1-t.length);return m+Le(_)*ms[S]},Le(0));if(i){var g=ms[t.length]/Le(2)-Le(1);c=Le(c),c>g&&(c-=g,c-=g,c-=Le(2))}return Number(c)},og=function(t,r){var n=r===void 0?{}:r,e=n.le,i=e===void 0?!1:e;(typeof t!="bigint"&&typeof t!="number"||typeof t=="number"&&t!==t)&&(t=0),t=Le(t);for(var s=ng(t),o=new Uint8Array(new ArrayBuffer(s)),u=0;u<s;u++){var l=i?u:Math.abs(u+1-o.length);o[l]=Number(t/ms[u]&Le(255)),t<0&&(o[l]=Math.abs(~o[l]),o[l]-=u===0?1:2)}return o},xd=function(t,r){if(typeof t!="string"&&t&&typeof t.toString=="function"&&(t=t.toString()),typeof t!="string")return new Uint8Array;r||(t=unescape(encodeURIComponent(t)));for(var n=new Uint8Array(t.length),e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n},ug=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r=r.filter(function(o){return o&&(o.byteLength||o.length)&&typeof o!="string"}),r.length<=1)return Q(r[0]);var e=r.reduce(function(o,u,l){return o+(u.byteLength||u.length)},0),i=new Uint8Array(e),s=0;return r.forEach(function(o){o=Q(o),i.set(o,s),s+=o.byteLength}),i},_e=function(t,r,n){var e=n===void 0?{}:n,i=e.offset,s=i===void 0?0:i,o=e.mask,u=o===void 0?[]:o;t=Q(t),r=Q(r);var l=r.every?r.every:Array.prototype.every;return r.length&&t.length-s>=r.length&&l.call(r,function(c,g){var m=u[g]?u[g]&t[s+g]:t[s+g];return c===m})},lg=function(t,r,n){r.forEach(function(e){for(var i in t.mediaGroups[e])for(var s in t.mediaGroups[e][i]){var o=t.mediaGroups[e][i][s];n(o,e,i,s)}})},Qt={},Ht={};function dg(a,t,r){if(r===void 0&&(r=Array.prototype),a&&typeof r.find=="function")return r.find.call(a,t);for(var n=0;n<a.length;n++)if(Object.prototype.hasOwnProperty.call(a,n)){var e=a[n];if(t.call(void 0,e,n,a))return e}}function $s(a,t){return t===void 0&&(t=Object),t&&typeof t.freeze=="function"?t.freeze(a):a}function cg(a,t){if(a===null||typeof a!="object")throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r]);return a}var Sd=$s({HTML:"text/html",isHTML:function(a){return a===Sd.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Ed=$s({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(a){return a===Ed.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Ht.assign=cg;Ht.find=dg;Ht.freeze=$s;Ht.MIME_TYPE=Sd;Ht.NAMESPACE=Ed;var Cd=Ht,St=Cd.find,Ii=Cd.NAMESPACE;function fg(a){return a!==""}function hg(a){return a?a.split(/[\t\n\f\r ]+/).filter(fg):[]}function pg(a,t){return a.hasOwnProperty(t)||(a[t]=!0),a}function zu(a){if(!a)return[];var t=hg(a);return Object.keys(t.reduce(pg,{}))}function mg(a){return function(t){return a&&a.indexOf(t)!==-1}}function Vi(a,t){for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}function Qe(a,t){var r=a.prototype;if(!(r instanceof t)){let n=function(){};n.prototype=t.prototype,n=new n,Vi(r,n),a.prototype=r=n}r.constructor!=a&&(typeof a!="function"&&console.error("unknown Class:"+a),r.constructor=a)}var Je={},ct=Je.ELEMENT_NODE=1,Br=Je.ATTRIBUTE_NODE=2,Bn=Je.TEXT_NODE=3,Ad=Je.CDATA_SECTION_NODE=4,Dd=Je.ENTITY_REFERENCE_NODE=5,gg=Je.ENTITY_NODE=6,wd=Je.PROCESSING_INSTRUCTION_NODE=7,kd=Je.COMMENT_NODE=8,Pd=Je.DOCUMENT_NODE=9,Id=Je.DOCUMENT_TYPE_NODE=10,Nt=Je.DOCUMENT_FRAGMENT_NODE=11,vg=Je.NOTATION_NODE=12,Be={},Pe={};Be.INDEX_SIZE_ERR=(Pe[1]="Index size error",1);Be.DOMSTRING_SIZE_ERR=(Pe[2]="DOMString size error",2);var Xe=Be.HIERARCHY_REQUEST_ERR=(Pe[3]="Hierarchy request error",3);Be.WRONG_DOCUMENT_ERR=(Pe[4]="Wrong document",4);Be.INVALID_CHARACTER_ERR=(Pe[5]="Invalid character",5);Be.NO_DATA_ALLOWED_ERR=(Pe[6]="No data allowed",6);Be.NO_MODIFICATION_ALLOWED_ERR=(Pe[7]="No modification allowed",7);var Od=Be.NOT_FOUND_ERR=(Pe[8]="Not found",8);Be.NOT_SUPPORTED_ERR=(Pe[9]="Not supported",9);var $u=Be.INUSE_ATTRIBUTE_ERR=(Pe[10]="Attribute in use",10);Be.INVALID_STATE_ERR=(Pe[11]="Invalid state",11);Be.SYNTAX_ERR=(Pe[12]="Syntax error",12);Be.INVALID_MODIFICATION_ERR=(Pe[13]="Invalid modification",13);Be.NAMESPACE_ERR=(Pe[14]="Invalid namespace",14);Be.INVALID_ACCESS_ERR=(Pe[15]="Invalid access",15);function Ce(a,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,Pe[a]),this.message=Pe[a],Error.captureStackTrace&&Error.captureStackTrace(this,Ce);return r.code=a,t&&(this.message=this.message+": "+t),r}Ce.prototype=Error.prototype;Vi(Be,Ce);function Lt(){}Lt.prototype={length:0,item:function(a){return this[a]||null},toString:function(a,t){for(var r=[],n=0;n<this.length;n++)Pr(this[n],r,a,t);return r.join("")},filter:function(a){return Array.prototype.filter.call(this,a)},indexOf:function(a){return Array.prototype.indexOf.call(this,a)}};function Ur(a,t){this._node=a,this._refresh=t,Ks(this)}function Ks(a){var t=a._node._inc||a._node.ownerDocument._inc;if(a._inc!=t){var r=a._refresh(a._node);Gd(a,"length",r.length),Vi(r,a),a._inc=t}}Ur.prototype.item=function(a){return Ks(this),this[a]};Qe(Ur,Lt);function Un(){}function Ld(a,t){for(var r=a.length;r--;)if(a[r]===t)return r}function Ku(a,t,r,n){if(n?t[Ld(t,n)]=r:t[t.length++]=r,a){r.ownerElement=a;var e=a.ownerDocument;e&&(n&&Md(e,a,n),yg(e,a,r))}}function Xu(a,t,r){var n=Ld(t,r);if(n>=0){for(var e=t.length-1;n<e;)t[n]=t[++n];if(t.length=e,a){var i=a.ownerDocument;i&&(Md(i,a,r),r.ownerElement=null)}}else throw new Ce(Od,new Error(a.tagName+"@"+r))}Un.prototype={length:0,item:Lt.prototype.item,getNamedItem:function(a){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==a)return r}},setNamedItem:function(a){var t=a.ownerElement;if(t&&t!=this._ownerElement)throw new Ce($u);var r=this.getNamedItem(a.nodeName);return Ku(this._ownerElement,this,a,r),r},setNamedItemNS:function(a){var t=a.ownerElement,r;if(t&&t!=this._ownerElement)throw new Ce($u);return r=this.getNamedItemNS(a.namespaceURI,a.localName),Ku(this._ownerElement,this,a,r),r},removeNamedItem:function(a){var t=this.getNamedItem(a);return Xu(this._ownerElement,this,t),t},removeNamedItemNS:function(a,t){var r=this.getNamedItemNS(a,t);return Xu(this._ownerElement,this,r),r},getNamedItemNS:function(a,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==a)return n}return null}};function Fd(){}Fd.prototype={hasFeature:function(a,t){return!0},createDocument:function(a,t,r){var n=new Hi;if(n.implementation=this,n.childNodes=new Lt,n.doctype=r||null,r&&n.appendChild(r),t){var e=n.createElementNS(a,t);n.appendChild(e)}return n},createDocumentType:function(a,t,r){var n=new da;return n.name=a,n.nodeName=a,n.publicId=t||"",n.systemId=r||"",n}};function ce(){}ce.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(a,t){return Vn(this,a,t)},replaceChild:function(a,t){Vn(this,a,t,Bd),t&&this.removeChild(t)},removeChild:function(a){return Nd(this,a)},appendChild:function(a){return this.insertBefore(a,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(a){return gs(this.ownerDocument||this,this,a)},normalize:function(){for(var a=this.firstChild;a;){var t=a.nextSibling;t&&t.nodeType==Bn&&a.nodeType==Bn?(this.removeChild(t),a.appendData(t.data)):(a.normalize(),a=t)}},isSupported:function(a,t){return this.ownerDocument.implementation.hasFeature(a,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(a){for(var t=this;t;){var r=t._nsMap;if(r){for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===a)return n}t=t.nodeType==Br?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(a){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,a))return r[a];t=t.nodeType==Br?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(a){var t=this.lookupPrefix(a);return t==null}};function Rd(a){return a=="<"&&"&lt;"||a==">"&&"&gt;"||a=="&"&&"&amp;"||a=='"'&&"&quot;"||"&#"+a.charCodeAt()+";"}Vi(Je,ce);Vi(Je,ce.prototype);function Oi(a,t){if(t(a))return!0;if(a=a.firstChild)do if(Oi(a,t))return!0;while(a=a.nextSibling)}function Hi(){this.ownerDocument=this}function yg(a,t,r){a&&a._inc++;var n=r.namespaceURI;n===Ii.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}function Md(a,t,r,n){a&&a._inc++;var e=r.namespaceURI;e===Ii.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function Xs(a,t,r){if(a&&a._inc){a._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var e=t.firstChild,i=0;e;)n[i++]=e,e=e.nextSibling;n.length=i,delete n[n.length]}}}function Nd(a,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:a.firstChild=n,n?n.previousSibling=r:a.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,Xs(a.ownerDocument,a),t}function _g(a){return a&&(a.nodeType===ce.DOCUMENT_NODE||a.nodeType===ce.DOCUMENT_FRAGMENT_NODE||a.nodeType===ce.ELEMENT_NODE)}function Tg(a){return a&&(Et(a)||Ys(a)||Bt(a)||a.nodeType===ce.DOCUMENT_FRAGMENT_NODE||a.nodeType===ce.COMMENT_NODE||a.nodeType===ce.PROCESSING_INSTRUCTION_NODE)}function Bt(a){return a&&a.nodeType===ce.DOCUMENT_TYPE_NODE}function Et(a){return a&&a.nodeType===ce.ELEMENT_NODE}function Ys(a){return a&&a.nodeType===ce.TEXT_NODE}function Yu(a,t){var r=a.childNodes||[];if(St(r,Et)||Bt(t))return!1;var n=St(r,Bt);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Qu(a,t){var r=a.childNodes||[];function n(i){return Et(i)&&i!==t}if(St(r,n))return!1;var e=St(r,Bt);return!(t&&e&&r.indexOf(e)>r.indexOf(t))}function bg(a,t,r){if(!_g(a))throw new Ce(Xe,"Unexpected parent node type "+a.nodeType);if(r&&r.parentNode!==a)throw new Ce(Od,"child not in parent");if(!Tg(t)||Bt(t)&&a.nodeType!==ce.DOCUMENT_NODE)throw new Ce(Xe,"Unexpected node type "+t.nodeType+" for parent node type "+a.nodeType)}function xg(a,t,r){var n=a.childNodes||[],e=t.childNodes||[];if(t.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var i=e.filter(Et);if(i.length>1||St(e,Ys))throw new Ce(Xe,"More than one element or text in fragment");if(i.length===1&&!Yu(a,r))throw new Ce(Xe,"Element in fragment can not be inserted before doctype")}if(Et(t)&&!Yu(a,r))throw new Ce(Xe,"Only one element can be added and only after doctype");if(Bt(t)){if(St(n,Bt))throw new Ce(Xe,"Only one doctype is allowed");var s=St(n,Et);if(r&&n.indexOf(s)<n.indexOf(r))throw new Ce(Xe,"Doctype can only be inserted before an element");if(!r&&s)throw new Ce(Xe,"Doctype can not be appended since element is present")}}function Bd(a,t,r){var n=a.childNodes||[],e=t.childNodes||[];if(t.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var i=e.filter(Et);if(i.length>1||St(e,Ys))throw new Ce(Xe,"More than one element or text in fragment");if(i.length===1&&!Qu(a,r))throw new Ce(Xe,"Element in fragment can not be inserted before doctype")}if(Et(t)&&!Qu(a,r))throw new Ce(Xe,"Only one element can be added and only after doctype");if(Bt(t)){if(St(n,function(u){return Bt(u)&&u!==r}))throw new Ce(Xe,"Only one doctype is allowed");var s=St(n,Et);if(r&&n.indexOf(s)<n.indexOf(r))throw new Ce(Xe,"Doctype can only be inserted before an element")}}function Vn(a,t,r,n){bg(a,t,r),a.nodeType===ce.DOCUMENT_NODE&&(n||xg)(a,t,r);var e=t.parentNode;if(e&&e.removeChild(t),t.nodeType===Nt){var i=t.firstChild;if(i==null)return t;var s=t.lastChild}else i=s=t;var o=r?r.previousSibling:a.lastChild;i.previousSibling=o,s.nextSibling=r,o?o.nextSibling=i:a.firstChild=i,r==null?a.lastChild=s:r.previousSibling=s;do i.parentNode=a;while(i!==s&&(i=i.nextSibling));return Xs(a.ownerDocument||a,a),t.nodeType==Nt&&(t.firstChild=t.lastChild=null),t}function Sg(a,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=a,t.previousSibling=a.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:a.firstChild=t,a.lastChild=t,Xs(a.ownerDocument,a,t),t}Hi.prototype={nodeName:"#document",nodeType:Pd,doctype:null,documentElement:null,_inc:1,insertBefore:function(a,t){if(a.nodeType==Nt){for(var r=a.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return a}return Vn(this,a,t),a.ownerDocument=this,this.documentElement===null&&a.nodeType===ct&&(this.documentElement=a),a},removeChild:function(a){return this.documentElement==a&&(this.documentElement=null),Nd(this,a)},replaceChild:function(a,t){Vn(this,a,t,Bd),a.ownerDocument=this,t&&this.removeChild(t),Et(a)&&(this.documentElement=a)},importNode:function(a,t){return jd(this,a,t)},getElementById:function(a){var t=null;return Oi(this.documentElement,function(r){if(r.nodeType==ct&&r.getAttribute("id")==a)return t=r,!0}),t},getElementsByClassName:function(a){var t=zu(a);return new Ur(this,function(r){var n=[];return t.length>0&&Oi(r.documentElement,function(e){if(e!==r&&e.nodeType===ct){var i=e.getAttribute("class");if(i){var s=a===i;if(!s){var o=zu(i);s=t.every(mg(o))}s&&n.push(e)}}}),n})},createElement:function(a){var t=new hr;t.ownerDocument=this,t.nodeName=a,t.tagName=a,t.localName=a,t.childNodes=new Lt;var r=t.attributes=new Un;return r._ownerElement=t,t},createDocumentFragment:function(){var a=new ca;return a.ownerDocument=this,a.childNodes=new Lt,a},createTextNode:function(a){var t=new Qs;return t.ownerDocument=this,t.appendData(a),t},createComment:function(a){var t=new Js;return t.ownerDocument=this,t.appendData(a),t},createCDATASection:function(a){var t=new Zs;return t.ownerDocument=this,t.appendData(a),t},createProcessingInstruction:function(a,t){var r=new to;return r.ownerDocument=this,r.tagName=r.target=a,r.nodeValue=r.data=t,r},createAttribute:function(a){var t=new Hn;return t.ownerDocument=this,t.name=a,t.nodeName=a,t.localName=a,t.specified=!0,t},createEntityReference:function(a){var t=new eo;return t.ownerDocument=this,t.nodeName=a,t},createElementNS:function(a,t){var r=new hr,n=t.split(":"),e=r.attributes=new Un;return r.childNodes=new Lt,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=a,n.length==2?(r.prefix=n[0],r.localName=n[1]):r.localName=t,e._ownerElement=r,r},createAttributeNS:function(a,t){var r=new Hn,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=a,r.specified=!0,n.length==2?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}};Qe(Hi,ce);function hr(){this._nsMap={}}hr.prototype={nodeType:ct,hasAttribute:function(a){return this.getAttributeNode(a)!=null},getAttribute:function(a){var t=this.getAttributeNode(a);return t&&t.value||""},getAttributeNode:function(a){return this.attributes.getNamedItem(a)},setAttribute:function(a,t){var r=this.ownerDocument.createAttribute(a);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(a){var t=this.getAttributeNode(a);t&&this.removeAttributeNode(t)},appendChild:function(a){return a.nodeType===Nt?this.insertBefore(a,null):Sg(this,a)},setAttributeNode:function(a){return this.attributes.setNamedItem(a)},setAttributeNodeNS:function(a){return this.attributes.setNamedItemNS(a)},removeAttributeNode:function(a){return this.attributes.removeNamedItem(a.nodeName)},removeAttributeNS:function(a,t){var r=this.getAttributeNodeNS(a,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(a,t){return this.getAttributeNodeNS(a,t)!=null},getAttributeNS:function(a,t){var r=this.getAttributeNodeNS(a,t);return r&&r.value||""},setAttributeNS:function(a,t,r){var n=this.ownerDocument.createAttributeNS(a,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(a,t){return this.attributes.getNamedItemNS(a,t)},getElementsByTagName:function(a){return new Ur(this,function(t){var r=[];return Oi(t,function(n){n!==t&&n.nodeType==ct&&(a==="*"||n.tagName==a)&&r.push(n)}),r})},getElementsByTagNameNS:function(a,t){return new Ur(this,function(r){var n=[];return Oi(r,function(e){e!==r&&e.nodeType===ct&&(a==="*"||e.namespaceURI===a)&&(t==="*"||e.localName==t)&&n.push(e)}),n})}};Hi.prototype.getElementsByTagName=hr.prototype.getElementsByTagName;Hi.prototype.getElementsByTagNameNS=hr.prototype.getElementsByTagNameNS;Qe(hr,ce);function Hn(){}Hn.prototype.nodeType=Br;Qe(Hn,ce);function qi(){}qi.prototype={data:"",substringData:function(a,t){return this.data.substring(a,a+t)},appendData:function(a){a=this.data+a,this.nodeValue=this.data=a,this.length=a.length},insertData:function(a,t){this.replaceData(a,0,t)},appendChild:function(a){throw new Error(Pe[Xe])},deleteData:function(a,t){this.replaceData(a,t,"")},replaceData:function(a,t,r){var n=this.data.substring(0,a),e=this.data.substring(a+t);r=n+r+e,this.nodeValue=this.data=r,this.length=r.length}};Qe(qi,ce);function Qs(){}Qs.prototype={nodeName:"#text",nodeType:Bn,splitText:function(a){var t=this.data,r=t.substring(a);t=t.substring(0,a),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}};Qe(Qs,qi);function Js(){}Js.prototype={nodeName:"#comment",nodeType:kd};Qe(Js,qi);function Zs(){}Zs.prototype={nodeName:"#cdata-section",nodeType:Ad};Qe(Zs,qi);function da(){}da.prototype.nodeType=Id;Qe(da,ce);function Ud(){}Ud.prototype.nodeType=vg;Qe(Ud,ce);function Vd(){}Vd.prototype.nodeType=gg;Qe(Vd,ce);function eo(){}eo.prototype.nodeType=Dd;Qe(eo,ce);function ca(){}ca.prototype.nodeName="#document-fragment";ca.prototype.nodeType=Nt;Qe(ca,ce);function to(){}to.prototype.nodeType=wd;Qe(to,ce);function Hd(){}Hd.prototype.serializeToString=function(a,t,r){return qd.call(a,t,r)};ce.prototype.toString=qd;function qd(a,t){var r=[],n=this.nodeType==9&&this.documentElement||this,e=n.prefix,i=n.namespaceURI;if(i&&e==null){var e=n.lookupPrefix(i);if(e==null)var s=[{namespace:i,prefix:null}]}return Pr(this,r,a,t,s),r.join("")}function Ju(a,t,r){var n=a.prefix||"",e=a.namespaceURI;if(!e||n==="xml"&&e===Ii.XML||e===Ii.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==e}return!0}function Xa(a,t,r){a.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,Rd),'"')}function Pr(a,t,r,n,e){if(e||(e=[]),n)if(a=n(a),a){if(typeof a=="string"){t.push(a);return}}else return;switch(a.nodeType){case ct:var i=a.attributes,s=i.length,w=a.firstChild,o=a.tagName;r=Ii.isHTML(a.namespaceURI)||r;var u=o;if(!r&&!a.prefix&&a.namespaceURI){for(var l,c=0;c<i.length;c++)if(i.item(c).name==="xmlns"){l=i.item(c).value;break}if(!l)for(var g=e.length-1;g>=0;g--){var m=e[g];if(m.prefix===""&&m.namespace===a.namespaceURI){l=m.namespace;break}}if(l!==a.namespaceURI)for(var g=e.length-1;g>=0;g--){var m=e[g];if(m.namespace===a.namespaceURI){m.prefix&&(u=m.prefix+":"+o);break}}}t.push("<",u);for(var _=0;_<s;_++){var b=i.item(_);b.prefix=="xmlns"?e.push({prefix:b.localName,namespace:b.value}):b.nodeName=="xmlns"&&e.push({prefix:"",namespace:b.value})}for(var _=0;_<s;_++){var b=i.item(_);if(Ju(b,r,e)){var S=b.prefix||"",x=b.namespaceURI;Xa(t,S?"xmlns:"+S:"xmlns",x),e.push({prefix:S,namespace:x})}Pr(b,t,r,n,e)}if(o===u&&Ju(a,r,e)){var S=a.prefix||"",x=a.namespaceURI;Xa(t,S?"xmlns:"+S:"xmlns",x),e.push({prefix:S,namespace:x})}if(w||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(o)){if(t.push(">"),r&&/^script$/i.test(o))for(;w;)w.data?t.push(w.data):Pr(w,t,r,n,e.slice()),w=w.nextSibling;else for(;w;)Pr(w,t,r,n,e.slice()),w=w.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Pd:case Nt:for(var w=a.firstChild;w;)Pr(w,t,r,n,e.slice()),w=w.nextSibling;return;case Br:return Xa(t,a.name,a.value);case Bn:return t.push(a.data.replace(/[<&>]/g,Rd));case Ad:return t.push("<![CDATA[",a.data,"]]>");case kd:return t.push("<!--",a.data,"-->");case Id:var O=a.publicId,H=a.systemId;if(t.push("<!DOCTYPE ",a.name),O)t.push(" PUBLIC ",O),H&&H!="."&&t.push(" ",H),t.push(">");else if(H&&H!=".")t.push(" SYSTEM ",H,">");else{var L=a.internalSubset;L&&t.push(" [",L,"]"),t.push(">")}return;case wd:return t.push("<?",a.target," ",a.data,"?>");case Dd:return t.push("&",a.nodeName,";");default:t.push("??",a.nodeName)}}function jd(a,t,r){var n;switch(t.nodeType){case ct:n=t.cloneNode(!1),n.ownerDocument=a;case Nt:break;case Br:r=!0;break}if(n||(n=t.cloneNode(!1)),n.ownerDocument=a,n.parentNode=null,r)for(var e=t.firstChild;e;)n.appendChild(jd(a,e,r)),e=e.nextSibling;return n}function gs(a,t,r){var n=new t.constructor;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var i=t[e];typeof i!="object"&&i!=n[e]&&(n[e]=i)}switch(t.childNodes&&(n.childNodes=new Lt),n.ownerDocument=a,n.nodeType){case ct:var s=t.attributes,o=n.attributes=new Un,u=s.length;o._ownerElement=n;for(var l=0;l<u;l++)n.setAttributeNode(gs(a,s.item(l),!0));break;case Br:r=!0}if(r)for(var c=t.firstChild;c;)n.appendChild(gs(a,c,r)),c=c.nextSibling;return n}function Gd(a,t,r){a[t]=r}try{if(Object.defineProperty){let a=function(t){switch(t.nodeType){case ct:case Nt:var r=[];for(t=t.firstChild;t;)t.nodeType!==7&&t.nodeType!==8&&r.push(a(t)),t=t.nextSibling;return r.join("");default:return t.nodeValue}};Object.defineProperty(Ur.prototype,"length",{get:function(){return Ks(this),this.$$length}}),Object.defineProperty(ce.prototype,"textContent",{get:function(){return a(this)},set:function(t){switch(this.nodeType){case ct:case Nt:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Gd=function(t,r,n){t["$$"+r]=n}}}catch{}Qt.DocumentType=da;Qt.DOMException=Ce;Qt.DOMImplementation=Fd;Qt.Element=hr;Qt.Node=ce;Qt.NodeList=Lt;Qt.XMLSerializer=Hd;var fa={},Wd={};(function(a){var t=Ht.freeze;a.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),a.HTML_ENTITIES=t({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}),a.entityMap=a.HTML_ENTITIES})(Wd);var ro={},Li=Ht.NAMESPACE,vs=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Zu=new RegExp("[\\-\\.0-9"+vs.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),el=new RegExp("^"+vs.source+Zu.source+"*(?::"+vs.source+Zu.source+"*)?$"),hi=0,$t=1,Sr=2,pi=3,Er=4,Cr=5,mi=6,Tn=7;function Vr(a,t){this.message=a,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Vr)}Vr.prototype=new Error;Vr.prototype.name=Vr.name;function zd(){}zd.prototype={parse:function(a,t,r){var n=this.domBuilder;n.startDocument(),$d(t,t={}),Eg(a,t,r,n,this.errorHandler),n.endDocument()}};function Eg(a,t,r,n,e){function i(re){if(re>65535){re-=65536;var ae=55296+(re>>10),pe=56320+(re&1023);return String.fromCharCode(ae,pe)}else return String.fromCharCode(re)}function s(re){var ae=re.slice(1,-1);return Object.hasOwnProperty.call(r,ae)?r[ae]:ae.charAt(0)==="#"?i(parseInt(ae.substr(1).replace("x","0x"))):(e.error("entity not found:"+re),re)}function o(re){if(re>S){var ae=a.substring(S,re).replace(/&#?\w+;/g,s);m&&u(S),n.characters(ae,0,re-S),S=re}}function u(re,ae){for(;re>=c&&(ae=g.exec(a));)l=ae.index,c=l+ae[0].length,m.lineNumber++;m.columnNumber=re-l+1}for(var l=0,c=0,g=/.*(?:\r\n?|\n)|.*$/g,m=n.locator,_=[{currentNSMap:t}],b={},S=0;;){try{var x=a.indexOf("<",S);if(x<0){if(!a.substr(S).match(/^\s*$/)){var w=n.doc,O=w.createTextNode(a.substr(S));w.appendChild(O),n.currentElement=O}return}switch(x>S&&o(x),a.charAt(x+1)){case"/":var X=a.indexOf(">",x+3),H=a.substring(x+2,X).replace(/[ \t\n\r]+$/g,""),L=_.pop();X<0?(H=a.substring(x+2).replace(/[\s<].*/,""),e.error("end tag name: "+H+" is not complete:"+L.tagName),X=x+1+H.length):H.match(/\s</)&&(H=H.replace(/[\s<].*/,""),e.error("end tag name: "+H+" maybe not complete"),X=x+1+H.length);var F=L.localNSMap,q=L.tagName==H,B=q||L.tagName&&L.tagName.toLowerCase()==H.toLowerCase();if(B){if(n.endElement(L.uri,L.localName,H),F)for(var R in F)Object.prototype.hasOwnProperty.call(F,R)&&n.endPrefixMapping(R);q||e.fatalError("end tag name: "+H+" is not match the current start tagName:"+L.tagName)}else _.push(L);X++;break;case"?":m&&u(x),X=kg(a,x,n);break;case"!":m&&u(x),X=wg(a,x,n,e);break;default:m&&u(x);var U=new Kd,N=_[_.length-1].currentNSMap,X=Cg(a,x,U,N,s,e),$=U.length;if(!U.closed&&Dg(a,X,U.tagName,b)&&(U.closed=!0,r.nbsp||e.warning("unclosed xml attribute")),m&&$){for(var J=tl(m,{}),oe=0;oe<$;oe++){var fe=U[oe];u(fe.offset),fe.locator=tl(m,{})}n.locator=J,rl(U,n,N)&&_.push(U),n.locator=m}else rl(U,n,N)&&_.push(U);Li.isHTML(U.uri)&&!U.closed?X=Ag(a,X,U.tagName,s,n):X++}}catch(re){if(re instanceof Vr)throw re;e.error("element parse error: "+re),X=-1}X>S?S=X:o(Math.max(x,S)+1)}}function tl(a,t){return t.lineNumber=a.lineNumber,t.columnNumber=a.columnNumber,t}function Cg(a,t,r,n,e,i){function s(m,_,b){r.attributeNames.hasOwnProperty(m)&&i.fatalError("Attribute "+m+" redefined"),r.addValue(m,_.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,e),b)}for(var o,u,l=++t,c=hi;;){var g=a.charAt(l);switch(g){case"=":if(c===$t)o=a.slice(t,l),c=pi;else if(c===Sr)c=pi;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(c===pi||c===$t)if(c===$t&&(i.warning('attribute value must after "="'),o=a.slice(t,l)),t=l+1,l=a.indexOf(g,t),l>0)u=a.slice(t,l),s(o,u,t-1),c=Cr;else throw new Error("attribute value no end '"+g+"' match");else if(c==Er)u=a.slice(t,l),s(o,u,t),i.warning('attribute "'+o+'" missed start quot('+g+")!!"),t=l+1,c=Cr;else throw new Error('attribute value must after "="');break;case"/":switch(c){case hi:r.setTagName(a.slice(t,l));case Cr:case mi:case Tn:c=Tn,r.closed=!0;case Er:case $t:break;case Sr:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),c==hi&&r.setTagName(a.slice(t,l)),l;case">":switch(c){case hi:r.setTagName(a.slice(t,l));case Cr:case mi:case Tn:break;case Er:case $t:u=a.slice(t,l),u.slice(-1)==="/"&&(r.closed=!0,u=u.slice(0,-1));case Sr:c===Sr&&(u=o),c==Er?(i.warning('attribute "'+u+'" missed quot(")!'),s(o,u,t)):((!Li.isHTML(n[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),s(u,u,t));break;case pi:throw new Error("attribute value missed!!")}return l;case"\x80":g=" ";default:if(g<=" ")switch(c){case hi:r.setTagName(a.slice(t,l)),c=mi;break;case $t:o=a.slice(t,l),c=Sr;break;case Er:var u=a.slice(t,l);i.warning('attribute "'+u+'" missed quot(")!!'),s(o,u,t);case Cr:c=mi;break}else switch(c){case Sr:r.tagName,(!Li.isHTML(n[""])||!o.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!'),s(o,o,t),t=l,c=$t;break;case Cr:i.warning('attribute space is required"'+o+'"!!');case mi:c=$t,t=l;break;case pi:c=Er,t=l;break;case Tn:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function rl(a,t,r){for(var n=a.tagName,e=null,g=a.length;g--;){var i=a[g],s=i.qName,o=i.value,m=s.indexOf(":");if(m>0)var u=i.prefix=s.slice(0,m),l=s.slice(m+1),c=u==="xmlns"&&l;else l=s,u=null,c=s==="xmlns"&&"";i.localName=l,c!==!1&&(e==null&&(e={},$d(r,r={})),r[c]=e[c]=o,i.uri=Li.XMLNS,t.startPrefixMapping(c,o))}for(var g=a.length;g--;){i=a[g];var u=i.prefix;u&&(u==="xml"&&(i.uri=Li.XML),u!=="xmlns"&&(i.uri=r[u||""]))}var m=n.indexOf(":");m>0?(u=a.prefix=n.slice(0,m),l=a.localName=n.slice(m+1)):(u=null,l=a.localName=n);var _=a.uri=r[u||""];if(t.startElement(_,l,n,a),a.closed){if(t.endElement(_,l,n),e)for(u in e)Object.prototype.hasOwnProperty.call(e,u)&&t.endPrefixMapping(u)}else return a.currentNSMap=r,a.localNSMap=e,!0}function Ag(a,t,r,n,e){if(/^(?:script|textarea)$/i.test(r)){var i=a.indexOf("</"+r+">",t),s=a.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(e.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),e.characters(s,0,s.length),i)}return t+1}function Dg(a,t,r,n){var e=n[r];return e==null&&(e=a.lastIndexOf("</"+r+">"),e<t&&(e=a.lastIndexOf("</"+r)),n[r]=e),e<t}function $d(a,t){for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}function wg(a,t,r,n){var e=a.charAt(t+2);switch(e){case"-":if(a.charAt(t+3)==="-"){var i=a.indexOf("-->",t+4);return i>t?(r.comment(a,t+4,i-t-4),i+3):(n.error("Unclosed comment"),-1)}else return-1;default:if(a.substr(t+3,6)=="CDATA["){var i=a.indexOf("]]>",t+9);return r.startCDATA(),r.characters(a,t+9,i-t-9),r.endCDATA(),i+3}var s=Pg(a,t),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var u=s[1][0],l=!1,c=!1;o>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],c=o>4&&s[4][0]):/^system$/i.test(s[2][0])&&(c=s[3][0]));var g=s[o-1];return r.startDTD(u,l,c),r.endDTD(),g.index+g[0].length}}return-1}function kg(a,t,r){var n=a.indexOf("?>",t);if(n){var e=a.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return e?(e[0].length,r.processingInstruction(e[1],e[2]),n+2):-1}return-1}function Kd(){this.attributeNames={}}Kd.prototype={setTagName:function(a){if(!el.test(a))throw new Error("invalid tagName:"+a);this.tagName=a},addValue:function(a,t,r){if(!el.test(a))throw new Error("invalid attribute:"+a);this.attributeNames[a]=this.length,this[this.length++]={qName:a,value:t,offset:r}},length:0,getLocalName:function(a){return this[a].localName},getLocator:function(a){return this[a].locator},getQName:function(a){return this[a].qName},getURI:function(a){return this[a].uri},getValue:function(a){return this[a].value}};function Pg(a,t){var r,n=[],e=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(e.lastIndex=t,e.exec(a);r=e.exec(a);)if(n.push(r),r[1])return n}ro.XMLReader=zd;ro.ParseError=Vr;var Ig=Ht,Og=Qt,il=Wd,Xd=ro,Lg=Og.DOMImplementation,nl=Ig.NAMESPACE,Fg=Xd.ParseError,Rg=Xd.XMLReader;function Yd(a){return a.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
`)}function Qd(a){this.options=a||{locator:{}}}Qd.prototype.parseFromString=function(a,t){var r=this.options,n=new Rg,e=r.domBuilder||new ji,i=r.errorHandler,s=r.locator,o=r.xmlns||{},u=/\/x?html?$/.test(t),l=u?il.HTML_ENTITIES:il.XML_ENTITIES;s&&e.setDocumentLocator(s),n.errorHandler=Mg(i,e,s),n.domBuilder=r.domBuilder||e,u&&(o[""]=nl.HTML),o.xml=o.xml||nl.XML;var c=r.normalizeLineEndings||Yd;return a&&typeof a=="string"?n.parse(c(a),o,l):n.errorHandler.error("invalid doc source"),e.doc};function Mg(a,t,r){if(!a){if(t instanceof ji)return t;a=t}var n={},e=a instanceof Function;r=r||{};function i(s){var o=a[s];!o&&e&&(o=a.length==2?function(u){a(s,u)}:a),n[s]=o&&function(u){o("[xmldom "+s+"] "+u+ys(r))}||function(){}}return i("warning"),i("error"),i("fatalError"),n}function ji(){this.cdata=!1}function Ar(a,t){t.lineNumber=a.lineNumber,t.columnNumber=a.columnNumber}ji.prototype={startDocument:function(){this.doc=new Lg().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(a,t,r,n){var e=this.doc,i=e.createElementNS(a,r||t),s=n.length;bn(this,i),this.currentElement=i,this.locator&&Ar(this.locator,i);for(var o=0;o<s;o++){var a=n.getURI(o),u=n.getValue(o),r=n.getQName(o),l=e.createAttributeNS(a,r);this.locator&&Ar(n.getLocator(o),l),l.value=l.nodeValue=u,i.setAttributeNode(l)}},endElement:function(a,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(a,t){},endPrefixMapping:function(a){},processingInstruction:function(a,t){var r=this.doc.createProcessingInstruction(a,t);this.locator&&Ar(this.locator,r),bn(this,r)},ignorableWhitespace:function(a,t,r){},characters:function(a,t,r){if(a=al.apply(this,arguments),a){if(this.cdata)var n=this.doc.createCDATASection(a);else var n=this.doc.createTextNode(a);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(a)&&this.doc.appendChild(n),this.locator&&Ar(this.locator,n)}},skippedEntity:function(a){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(a){(this.locator=a)&&(a.lineNumber=0)},comment:function(a,t,r){a=al.apply(this,arguments);var n=this.doc.createComment(a);this.locator&&Ar(this.locator,n),bn(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(a,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var e=n.createDocumentType(a,t,r);this.locator&&Ar(this.locator,e),bn(this,e),this.doc.doctype=e}},warning:function(a){console.warn("[xmldom warning] "+a,ys(this.locator))},error:function(a){console.error("[xmldom error] "+a,ys(this.locator))},fatalError:function(a){throw new Fg(a,this.locator)}};function ys(a){if(a)return`
@`+(a.systemId||"")+"#[line:"+a.lineNumber+",col:"+a.columnNumber+"]"}function al(a,t,r){return typeof a=="string"?a.substr(t,r):a.length>=t+r||t?new java.lang.String(a,t,r)+"":a}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(a){ji.prototype[a]=function(){return null}});function bn(a,t){a.currentElement?a.currentElement.appendChild(t):a.doc.appendChild(t)}fa.__DOMHandler=ji;fa.normalizeLineEndings=Yd;fa.DOMParser=Qd;var Ng=fa.DOMParser;/*! @name mpd-parser @version 0.22.1 @license Apache-2.0 */var sl=function(t){return!!t&&typeof t=="object"},Ge=function a(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.reduce(function(e,i){return typeof i!="object"||Object.keys(i).forEach(function(s){Array.isArray(e[s])&&Array.isArray(i[s])?e[s]=e[s].concat(i[s]):sl(e[s])&&sl(i[s])?e[s]=a(e[s],i[s]):e[s]=i[s]}),e},{})},Jd=function(t){return Object.keys(t).map(function(r){return t[r]})},Bg=function(t,r){for(var n=[],e=t;e<r;e++)n.push(e);return n},ha=function(t){return t.reduce(function(r,n){return r.concat(n)},[])},Zd=function(t){if(!t.length)return[];for(var r=[],n=0;n<t.length;n++)r.push(t[n]);return r},Ug=function(t,r){return t.reduce(function(n,e,i){return e[r]&&n.push(i),n},[])},_s=function(t,r){for(var n=0;n<t.length;n++)if(r(t[n]))return n;return-1},Vg=function(t,r){return Jd(t.reduce(function(n,e){return e.forEach(function(i){n[r(i)]=i}),n},{}))},Hr={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},Fi=function(t){var r=t.baseUrl,n=r===void 0?"":r,e=t.source,i=e===void 0?"":e,s=t.range,o=s===void 0?"":s,u=t.indexRange,l=u===void 0?"":u,c={uri:i,resolvedUri:la(n||"",i)};if(o||l){var g=o||l,m=g.split("-"),_=A.BigInt?A.BigInt(m[0]):parseInt(m[0],10),b=A.BigInt?A.BigInt(m[1]):parseInt(m[1],10);_<Number.MAX_SAFE_INTEGER&&typeof _=="bigint"&&(_=Number(_)),b<Number.MAX_SAFE_INTEGER&&typeof b=="bigint"&&(b=Number(b));var S;typeof b=="bigint"||typeof _=="bigint"?S=A.BigInt(b)-A.BigInt(_)+A.BigInt(1):S=b-_+1,typeof S=="bigint"&&S<Number.MAX_SAFE_INTEGER&&(S=Number(S)),c.byterange={length:S,offset:_}}return c},Hg=function(t){var r;return typeof t.offset=="bigint"||typeof t.length=="bigint"?r=A.BigInt(t.offset)+A.BigInt(t.length)-A.BigInt(1):r=t.offset+t.length-1,t.offset+"-"+r},ol=function(t){return t&&typeof t!="number"&&(t=parseInt(t,10)),isNaN(t)?null:t},qg={static:function(t){var r=t.duration,n=t.timescale,e=n===void 0?1:n,i=t.sourceDuration,s=t.periodDuration,o=ol(t.endNumber),u=r/e;return typeof o=="number"?{start:0,end:o}:typeof s=="number"?{start:0,end:s/u}:{start:0,end:i/u}},dynamic:function(t){var r=t.NOW,n=t.clientOffset,e=t.availabilityStartTime,i=t.timescale,s=i===void 0?1:i,o=t.duration,u=t.periodStart,l=u===void 0?0:u,c=t.minimumUpdatePeriod,g=c===void 0?0:c,m=t.timeShiftBufferDepth,_=m===void 0?1/0:m,b=ol(t.endNumber),S=(r+n)/1e3,x=e+l,w=S+g,O=w-x,H=Math.ceil(O*s/o),L=Math.floor((S-x-_)*s/o),F=Math.floor((S-x)*s/o);return{start:Math.max(0,L),end:typeof b=="number"?b:Math.min(H,F)}}},jg=function(t){return function(r){var n=t.duration,e=t.timescale,i=e===void 0?1:e,s=t.periodStart,o=t.startNumber,u=o===void 0?1:o;return{number:u+r,duration:n/i,timeline:s,time:r*n}}},io=function(t){var r=t.type,n=t.duration,e=t.timescale,i=e===void 0?1:e,s=t.periodDuration,o=t.sourceDuration,u=qg[r](t),l=u.start,c=u.end,g=Bg(l,c).map(jg(t));if(r==="static"){var m=g.length-1,_=typeof s=="number"?s:o;g[m].duration=_-n/i*m}return g},ec=function(t){var r=t.baseUrl,n=t.initialization,e=n===void 0?{}:n,i=t.sourceDuration,s=t.indexRange,o=s===void 0?"":s,u=t.periodStart,l=t.presentationTime,c=t.number,g=c===void 0?0:c,m=t.duration;if(!r)throw new Error(Hr.NO_BASE_URL);var _=Fi({baseUrl:r,source:e.sourceURL,range:e.range}),b=Fi({baseUrl:r,source:r,indexRange:o});if(b.map=_,m){var S=io(t);S.length&&(b.duration=S[0].duration,b.timeline=S[0].timeline)}else i&&(b.duration=i,b.timeline=u);return b.presentationTime=l||u,b.number=g,[b]},no=function(t,r,n){var e=t.sidx.map?t.sidx.map:null,i=t.sidx.duration,s=t.timeline||0,o=t.sidx.byterange,u=o.offset+o.length,l=r.timescale,c=r.references.filter(function(U){return U.referenceType!==1}),g=[],m=t.endList?"static":"dynamic",_=t.sidx.timeline,b=_,S=t.mediaSequence||0,x;typeof r.firstOffset=="bigint"?x=A.BigInt(u)+r.firstOffset:x=u+r.firstOffset;for(var w=0;w<c.length;w++){var O=r.references[w],H=O.referencedSize,L=O.subsegmentDuration,F=void 0;typeof x=="bigint"?F=x+A.BigInt(H)-A.BigInt(1):F=x+H-1;var q=x+"-"+F,B={baseUrl:n,timescale:l,timeline:s,periodStart:_,presentationTime:b,number:S,duration:L,sourceDuration:i,indexRange:q,type:m},R=ec(B)[0];e&&(R.map=e),g.push(R),typeof x=="bigint"?x+=A.BigInt(H):x+=H,b+=L/l,S++}return t.segments=g,t},Gg=["AUDIO","SUBTITLES"],Wg=1/60,tc=function(t){return Vg(t,function(r){var n=r.timeline;return n}).sort(function(r,n){return r.timeline>n.timeline?1:-1})},zg=function(t,r){for(var n=0;n<t.length;n++)if(t[n].attributes.NAME===r)return t[n];return null},ul=function(t){var r=[];return lg(t,Gg,function(n,e,i,s){r=r.concat(n.playlists||[])}),r},ll=function(t){var r=t.playlist,n=t.mediaSequence;r.mediaSequence=n,r.segments.forEach(function(e,i){e.number=r.mediaSequence+i})},$g=function(t){var r=t.oldPlaylists,n=t.newPlaylists,e=t.timelineStarts;n.forEach(function(i){i.discontinuitySequence=_s(e,function(c){var g=c.timeline;return g===i.timeline});var s=zg(r,i.attributes.NAME);if(!!s&&!i.sidx){var o=i.segments[0],u=_s(s.segments,function(c){return Math.abs(c.presentationTime-o.presentationTime)<Wg});if(u===-1){ll({playlist:i,mediaSequence:s.mediaSequence+s.segments.length}),i.segments[0].discontinuity=!0,i.discontinuityStarts.unshift(0),(!s.segments.length&&i.timeline>s.timeline||s.segments.length&&i.timeline>s.segments[s.segments.length-1].timeline)&&i.discontinuitySequence--;return}var l=s.segments[u];l.discontinuity&&!o.discontinuity&&(o.discontinuity=!0,i.discontinuityStarts.unshift(0),i.discontinuitySequence--),ll({playlist:i,mediaSequence:s.segments[u].number})}})},Kg=function(t){var r=t.oldManifest,n=t.newManifest,e=r.playlists.concat(ul(r)),i=n.playlists.concat(ul(n));return n.timelineStarts=tc([r.timelineStarts,n.timelineStarts]),$g({oldPlaylists:e,newPlaylists:i,timelineStarts:n.timelineStarts}),n},pa=function(t){return t&&t.uri+"-"+Hg(t.byterange)},Ya=function(t){var r=Jd(t.reduce(function(n,e){var i=e.attributes.id+(e.attributes.lang||"");if(!n[i])n[i]=e,n[i].attributes.timelineStarts=[];else{if(e.segments){var s;e.segments[0]&&(e.segments[0].discontinuity=!0),(s=n[i].segments).push.apply(s,e.segments)}e.attributes.contentProtection&&(n[i].attributes.contentProtection=e.attributes.contentProtection)}return n[i].attributes.timelineStarts.push({start:e.attributes.periodStart,timeline:e.attributes.periodStart}),n},{}));return r.map(function(n){return n.discontinuityStarts=Ug(n.segments||[],"discontinuity"),n})},ao=function(t,r){var n=pa(t.sidx),e=n&&r[n]&&r[n].sidx;return e&&no(t,e,t.sidx.resolvedUri),t},Xg=function(t,r){if(r===void 0&&(r={}),!Object.keys(r).length)return t;for(var n in t)t[n]=ao(t[n],r);return t},Yg=function(t,r){var n,e=t.attributes,i=t.segments,s=t.sidx,o=t.mediaSequence,u=t.discontinuitySequence,l=t.discontinuityStarts,c={attributes:(n={NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:u,discontinuityStarts:l,timelineStarts:e.timelineStarts,mediaSequence:o,segments:i};return e.contentProtection&&(c.contentProtection=e.contentProtection),s&&(c.sidx=s),r&&(c.attributes.AUDIO="audio",c.attributes.SUBTITLES="subs"),c},Qg=function(t){var r,n=t.attributes,e=t.segments,i=t.mediaSequence,s=t.discontinuityStarts,o=t.discontinuitySequence;typeof e>"u"&&(e=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var u=(r={NAME:n.id,BANDWIDTH:n.bandwidth},r["PROGRAM-ID"]=1,r);return n.codecs&&(u.CODECS=n.codecs),{attributes:u,uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:s,discontinuitySequence:o,mediaSequence:i,segments:e}},Jg=function(t,r,n){r===void 0&&(r={}),n===void 0&&(n=!1);var e,i=t.reduce(function(o,u){var l=u.attributes.role&&u.attributes.role.value||"",c=u.attributes.lang||"",g=u.attributes.label||"main";if(c&&!u.attributes.label){var m=l?" ("+l+")":"";g=""+u.attributes.lang+m}o[g]||(o[g]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});var _=ao(Yg(u,n),r);return o[g].playlists.push(_),typeof e>"u"&&l==="main"&&(e=u,e.default=!0),o},{});if(!e){var s=Object.keys(i)[0];i[s].default=!0}return i},Zg=function(t,r){return r===void 0&&(r={}),t.reduce(function(n,e){var i=e.attributes.lang||"text";return n[i]||(n[i]={language:i,default:!1,autoselect:!1,playlists:[],uri:""}),n[i].playlists.push(ao(Qg(e),r)),n},{})},ev=function(t){return t.reduce(function(r,n){return n&&n.forEach(function(e){var i=e.channel,s=e.language;r[s]={autoselect:!1,default:!1,instreamId:i,language:s},e.hasOwnProperty("aspectRatio")&&(r[s].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(r[s].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(r[s]["3D"]=e["3D"])}),r},{})},tv=function(t){var r,n=t.attributes,e=t.segments,i=t.sidx,s=t.discontinuityStarts,o={attributes:(r={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:s,timelineStarts:n.timelineStarts,segments:e};return n.frameRate&&(o.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(o.contentProtection=n.contentProtection),i&&(o.sidx=i),o},rv=function(t){var r=t.attributes;return r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video"},iv=function(t){var r=t.attributes;return r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio"},nv=function(t){var r=t.attributes;return r.mimeType==="text/vtt"||r.contentType==="text"},av=function(t,r){t.forEach(function(n){n.mediaSequence=0,n.discontinuitySequence=_s(r,function(e){var i=e.timeline;return i===n.timeline}),n.segments&&n.segments.forEach(function(e,i){e.number=i})})},dl=function(t){return t?Object.keys(t).reduce(function(r,n){var e=t[n];return r.concat(e.playlists)},[]):[]},sv=function(t){var r,n=t.dashPlaylists,e=t.locations,i=t.sidxMapping,s=i===void 0?{}:i,o=t.previousManifest;if(!n.length)return{};var u=n[0].attributes,l=u.sourceDuration,c=u.type,g=u.suggestedPresentationDelay,m=u.minimumUpdatePeriod,_=Ya(n.filter(rv)).map(tv),b=Ya(n.filter(iv)),S=Ya(n.filter(nv)),x=n.map(function(B){return B.attributes.captionServices}).filter(Boolean),w={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(r={AUDIO:{},VIDEO:{}},r["CLOSED-CAPTIONS"]={},r.SUBTITLES={},r),uri:"",duration:l,playlists:Xg(_,s)};m>=0&&(w.minimumUpdatePeriod=m*1e3),e&&(w.locations=e),c==="dynamic"&&(w.suggestedPresentationDelay=g);var O=w.playlists.length===0,H=b.length?Jg(b,s,O):null,L=S.length?Zg(S,s):null,F=_.concat(dl(H),dl(L)),q=F.map(function(B){var R=B.timelineStarts;return R});return w.timelineStarts=tc(q),av(F,w.timelineStarts),H&&(w.mediaGroups.AUDIO.audio=H),L&&(w.mediaGroups.SUBTITLES.subs=L),x.length&&(w.mediaGroups["CLOSED-CAPTIONS"].cc=ev(x)),o?Kg({oldManifest:o,newManifest:w}):w},ov=function(t,r,n){var e=t.NOW,i=t.clientOffset,s=t.availabilityStartTime,o=t.timescale,u=o===void 0?1:o,l=t.periodStart,c=l===void 0?0:l,g=t.minimumUpdatePeriod,m=g===void 0?0:g,_=(e+i)/1e3,b=s+c,S=_+m,x=S-b;return Math.ceil((x*u-r)/n)},rc=function(t,r){for(var n=t.type,e=t.minimumUpdatePeriod,i=e===void 0?0:e,s=t.media,o=s===void 0?"":s,u=t.sourceDuration,l=t.timescale,c=l===void 0?1:l,g=t.startNumber,m=g===void 0?1:g,_=t.periodStart,b=[],S=-1,x=0;x<r.length;x++){var w=r[x],O=w.d,H=w.r||0,L=w.t||0;S<0&&(S=L),L&&L>S&&(S=L);var F=void 0;if(H<0){var q=x+1;q===r.length?n==="dynamic"&&i>0&&o.indexOf("$Number$")>0?F=ov(t,S,O):F=(u*c-S)/O:F=(r[q].t-S)/O}else F=H+1;for(var B=m+b.length+F,R=m+b.length;R<B;)b.push({number:R,duration:O/c,time:S,timeline:_}),S+=O,R++}return b},uv=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,lv=function(t){return function(r,n,e,i){if(r==="$$")return"$";if(typeof t[n]>"u")return r;var s=""+t[n];return n==="RepresentationID"||(e?i=parseInt(i,10):i=1,s.length>=i)?s:""+new Array(i-s.length+1).join("0")+s}},cl=function(t,r){return t.replace(uv,lv(r))},dv=function(t,r){return!t.duration&&!r?[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodStart}]:t.duration?io(t):rc(t,r)},cv=function(t,r){var n={RepresentationID:t.id,Bandwidth:t.bandwidth||0},e=t.initialization,i=e===void 0?{sourceURL:"",range:""}:e,s=Fi({baseUrl:t.baseUrl,source:cl(i.sourceURL,n),range:i.range}),o=dv(t,r);return o.map(function(u){n.Number=u.number,n.Time=u.time;var l=cl(t.media||"",n),c=t.timescale||1,g=t.presentationTimeOffset||0,m=t.periodStart+(u.time-g)/c,_={uri:l,timeline:u.timeline,duration:u.duration,resolvedUri:la(t.baseUrl||"",l),map:s,number:u.number,presentationTime:m};return _})},fv=function(t,r){var n=t.baseUrl,e=t.initialization,i=e===void 0?{}:e,s=Fi({baseUrl:n,source:i.sourceURL,range:i.range}),o=Fi({baseUrl:n,source:r.media,range:r.mediaRange});return o.map=s,o},hv=function(t,r){var n=t.duration,e=t.segmentUrls,i=e===void 0?[]:e,s=t.periodStart;if(!n&&!r||n&&r)throw new Error(Hr.SEGMENT_TIME_UNSPECIFIED);var o=i.map(function(c){return fv(t,c)}),u;n&&(u=io(t)),r&&(u=rc(t,r));var l=u.map(function(c,g){if(o[g]){var m=o[g],_=t.timescale||1,b=t.presentationTimeOffset||0;return m.timeline=c.timeline,m.duration=c.duration,m.number=c.number,m.presentationTime=s+(c.time-b)/_,m}}).filter(function(c){return c});return l},pv=function(t){var r=t.attributes,n=t.segmentInfo,e,i;n.template?(i=cv,e=Ge(r,n.template)):n.base?(i=ec,e=Ge(r,n.base)):n.list&&(i=hv,e=Ge(r,n.list));var s={attributes:r};if(!i)return s;var o=i(e,n.segmentTimeline);if(e.duration){var u=e,l=u.duration,c=u.timescale,g=c===void 0?1:c;e.duration=l/g}else o.length?e.duration=o.reduce(function(m,_){return Math.max(m,Math.ceil(_.duration))},0):e.duration=0;return s.attributes=e,s.segments=o,n.base&&e.indexRange&&(s.sidx=o[0],s.segments=[]),s},mv=function(t){return t.map(pv)},Se=function(t,r){return Zd(t.childNodes).filter(function(n){var e=n.tagName;return e===r})},so=function(t){return t.textContent.trim()},gv=function(t){return parseFloat(t.split("/").reduce(function(r,n){return r/n}))},Dr=function(t){var r=31536e3,n=30*24*60*60,e=24*60*60,i=60*60,s=60,o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,u=o.exec(t);if(!u)return 0;var l=u.slice(1),c=l[0],g=l[1],m=l[2],_=l[3],b=l[4],S=l[5];return parseFloat(c||0)*r+parseFloat(g||0)*n+parseFloat(m||0)*e+parseFloat(_||0)*i+parseFloat(b||0)*s+parseFloat(S||0)},vv=function(t){var r=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return r.test(t)&&(t+="Z"),Date.parse(t)},fl={mediaPresentationDuration:function(t){return Dr(t)},availabilityStartTime:function(t){return vv(t)/1e3},minimumUpdatePeriod:function(t){return Dr(t)},suggestedPresentationDelay:function(t){return Dr(t)},type:function(t){return t},timeShiftBufferDepth:function(t){return Dr(t)},start:function(t){return Dr(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},frameRate:function(t){return gv(t)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},presentationTimeOffset:function(t){return parseInt(t,10)},duration:function(t){var r=parseInt(t,10);return isNaN(r)?Dr(t):r},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},Me=function(t){return t&&t.attributes?Zd(t.attributes).reduce(function(r,n){var e=fl[n.name]||fl.DEFAULT;return r[n.name]=e(n.value),r},{}):{}},yv={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},ma=function(t,r){return r.length?ha(t.map(function(n){return r.map(function(e){return la(n,so(e))})})):t},oo=function(t){var r=Se(t,"SegmentTemplate")[0],n=Se(t,"SegmentList")[0],e=n&&Se(n,"SegmentURL").map(function(m){return Ge({tag:"SegmentURL"},Me(m))}),i=Se(t,"SegmentBase")[0],s=n||r,o=s&&Se(s,"SegmentTimeline")[0],u=n||i||r,l=u&&Se(u,"Initialization")[0],c=r&&Me(r);c&&l?c.initialization=l&&Me(l):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var g={template:c,segmentTimeline:o&&Se(o,"S").map(function(m){return Me(m)}),list:n&&Ge(Me(n),{segmentUrls:e,initialization:Me(l)}),base:i&&Ge(Me(i),{initialization:Me(l)})};return Object.keys(g).forEach(function(m){g[m]||delete g[m]}),g},_v=function(t,r,n){return function(e){var i=Se(e,"BaseURL"),s=ma(r,i),o=Ge(t,Me(e)),u=oo(e);return s.map(function(l){return{segmentInfo:Ge(n,u),attributes:Ge(o,{baseUrl:l})}})}},Tv=function(t){return t.reduce(function(r,n){var e=Me(n);e.schemeIdUri&&(e.schemeIdUri=e.schemeIdUri.toLowerCase());var i=yv[e.schemeIdUri];if(i){r[i]={attributes:e};var s=Se(n,"cenc:pssh")[0];if(s){var o=so(s);r[i].pssh=o&&vd(o)}}return r},{})},bv=function(t){if(t.schemeIdUri==="urn:scte:dash:cc:cea-608:2015"){var r=typeof t.value!="string"?[]:t.value.split(";");return r.map(function(e){var i,s;if(s=e,/^CC\d=/.test(e)){var o=e.split("=");i=o[0],s=o[1]}else/^CC\d$/.test(e)&&(i=e);return{channel:i,language:s}})}else if(t.schemeIdUri==="urn:scte:dash:cc:cea-708:2015"){var n=typeof t.value!="string"?[]:t.value.split(";");return n.map(function(e){var i={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var s=e.split("="),o=s[0],u=s[1],l=u===void 0?"":u;i.channel=o,i.language=e,l.split(",").forEach(function(c){var g=c.split(":"),m=g[0],_=g[1];m==="lang"?i.language=_:m==="er"?i.easyReader=Number(_):m==="war"?i.aspectRatio=Number(_):m==="3D"&&(i["3D"]=Number(_))})}else i.language=e;return i.channel&&(i.channel="SERVICE"+i.channel),i})}},xv=function(t,r,n){return function(e){var i=Me(e),s=ma(r,Se(e,"BaseURL")),o=Se(e,"Role")[0],u={role:Me(o)},l=Ge(t,i,u),c=Se(e,"Accessibility")[0],g=bv(Me(c));g&&(l=Ge(l,{captionServices:g}));var m=Se(e,"Label")[0];if(m&&m.childNodes.length){var _=m.childNodes[0].nodeValue.trim();l=Ge(l,{label:_})}var b=Tv(Se(e,"ContentProtection"));Object.keys(b).length&&(l=Ge(l,{contentProtection:b}));var S=oo(e),x=Se(e,"Representation"),w=Ge(n,S);return ha(x.map(_v(l,s,w)))}},Sv=function(t,r){return function(n,e){var i=ma(r,Se(n.node,"BaseURL")),s=Ge(t,{periodStart:n.attributes.start});typeof n.attributes.duration=="number"&&(s.periodDuration=n.attributes.duration);var o=Se(n.node,"AdaptationSet"),u=oo(n.node);return ha(o.map(xv(s,i,u)))}},Ev=function(t){var r=t.attributes,n=t.priorPeriodAttributes,e=t.mpdType;return typeof r.start=="number"?r.start:n&&typeof n.start=="number"&&typeof n.duration=="number"?n.start+n.duration:!n&&e==="static"?0:null},Cv=function(t,r){r===void 0&&(r={});var n=r,e=n.manifestUri,i=e===void 0?"":e,s=n.NOW,o=s===void 0?Date.now():s,u=n.clientOffset,l=u===void 0?0:u,c=Se(t,"Period");if(!c.length)throw new Error(Hr.INVALID_NUMBER_OF_PERIOD);var g=Se(t,"Location"),m=Me(t),_=ma([i],Se(t,"BaseURL"));m.type=m.type||"static",m.sourceDuration=m.mediaPresentationDuration||0,m.NOW=o,m.clientOffset=l,g.length&&(m.locations=g.map(so));var b=[];return c.forEach(function(S,x){var w=Me(S),O=b[x-1];w.start=Ev({attributes:w,priorPeriodAttributes:O?O.attributes:null,mpdType:m.type}),b.push({node:S,attributes:w})}),{locations:m.locations,representationInfo:ha(b.map(Sv(m,_)))}},ic=function(t){if(t==="")throw new Error(Hr.DASH_EMPTY_MANIFEST);var r=new Ng,n,e;try{n=r.parseFromString(t,"application/xml"),e=n&&n.documentElement.tagName==="MPD"?n.documentElement:null}catch{}if(!e||e&&e.getElementsByTagName("parsererror").length>0)throw new Error(Hr.DASH_INVALID_XML);return e},Av=function(t){var r=Se(t,"UTCTiming")[0];if(!r)return null;var n=Me(r);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Hr.UNSUPPORTED_UTC_TIMING_SCHEME)}return n},Dv=function(t,r){r===void 0&&(r={});var n=Cv(ic(t),r),e=mv(n.representationInfo);return sv({dashPlaylists:e,locations:n.locations,sidxMapping:r.sidxMapping,previousManifest:r.previousManifest})},wv=function(t){return Av(ic(t))},nc=Math.pow(2,32),kv=function(a){var t=new DataView(a.buffer,a.byteOffset,a.byteLength),r;return t.getBigUint64?(r=t.getBigUint64(0),r<Number.MAX_SAFE_INTEGER?Number(r):r):t.getUint32(0)*nc+t.getUint32(4)},Pv={getUint64:kv,MAX_UINT32:nc},hl=Pv.getUint64,Iv=function(a){var t=new DataView(a.buffer,a.byteOffset,a.byteLength),r={version:a[0],flags:new Uint8Array(a.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;r.version===0?(r.earliestPresentationTime=t.getUint32(n),r.firstOffset=t.getUint32(n+4),n+=8):(r.earliestPresentationTime=hl(a.subarray(n)),r.firstOffset=hl(a.subarray(n+8)),n+=16),n+=2;var e=t.getUint16(n);for(n+=2;e>0;n+=12,e--)r.references.push({referenceType:(a[n]&128)>>>7,referencedSize:t.getUint32(n)&2147483647,subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(a[n+8]&128),sapType:(a[n+8]&112)>>>4,sapDeltaTime:t.getUint32(n+8)&268435455});return r},Ov=Iv,Lv=Q([73,68,51]),Fv=function(t,r){r===void 0&&(r=0),t=Q(t);var n=t[r+5],e=t[r+6]<<21|t[r+7]<<14|t[r+8]<<7|t[r+9],i=(n&16)>>4;return i?e+20:e+10},xi=function a(t,r){return r===void 0&&(r=0),t=Q(t),t.length-r<10||!_e(t,Lv,{offset:r})?r:(r+=Fv(t,r),a(t,r))},pl=function(t){return typeof t=="string"?xd(t):t},Rv=function(t){return Array.isArray(t)?t.map(function(r){return pl(r)}):[pl(t)]},Mv=function a(t,r,n){n===void 0&&(n=!1),r=Rv(r),t=Q(t);var e=[];if(!r.length)return e;for(var i=0;i<t.length;){var s=(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0,o=t.subarray(i+4,i+8);if(s===0)break;var u=i+s;if(u>t.length){if(n)break;u=t.length}var l=t.subarray(i+8,u);_e(o,r[0])&&(r.length===1?e.push(l):e.push.apply(e,a(l,r.slice(1),n))),i=u}return e},xn={EBML:Q([26,69,223,163]),DocType:Q([66,130]),Segment:Q([24,83,128,103]),SegmentInfo:Q([21,73,169,102]),Tracks:Q([22,84,174,107]),Track:Q([174]),TrackNumber:Q([215]),DefaultDuration:Q([35,227,131]),TrackEntry:Q([174]),TrackType:Q([131]),FlagDefault:Q([136]),CodecID:Q([134]),CodecPrivate:Q([99,162]),VideoTrack:Q([224]),AudioTrack:Q([225]),Cluster:Q([31,67,182,117]),Timestamp:Q([231]),TimestampScale:Q([42,215,177]),BlockGroup:Q([160]),BlockDuration:Q([155]),Block:Q([161]),SimpleBlock:Q([163])},Ts=[128,64,32,16,8,4,2,1],Nv=function(t){for(var r=1,n=0;n<Ts.length&&!(t&Ts[n]);n++)r++;return r},qn=function(t,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var i=Nv(t[r]),s=t.subarray(r,r+i);return n&&(s=Array.prototype.slice.call(t,r,r+i),s[0]^=Ts[i-1]),{length:i,value:sg(s,{signed:e}),bytes:s}},ml=function a(t){return typeof t=="string"?t.match(/.{1,2}/g).map(function(r){return a(r)}):typeof t=="number"?og(t):t},Bv=function(t){return Array.isArray(t)?t.map(function(r){return ml(r)}):[ml(t)]},Uv=function a(t,r,n){if(n>=r.length)return r.length;var e=qn(r,n,!1);if(_e(t.bytes,e.bytes))return n;var i=qn(r,n+e.length);return a(t,r,n+i.length+i.value+e.length)},gl=function a(t,r){r=Bv(r),t=Q(t);var n=[];if(!r.length)return n;for(var e=0;e<t.length;){var i=qn(t,e,!1),s=qn(t,e+i.length),o=e+i.length+s.length;s.value===127&&(s.value=Uv(i,t,o),s.value!==t.length&&(s.value-=o));var u=o+s.value>t.length?t.length:o+s.value,l=t.subarray(o,u);_e(r[0],i.bytes)&&(r.length===1?n.push(l):n=n.concat(a(l,r.slice(1))));var c=i.length+s.length+l.length;e+=c}return n},Vv=Q([0,0,0,1]),Hv=Q([0,0,1]),qv=Q([0,0,3]),jv=function(t){for(var r=[],n=1;n<t.length-2;)_e(t.subarray(n,n+3),qv)&&(r.push(n+2),n++),n++;if(r.length===0)return t;var e=t.length-r.length,i=new Uint8Array(e),s=0;for(n=0;n<e;s++,n++)s===r[0]&&(s++,r.shift()),i[n]=t[s];return i},ac=function(t,r,n,e){e===void 0&&(e=1/0),t=Q(t),n=[].concat(n);for(var i=0,s,o=0;i<t.length&&(o<e||s);){var u=void 0;if(_e(t.subarray(i),Vv)?u=4:_e(t.subarray(i),Hv)&&(u=3),!u){i++;continue}if(o++,s)return jv(t.subarray(s,i));var l=void 0;r==="h264"?l=t[i+u]&31:r==="h265"&&(l=t[i+u]>>1&63),n.indexOf(l)!==-1&&(s=i+u),i+=u+(r==="h264"?1:2)}return t.subarray(0,0)},Gv=function(t,r,n){return ac(t,"h264",r,n)},Wv=function(t,r,n){return ac(t,"h265",r,n)},He={webm:Q([119,101,98,109]),matroska:Q([109,97,116,114,111,115,107,97]),flac:Q([102,76,97,67]),ogg:Q([79,103,103,83]),ac3:Q([11,119]),riff:Q([82,73,70,70]),avi:Q([65,86,73]),wav:Q([87,65,86,69]),"3gp":Q([102,116,121,112,51,103]),mp4:Q([102,116,121,112]),fmp4:Q([115,116,121,112]),mov:Q([102,116,121,112,113,116]),moov:Q([109,111,111,118]),moof:Q([109,111,111,102])},qr={aac:function(t){var r=xi(t);return _e(t,[255,16],{offset:r,mask:[255,22]})},mp3:function(t){var r=xi(t);return _e(t,[255,2],{offset:r,mask:[255,6]})},webm:function(t){var r=gl(t,[xn.EBML,xn.DocType])[0];return _e(r,He.webm)},mkv:function(t){var r=gl(t,[xn.EBML,xn.DocType])[0];return _e(r,He.matroska)},mp4:function(t){if(qr["3gp"](t)||qr.mov(t))return!1;if(_e(t,He.mp4,{offset:4})||_e(t,He.fmp4,{offset:4})||_e(t,He.moof,{offset:4})||_e(t,He.moov,{offset:4}))return!0},mov:function(t){return _e(t,He.mov,{offset:4})},"3gp":function(t){return _e(t,He["3gp"],{offset:4})},ac3:function(t){var r=xi(t);return _e(t,He.ac3,{offset:r})},ts:function(t){if(t.length<189&&t.length>=1)return t[0]===71;for(var r=0;r+188<t.length&&r<188;){if(t[r]===71&&t[r+188]===71)return!0;r+=1}return!1},flac:function(t){var r=xi(t);return _e(t,He.flac,{offset:r})},ogg:function(t){return _e(t,He.ogg)},avi:function(t){return _e(t,He.riff)&&_e(t,He.avi,{offset:8})},wav:function(t){return _e(t,He.riff)&&_e(t,He.wav,{offset:8})},h264:function(t){return Gv(t,7,3).length},h265:function(t){return Wv(t,[32,33],3).length}},bs=Object.keys(qr).filter(function(a){return a!=="ts"&&a!=="h264"&&a!=="h265"}).concat(["ts","h264","h265"]);bs.forEach(function(a){var t=qr[a];qr[a]=function(r){return t(Q(r))}});var zv=qr,uo=function(t){t=Q(t);for(var r=0;r<bs.length;r++){var n=bs[r];if(zv[n](t))return n}return""},$v=function(t){return Mv(t,["moof"]).length>0},lo=9e4,co,fo,ga,ho,sc,oc,uc;co=function(a){return a*lo};fo=function(a,t){return a*t};ga=function(a){return a/lo};ho=function(a,t){return a/t};sc=function(a,t){return co(ho(a,t))};oc=function(a,t){return fo(ga(a),t)};uc=function(a,t,r){return ga(r?a:a-t)};var jn={ONE_SECOND_IN_TS:lo,secondsToVideoTs:co,secondsToAudioTs:fo,videoTsToSeconds:ga,audioTsToSeconds:ho,audioTsToVideoTs:sc,videoTsToAudioTs:oc,metadataTsToSeconds:uc};function xs(a){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xs(a)}function Kv(a){return Function.toString.call(a).indexOf("[native code]")!==-1}function Ss(a){var t=typeof Map=="function"?new Map:void 0;return Ss=function(n){if(n===null||!Kv(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,e)}function e(){return Ai(n,arguments,xs(this).constructor)}return e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Nr(e,n)},Ss(a)}/**
* @license
* Video.js 7.21.4 <http://videojs.com/>
* Copyright Brightcove, Inc. <https://www.brightcove.com/>
* Available under Apache License Version 2.0
* <https://github.com/videojs/video.js/blob/main/LICENSE>
*
* Includes vtt.js <https://github.com/mozilla/vtt.js>
* Available under Apache License Version 2.0
* <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
*/var lc="7.21.4",It={},Kt=function(t,r){return It[t]=It[t]||[],r&&(It[t]=It[t].concat(r)),It[t]},Xv=function(t,r){Kt(t,r)},dc=function(t,r){var n=Kt(t).indexOf(r);return n<=-1?!1:(It[t]=It[t].slice(),It[t].splice(n,1),!0)},Yv=function(t,r){Kt(t,[].concat(r).map(function(n){var e=function i(){return dc(t,i),n.apply(void 0,arguments)};return e}))},Gn={prefixed:!0},On=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],vl=On[0],Si;for(var Sn=0;Sn<On.length;Sn++)if(On[Sn][1]in G){Si=On[Sn];break}if(Si){for(var En=0;En<Si.length;En++)Gn[vl[En]]=Si[En];Gn.prefixed=Si[0]!==vl[0]}var Ke=[],Qv=function(t,r){return function(n,e,i){var s=r.levels[e],o=new RegExp("^("+s+")$");if(n!=="log"&&i.unshift(n.toUpperCase()+":"),i.unshift(t+":"),Ke){Ke.push([].concat(i));var u=Ke.length-1e3;Ke.splice(0,u>0?u:0)}if(!!A.console){var l=A.console[n];!l&&n==="debug"&&(l=A.console.info||A.console.log),!(!l||!s||!o.test(n))&&l[Array.isArray(i)?"apply":"call"](A.console,i)}}};function cc(a){var t="info",r,n=function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];r("log",t,s)};return r=Qv(a,n),n.createLogger=function(e){return cc(a+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:t},n.level=function(e){if(typeof e=="string"){if(!n.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');t=e}return t},n.history=function(){return Ke?[].concat(Ke):[]},n.history.filter=function(e){return(Ke||[]).filter(function(i){return new RegExp(".*"+e+".*").test(i[0])})},n.history.clear=function(){Ke&&(Ke.length=0)},n.history.disable=function(){Ke!==null&&(Ke.length=0,Ke=null)},n.history.enable=function(){Ke===null&&(Ke=[])},n.error=function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return r("error",t,i)},n.warn=function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return r("warn",t,i)},n.debug=function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return r("debug",t,i)},n}var ie=cc("VIDEOJS"),fc=ie.createLogger,Jv=Object.prototype.toString,hc=function(t){return Ut(t)?Object.keys(t):[]};function Fr(a,t){hc(a).forEach(function(r){return t(a[r],r)})}function Zv(a,t,r){return r===void 0&&(r=0),hc(a).reduce(function(n,e){return t(n,a[e],e)},r)}function be(a){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.assign?ot.apply(void 0,[a].concat(r)):(r.forEach(function(e){!e||Fr(e,function(i,s){a[s]=i})}),a)}function Ut(a){return!!a&&typeof a=="object"}function Ri(a){return Ut(a)&&Jv.call(a)==="[object Object]"&&a.constructor===Object}function Mi(a,t){if(!a||!t)return"";if(typeof A.getComputedStyle=="function"){var r;try{r=A.getComputedStyle(a)}catch{return""}return r?r.getPropertyValue(t)||r[t]:""}return""}var ke=A.navigator&&A.navigator.userAgent||"",yl=/AppleWebKit\/([\d.]+)/i.exec(ke),e0=yl?parseFloat(yl.pop()):null,pc=/iPod/i.test(ke),t0=function(){var a=ke.match(/OS (\d+)_/i);return a&&a[1]?a[1]:null}(),qt=/Android/i.test(ke),po=function(){var a=ke.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!a)return null;var t=a[1]&&parseFloat(a[1]),r=a[2]&&parseFloat(a[2]);return t&&r?parseFloat(a[1]+"."+a[2]):t||null}(),mc=qt&&po<5&&e0<537,gc=/Firefox/i.test(ke),Gi=/Edg/i.test(ke),jt=!Gi&&(/Chrome/i.test(ke)||/CriOS/i.test(ke)),vc=function(){var a=ke.match(/(Chrome|CriOS)\/(\d+)/);return a&&a[2]?parseFloat(a[2]):null}(),Wi=function(){var a=/MSIE\s(\d+)\.\d/.exec(ke),t=a&&parseFloat(a[1]);return!t&&/Trident\/7.0/i.test(ke)&&/rv:11.0/.test(ke)&&(t=11),t}(),mo=/Safari/i.test(ke)&&!jt&&!qt&&!Gi,yc=/Windows/i.test(ke),jr=Boolean(Yr()&&("ontouchstart"in A||A.navigator.maxTouchPoints||A.DocumentTouch&&A.document instanceof A.DocumentTouch)),go=/iPad/i.test(ke)||mo&&jr&&!/iPhone/i.test(ke),vo=/iPhone/i.test(ke)&&!go,$e=vo||go||pc,va=(mo||$e)&&!jt,r0=Object.freeze({__proto__:null,IS_IPOD:pc,IOS_VERSION:t0,IS_ANDROID:qt,ANDROID_VERSION:po,IS_NATIVE_ANDROID:mc,IS_FIREFOX:gc,IS_EDGE:Gi,IS_CHROME:jt,CHROME_VERSION:vc,IE_VERSION:Wi,IS_SAFARI:mo,IS_WINDOWS:yc,TOUCH_ENABLED:jr,IS_IPAD:go,IS_IPHONE:vo,IS_IOS:$e,IS_ANY_SAFARI:va});function _l(a){return typeof a=="string"&&Boolean(a.trim())}function _c(a){if(a.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function i0(a){return new RegExp("(^|\\s)"+a+"($|\\s)")}function Yr(){return G===A.document}function Qr(a){return Ut(a)&&a.nodeType===1}function Tc(){try{return A.parent!==A.self}catch{return!0}}function bc(a){return function(t,r){if(!_l(t))return G[a](null);_l(r)&&(r=G.querySelector(r));var n=Qr(r)?r:G;return n[a]&&n[a](t)}}function ne(a,t,r,n){a===void 0&&(a="div"),t===void 0&&(t={}),r===void 0&&(r={});var e=G.createElement(a);return Object.getOwnPropertyNames(t).forEach(function(i){var s=t[i];i.indexOf("aria-")!==-1||i==="role"||i==="type"?(ie.warn(`Setting attributes in the second argument of createEl()
has been deprecated. Use the third argument instead.
`+("createEl(type, properties, attributes). Attempting to set "+i+" to "+s+".")),e.setAttribute(i,s)):i==="textContent"?mr(e,s):(e[i]!==s||i==="tabIndex")&&(e[i]=s)}),Object.getOwnPropertyNames(r).forEach(function(i){e.setAttribute(i,r[i])}),n&&_o(e,n),e}function mr(a,t){return typeof a.textContent>"u"?a.innerText=t:a.textContent=t,a}function Es(a,t){t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a)}function dr(a,t){return _c(t),a.classList?a.classList.contains(t):i0(t).test(a.className)}function Ft(a,t){return a.classList?a.classList.add(t):dr(a,t)||(a.className=(a.className+" "+t).trim()),a}function zi(a,t){return a?(a.classList?a.classList.remove(t):(_c(t),a.className=a.className.split(/\s+/).filter(function(r){return r!==t}).join(" ")),a):(ie.warn("removeClass was called with an element that doesn't exist"),null)}function xc(a,t,r){var n=dr(a,t);if(typeof r=="function"&&(r=r(a,t)),typeof r!="boolean"&&(r=!n),r!==n)return r?Ft(a,t):zi(a,t),a}function Sc(a,t){Object.getOwnPropertyNames(t).forEach(function(r){var n=t[r];n===null||typeof n>"u"||n===!1?a.removeAttribute(r):a.setAttribute(r,n===!0?"":n)})}function Pt(a){var t={},r=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(a&&a.attributes&&a.attributes.length>0)for(var n=a.attributes,e=n.length-1;e>=0;e--){var i=n[e].name,s=n[e].value;(typeof a[i]=="boolean"||r.indexOf(","+i+",")!==-1)&&(s=s!==null),t[i]=s}return t}function Ec(a,t){return a.getAttribute(t)}function Gr(a,t,r){a.setAttribute(t,r)}function ya(a,t){a.removeAttribute(t)}function Cc(){G.body.focus(),G.onselectstart=function(){return!1}}function Ac(){G.onselectstart=function(){return!0}}function Wr(a){if(a&&a.getBoundingClientRect&&a.parentNode){var t=a.getBoundingClientRect(),r={};return["bottom","height","left","right","top","width"].forEach(function(n){t[n]!==void 0&&(r[n]=t[n])}),r.height||(r.height=parseFloat(Mi(a,"height"))),r.width||(r.width=parseFloat(Mi(a,"width"))),r}}function Ni(a){if(!a||a&&!a.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=a.offsetWidth,r=a.offsetHeight,n=0,e=0;a.offsetParent&&a!==G[Gn.fullscreenElement];)n+=a.offsetLeft,e+=a.offsetTop,a=a.offsetParent;return{left:n,top:e,width:t,height:r}}function _a(a,t){var r={x:0,y:0};if($e)for(var n=a;n&&n.nodeName.toLowerCase()!=="html";){var e=Mi(n,"transform");if(/^matrix/.test(e)){var i=e.slice(7,-1).split(/,\s/).map(Number);r.x+=i[4],r.y+=i[5]}else if(/^matrix3d/.test(e)){var s=e.slice(9,-1).split(/,\s/).map(Number);r.x+=s[12],r.y+=s[13]}n=n.parentNode}var o={},u=Ni(t.target),l=Ni(a),c=l.width,g=l.height,m=t.offsetY-(l.top-u.top),_=t.offsetX-(l.left-u.left);return t.changedTouches&&(_=t.changedTouches[0].pageX-l.left,m=t.changedTouches[0].pageY+l.top,$e&&(_-=r.x,m-=r.y)),o.y=1-Math.max(0,Math.min(1,m/g)),o.x=Math.max(0,Math.min(1,_/c)),o}function Dc(a){return Ut(a)&&a.nodeType===3}function yo(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function wc(a){return typeof a=="function"&&(a=a()),(Array.isArray(a)?a:[a]).map(function(t){if(typeof t=="function"&&(t=t()),Qr(t)||Dc(t))return t;if(typeof t=="string"&&/\S/.test(t))return G.createTextNode(t)}).filter(function(t){return t})}function _o(a,t){return wc(t).forEach(function(r){return a.appendChild(r)}),a}function kc(a,t){return _o(yo(a),t)}function Bi(a){return a.button===void 0&&a.buttons===void 0||a.button===0&&a.buttons===void 0||a.type==="mouseup"&&a.button===0&&a.buttons===0?!0:!(a.button!==0||a.buttons!==1)}var Xt=bc("querySelector"),Pc=bc("querySelectorAll"),Ic=Object.freeze({__proto__:null,isReal:Yr,isEl:Qr,isInFrame:Tc,createEl:ne,textContent:mr,prependTo:Es,hasClass:dr,addClass:Ft,removeClass:zi,toggleClass:xc,setAttributes:Sc,getAttributes:Pt,getAttribute:Ec,setAttribute:Gr,removeAttribute:ya,blockTextSelection:Cc,unblockTextSelection:Ac,getBoundingClientRect:Wr,findPosition:Ni,getPointerPosition:_a,isTextNode:Dc,emptyEl:yo,normalizeContent:wc,appendContent:_o,insertContent:kc,isSingleLeftClick:Bi,$:Xt,$$:Pc}),Oc=!1,Cs,n0=function(){if(Cs.options.autoSetup!==!1){var t=Array.prototype.slice.call(G.getElementsByTagName("video")),r=Array.prototype.slice.call(G.getElementsByTagName("audio")),n=Array.prototype.slice.call(G.getElementsByTagName("video-js")),e=t.concat(r,n);if(e&&e.length>0)for(var i=0,s=e.length;i<s;i++){var o=e[i];if(o&&o.getAttribute){if(o.player===void 0){var u=o.getAttribute("data-setup");u!==null&&Cs(o)}}else{As(1);break}}else Oc||As(1)}};function As(a,t){!Yr()||(t&&(Cs=t),A.setTimeout(n0,a))}function Ds(){Oc=!0,A.removeEventListener("load",Ds)}Yr()&&(G.readyState==="complete"?Ds():A.addEventListener("load",Ds));var Lc=function(t){var r=G.createElement("style");return r.className=t,r},Fc=function(t,r){t.styleSheet?t.styleSheet.cssText=r:t.textContent=r},a0=3,s0=a0;function Gt(){return s0++}var Rc;A.WeakMap||(Rc=function(){function a(){this.vdata="vdata"+Math.floor(A.performance&&A.performance.now()||Date.now()),this.data={}}var t=a.prototype;return t.set=function(n,e){var i=n[this.vdata]||Gt();return n[this.vdata]||(n[this.vdata]=i),this.data[i]=e,this},t.get=function(n){var e=n[this.vdata];if(e)return this.data[e];ie("We have no data for this element",n)},t.has=function(n){var e=n[this.vdata];return e in this.data},t.delete=function(n){var e=n[this.vdata];e&&(delete this.data[e],delete n[this.vdata])},a}());var We=A.WeakMap?new WeakMap:new Rc;function Tl(a,t){if(!!We.has(a)){var r=We.get(a);r.handlers[t].length===0&&(delete r.handlers[t],a.removeEventListener?a.removeEventListener(t,r.dispatcher,!1):a.detachEvent&&a.detachEvent("on"+t,r.dispatcher)),Object.getOwnPropertyNames(r.handlers).length<=0&&(delete r.handlers,delete r.dispatcher,delete r.disabled),Object.getOwnPropertyNames(r).length===0&&We.delete(a)}}function To(a,t,r,n){r.forEach(function(e){a(t,e,n)})}function Ta(a){if(a.fixed_)return a;function t(){return!0}function r(){return!1}if(!a||!a.isPropagationStopped||!a.isImmediatePropagationStopped){var n=a||A.event;a={};for(var e in n)e!=="layerX"&&e!=="layerY"&&e!=="keyLocation"&&e!=="webkitMovementX"&&e!=="webkitMovementY"&&e!=="path"&&(e==="returnValue"&&n.preventDefault||(a[e]=n[e]));if(a.target||(a.target=a.srcElement||G),a.relatedTarget||(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement),a.preventDefault=function(){n.preventDefault&&n.preventDefault(),a.returnValue=!1,n.returnValue=!1,a.defaultPrevented=!0},a.defaultPrevented=!1,a.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),a.cancelBubble=!0,n.cancelBubble=!0,a.isPropagationStopped=t},a.isPropagationStopped=r,a.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),a.isImmediatePropagationStopped=t,a.stopPropagation()},a.isImmediatePropagationStopped=r,a.clientX!==null&&a.clientX!==void 0){var i=G.documentElement,s=G.body;a.pageX=a.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)}a.which=a.charCode||a.keyCode,a.button!==null&&a.button!==void 0&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}return a.fixed_=!0,a}var Cn,o0=function(){if(typeof Cn!="boolean"){Cn=!1;try{var t=Object.defineProperty({},"passive",{get:function(){Cn=!0}});A.addEventListener("test",null,t),A.removeEventListener("test",null,t)}catch{}}return Cn},u0=["touchstart","touchmove"];function it(a,t,r){if(Array.isArray(t))return To(it,a,t,r);We.has(a)||We.set(a,{});var n=We.get(a);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),r.guid||(r.guid=Gt()),n.handlers[t].push(r),n.dispatcher||(n.disabled=!1,n.dispatcher=function(i,s){if(!n.disabled){i=Ta(i);var o=n.handlers[i.type];if(o)for(var u=o.slice(0),l=0,c=u.length;l<c&&!i.isImmediatePropagationStopped();l++)try{u[l].call(a,i,s)}catch(g){ie.error(g)}}}),n.handlers[t].length===1)if(a.addEventListener){var e=!1;o0()&&u0.indexOf(t)>-1&&(e={passive:!0}),a.addEventListener(t,n.dispatcher,e)}else a.attachEvent&&a.attachEvent("on"+t,n.dispatcher)}function Ne(a,t,r){if(!!We.has(a)){var n=We.get(a);if(!!n.handlers){if(Array.isArray(t))return To(Ne,a,t,r);var e=function(l,c){n.handlers[c]=[],Tl(l,c)};if(t===void 0){for(var i in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},i)&&e(a,i);return}var s=n.handlers[t];if(!!s){if(!r){e(a,t);return}if(r.guid)for(var o=0;o<s.length;o++)s[o].guid===r.guid&&s.splice(o--,1);Tl(a,t)}}}}function Jr(a,t,r){var n=We.has(a)?We.get(a):{},e=a.parentNode||a.ownerDocument;if(typeof t=="string"?t={type:t,target:a}:t.target||(t.target=a),t=Ta(t),n.dispatcher&&n.dispatcher.call(a,t,r),e&&!t.isPropagationStopped()&&t.bubbles===!0)Jr.call(null,e,t,r);else if(!e&&!t.defaultPrevented&&t.target&&t.target[t.type]){We.has(t.target)||We.set(t.target,{});var i=We.get(t.target);t.target[t.type]&&(i.disabled=!0,typeof t.target[t.type]=="function"&&t.target[t.type](),i.disabled=!1)}return!t.defaultPrevented}function ba(a,t,r){if(Array.isArray(t))return To(ba,a,t,r);var n=function e(){Ne(a,t,e),r.apply(this,arguments)};n.guid=r.guid=r.guid||Gt(),it(a,t,n)}function Mc(a,t,r){var n=function e(){Ne(a,t,e),r.apply(this,arguments)};n.guid=r.guid=r.guid||Gt(),it(a,t,n)}var l0=Object.freeze({__proto__:null,fixEvent:Ta,on:it,off:Ne,trigger:Jr,one:ba,any:Mc}),ht=30,ye=function(t,r,n){r.guid||(r.guid=Gt());var e=r.bind(t);return e.guid=n?n+"_"+r.guid:r.guid,e},Vt=function(t,r){var n=A.performance.now(),e=function(){var s=A.performance.now();s-n>=r&&(t.apply(void 0,arguments),n=s)};return e},d0=function(t,r,n,e){e===void 0&&(e=A);var i,s=function(){e.clearTimeout(i),i=null},o=function(){var l=this,c=arguments,g=function(){i=null,g=null,n||t.apply(l,c)};!i&&n&&t.apply(l,c),e.clearTimeout(i),i=e.setTimeout(g,r)};return o.cancel=s,o},Ie=function(){};Ie.prototype.allowedEvents_={};Ie.prototype.on=function(a,t){var r=this.addEventListener;this.addEventListener=function(){},it(this,a,t),this.addEventListener=r};Ie.prototype.addEventListener=Ie.prototype.on;Ie.prototype.off=function(a,t){Ne(this,a,t)};Ie.prototype.removeEventListener=Ie.prototype.off;Ie.prototype.one=function(a,t){var r=this.addEventListener;this.addEventListener=function(){},ba(this,a,t),this.addEventListener=r};Ie.prototype.any=function(a,t){var r=this.addEventListener;this.addEventListener=function(){},Mc(this,a,t),this.addEventListener=r};Ie.prototype.trigger=function(a){var t=a.type||a;typeof a=="string"&&(a={type:t}),a=Ta(a),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](a),Jr(this,a)};Ie.prototype.dispatchEvent=Ie.prototype.trigger;var gi;Ie.prototype.queueTrigger=function(a){var t=this;gi||(gi=new Map);var r=a.type||a,n=gi.get(this);n||(n=new Map,gi.set(this,n));var e=n.get(r);n.delete(r),A.clearTimeout(e);var i=A.setTimeout(function(){n.delete(r),n.size===0&&(n=null,gi.delete(t)),t.trigger(a)},0);n.set(r,i)};var xa=function(t){return typeof t.name=="function"?t.name():typeof t.name=="string"?t.name:t.name_?t.name_:t.constructor&&t.constructor.name?t.constructor.name:typeof t},Rt=function(t){return t instanceof Ie||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(r){return typeof t[r]=="function"})},c0=function(t,r){Rt(t)?r():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(r))},ws=function(t){return typeof t=="string"&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Wn=function(t,r,n){if(!t||!t.nodeName&&!Rt(t))throw new Error("Invalid target for "+xa(r)+"#"+n+"; must be a DOM node or evented object.")},Nc=function(t,r,n){if(!ws(t))throw new Error("Invalid event type for "+xa(r)+"#"+n+"; must be a non-empty string or array.")},Bc=function(t,r,n){if(typeof t!="function")throw new Error("Invalid listener for "+xa(r)+"#"+n+"; must be a function.")},Qa=function(t,r,n){var e=r.length<3||r[0]===t||r[0]===t.eventBusEl_,i,s,o;return e?(i=t.eventBusEl_,r.length>=3&&r.shift(),s=r[0],o=r[1]):(i=r[0],s=r[1],o=r[2]),Wn(i,t,n),Nc(s,t,n),Bc(o,t,n),o=ye(t,o),{isTargetingSelf:e,target:i,type:s,listener:o}},ar=function(t,r,n,e){Wn(t,t,r),t.nodeName?l0[r](t,n,e):t[r](n,e)},f0={on:function(){for(var t=this,r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];var i=Qa(this,n,"on"),s=i.isTargetingSelf,o=i.target,u=i.type,l=i.listener;if(ar(o,"on",u,l),!s){var c=function(){return t.off(o,u,l)};c.guid=l.guid;var g=function(){return t.off("dispose",c)};g.guid=l.guid,ar(this,"on","dispose",c),ar(o,"on","dispose",g)}},one:function(){for(var t=this,r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];var i=Qa(this,n,"one"),s=i.isTargetingSelf,o=i.target,u=i.type,l=i.listener;if(s)ar(o,"one",u,l);else{var c=function g(){t.off(o,u,g);for(var m=arguments.length,_=new Array(m),b=0;b<m;b++)_[b]=arguments[b];l.apply(null,_)};c.guid=l.guid,ar(o,"one",u,c)}},any:function(){for(var t=this,r=arguments.length,n=new Array(r),e=0;e<r;e++)n[e]=arguments[e];var i=Qa(this,n,"any"),s=i.isTargetingSelf,o=i.target,u=i.type,l=i.listener;if(s)ar(o,"any",u,l);else{var c=function g(){t.off(o,u,g);for(var m=arguments.length,_=new Array(m),b=0;b<m;b++)_[b]=arguments[b];l.apply(null,_)};c.guid=l.guid,ar(o,"any",u,c)}},off:function(t,r,n){if(!t||ws(t))Ne(this.eventBusEl_,t,r);else{var e=t,i=r;Wn(e,this,"off"),Nc(i,this,"off"),Bc(n,this,"off"),n=ye(this,n),this.off("dispose",n),e.nodeName?(Ne(e,i,n),Ne(e,"dispose",n)):Rt(e)&&(e.off(i,n),e.off("dispose",n))}},trigger:function(t,r){Wn(this.eventBusEl_,this,"trigger");var n=t&&typeof t!="string"?t.type:t;if(!ws(n)){var e="Invalid event type for "+xa(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(t)(this.log||ie).error(e);else throw new Error(e)}return Jr(this.eventBusEl_,t,r)}};function bo(a,t){t===void 0&&(t={});var r=t,n=r.eventBusKey;if(n){if(!a[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');a.eventBusEl_=a[n]}else a.eventBusEl_=ne("span",{className:"vjs-event-bus"});return be(a,f0),a.eventedCallbacks&&a.eventedCallbacks.forEach(function(e){e()}),a.on("dispose",function(){a.off(),[a,a.el_,a.eventBusEl_].forEach(function(e){e&&We.has(e)&&We.delete(e)}),A.setTimeout(function(){a.eventBusEl_=null},0)}),a}var h0={state:{},setState:function(t){var r=this;typeof t=="function"&&(t=t());var n;return Fr(t,function(e,i){r.state[i]!==e&&(n=n||{},n[i]={from:r.state[i],to:e}),r.state[i]=e}),n&&Rt(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function Uc(a,t){return be(a,h0),a.state=be({},a.state,t),typeof a.handleStateChanged=="function"&&Rt(a)&&a.on("statechanged",a.handleStateChanged),a}var Ln=function(t){return typeof t!="string"?t:t.replace(/./,function(r){return r.toLowerCase()})},Ee=function(t){return typeof t!="string"?t:t.replace(/./,function(r){return r.toUpperCase()})},p0=function(t,r){return Ee(t)===Ee(r)};function ve(){for(var a={},t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(e){!e||Fr(e,function(i,s){if(!Ri(i)){a[s]=i;return}Ri(a[s])||(a[s]={}),a[s]=ve(a[s],i)})}),a}var m0=function(){function a(){this.map_={}}var t=a.prototype;return t.has=function(n){return n in this.map_},t.delete=function(n){var e=this.has(n);return delete this.map_[n],e},t.set=function(n,e){return this.map_[n]=e,this},t.forEach=function(n,e){for(var i in this.map_)n.call(e,this.map_[i],i,this)},a}(),g0=A.Map?A.Map:m0,v0=function(){function a(){this.set_={}}var t=a.prototype;return t.has=function(n){return n in this.set_},t.delete=function(n){var e=this.has(n);return delete this.set_[n],e},t.add=function(n){return this.set_[n]=1,this},t.forEach=function(n,e){for(var i in this.set_)n.call(e,i,i,this)},a}(),Ja=A.Set?A.Set:v0,V=function(){function a(r,n,e){var i=this;if(!r&&this.play?this.player_=r=this:this.player_=r,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ve({},this.options_),n=this.options_=ve(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var s=r&&r.id&&r.id()||"no_player";this.id_=s+"_component_"+Gt()}this.name_=n.name||null,n.el?this.el_=n.el:n.createEl!==!1&&(this.el_=this.createEl()),n.className&&this.el_&&n.className.split(" ").forEach(function(o){return i.addClass(o)}),n.evented!==!1&&(bo(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Uc(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Ja,this.setIntervalIds_=new Ja,this.rafIds_=new Ja,this.namedRafs_=new g0,this.clearingTimersOnDispose_=!1,n.initChildren!==!1&&this.initChildren(),this.ready(e),n.reportTouchActivity!==!1&&this.enableTouchActivity()}var t=a.prototype;return t.dispose=function(n){if(n===void 0&&(n={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(n.restoreEl?this.el_.parentNode.replaceChild(n.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(n){return n?(this.options_=ve(this.options_,n),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(n,e,i){return ne(n,e,i)},t.localize=function(n,e,i){i===void 0&&(i=n);var s=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),u=o&&o[s],l=s&&s.split("-")[0],c=o&&o[l],g=i;return u&&u[n]?g=u[n]:c&&c[n]&&(g=c[n]),e&&(g=g.replace(/\{(\d+)\}/g,function(m,_){var b=e[_-1],S=b;return typeof b>"u"&&(S=m),S})),g},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(n){return this.childIndex_[n]},t.getChild=function(n){if(!!n)return this.childNameIndex_[n]},t.getDescendant=function(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];e=e.reduce(function(u,l){return u.concat(l)},[]);for(var s=this,o=0;o<e.length;o++)if(s=s.getChild(e[o]),!s||!s.getChild)return;return s},t.addChild=function(n,e,i){e===void 0&&(e={}),i===void 0&&(i=this.children_.length);var s,o;if(typeof n=="string"){o=Ee(n);var u=e.componentClass||o;e.name=o;var l=a.getComponent(u);if(!l)throw new Error("Component "+u+" does not exist");if(typeof l!="function")return null;s=new l(this.player_||this,e)}else s=n;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(i,0,s),s.parentComponent_=this,typeof s.id=="function"&&(this.childIndex_[s.id()]=s),o=o||s.name&&Ee(s.name()),o&&(this.childNameIndex_[o]=s,this.childNameIndex_[Ln(o)]=s),typeof s.el=="function"&&s.el()){var c=null;this.children_[i+1]&&(this.children_[i+1].el_?c=this.children_[i+1].el_:Qr(this.children_[i+1])&&(c=this.children_[i+1])),this.contentEl().insertBefore(s.el(),c)}return s},t.removeChild=function(n){if(typeof n=="string"&&(n=this.getChild(n)),!(!n||!this.children_)){for(var e=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===n){e=!0,this.children_.splice(i,1);break}if(!!e){n.parentComponent_=null,this.childIndex_[n.id()]=null,this.childNameIndex_[Ee(n.name())]=null,this.childNameIndex_[Ln(n.name())]=null;var s=n.el();s&&s.parentNode===this.contentEl()&&this.contentEl().removeChild(n.el())}}},t.initChildren=function(){var n=this,e=this.options_.children;if(e){var i=this.options_,s=function(c){var g=c.name,m=c.opts;if(i[g]!==void 0&&(m=i[g]),m!==!1){m===!0&&(m={}),m.playerOptions=n.options_.playerOptions;var _=n.addChild(g,m);_&&(n[g]=_)}},o,u=a.getComponent("Tech");Array.isArray(e)?o=e:o=Object.keys(e),o.concat(Object.keys(this.options_).filter(function(l){return!o.some(function(c){return typeof c=="string"?l===c:l===c.name})})).map(function(l){var c,g;return typeof l=="string"?(c=l,g=e[c]||n.options_[c]||{}):(c=l.name,g=l),{name:c,opts:g}}).filter(function(l){var c=a.getComponent(l.opts.componentClass||Ee(l.name));return c&&!u.isTech(c)}).forEach(s)}},t.buildCSSClass=function(){return""},t.ready=function(n,e){if(e===void 0&&(e=!1),!!n){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(n);return}e?n.call(this):this.setTimeout(n,1)}},t.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var n=this.readyQueue_;this.readyQueue_=[],n&&n.length>0&&n.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},t.$=function(n,e){return Xt(n,e||this.contentEl())},t.$$=function(n,e){return Pc(n,e||this.contentEl())},t.hasClass=function(n){return dr(this.el_,n)},t.addClass=function(n){Ft(this.el_,n)},t.removeClass=function(n){zi(this.el_,n)},t.toggleClass=function(n,e){xc(this.el_,n,e)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(n){return Ec(this.el_,n)},t.setAttribute=function(n,e){Gr(this.el_,n,e)},t.removeAttribute=function(n){ya(this.el_,n)},t.width=function(n,e){return this.dimension("width",n,e)},t.height=function(n,e){return this.dimension("height",n,e)},t.dimensions=function(n,e){this.width(n,!0),this.height(e)},t.dimension=function(n,e,i){if(e!==void 0){(e===null||e!==e)&&(e=0),(""+e).indexOf("%")!==-1||(""+e).indexOf("px")!==-1?this.el_.style[n]=e:e==="auto"?this.el_.style[n]="":this.el_.style[n]=e+"px",i||this.trigger("componentresize");return}if(!this.el_)return 0;var s=this.el_.style[n],o=s.indexOf("px");return parseInt(o!==-1?s.slice(0,o):this.el_["offset"+Ee(n)],10)},t.currentDimension=function(n){var e=0;if(n!=="width"&&n!=="height")throw new Error("currentDimension only accepts width or height value");if(e=Mi(this.el_,n),e=parseFloat(e),e===0||isNaN(e)){var i="offset"+Ee(n);e=this.el_[i]}return e},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(n){this.player_&&(te.isEventKey(n,"Tab")||n.stopPropagation(),this.player_.handleKeyDown(n))},t.handleKeyPress=function(n){this.handleKeyDown(n)},t.emitTapEvents=function(){var n=0,e=null,i=10,s=200,o;this.on("touchstart",function(l){l.touches.length===1&&(e={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},n=A.performance.now(),o=!0)}),this.on("touchmove",function(l){if(l.touches.length>1)o=!1;else if(e){var c=l.touches[0].pageX-e.pageX,g=l.touches[0].pageY-e.pageY,m=Math.sqrt(c*c+g*g);m>i&&(o=!1)}});var u=function(){o=!1};this.on("touchleave",u),this.on("touchcancel",u),this.on("touchend",function(l){if(e=null,o===!0){var c=A.performance.now()-n;c<s&&(l.preventDefault(),this.trigger("tap"))}})},t.enableTouchActivity=function(){if(!(!this.player()||!this.player().reportUserActivity)){var n=ye(this.player(),this.player().reportUserActivity),e;this.on("touchstart",function(){n(),this.clearInterval(e),e=this.setInterval(n,250)});var i=function(o){n(),this.clearInterval(e)};this.on("touchmove",n),this.on("touchend",i),this.on("touchcancel",i)}},t.setTimeout=function(n,e){var i=this,s;return n=ye(this,n),this.clearTimersOnDispose_(),s=A.setTimeout(function(){i.setTimeoutIds_.has(s)&&i.setTimeoutIds_.delete(s),n()},e),this.setTimeoutIds_.add(s),s},t.clearTimeout=function(n){return this.setTimeoutIds_.has(n)&&(this.setTimeoutIds_.delete(n),A.clearTimeout(n)),n},t.setInterval=function(n,e){n=ye(this,n),this.clearTimersOnDispose_();var i=A.setInterval(n,e);return this.setIntervalIds_.add(i),i},t.clearInterval=function(n){return this.setIntervalIds_.has(n)&&(this.setIntervalIds_.delete(n),A.clearInterval(n)),n},t.requestAnimationFrame=function(n){var e=this;if(!this.supportsRaf_)return this.setTimeout(n,1e3/60);this.clearTimersOnDispose_();var i;return n=ye(this,n),i=A.requestAnimationFrame(function(){e.rafIds_.has(i)&&e.rafIds_.delete(i),n()}),this.rafIds_.add(i),i},t.requestNamedAnimationFrame=function(n,e){var i=this;if(!this.namedRafs_.has(n)){this.clearTimersOnDispose_(),e=ye(this,e);var s=this.requestAnimationFrame(function(){e(),i.namedRafs_.has(n)&&i.namedRafs_.delete(n)});return this.namedRafs_.set(n,s),n}},t.cancelNamedAnimationFrame=function(n){!this.namedRafs_.has(n)||(this.cancelAnimationFrame(this.namedRafs_.get(n)),this.namedRafs_.delete(n))},t.cancelAnimationFrame=function(n){return this.supportsRaf_?(this.rafIds_.has(n)&&(this.rafIds_.delete(n),A.cancelAnimationFrame(n)),n):this.clearTimeout(n)},t.clearTimersOnDispose_=function(){var n=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(e){var i=e[0],s=e[1];n[i].forEach(function(o,u){return n[s](u)})}),n.clearingTimersOnDispose_=!1}))},a.registerComponent=function(n,e){if(typeof n!="string"||!n)throw new Error('Illegal component name, "'+n+'"; must be a non-empty string.');var i=a.getComponent("Tech"),s=i&&i.isTech(e),o=a===e||a.prototype.isPrototypeOf(e.prototype);if(s||!o){var u;throw s?u="techs must be registered using Tech.registerTech()":u="must be a Component subclass",new Error('Illegal component, "'+n+'"; '+u+".")}n=Ee(n),a.components_||(a.components_={});var l=a.getComponent("Player");if(n==="Player"&&l&&l.players){var c=l.players,g=Object.keys(c);if(c&&g.length>0&&g.map(function(m){return c[m]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return a.components_[n]=e,a.components_[Ln(n)]=e,e},a.getComponent=function(n){if(!(!n||!a.components_))return a.components_[n]},a}();V.prototype.supportsRaf_=typeof A.requestAnimationFrame=="function"&&typeof A.cancelAnimationFrame=="function";V.registerComponent("Component",V);function y0(a,t,r){if(typeof t!="number"||t<0||t>r)throw new Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+r+").")}function bl(a,t,r,n){return y0(a,n,r.length-1),r[n][t]}function Za(a){var t;return a===void 0||a.length===0?t={length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:t={length:a.length,start:bl.bind(null,"start",0,a),end:bl.bind(null,"end",1,a)},A.Symbol&&A.Symbol.iterator&&(t[A.Symbol.iterator]=function(){return(a||[]).values()}),t}function cr(a,t){return Array.isArray(a)?Za(a):a===void 0||t===void 0?Za():Za([[a,t]])}function Vc(a,t){var r=0,n,e;if(!t)return 0;(!a||!a.length)&&(a=cr(0,0));for(var i=0;i<a.length;i++)n=a.start(i),e=a.end(i),e>t&&(e=t),r+=e-n;return r/t}function ze(a){if(a instanceof ze)return a;typeof a=="number"?this.code=a:typeof a=="string"?this.message=a:Ut(a)&&(typeof a.code=="number"&&(this.code=a.code),be(this,a)),this.message||(this.message=ze.defaultMessages[this.code]||"")}ze.prototype.code=0;ze.prototype.message="";ze.prototype.status=null;ze.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];ze.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var wr=0;wr<ze.errorTypes.length;wr++)ze[ze.errorTypes[wr]]=wr,ze.prototype[ze.errorTypes[wr]]=wr;function Di(a){return a!=null&&typeof a.then=="function"}function _t(a){Di(a)&&a.then(null,function(t){})}var ks=function(t){var r=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(n,e,i){return t[e]&&(n[e]=t[e]),n},{cues:t.cues&&Array.prototype.map.call(t.cues,function(n){return{startTime:n.startTime,endTime:n.endTime,text:n.text,id:n.id}})});return r},_0=function(t){var r=t.$$("track"),n=Array.prototype.map.call(r,function(i){return i.track}),e=Array.prototype.map.call(r,function(i){var s=ks(i.track);return i.src&&(s.src=i.src),s});return e.concat(Array.prototype.filter.call(t.textTracks(),function(i){return n.indexOf(i)===-1}).map(ks))},T0=function(t,r){return t.forEach(function(n){var e=r.addRemoteTextTrack(n).track;!n.src&&n.cues&&n.cues.forEach(function(i){return e.addCue(i)})}),r.textTracks()},xl={textTracksToJson:_0,jsonToTextTracks:T0,trackToJson_:ks},es="vjs-modal-dialog",Zr=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.handleKeyDown_=function(s){return i.handleKeyDown(s)},i.close_=function(s){return i.close(s)},i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=ne("div",{className:es+"-content"},{role:"document"}),i.descEl_=ne("p",{className:es+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),mr(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},r.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,a.prototype.dispose.call(this)},r.buildCSSClass=function(){return es+" vjs-hidden "+a.prototype.buildCSSClass.call(this)},r.label=function(){return this.localize(this.options_.label||"Modal Window")},r.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},r.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},r.opened=function(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_},r.close=function(){if(!!this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},r.closeable=function(e){if(typeof e=="boolean"){var i=this.closeable_=!!e,s=this.getChild("closeButton");if(i&&!s){var o=this.contentEl_;this.contentEl_=this.el_,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=o,this.on(s,"close",this.close_)}!i&&s&&(this.off(s,"close",this.close_),this.removeChild(s),s.dispose())}return this.closeable_},r.fill=function(){this.fillWith(this.content())},r.fillWith=function(e){var i=this.contentEl(),s=i.parentNode,o=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,s.removeChild(i),this.empty(),kc(i,e),this.trigger("modalfill"),o?s.insertBefore(i,o):s.appendChild(i);var u=this.getChild("closeButton");u&&s.appendChild(u.el_)},r.empty=function(){this.trigger("beforemodalempty"),yo(this.contentEl()),this.trigger("modalempty")},r.content=function(e){return typeof e<"u"&&(this.content_=e),this.content_},r.conditionalFocus_=function(){var e=G.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())},r.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},r.handleKeyDown=function(e){if(e.stopPropagation(),te.isEventKey(e,"Escape")&&this.closeable()){e.preventDefault(),this.close();return}if(!!te.isEventKey(e,"Tab")){for(var i=this.focusableEls_(),s=this.el_.querySelector(":focus"),o,u=0;u<i.length;u++)if(s===i[u]){o=u;break}G.activeElement===this.el_&&(o=0),e.shiftKey&&o===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&o===i.length-1&&(i[0].focus(),e.preventDefault())}},r.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(i){return(i instanceof A.HTMLAnchorElement||i instanceof A.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof A.HTMLInputElement||i instanceof A.HTMLSelectElement||i instanceof A.HTMLTextAreaElement||i instanceof A.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof A.HTMLIFrameElement||i instanceof A.HTMLObjectElement||i instanceof A.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable")})},t}(V);Zr.prototype.options_={pauseOnOpen:!0,temporary:!0};V.registerComponent("ModalDialog",Zr);var zr=function(a){W(t,a);function t(n){var e;n===void 0&&(n=[]),e=a.call(this)||this,e.tracks_=[],Object.defineProperty(ee(e),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<n.length;i++)e.addTrack(n[i]);return e}var r=t.prototype;return r.addTrack=function(e){var i=this,s=this.tracks_.length;""+s in this||Object.defineProperty(this,s,{get:function(){return this.tracks_[s]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){i.trigger({track:e,type:"labelchange",target:i})},Rt(e)&&e.addEventListener("labelchange",e.labelchange_)},r.removeTrack=function(e){for(var i,s=0,o=this.length;s<o;s++)if(this[s]===e){i=this[s],i.off&&i.off(),this.tracks_.splice(s,1);break}!i||this.trigger({track:i,type:"removetrack",target:this})},r.getTrackById=function(e){for(var i=null,s=0,o=this.length;s<o;s++){var u=this[s];if(u.id===e){i=u;break}}return i},t}(Ie);zr.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(var b0 in zr.prototype.allowedEvents_)zr.prototype["on"+b0]=null;var ts=function(t,r){for(var n=0;n<t.length;n++)!Object.keys(t[n]).length||r.id===t[n].id||(t[n].enabled=!1)},x0=function(a){W(t,a);function t(n){var e;n===void 0&&(n=[]);for(var i=n.length-1;i>=0;i--)if(n[i].enabled){ts(n,n[i]);break}return e=a.call(this,n)||this,e.changing_=!1,e}var r=t.prototype;return r.addTrack=function(e){var i=this;e.enabled&&ts(this,e),a.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){i.changing_||(i.changing_=!0,ts(i,e),i.changing_=!1,i.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},r.removeTrack=function(e){a.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},t}(zr),rs=function(t,r){for(var n=0;n<t.length;n++)!Object.keys(t[n]).length||r.id===t[n].id||(t[n].selected=!1)},S0=function(a){W(t,a);function t(n){var e;n===void 0&&(n=[]);for(var i=n.length-1;i>=0;i--)if(n[i].selected){rs(n,n[i]);break}return e=a.call(this,n)||this,e.changing_=!1,Object.defineProperty(ee(e),"selectedIndex",{get:function(){for(var o=0;o<this.length;o++)if(this[o].selected)return o;return-1},set:function(){}}),e}var r=t.prototype;return r.addTrack=function(e){var i=this;e.selected&&rs(this,e),a.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){i.changing_||(i.changing_=!0,rs(i,e),i.changing_=!1,i.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},r.removeTrack=function(e){a.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},t}(zr),Hc=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.addTrack=function(e){var i=this;a.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return i.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);var s=["metadata","chapters"];s.indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},r.removeTrack=function(e){a.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(zr),E0=function(){function a(r){r===void 0&&(r=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var n=0,e=r.length;n<e;n++)this.addTrackElement_(r[n])}var t=a.prototype;return t.addTrackElement_=function(n){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),this.trackElements_.indexOf(n)===-1&&this.trackElements_.push(n)},t.getTrackElementByTrack_=function(n){for(var e,i=0,s=this.trackElements_.length;i<s;i++)if(n===this.trackElements_[i].track){e=this.trackElements_[i];break}return e},t.removeTrackElement_=function(n){for(var e=0,i=this.trackElements_.length;e<i;e++)if(n===this.trackElements_[e]){this.trackElements_[e].track&&typeof this.trackElements_[e].track.off=="function"&&this.trackElements_[e].track.off(),typeof this.trackElements_[e].off=="function"&&this.trackElements_[e].off(),this.trackElements_.splice(e,1);break}},a}(),Sl=function(){function a(r){a.prototype.setCues_.call(this,r),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=a.prototype;return t.setCues_=function(n){var e=this.length||0,i=0,s=n.length;this.cues_=n,this.length_=n.length;var o=function(l){""+l in this||Object.defineProperty(this,""+l,{get:function(){return this.cues_[l]}})};if(e<s)for(i=e;i<s;i++)o.call(this,i)},t.getCueById=function(n){for(var e=null,i=0,s=this.length;i<s;i++){var o=this[i];if(o.id===n){e=o;break}}return e},a}(),C0={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},A0={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},D0={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},El={disabled:"disabled",hidden:"hidden",showing:"showing"},xo=function(a){W(t,a);function t(r){var n;r===void 0&&(r={}),n=a.call(this)||this;var e={id:r.id||"vjs_track_"+Gt(),kind:r.kind||"",language:r.language||""},i=r.label||"",s=function(l){Object.defineProperty(ee(n),l,{get:function(){return e[l]},set:function(){}})};for(var o in e)s(o);return Object.defineProperty(ee(n),"label",{get:function(){return i},set:function(l){l!==i&&(i=l,this.trigger("labelchange"))}}),n}return t}(Ie),So=function(t){var r=["protocol","hostname","port","pathname","search","hash","host"],n=G.createElement("a");n.href=t;for(var e={},i=0;i<r.length;i++)e[r[i]]=n[r[i]];return e.protocol==="http:"&&(e.host=e.host.replace(/:80$/,"")),e.protocol==="https:"&&(e.host=e.host.replace(/:443$/,"")),e.protocol||(e.protocol=A.location.protocol),e.host||(e.host=A.location.host),e},qc=function(t){if(!t.match(/^https?:\/\//)){var r=G.createElement("a");r.href=t,t=r.href}return t},Eo=function(t){if(typeof t=="string"){var r=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,n=r.exec(t);if(n)return n.pop().toLowerCase()}return""},Sa=function(t,r){r===void 0&&(r=A.location);var n=So(t),e=n.protocol===":"?r.protocol:n.protocol,i=e+n.host!==r.protocol+r.host;return i},w0=Object.freeze({__proto__:null,parseUrl:So,getAbsoluteURL:qc,getFileExtension:Eo,isCrossOrigin:Sa}),Cl=function(t,r){var n=new A.WebVTT.Parser(A,A.vttjs,A.WebVTT.StringDecoder()),e=[];n.oncue=function(i){r.addCue(i)},n.onparsingerror=function(i){e.push(i)},n.onflush=function(){r.trigger({type:"loadeddata",target:r})},n.parse(t),e.length>0&&(A.console&&A.console.groupCollapsed&&A.console.groupCollapsed("Text Track parsing errors for "+r.src),e.forEach(function(i){return ie.error(i)}),A.console&&A.console.groupEnd&&A.console.groupEnd()),n.flush()},Al=function(t,r){var n={uri:t},e=Sa(t);e&&(n.cors=e);var i=r.tech_.crossOrigin()==="use-credentials";i&&(n.withCredentials=i),oa.exports(n,ye(this,function(s,o,u){if(s)return ie.error(s,o);r.loaded_=!0,typeof A.WebVTT!="function"?r.tech_&&r.tech_.any(["vttjsloaded","vttjserror"],function(l){if(l.type==="vttjserror"){ie.error("vttjs failed to load, stopping trying to process "+r.src);return}return Cl(u,r)}):Cl(u,r)}))},$i=function(a){W(t,a);function t(n){var e;if(n===void 0&&(n={}),!n.tech)throw new Error("A tech was not provided.");var i=ve(n,{kind:D0[n.kind]||"subtitles",language:n.language||n.srclang||""}),s=El[i.mode]||"disabled",o=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(s="hidden"),e=a.call(this,i)||this,e.tech_=i.tech,e.cues_=[],e.activeCues_=[],e.preload_=e.tech_.preloadTextTracks!==!1;var u=new Sl(e.cues_),l=new Sl(e.activeCues_),c=!1;e.timeupdateHandler=ye(ee(e),function(m){if(m===void 0&&(m={}),!this.tech_.isDisposed()){if(!this.tech_.isReady_){m.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,c&&(this.trigger("cuechange"),c=!1),m.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});var g=function(){e.stopTracking()};return e.tech_.one("dispose",g),s!=="disabled"&&e.startTracking(),Object.defineProperties(ee(e),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return s},set:function(_){!El[_]||s!==_&&(s=_,!this.preload_&&s!=="disabled"&&this.cues.length===0&&Al(this.src,this),this.stopTracking(),s!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?u:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(this.cues.length===0)return l;for(var _=this.tech_.currentTime(),b=[],S=0,x=this.cues.length;S<x;S++){var w=this.cues[S];(w.startTime<=_&&w.endTime>=_||w.startTime===w.endTime&&w.startTime<=_&&w.startTime+.5>=_)&&b.push(w)}if(c=!1,b.length!==this.activeCues_.length)c=!0;else for(var O=0;O<b.length;O++)this.activeCues_.indexOf(b[O])===-1&&(c=!0);return this.activeCues_=b,l.setCues_(this.activeCues_),l},set:function(){}}}),i.src?(e.src=i.src,e.preload_||(e.loaded_=!0),(e.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&Al(e.src,ee(e))):e.loaded_=!0,e}var r=t.prototype;return r.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},r.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},r.addCue=function(e){var i=e;if(A.vttjs&&!(e instanceof A.vttjs.VTTCue)){i=new A.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(var s in e)s in i||(i[s]=e[s]);i.id=e.id,i.originalCue_=e}for(var o=this.tech_.textTracks(),u=0;u<o.length;u++)o[u]!==this&&o[u].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)},r.removeCue=function(e){for(var i=this.cues_.length;i--;){var s=this.cues_[i];if(s===e||s.originalCue_&&s.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}},t}(xo);$i.prototype.allowedEvents_={cuechange:"cuechange"};var jc=function(a){W(t,a);function t(r){var n;r===void 0&&(r={});var e=ve(r,{kind:A0[r.kind]||""});n=a.call(this,e)||this;var i=!1;return Object.defineProperty(ee(n),"enabled",{get:function(){return i},set:function(o){typeof o!="boolean"||o===i||(i=o,this.trigger("enabledchange"))}}),e.enabled&&(n.enabled=e.enabled),n.loaded_=!0,n}return t}(xo),Gc=function(a){W(t,a);function t(r){var n;r===void 0&&(r={});var e=ve(r,{kind:C0[r.kind]||""});n=a.call(this,e)||this;var i=!1;return Object.defineProperty(ee(n),"selected",{get:function(){return i},set:function(o){typeof o!="boolean"||o===i||(i=o,this.trigger("selectedchange"))}}),e.selected&&(n.selected=e.selected),n}return t}(xo),Wc=0,k0=1,zc=2,P0=3,ei=function(a){W(t,a);function t(r){var n;r===void 0&&(r={}),n=a.call(this)||this;var e,i=new $i(r);return n.kind=i.kind,n.src=i.src,n.srclang=i.language,n.label=i.label,n.default=i.default,Object.defineProperties(ee(n),{readyState:{get:function(){return e}},track:{get:function(){return i}}}),e=Wc,i.addEventListener("loadeddata",function(){e=zc,n.trigger({type:"load",target:ee(n)})}),n}return t}(Ie);ei.prototype.allowedEvents_={load:"load"};ei.NONE=Wc;ei.LOADING=k0;ei.LOADED=zc;ei.ERROR=P0;var st={audio:{ListClass:x0,TrackClass:jc,capitalName:"Audio"},video:{ListClass:S0,TrackClass:Gc,capitalName:"Video"},text:{ListClass:Hc,TrackClass:$i,capitalName:"Text"}};Object.keys(st).forEach(function(a){st[a].getterName=a+"Tracks",st[a].privateName=a+"Tracks_"});var $r={remoteText:{ListClass:Hc,TrackClass:$i,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:E0,TrackClass:ei,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},qe=ot({},st,$r);$r.names=Object.keys($r);st.names=Object.keys(st);qe.names=[].concat($r.names).concat(st.names);function I0(a,t,r,n,e){e===void 0&&(e={});var i=a.textTracks();e.kind=t,r&&(e.label=r),n&&(e.language=n),e.tech=a;var s=new qe.text.TrackClass(e);return i.addTrack(s),s}var he=function(a){W(t,a);function t(n,e){var i;return n===void 0&&(n={}),e===void 0&&(e=function(){}),n.reportTouchActivity=!1,i=a.call(this,null,n,e)||this,i.onDurationChange_=function(s){return i.onDurationChange(s)},i.trackProgress_=function(s){return i.trackProgress(s)},i.trackCurrentTime_=function(s){return i.trackCurrentTime(s)},i.stopTrackingCurrentTime_=function(s){return i.stopTrackingCurrentTime(s)},i.disposeSourceHandler_=function(s){return i.disposeSourceHandler(s)},i.queuedHanders_=new Set,i.hasStarted_=!1,i.on("playing",function(){this.hasStarted_=!0}),i.on("loadstart",function(){this.hasStarted_=!1}),qe.names.forEach(function(s){var o=qe[s];n&&n[o.getterName]&&(i[o.privateName]=n[o.getterName])}),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(s){n["native"+s+"Tracks"]===!1&&(i["featuresNative"+s+"Tracks"]=!1)}),n.nativeCaptions===!1||n.nativeTextTracks===!1?i.featuresNativeTextTracks=!1:(n.nativeCaptions===!0||n.nativeTextTracks===!0)&&(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.preloadTextTracks=n.preloadTextTracks!==!1,i.autoRemoteTextTracks_=new qe.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}var r=t.prototype;return r.triggerSourceset=function(e){var i=this;this.isReady_||this.one("ready",function(){return i.setTimeout(function(){return i.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},r.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},r.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},r.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ye(this,function(){var i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress()}),500)},r.onDurationChange=function(e){this.duration_=this.duration()},r.buffered=function(){return cr(0,0)},r.bufferedPercent=function(){return Vc(this.buffered(),this.duration_)},r.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},r.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},r.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},r.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},r.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.dispose=function(){this.clearTracks(st.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),a.prototype.dispose.call(this)},r.clearTracks=function(e){var i=this;e=[].concat(e),e.forEach(function(s){for(var o=i[s+"Tracks"]()||[],u=o.length;u--;){var l=o[u];s==="text"&&i.removeRemoteTextTrack(l),o.removeTrack(l)}})},r.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],i=e.length;i--;){var s=e[i];this.removeRemoteTextTrack(s)}},r.reset=function(){},r.crossOrigin=function(){},r.setCrossOrigin=function(){},r.error=function(e){return e!==void 0&&(this.error_=new ze(e),this.trigger("error")),this.error_},r.played=function(){return this.hasStarted_?cr(0,0):cr()},r.play=function(){},r.setScrubbing=function(){},r.scrubbing=function(){},r.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},r.initTrackListeners=function(){var e=this;st.names.forEach(function(i){var s=st[i],o=function(){e.trigger(i+"trackchange")},u=e[s.getterName]();u.addEventListener("removetrack",o),u.addEventListener("addtrack",o),e.on("dispose",function(){u.removeEventListener("removetrack",o),u.removeEventListener("addtrack",o)})})},r.addWebVttScript_=function(){var e=this;if(!A.WebVTT)if(G.body.contains(this.el())){if(!this.options_["vtt.js"]&&Ri(ps.exports)&&Object.keys(ps.exports).length>0){this.trigger("vttjsloaded");return}var i=G.createElement("script");i.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",i.onload=function(){e.trigger("vttjsloaded")},i.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){i.onload=null,i.onerror=null}),A.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.addWebVttScript_)},r.emulateTextTracks=function(){var e=this,i=this.textTracks(),s=this.remoteTextTracks(),o=function(m){return i.addTrack(m.track)},u=function(m){return i.removeTrack(m.track)};s.on("addtrack",o),s.on("removetrack",u),this.addWebVttScript_();var l=function(){return e.trigger("texttrackchange")},c=function(){l();for(var m=0;m<i.length;m++){var _=i[m];_.removeEventListener("cuechange",l),_.mode==="showing"&&_.addEventListener("cuechange",l)}};c(),i.addEventListener("change",c),i.addEventListener("addtrack",c),i.addEventListener("removetrack",c),this.on("dispose",function(){s.off("addtrack",o),s.off("removetrack",u),i.removeEventListener("change",c),i.removeEventListener("addtrack",c),i.removeEventListener("removetrack",c);for(var g=0;g<i.length;g++){var m=i[g];m.removeEventListener("cuechange",l)}})},r.addTextTrack=function(e,i,s){if(!e)throw new Error("TextTrack kind is required but was not provided");return I0(this,e,i,s)},r.createRemoteTextTrack=function(e){var i=ve(e,{tech:this});return new $r.remoteTextEl.TrackClass(i)},r.addRemoteTextTrack=function(e,i){var s=this;e===void 0&&(e={});var o=this.createRemoteTextTrack(e);return i!==!0&&i!==!1&&(ie.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().addTrackElement_(o),this.remoteTextTracks().addTrack(o.track),i!==!0&&this.ready(function(){return s.autoRemoteTextTracks_.addTrack(o.track)}),o},r.removeRemoteTextTrack=function(e){var i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},r.getVideoPlaybackQuality=function(){return{}},r.requestPictureInPicture=function(){var e=this.options_.Promise||A.Promise;if(e)return e.reject()},r.disablePictureInPicture=function(){return!0},r.setDisablePictureInPicture=function(){},r.requestVideoFrameCallback=function(e){var i=this,s=Gt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(s),this.one("playing",function(){i.queuedHanders_.has(s)&&(i.queuedHanders_.delete(s),e())})):this.requestNamedAnimationFrame(s,e),s},r.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},r.setPoster=function(){},r.playsinline=function(){},r.setPlaysinline=function(){},r.overrideNativeAudioTracks=function(){},r.overrideNativeVideoTracks=function(){},r.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,i){return t.canPlayType(e.type)},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Ee(e),t.techs_[e]=i,t.techs_[Ln(e)]=i,e!=="Tech"&&t.defaultTechOrder_.push(e),i},t.getTech=function(e){if(!!e){if(t.techs_&&t.techs_[e])return t.techs_[e];if(e=Ee(e),A&&A.videojs&&A.videojs[e])return ie.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),A.videojs[e]}},t}(V);qe.names.forEach(function(a){var t=qe[a];he.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}});he.prototype.featuresVolumeControl=!0;he.prototype.featuresMuteControl=!0;he.prototype.featuresFullscreenResize=!1;he.prototype.featuresPlaybackRate=!1;he.prototype.featuresProgressEvents=!1;he.prototype.featuresSourceset=!1;he.prototype.featuresTimeupdateEvents=!1;he.prototype.featuresNativeTextTracks=!1;he.prototype.featuresVideoFrameCallback=!1;he.withSourceHandlers=function(a){a.registerSourceHandler=function(r,n){var e=a.sourceHandlers;e||(e=a.sourceHandlers=[]),n===void 0&&(n=e.length),e.splice(n,0,r)},a.canPlayType=function(r){for(var n=a.sourceHandlers||[],e,i=0;i<n.length;i++)if(e=n[i].canPlayType(r),e)return e;return""},a.selectSourceHandler=function(r,n){for(var e=a.sourceHandlers||[],i,s=0;s<e.length;s++)if(i=e[s].canHandleSource(r,n),i)return e[s];return null},a.canPlaySource=function(r,n){var e=a.selectSourceHandler(r,n);return e?e.canHandleSource(r,n):""};var t=["seekable","seeking","duration"];t.forEach(function(r){var n=this[r];typeof n=="function"&&(this[r]=function(){return this.sourceHandler_&&this.sourceHandler_[r]?this.sourceHandler_[r].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},a.prototype),a.prototype.setSource=function(r){var n=a.selectSourceHandler(r,this.options_);n||(a.nativeSourceHandler?n=a.nativeSourceHandler:ie.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==a.nativeSourceHandler&&(this.currentSource_=r),this.sourceHandler_=n.handleSource(r,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},a.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};V.registerComponent("Tech",he);he.registerTech("Tech",he);he.defaultTechOrder_=[];var fr={},Ps={},zn={};function O0(a,t){fr[a]=fr[a]||[],fr[a].push(t)}function L0(a,t,r){a.setTimeout(function(){return sr(t,fr[t.type],r,a)},1)}function F0(a,t){a.forEach(function(r){return r.setTech&&r.setTech(t)})}function R0(a,t,r){return a.reduceRight(Co(r),t[r]())}function M0(a,t,r,n){return t[r](a.reduce(Co(r),n))}function Dl(a,t,r,n){n===void 0&&(n=null);var e="call"+Ee(r),i=a.reduce(Co(e),n),s=i===zn,o=s?null:t[r](i);return U0(a,r,o,s),o}var N0={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},B0={setCurrentTime:1,setMuted:1,setVolume:1},wl={play:1,pause:1};function Co(a){return function(t,r){return t===zn?zn:r[a]?r[a](t):t}}function U0(a,t,r,n){for(var e=a.length-1;e>=0;e--){var i=a[e];i[t]&&i[t](n,r)}}function V0(a){Ps[a.id()]=null}function H0(a,t){var r=Ps[a.id()],n=null;if(r==null)return n=t(a),Ps[a.id()]=[[t,n]],n;for(var e=0;e<r.length;e++){var i=r[e],s=i[0],o=i[1];s===t&&(n=o)}return n===null&&(n=t(a),r.push([t,n])),n}function sr(a,t,r,n,e,i){a===void 0&&(a={}),t===void 0&&(t=[]),e===void 0&&(e=[]),i===void 0&&(i=!1);var s=t,o=s[0],u=s.slice(1);if(typeof o=="string")sr(a,fr[o],r,n,e,i);else if(o){var l=H0(n,o);if(!l.setSource)return e.push(l),sr(a,u,r,n,e,i);l.setSource(be({},a),function(c,g){if(c)return sr(a,u,r,n,e,i);e.push(l),sr(g,a.type===g.type?u:fr[g.type],r,n,e,i)})}else u.length?sr(a,u,r,n,e,i):i?r(a,e):sr(a,fr["*"],r,n,e,!0)}var q0={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},$n=function(t){t===void 0&&(t="");var r=Eo(t),n=q0[r.toLowerCase()];return n||""},j0=function(t,r){if(!r)return"";if(t.cache_.source.src===r&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter(function(o){return o.src===r});if(n.length)return n[0].type;for(var e=t.$$("source"),i=0;i<e.length;i++){var s=e[i];if(s.type&&s.src&&s.src===r)return s.type}return $n(r)},G0=function a(t){if(Array.isArray(t)){var r=[];t.forEach(function(n){n=a(n),Array.isArray(n)?r=r.concat(n):Ut(n)&&r.push(n)}),t=r}else typeof t=="string"&&t.trim()?t=[kl({src:t})]:Ut(t)&&typeof t.src=="string"&&t.src&&t.src.trim()?t=[kl(t)]:t=[];return t};function kl(a){if(!a.type){var t=$n(a.src);t&&(a.type=t)}return a}var W0=function(a){W(t,a);function t(r,n,e){var i,s=ve({createEl:!1},n);if(i=a.call(this,r,s,e)||this,!n.playerOptions.sources||n.playerOptions.sources.length===0)for(var o=0,u=n.playerOptions.techOrder;o<u.length;o++){var l=Ee(u[o]),c=he.getTech(l);if(l||(c=V.getComponent(l)),c&&c.isSupported()){r.loadTech_(l);break}}else r.src(n.playerOptions.sources);return i}return t}(V);V.registerComponent("MediaLoader",W0);var Ea=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.options_.controlText&&i.controlText(i.options_.controlText),i.handleMouseOver_=function(s){return i.handleMouseOver(s)},i.handleMouseOut_=function(s){return i.handleMouseOut(s)},i.handleClick_=function(s){return i.handleClick(s)},i.handleKeyDown_=function(s){return i.handleKeyDown(s)},i.emitTapEvents(),i.enable(),i}var r=t.prototype;return r.createEl=function(e,i,s){e===void 0&&(e="div"),i===void 0&&(i={}),s===void 0&&(s={}),i=be({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&ie.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),s=be({role:"button"},s),this.tabIndex_=i.tabIndex;var o=ne(e,i,s);return o.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o},r.dispose=function(){this.controlTextEl_=null,a.prototype.dispose.call(this)},r.createControlTextEl=function(e){return this.controlTextEl_=ne("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},r.controlText=function(e,i){if(i===void 0&&(i=this.el()),e===void 0)return this.controlText_||"Need Text";var s=this.localize(e);this.controlText_=e,mr(this.controlTextEl_,s),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",s)},r.buildCSSClass=function(){return"vjs-control vjs-button "+a.prototype.buildCSSClass.call(this)},r.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},r.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},r.handleLanguagechange=function(){this.controlText(this.controlText_)},r.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},r.handleKeyDown=function(e){te.isEventKey(e,"Space")||te.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):a.prototype.handleKeyDown.call(this,e)},t}(V);V.registerComponent("ClickableComponent",Ea);var z0=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.update(),i.update_=function(s){return i.update(s)},n.on("posterchange",i.update_),i}var r=t.prototype;return r.dispose=function(){this.player().off("posterchange",this.update_),a.prototype.dispose.call(this)},r.createEl=function(){var e=ne("div",{className:"vjs-poster",tabIndex:-1});return e},r.update=function(e){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},r.setSrc=function(e){var i="";e&&(i='url("'+e+'")'),this.el_.style.backgroundImage=i},r.handleClick=function(e){if(!!this.player_.controls()){var i=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;this.player_.tech(!0)&&!((Wi||Gi)&&i)&&this.player_.tech(!0).focus(),this.player_.paused()?_t(this.player_.play()):this.player_.pause()}},t}(Ea);V.registerComponent("PosterImage",z0);var at="#222",Pl="#ccc",$0={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function is(a,t){var r;if(a.length===4)r=a[1]+a[1]+a[2]+a[2]+a[3]+a[3];else if(a.length===7)r=a.slice(1);else throw new Error("Invalid color code provided, "+a+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(r.slice(0,2),16)+","+parseInt(r.slice(2,4),16)+","+parseInt(r.slice(4,6),16)+","+t+")"}function ns(a,t,r){try{a.style[t]=r}catch{return}}var K0=function(a){W(t,a);function t(n,e,i){var s;s=a.call(this,n,e,i)||this;var o=function(l){return s.updateDisplay(l)};return n.on("loadstart",function(u){return s.toggleDisplay(u)}),n.on("texttrackchange",o),n.on("loadedmetadata",function(u){return s.preselectTrack(u)}),n.ready(ye(ee(s),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks){this.hide();return}n.on("fullscreenchange",o),n.on("playerresize",o),A.addEventListener("orientationchange",o),n.on("dispose",function(){return A.removeEventListener("orientationchange",o)});for(var u=this.options_.playerOptions.tracks||[],l=0;l<u.length;l++)this.player_.addRemoteTextTrack(u[l],!0);this.preselectTrack()})),s}var r=t.prototype;return r.preselectTrack=function(){for(var e={captions:1,subtitles:1},i=this.player_.textTracks(),s=this.player_.cache_.selectedLanguage,o,u,l,c=0;c<i.length;c++){var g=i[c];s&&s.enabled&&s.language&&s.language===g.language&&g.kind in e?g.kind===s.kind?l=g:l||(l=g):s&&!s.enabled?(l=null,o=null,u=null):g.default&&(g.kind==="descriptions"&&!o?o=g:g.kind in e&&!u&&(u=g))}l?l.mode="showing":u?u.mode="showing":o&&(o.mode="showing")},r.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},r.clearDisplay=function(){typeof A.WebVTT=="function"&&A.WebVTT.processCues(A,[],this.el_)},r.updateDisplay=function(){var e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){for(var s=[],o=0;o<e.length;++o){var u=e[o];u.mode==="showing"&&s.push(u)}this.updateForTrack(s);return}for(var l=null,c=null,g=e.length;g--;){var m=e[g];m.mode==="showing"&&(m.kind==="descriptions"?l=m:c=m)}c?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(c)):l&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(l))},r.updateDisplayState=function(e){for(var i=this.player_.textTrackSettings.getValues(),s=e.activeCues,o=s.length;o--;){var u=s[o];if(!!u){var l=u.displayState;if(i.color&&(l.firstChild.style.color=i.color),i.textOpacity&&ns(l.firstChild,"color",is(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(l.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&ns(l.firstChild,"backgroundColor",is(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?ns(l,"backgroundColor",is(i.windowColor,i.windowOpacity)):l.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?l.firstChild.style.textShadow="2px 2px 3px "+at+", 2px 2px 4px "+at+", 2px 2px 5px "+at:i.edgeStyle==="raised"?l.firstChild.style.textShadow="1px 1px "+at+", 2px 2px "+at+", 3px 3px "+at:i.edgeStyle==="depressed"?l.firstChild.style.textShadow="1px 1px "+Pl+", 0 1px "+Pl+", -1px -1px "+at+", 0 -1px "+at:i.edgeStyle==="uniform"&&(l.firstChild.style.textShadow="0 0 4px "+at+", 0 0 4px "+at+", 0 0 4px "+at+", 0 0 4px "+at)),i.fontPercent&&i.fontPercent!==1){var c=A.parseFloat(l.style.fontSize);l.style.fontSize=c*i.fontPercent+"px",l.style.height="auto",l.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?l.firstChild.style.fontVariant="small-caps":l.firstChild.style.fontFamily=$0[i.fontFamily])}}},r.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),!(typeof A.WebVTT!="function"||e.every(function(_){return!_.activeCues}))){for(var i=[],s=0;s<e.length;++s)for(var o=e[s],u=0;u<o.activeCues.length;++u)i.push(o.activeCues[u]);A.WebVTT.processCues(A,i,this.el_);for(var l=0;l<e.length;++l){for(var c=e[l],g=0;g<c.activeCues.length;++g){var m=c.activeCues[g].displayState;Ft(m,"vjs-text-track-cue"),Ft(m,"vjs-text-track-cue-"+(c.language?c.language:l)),c.language&&Gr(m,"lang",c.language)}this.player_.textTrackSettings&&this.updateDisplayState(c)}}},t}(V);V.registerComponent("TextTrackDisplay",K0);var X0=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.createEl=function(){var e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),s=ne("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),o=a.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(s),o},t}(V);V.registerComponent("LoadingSpinner",X0);var ft=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.createEl=function(e,i,s){i===void 0&&(i={}),s===void 0&&(s={}),e="button",i=be({className:this.buildCSSClass()},i),s=be({type:"button"},s);var o=ne(e,i,s);return o.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o},r.addChild=function(e,i){i===void 0&&(i={});var s=this.constructor.name;return ie.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),V.prototype.addChild.call(this,e,i)},r.enable=function(){a.prototype.enable.call(this),this.el_.removeAttribute("disabled")},r.disable=function(){a.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},r.handleKeyDown=function(e){if(te.isEventKey(e,"Space")||te.isEventKey(e,"Enter")){e.stopPropagation();return}a.prototype.handleKeyDown.call(this,e)},t}(Ea);V.registerComponent("Button",ft);var $c=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.mouseused_=!1,i.on("mousedown",function(s){return i.handleMouseDown(s)}),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-big-play-button"},r.handleClick=function(e){var i=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var s=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;_t(i),this.player_.tech(!0)&&!((Wi||Gi)&&s)&&this.player_.tech(!0).focus();return}var o=this.player_.getChild("controlBar"),u=o&&o.getChild("playToggle");if(!u){this.player_.tech(!0).focus();return}var l=function(){return u.focus()};Di(i)?i.then(l,function(){}):this.setTimeout(l,1)},r.handleKeyDown=function(e){this.mouseused_=!1,a.prototype.handleKeyDown.call(this,e)},r.handleMouseDown=function(e){this.mouseused_=!0},t}(ft);$c.prototype.controlText_="Play Video";V.registerComponent("BigPlayButton",$c);var Y0=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.controlText(e&&e.controlText||i.localize("Close")),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-close-button "+a.prototype.buildCSSClass.call(this)},r.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},r.handleKeyDown=function(e){te.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):a.prototype.handleKeyDown.call(this,e)},t}(ft);V.registerComponent("CloseButton",Y0);var Kc=function(a){W(t,a);function t(n,e){var i;return e===void 0&&(e={}),i=a.call(this,n,e)||this,e.replay=e.replay===void 0||e.replay,i.on(n,"play",function(s){return i.handlePlay(s)}),i.on(n,"pause",function(s){return i.handlePause(s)}),e.replay&&i.on(n,"ended",function(s){return i.handleEnded(s)}),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-play-control "+a.prototype.buildCSSClass.call(this)},r.handleClick=function(e){this.player_.paused()?_t(this.player_.play()):this.player_.pause()},r.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},r.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},r.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},r.handleEnded=function(e){var i=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(s){return i.handleSeeked(s)})},t}(ft);Kc.prototype.controlText_="Play";V.registerComponent("PlayToggle",Kc);var Xc=function(t,r){t=t<0?0:t;var n=Math.floor(t%60),e=Math.floor(t/60%60),i=Math.floor(t/3600),s=Math.floor(r/60%60),o=Math.floor(r/3600);return(isNaN(t)||t===1/0)&&(i=e=n="-"),i=i>0||o>0?i+":":"",e=((i||s>=10)&&e<10?"0"+e:e)+":",n=n<10?"0"+n:n,i+e+n},Ao=Xc;function Q0(a){Ao=a}function J0(){Ao=Xc}function Kr(a,t){return t===void 0&&(t=a),Ao(a,t)}var ti=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.on(n,["timeupdate","ended"],function(s){return i.updateContent(s)}),i.updateTextNode_(),i}var r=t.prototype;return r.createEl=function(){var e=this.buildCSSClass(),i=a.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control"}),s=ne("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\xA0"},{role:"presentation"});return i.appendChild(s),this.contentEl_=ne("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),i.appendChild(this.contentEl_),i},r.dispose=function(){this.contentEl_=null,this.textNode_=null,a.prototype.dispose.call(this)},r.updateTextNode_=function(e){var i=this;e===void 0&&(e=0),e=Kr(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(!!i.contentEl_){var s=i.textNode_;s&&i.contentEl_.firstChild!==s&&(s=null,ie.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),i.textNode_=G.createTextNode(i.formattedTime_),i.textNode_&&(s?i.contentEl_.replaceChild(i.textNode_,s):i.contentEl_.appendChild(i.textNode_))}}))},r.updateContent=function(e){},t}(V);ti.prototype.labelText_="Time";ti.prototype.controlText_="Time";V.registerComponent("TimeDisplay",ti);var Do=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-current-time"},r.updateContent=function(e){var i;this.player_.ended()?i=this.player_.duration():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)},t}(ti);Do.prototype.labelText_="Current Time";Do.prototype.controlText_="Current Time";V.registerComponent("CurrentTimeDisplay",Do);var wo=function(a){W(t,a);function t(n,e){var i;i=a.call(this,n,e)||this;var s=function(u){return i.updateContent(u)};return i.on(n,"durationchange",s),i.on(n,"loadstart",s),i.on(n,"loadedmetadata",s),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-duration"},r.updateContent=function(e){var i=this.player_.duration();this.updateTextNode_(i)},t}(ti);wo.prototype.labelText_="Duration";wo.prototype.controlText_="Duration";V.registerComponent("DurationDisplay",wo);var Z0=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.createEl=function(){var e=a.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=a.prototype.createEl.call(this,"div"),s=a.prototype.createEl.call(this,"span",{textContent:"/"});return i.appendChild(s),e.appendChild(i),e},t}(V);V.registerComponent("TimeDivider",Z0);var ko=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.on(n,"durationchange",function(s){return i.updateContent(s)}),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-remaining-time"},r.createEl=function(){var e=a.prototype.createEl.call(this);return this.options_.displayNegative!==!1&&e.insertBefore(ne("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},r.updateContent=function(e){if(typeof this.player_.duration()=="number"){var i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i)}},t}(ti);ko.prototype.labelText_="Remaining Time";ko.prototype.controlText_="Remaining Time";V.registerComponent("RemainingTimeDisplay",ko);var ey=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.updateShowing(),i.on(i.player(),"durationchange",function(s){return i.updateShowing(s)}),i}var r=t.prototype;return r.createEl=function(){var e=a.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ne("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(ne("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\xA0"})),this.contentEl_.appendChild(G.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e},r.dispose=function(){this.contentEl_=null,a.prototype.dispose.call(this)},r.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(V);V.registerComponent("LiveDisplay",ey);var Yc=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.updateLiveEdgeStatus(),i.player_.liveTracker&&(i.updateLiveEdgeStatusHandler_=function(s){return i.updateLiveEdgeStatus(s)},i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatusHandler_)),i}var r=t.prototype;return r.createEl=function(){var e=a.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=ne("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},r.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},r.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},r.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,a.prototype.dispose.call(this)},t}(ft);Yc.prototype.controlText_="Seek to live, currently playing live";V.registerComponent("SeekToLive",Yc);var Ca=function(t,r,n){return t=Number(t),Math.min(n,Math.max(r,isNaN(t)?r:t))},Po=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.handleMouseDown_=function(s){return i.handleMouseDown(s)},i.handleMouseUp_=function(s){return i.handleMouseUp(s)},i.handleKeyDown_=function(s){return i.handleKeyDown(s)},i.handleClick_=function(s){return i.handleClick(s)},i.handleMouseMove_=function(s){return i.handleMouseMove(s)},i.update_=function(s){return i.update(s)},i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}var r=t.prototype;return r.enabled=function(){return this.enabled_},r.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},r.disable=function(){if(!!this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},r.createEl=function(e,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i.className=i.className+" vjs-slider",i=be({tabIndex:0},i),s=be({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},s),a.prototype.createEl.call(this,e,i,s)},r.handleMouseDown=function(e){var i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!jt&&e.preventDefault(),Cc(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},r.handleMouseMove=function(e){},r.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Ac(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},r.update=function(){var e=this;if(!(!this.el_||!this.bar)){var i=this.getProgress();return i===this.progress_||(this.progress_=i,this.requestNamedAnimationFrame("Slider#update",function(){var s=e.vertical()?"height":"width";e.bar.el().style[s]=(i*100).toFixed(2)+"%"})),i}},r.getProgress=function(){return Number(Ca(this.getPercent(),0,1).toFixed(4))},r.calculateDistance=function(e){var i=_a(this.el_,e);return this.vertical()?i.y:i.x},r.handleKeyDown=function(e){te.isEventKey(e,"Left")||te.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):te.isEventKey(e,"Right")||te.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):a.prototype.handleKeyDown.call(this,e)},r.handleClick=function(e){e.stopPropagation(),e.preventDefault()},r.vertical=function(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(V);V.registerComponent("Slider",Po);var as=function(t,r){return Ca(t/r*100,0,100).toFixed(2)+"%"},ty=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.partEls_=[],i.on(n,"progress",function(s){return i.update(s)}),i}var r=t.prototype;return r.createEl=function(){var e=a.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=ne("span",{className:"vjs-control-text"}),s=ne("span",{textContent:this.localize("Loaded")}),o=G.createTextNode(": ");return this.percentageEl_=ne("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(s),i.appendChild(o),i.appendChild(this.percentageEl_),e},r.dispose=function(){this.partEls_=null,this.percentageEl_=null,a.prototype.dispose.call(this)},r.update=function(e){var i=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var s=i.player_.liveTracker,o=i.player_.buffered(),u=s&&s.isLive()?s.seekableEnd():i.player_.duration(),l=i.player_.bufferedEnd(),c=i.partEls_,g=as(l,u);i.percent_!==g&&(i.el_.style.width=g,mr(i.percentageEl_,g),i.percent_=g);for(var m=0;m<o.length;m++){var _=o.start(m),b=o.end(m),S=c[m];S||(S=i.el_.appendChild(ne()),c[m]=S),!(S.dataset.start===_&&S.dataset.end===b)&&(S.dataset.start=_,S.dataset.end=b,S.style.left=as(_,l),S.style.width=as(b-_,l))}for(var x=c.length;x>o.length;x--)i.el_.removeChild(c[x-1]);c.length=o.length})},t}(V);V.registerComponent("LoadProgressBar",ty);var ry=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.update=Vt(ye(ee(i),i.update),ht),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},r.update=function(e,i,s){var o=Ni(this.el_),u=Wr(this.player_.el()),l=e.width*i;if(!(!u||!o)){var c=e.left-u.left+l,g=e.width-l+(u.right-e.right),m=o.width/2;c<m?m+=m-c:g<m&&(m=g),m<0?m=0:m>o.width&&(m=o.width),m=Math.round(m),this.el_.style.right="-"+m+"px",this.write(s)}},r.write=function(e){mr(this.el_,e)},r.updateTime=function(e,i,s,o){var u=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var l,c=u.player_.duration();if(u.player_.liveTracker&&u.player_.liveTracker.isLive()){var g=u.player_.liveTracker.liveWindow(),m=g-i*g;l=(m<1?"":"-")+Kr(m,g)}else l=Kr(s,c);u.update(e,i,l),o&&o()})},t}(V);V.registerComponent("TimeTooltip",ry);var Io=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.update=Vt(ye(ee(i),i.update),ht),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},r.update=function(e,i){var s=this.getChild("timeTooltip");if(!!s){var o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,i,o)}},t}(V);Io.prototype.options_={children:[]};!$e&&!qt&&Io.prototype.options_.children.push("timeTooltip");V.registerComponent("PlayProgressBar",Io);var Qc=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.update=Vt(ye(ee(i),i.update),ht),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},r.update=function(e,i){var s=this,o=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,o,function(){s.el_.style.left=e.width*i+"px"})},t}(V);Qc.prototype.options_={children:["timeTooltip"]};V.registerComponent("MouseTimeDisplay",Qc);var An=5,Il=12,Oo=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.setEventHandlers_(),i}var r=t.prototype;return r.setEventHandlers_=function(){var e=this;this.update_=ye(this,this.update),this.update=Vt(this.update_,ht),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(i){return e.enableInterval_(i)},this.disableIntervalHandler_=function(i){return e.disableInterval_(i)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in G&&"visibilityState"in G&&this.on(G,"visibilitychange",this.toggleVisibility_)},r.toggleVisibility_=function(e){G.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},r.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,ht))},r.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||!this.updateInterval||(this.clearInterval(this.updateInterval),this.updateInterval=null)},r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},r.update=function(e){var i=this;if(G.visibilityState!=="hidden"){var s=a.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var o=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),u=i.player_.liveTracker,l=i.player_.duration();u&&u.isLive()&&(l=i.player_.liveTracker.liveCurrentTime()),i.percent_!==s&&(i.el_.setAttribute("aria-valuenow",(s*100).toFixed(2)),i.percent_=s),(i.currentTime_!==o||i.duration_!==l)&&(i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[Kr(o,l),Kr(l,l)],"{1} of {2}")),i.currentTime_=o,i.duration_=l),i.bar&&i.bar.update(Wr(i.el()),i.getProgress())}),s}},r.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},r.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},r.getPercent=function(){var e=this.getCurrentTime_(),i,s=this.player_.liveTracker;return s&&s.isLive()?(i=(e-s.seekableStart())/s.liveWindow(),s.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i},r.handleMouseDown=function(e){!Bi(e)||(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),a.prototype.handleMouseDown.call(this,e))},r.handleMouseMove=function(e,i){if(i===void 0&&(i=!1),!!Bi(e)){!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var s,o=this.calculateDistance(e),u=this.player_.liveTracker;if(!u||!u.isLive())s=o*this.player_.duration(),s===this.player_.duration()&&(s=s-.1);else{if(o>=.99){u.seekToLiveEdge();return}var l=u.seekableStart(),c=u.liveCurrentTime();if(s=l+o*u.liveWindow(),s>=c&&(s=c),s<=l&&(s=l+.1),s===1/0)return}this.userSeek_(s)}},r.enable=function(){a.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.show()},r.disable=function(){a.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");!e||e.hide()},r.handleMouseUp=function(e){a.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?_t(this.player_.play()):this.update_()},r.stepForward=function(){this.userSeek_(this.player_.currentTime()+An)},r.stepBack=function(){this.userSeek_(this.player_.currentTime()-An)},r.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},r.handleKeyDown=function(e){var i=this.player_.liveTracker;if(te.isEventKey(e,"Space")||te.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(te.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(te.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(te(e))){e.preventDefault(),e.stopPropagation();var s=(te.codes[te(e)]-te.codes[0])*10/100;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*s):this.userSeek_(this.player_.duration()*s)}else te.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-An*Il)):te.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+An*Il)):a.prototype.handleKeyDown.call(this,e)},r.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in G&&"visibilityState"in G&&this.off(G,"visibilitychange",this.toggleVisibility_),a.prototype.dispose.call(this)},t}(Po);Oo.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};!$e&&!qt&&Oo.prototype.options_.children.splice(1,0,"mouseTimeDisplay");V.registerComponent("SeekBar",Oo);var Jc=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.handleMouseMove=Vt(ye(ee(i),i.handleMouseMove),ht),i.throttledHandleMouseSeek=Vt(ye(ee(i),i.handleMouseSeek),ht),i.handleMouseUpHandler_=function(s){return i.handleMouseUp(s)},i.handleMouseDownHandler_=function(s){return i.handleMouseDown(s)},i.enable(),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},r.handleMouseMove=function(e){var i=this.getChild("seekBar");if(!!i){var s=i.getChild("playProgressBar"),o=i.getChild("mouseTimeDisplay");if(!(!s&&!o)){var u=i.el(),l=Ni(u),c=_a(u,e).x;c=Ca(c,0,1),o&&o.update(l,c),s&&s.update(l,i.getProgress())}}},r.handleMouseSeek=function(e){var i=this.getChild("seekBar");i&&i.handleMouseMove(e)},r.enabled=function(){return this.enabled_},r.disable=function(){if(this.children().forEach(function(i){return i.disable&&i.disable()}),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&_t(this.player_.play())}},r.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},r.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},r.handleMouseDown=function(e){var i=this.el_.ownerDocument,s=this.getChild("seekBar");s&&s.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)},r.handleMouseUp=function(e){var i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(V);Jc.prototype.options_={children:["seekBar"]};V.registerComponent("ProgressControl",Jc);var Zc=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.on(n,["enterpictureinpicture","leavepictureinpicture"],function(s){return i.handlePictureInPictureChange(s)}),i.on(n,["disablepictureinpicturechanged","loadedmetadata"],function(s){return i.handlePictureInPictureEnabledChange(s)}),i.on(n,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){var s=n.currentType().substring(0,5)==="audio";s||n.audioPosterMode()||n.audioOnlyMode()?(n.isInPictureInPicture()&&n.exitPictureInPicture(),i.hide()):i.show()}),i.disable(),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-picture-in-picture-control "+a.prototype.buildCSSClass.call(this)},r.handlePictureInPictureEnabledChange=function(){G.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1?this.enable():this.disable()},r.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},r.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(ft);Zc.prototype.controlText_="Picture-in-Picture";V.registerComponent("PictureInPictureToggle",Zc);var ef=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.on(n,"fullscreenchange",function(s){return i.handleFullscreenChange(s)}),G[n.fsApi_.fullscreenEnabled]===!1&&i.disable(),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-fullscreen-control "+a.prototype.buildCSSClass.call(this)},r.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},r.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(ft);ef.prototype.controlText_="Fullscreen";V.registerComponent("FullscreenToggle",ef);var iy=function(t,r){r.tech_&&!r.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(r,"loadstart",function(){r.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},ny=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.createEl=function(){var e=a.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(a.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},t}(V);V.registerComponent("VolumeLevel",ny);var ay=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.update=Vt(ye(ee(i),i.update),ht),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},r.update=function(e,i,s,o){if(!s){var u=Wr(this.el_),l=Wr(this.player_.el()),c=e.width*i;if(!l||!u)return;var g=e.left-l.left+c,m=e.width-c+(l.right-e.right),_=u.width/2;g<_?_+=_-g:m<_&&(_=m),_<0?_=0:_>u.width&&(_=u.width),this.el_.style.right="-"+_+"px"}this.write(o+"%")},r.write=function(e){mr(this.el_,e)},r.updateVolume=function(e,i,s,o,u){var l=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){l.update(e,i,s,o.toFixed(0)),u&&u()})},t}(V);V.registerComponent("VolumeLevelTooltip",ay);var tf=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.update=Vt(ye(ee(i),i.update),ht),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},r.update=function(e,i,s){var o=this,u=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,s,u,function(){s?o.el_.style.bottom=e.height*i+"px":o.el_.style.left=e.width*i+"px"})},t}(V);tf.prototype.options_={children:["volumeLevelTooltip"]};V.registerComponent("MouseVolumeLevelDisplay",tf);var Aa=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.on("slideractive",function(s){return i.updateLastVolume_(s)}),i.on(n,"volumechange",function(s){return i.updateARIAAttributes(s)}),n.ready(function(){return i.updateARIAAttributes()}),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},r.handleMouseDown=function(e){!Bi(e)||a.prototype.handleMouseDown.call(this,e)},r.handleMouseMove=function(e){var i=this.getChild("mouseVolumeLevelDisplay");if(i){var s=this.el(),o=Wr(s),u=this.vertical(),l=_a(s,e);l=u?l.y:l.x,l=Ca(l,0,1),i.update(o,l,u)}!Bi(e)||(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},r.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},r.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},r.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},r.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},r.updateARIAAttributes=function(e){var i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")},r.volumeAsPercentage_=function(){return Math.round(this.player_.volume()*100)},r.updateLastVolume_=function(){var e=this,i=this.player_.volume();this.one("sliderinactive",function(){e.player_.volume()===0&&e.player_.lastVolume_(i)})},t}(Po);Aa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!$e&&!qt&&Aa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Aa.prototype.playerEvent="volumechange";V.registerComponent("VolumeBar",Aa);var rf=function(a){W(t,a);function t(n,e){var i;return e===void 0&&(e={}),e.vertical=e.vertical||!1,(typeof e.volumeBar>"u"||Ri(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),i=a.call(this,n,e)||this,iy(ee(i),n),i.throttledHandleMouseMove=Vt(ye(ee(i),i.handleMouseMove),ht),i.handleMouseUpHandler_=function(s){return i.handleMouseUp(s)},i.on("mousedown",function(s){return i.handleMouseDown(s)}),i.on("touchstart",function(s){return i.handleMouseDown(s)}),i.on("mousemove",function(s){return i.handleMouseMove(s)}),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}var r=t.prototype;return r.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},r.handleMouseDown=function(e){var i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)},r.handleMouseUp=function(e){var i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)},r.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(V);rf.prototype.options_={children:["volumeBar"]};V.registerComponent("VolumeControl",rf);var sy=function(t,r){r.tech_&&!r.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(r,"loadstart",function(){r.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},nf=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,sy(ee(i),n),i.on(n,["loadstart","volumechange"],function(s){return i.update(s)}),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},r.handleClick=function(e){var i=this.player_.volume(),s=this.player_.lastVolume_();if(i===0){var o=s<.1?.1:s;this.player_.volume(o),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},r.update=function(e){this.updateIcon_(),this.updateControlText_()},r.updateIcon_=function(){var e=this.player_.volume(),i=3;$e&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?i=0:e<.33?i=1:e<.67&&(i=2);for(var s=0;s<4;s++)zi(this.el_,"vjs-vol-"+s);Ft(this.el_,"vjs-vol-"+i)},r.updateControlText_=function(){var e=this.player_.muted()||this.player_.volume()===0,i=e?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)},t}(ft);nf.prototype.controlText_="Mute";V.registerComponent("MuteToggle",nf);var af=function(a){W(t,a);function t(n,e){var i;return e===void 0&&(e={}),typeof e.inline<"u"?e.inline=e.inline:e.inline=!0,(typeof e.volumeControl>"u"||Ri(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),i=a.call(this,n,e)||this,i.handleKeyPressHandler_=function(s){return i.handleKeyPress(s)},i.on(n,["loadstart"],function(s){return i.volumePanelState_(s)}),i.on(i.muteToggle,"keyup",function(s){return i.handleKeyPress(s)}),i.on(i.volumeControl,"keyup",function(s){return i.handleVolumeControlKeyUp(s)}),i.on("keydown",function(s){return i.handleKeyPress(s)}),i.on("mouseover",function(s){return i.handleMouseOver(s)}),i.on("mouseout",function(s){return i.handleMouseOut(s)}),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}var r=t.prototype;return r.sliderActive_=function(){this.addClass("vjs-slider-active")},r.sliderInactive_=function(){this.removeClass("vjs-slider-active")},r.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},r.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),a.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},r.dispose=function(){this.handleMouseOut(),a.prototype.dispose.call(this)},r.handleVolumeControlKeyUp=function(e){te.isEventKey(e,"Esc")&&this.muteToggle.focus()},r.handleMouseOver=function(e){this.addClass("vjs-hover"),it(G,"keyup",this.handleKeyPressHandler_)},r.handleMouseOut=function(e){this.removeClass("vjs-hover"),Ne(G,"keyup",this.handleKeyPressHandler_)},r.handleKeyPress=function(e){te.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(V);af.prototype.options_={children:["muteToggle","volumeControl"]};V.registerComponent("VolumePanel",af);var sf=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,e&&(i.menuButton_=e.menuButton),i.focusedChild_=-1,i.on("keydown",function(s){return i.handleKeyDown(s)}),i.boundHandleBlur_=function(s){return i.handleBlur(s)},i.boundHandleTapClick_=function(s){return i.handleTapClick(s)},i}var r=t.prototype;return r.addEventListenerForItem=function(e){e instanceof V&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},r.removeEventListenerForItem=function(e){e instanceof V&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},r.removeChild=function(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),a.prototype.removeChild.call(this,e)},r.addItem=function(e){var i=this.addChild(e);i&&this.addEventListenerForItem(i)},r.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=ne(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=a.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),it(i,"click",function(s){s.preventDefault(),s.stopImmediatePropagation()}),i},r.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,a.prototype.dispose.call(this)},r.handleBlur=function(e){var i=e.relatedTarget||G.activeElement;if(!this.children().some(function(o){return o.el()===i})){var s=this.menuButton_;s&&s.buttonPressed_&&i!==s.el().firstChild&&s.unpressButton()}},r.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var i=this.children();if(!Array.isArray(i))return;var s=i.filter(function(o){return o.el()===e.target})[0];if(!s)return;s.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}},r.handleKeyDown=function(e){te.isEventKey(e,"Left")||te.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(te.isEventKey(e,"Right")||te.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},r.stepForward=function(){var e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)},r.stepBack=function(){var e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)},r.focus=function(e){e===void 0&&(e=0);var i=this.children().slice(),s=i.length&&i[0].hasClass("vjs-menu-title");s&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())},t}(V);V.registerComponent("Menu",sf);var Lo=function(a){W(t,a);function t(n,e){var i;e===void 0&&(e={}),i=a.call(this,n,e)||this,i.menuButton_=new ft(n,e),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var s=ft.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+s,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0;var o=function(l){return i.handleClick(l)};return i.handleMenuKeyUp_=function(u){return i.handleMenuKeyUp(u)},i.on(i.menuButton_,"tap",o),i.on(i.menuButton_,"click",o),i.on(i.menuButton_,"keydown",function(u){return i.handleKeyDown(u)}),i.on(i.menuButton_,"mouseenter",function(){i.addClass("vjs-hover"),i.menu.show(),it(G,"keyup",i.handleMenuKeyUp_)}),i.on("mouseleave",function(u){return i.handleMouseLeave(u)}),i.on("keydown",function(u){return i.handleSubmenuKeyDown(u)}),i}var r=t.prototype;return r.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},r.createMenu=function(){var e=new sf(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var i=ne("li",{className:"vjs-menu-title",textContent:Ee(this.options_.title),tabIndex:-1}),s=new V(this.player_,{el:i});e.addItem(s)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e},r.createItems=function(){},r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},r.buildWrapperCSSClass=function(){var e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";var i=ft.prototype.buildCSSClass();return"vjs-menu-button "+e+" "+i+" "+a.prototype.buildCSSClass.call(this)},r.buildCSSClass=function(){var e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+a.prototype.buildCSSClass.call(this)},r.controlText=function(e,i){return i===void 0&&(i=this.menuButton_.el()),this.menuButton_.controlText(e,i)},r.dispose=function(){this.handleMouseLeave(),a.prototype.dispose.call(this)},r.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},r.handleMouseLeave=function(e){this.removeClass("vjs-hover"),Ne(G,"keyup",this.handleMenuKeyUp_)},r.focus=function(){this.menuButton_.focus()},r.blur=function(){this.menuButton_.blur()},r.handleKeyDown=function(e){te.isEventKey(e,"Esc")||te.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),te.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(te.isEventKey(e,"Up")||te.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},r.handleMenuKeyUp=function(e){(te.isEventKey(e,"Esc")||te.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},r.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},r.handleSubmenuKeyDown=function(e){(te.isEventKey(e,"Esc")||te.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),te.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},r.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),$e&&Tc())return;this.menu.focus()}},r.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},r.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},r.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(V);V.registerComponent("MenuButton",Lo);var Fo=function(a){W(t,a);function t(r,n){var e,i=n.tracks;if(e=a.call(this,r,n)||this,e.items.length<=1&&e.hide(),!i)return ee(e);var s=ye(ee(e),e.update);return i.addEventListener("removetrack",s),i.addEventListener("addtrack",s),i.addEventListener("labelchange",s),e.player_.on("ready",s),e.player_.on("dispose",function(){i.removeEventListener("removetrack",s),i.removeEventListener("addtrack",s),i.removeEventListener("labelchange",s)}),e}return t}(Lo);V.registerComponent("TrackButton",Fo);var oy=["Tab","Esc","Up","Down","Right","Left"],Ki=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.selectable=e.selectable,i.isSelected_=e.selected||!1,i.multiSelectable=e.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}var r=t.prototype;return r.createEl=function(e,i,s){this.nonIconControl=!0;var o=a.prototype.createEl.call(this,"li",be({className:"vjs-menu-item",tabIndex:-1},i),s);return o.replaceChild(ne("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),o.querySelector(".vjs-icon-placeholder")),o},r.handleKeyDown=function(e){oy.some(function(i){return te.isEventKey(e,i)})||a.prototype.handleKeyDown.call(this,e)},r.handleClick=function(e){this.selected(!0)},r.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(Ea);V.registerComponent("MenuItem",Ki);var Xi=function(a){W(t,a);function t(n,e){var i,s=e.track,o=n.textTracks();e.label=s.label||s.language||"Unknown",e.selected=s.mode==="showing",i=a.call(this,n,e)||this,i.track=s,i.kinds=(e.kinds||[e.kind||i.track.kind]).filter(Boolean);var u=function(){for(var m=arguments.length,_=new Array(m),b=0;b<m;b++)_[b]=arguments[b];i.handleTracksChange.apply(ee(i),_)},l=function(){for(var m=arguments.length,_=new Array(m),b=0;b<m;b++)_[b]=arguments[b];i.handleSelectedLanguageChange.apply(ee(i),_)};if(n.on(["loadstart","texttrackchange"],u),o.addEventListener("change",u),o.addEventListener("selectedlanguagechange",l),i.on("dispose",function(){n.off(["loadstart","texttrackchange"],u),o.removeEventListener("change",u),o.removeEventListener("selectedlanguagechange",l)}),o.onchange===void 0){var c;i.on(["tap","click"],function(){if(typeof A.Event!="object")try{c=new A.Event("change")}catch{}c||(c=G.createEvent("Event"),c.initEvent("change",!0,!0)),o.dispatchEvent(c)})}return i.handleTracksChange(),i}var r=t.prototype;return r.handleClick=function(e){var i=this.track,s=this.player_.textTracks();if(a.prototype.handleClick.call(this,e),!!s)for(var o=0;o<s.length;o++){var u=s[o];this.kinds.indexOf(u.kind)!==-1&&(u===i?u.mode!=="showing"&&(u.mode="showing"):u.mode!=="disabled"&&(u.mode="disabled"))}},r.handleTracksChange=function(e){var i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i)},r.handleSelectedLanguageChange=function(e){if(this.track.mode==="showing"){var i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},r.dispose=function(){this.track=null,a.prototype.dispose.call(this)},t}(Ki);V.registerComponent("TextTrackMenuItem",Xi);var of=function(a){W(t,a);function t(n,e){return e.track={player:n,kind:e.kind,kinds:e.kinds,default:!1,mode:"disabled"},e.kinds||(e.kinds=[e.kind]),e.label?e.track.label=e.label:e.track.label=e.kinds.join(" and ")+" off",e.selectable=!0,e.multiSelectable=!1,a.call(this,n,e)||this}var r=t.prototype;return r.handleTracksChange=function(e){for(var i=this.player().textTracks(),s=!0,o=0,u=i.length;o<u;o++){var l=i[o];if(this.options_.kinds.indexOf(l.kind)>-1&&l.mode==="showing"){s=!1;break}}s!==this.isSelected_&&this.selected(s)},r.handleSelectedLanguageChange=function(e){for(var i=this.player().textTracks(),s=!0,o=0,u=i.length;o<u;o++){var l=i[o];if(["captions","descriptions","subtitles"].indexOf(l.kind)>-1&&l.mode==="showing"){s=!1;break}}s&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Xi);V.registerComponent("OffTextTrackMenuItem",of);var ri=function(a){W(t,a);function t(n,e){return e===void 0&&(e={}),e.tracks=n.textTracks(),a.call(this,n,e)||this}var r=t.prototype;return r.createItems=function(e,i){e===void 0&&(e=[]),i===void 0&&(i=Xi);var s;this.label_&&(s=this.label_+" off"),e.push(new of(this.player_,{kinds:this.kinds_,kind:this.kind_,label:s})),this.hideThreshold_+=1;var o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var u=0;u<o.length;u++){var l=o[u];if(this.kinds_.indexOf(l.kind)>-1){var c=new i(this.player_,{track:l,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});c.addClass("vjs-"+l.kind+"-menu-item"),e.push(c)}}return e},t}(Fo);V.registerComponent("TextTrackButton",ri);var uf=function(a){W(t,a);function t(n,e){var i,s=e.track,o=e.cue,u=n.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=o.text,e.selected=o.startTime<=u&&u<o.endTime,i=a.call(this,n,e)||this,i.track=s,i.cue=o,i}var r=t.prototype;return r.handleClick=function(e){a.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},t}(Ki);V.registerComponent("ChaptersTrackMenuItem",uf);var Ro=function(a){W(t,a);function t(n,e,i){var s;return s=a.call(this,n,e,i)||this,s.selectCurrentItem_=function(){s.items.forEach(function(o){o.selected(s.track_.activeCues[0]===o.cue)})},s}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildCSSClass.call(this)},r.buildWrapperCSSClass=function(){return"vjs-chapters-button "+a.prototype.buildWrapperCSSClass.call(this)},r.update=function(e){if(!(e&&e.track&&e.track.kind!=="chapters")){var i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),a.prototype.update.call(this)):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&a.prototype.update.call(this)}},r.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var s=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);s&&s.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},r.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],i=e.length-1;i>=0;i--){var s=e[i];if(s.kind===this.kind_)return s}},r.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ee(this.kind_))},r.createMenu=function(){return this.options_.title=this.getMenuCaption(),a.prototype.createMenu.call(this)},r.createItems=function(){var e=[];if(!this.track_)return e;var i=this.track_.cues;if(!i)return e;for(var s=0,o=i.length;s<o;s++){var u=i[s],l=new uf(this.player_,{track:this.track_,cue:u});e.push(l)}return e},t}(ri);Ro.prototype.kind_="chapters";Ro.prototype.controlText_="Chapters";V.registerComponent("ChaptersButton",Ro);var Mo=function(a){W(t,a);function t(n,e,i){var s;s=a.call(this,n,e,i)||this;var o=n.textTracks(),u=ye(ee(s),s.handleTracksChange);return o.addEventListener("change",u),s.on("dispose",function(){o.removeEventListener("change",u)}),s}var r=t.prototype;return r.handleTracksChange=function(e){for(var i=this.player().textTracks(),s=!1,o=0,u=i.length;o<u;o++){var l=i[o];if(l.kind!==this.kind_&&l.mode==="showing"){s=!0;break}}s?this.disable():this.enable()},r.buildCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildCSSClass.call(this)},r.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+a.prototype.buildWrapperCSSClass.call(this)},t}(ri);Mo.prototype.kind_="descriptions";Mo.prototype.controlText_="Descriptions";V.registerComponent("DescriptionsButton",Mo);var No=function(a){W(t,a);function t(n,e,i){return a.call(this,n,e,i)||this}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildCSSClass.call(this)},r.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+a.prototype.buildWrapperCSSClass.call(this)},t}(ri);No.prototype.kind_="subtitles";No.prototype.controlText_="Subtitles";V.registerComponent("SubtitlesButton",No);var Bo=function(a){W(t,a);function t(n,e){var i;return e.track={player:n,kind:e.kind,label:e.kind+" settings",selectable:!1,default:!1,mode:"disabled"},e.selectable=!1,e.name="CaptionSettingsMenuItem",i=a.call(this,n,e)||this,i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+e.kind+" settings dialog"),i}var r=t.prototype;return r.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Xi);V.registerComponent("CaptionSettingsMenuItem",Bo);var Uo=function(a){W(t,a);function t(n,e,i){return a.call(this,n,e,i)||this}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-captions-button "+a.prototype.buildCSSClass.call(this)},r.buildWrapperCSSClass=function(){return"vjs-captions-button "+a.prototype.buildWrapperCSSClass.call(this)},r.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new Bo(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),a.prototype.createItems.call(this,e)},t}(ri);Uo.prototype.kind_="captions";Uo.prototype.controlText_="Captions";V.registerComponent("CaptionsButton",Uo);var lf=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.createEl=function(e,i,s){var o=a.prototype.createEl.call(this,e,i,s),u=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(u.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(ne("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),o},t}(Xi);V.registerComponent("SubsCapsMenuItem",lf);var Vo=function(a){W(t,a);function t(n,e){var i;return e===void 0&&(e={}),i=a.call(this,n,e)||this,i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(Ee(i.label_)),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildCSSClass.call(this)},r.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+a.prototype.buildWrapperCSSClass.call(this)},r.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new Bo(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=a.prototype.createItems.call(this,e,lf),e},t}(ri);Vo.prototype.kinds_=["captions","subtitles"];Vo.prototype.controlText_="Subtitles";V.registerComponent("SubsCapsButton",Vo);var df=function(a){W(t,a);function t(n,e){var i,s=e.track,o=n.audioTracks();e.label=s.label||s.language||"Unknown",e.selected=s.enabled,i=a.call(this,n,e)||this,i.track=s,i.addClass("vjs-"+s.kind+"-menu-item");var u=function(){for(var c=arguments.length,g=new Array(c),m=0;m<c;m++)g[m]=arguments[m];i.handleTracksChange.apply(ee(i),g)};return o.addEventListener("change",u),i.on("dispose",function(){o.removeEventListener("change",u)}),i}var r=t.prototype;return r.createEl=function(e,i,s){var o=a.prototype.createEl.call(this,e,i,s),u=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="main-desc"&&(u.appendChild(ne("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),u.appendChild(ne("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),o},r.handleClick=function(e){if(a.prototype.handleClick.call(this,e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var i=this.player_.audioTracks(),s=0;s<i.length;s++){var o=i[s];o!==this.track&&(o.enabled=o===this.track)}},r.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Ki);V.registerComponent("AudioTrackMenuItem",df);var cf=function(a){W(t,a);function t(n,e){return e===void 0&&(e={}),e.tracks=n.audioTracks(),a.call(this,n,e)||this}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-audio-button "+a.prototype.buildCSSClass.call(this)},r.buildWrapperCSSClass=function(){return"vjs-audio-button "+a.prototype.buildWrapperCSSClass.call(this)},r.createItems=function(e){e===void 0&&(e=[]),this.hideThreshold_=1;for(var i=this.player_.audioTracks(),s=0;s<i.length;s++){var o=i[s];e.push(new df(this.player_,{track:o,selectable:!0,multiSelectable:!1}))}return e},t}(Fo);cf.prototype.controlText_="Audio Track";V.registerComponent("AudioTrackButton",cf);var Ho=function(a){W(t,a);function t(n,e){var i,s=e.rate,o=parseFloat(s,10);return e.label=s,e.selected=o===n.playbackRate(),e.selectable=!0,e.multiSelectable=!1,i=a.call(this,n,e)||this,i.label=s,i.rate=o,i.on(n,"ratechange",function(u){return i.update(u)}),i}var r=t.prototype;return r.handleClick=function(e){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},r.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(Ki);Ho.prototype.contentElType="button";V.registerComponent("PlaybackRateMenuItem",Ho);var ff=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.menuButton_.el_.setAttribute("aria-describedby",i.labelElId_),i.updateVisibility(),i.updateLabel(),i.on(n,"loadstart",function(s){return i.updateVisibility(s)}),i.on(n,"ratechange",function(s){return i.updateLabel(s)}),i.on(n,"playbackrateschange",function(s){return i.handlePlaybackRateschange(s)}),i}var r=t.prototype;return r.createEl=function(){var e=a.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=ne("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e},r.dispose=function(){this.labelEl_=null,a.prototype.dispose.call(this)},r.buildCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildCSSClass.call(this)},r.buildWrapperCSSClass=function(){return"vjs-playback-rate "+a.prototype.buildWrapperCSSClass.call(this)},r.createItems=function(){for(var e=this.playbackRates(),i=[],s=e.length-1;s>=0;s--)i.push(new Ho(this.player(),{rate:e[s]+"x"}));return i},r.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},r.handleClick=function(e){var i=this.player().playbackRate(),s=this.playbackRates(),o=s.indexOf(i),u=(o+1)%s.length;this.player().playbackRate(s[u])},r.handlePlaybackRateschange=function(e){this.update()},r.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},r.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},r.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},r.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Lo);ff.prototype.controlText_="Playback Rate";V.registerComponent("PlaybackRateMenuButton",ff);var hf=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-spacer "+a.prototype.buildCSSClass.call(this)},r.createEl=function(e,i,s){return e===void 0&&(e="div"),i===void 0&&(i={}),s===void 0&&(s={}),i.className||(i.className=this.buildCSSClass()),a.prototype.createEl.call(this,e,i,s)},t}(V);V.registerComponent("Spacer",hf);var uy=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-custom-control-spacer "+a.prototype.buildCSSClass.call(this)},r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\xA0"})},t}(hf);V.registerComponent("CustomControlSpacer",uy);var Kn=function(a){W(t,a);function t(){return a.apply(this,arguments)||this}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(V);Kn.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};"exitPictureInPicture"in G&&Kn.prototype.options_.children.splice(Kn.prototype.options_.children.length-1,0,"pictureInPictureToggle");V.registerComponent("ControlBar",Kn);var pf=function(a){W(t,a);function t(n,e){var i;return i=a.call(this,n,e)||this,i.on(n,"error",function(s){return i.open(s)}),i}var r=t.prototype;return r.buildCSSClass=function(){return"vjs-error-display "+a.prototype.buildCSSClass.call(this)},r.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Zr);pf.prototype.options_=ot({},Zr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});V.registerComponent("ErrorDisplay",pf);var ss="vjs-text-track-settings",Ol=["#000","Black"],Ll=["#00F","Blue"],Fl=["#0FF","Cyan"],Rl=["#0F0","Green"],Ml=["#F0F","Magenta"],Nl=["#F00","Red"],Bl=["#FFF","White"],Ul=["#FF0","Yellow"],os=["1","Opaque"],us=["0.5","Semi-Transparent"],Vl=["0","Transparent"],or={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Ol,Bl,Nl,Rl,Ll,Ul,Ml,Fl]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[os,us,Vl]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Bl,Ol,Nl,Rl,Ll,Ul,Ml,Fl]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return t==="1.00"?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[os,us]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Vl,us,os]}};or.windowColor.options=or.backgroundColor.options;function mf(a,t){if(t&&(a=t(a)),a&&a!=="none")return a}function ly(a,t){var r=a.options[a.options.selectedIndex].value;return mf(r,t)}function dy(a,t,r){if(!!t){for(var n=0;n<a.options.length;n++)if(mf(a.options[n].value,r)===t){a.selectedIndex=n;break}}}var cy=function(a){W(t,a);function t(n,e){var i;return e.temporary=!1,i=a.call(this,n,e)||this,i.updateDisplay=i.updateDisplay.bind(ee(i)),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=ne("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),e.persistTextTrackSettings===void 0&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),Fr(or,function(s){i.on(i.$(s.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}var r=t.prototype;return r.dispose=function(){this.endDialog=null,a.prototype.dispose.call(this)},r.createElSelect_=function(e,i,s){var o=this;i===void 0&&(i=""),s===void 0&&(s="label");var u=or[e],l=u.id.replace("%s",this.id_),c=[i,l].join(" ").trim();return["<"+s+' id="'+l+'" class="'+(s==="label"?"vjs-label":"")+'">',this.localize(u.label),"</"+s+">",'<select aria-labelledby="'+c+'">'].concat(u.options.map(function(g){var m=l+"-"+g[1].replace(/\W+/g,"");return['<option id="'+m+'" value="'+g[0]+'" ','aria-labelledby="'+c+" "+m+'">',o.localize(g[1]),"</option>"].join("")})).concat("</select>").join("")},r.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},r.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},r.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},r.createElColors_=function(){return ne("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},r.createElFont_=function(){return ne("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},r.createElControls_=function(){var e=this.localize("restore all settings to the default values");return ne("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},r.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},r.label=function(){return this.localize("Caption Settings Dialog")},r.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},r.buildCSSClass=function(){return a.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},r.getValues=function(){var e=this;return Zv(or,function(i,s,o){var u=ly(e.$(s.selector),s.parser);return u!==void 0&&(i[o]=u),i},{})},r.setValues=function(e){var i=this;Fr(or,function(s,o){dy(i.$(s.selector),e[o],s.parser)})},r.setDefaults=function(){var e=this;Fr(or,function(i){var s=i.hasOwnProperty("default")?i.default:0;e.$(i.selector).selectedIndex=s})},r.restoreSettings=function(){var e;try{e=JSON.parse(A.localStorage.getItem(ss))}catch(i){ie.warn(i)}e&&this.setValues(e)},r.saveSettings=function(){if(!!this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?A.localStorage.setItem(ss,JSON.stringify(e)):A.localStorage.removeItem(ss)}catch(i){ie.warn(i)}}},r.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},r.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,i=e&&e.subsCapsButton,s=e&&e.captionsButton;i?i.focus():s&&s.focus()},t}(Zr);V.registerComponent("TextTrackSettings",cy);var fy=function(a){W(t,a);function t(n,e){var i,s=e.ResizeObserver||A.ResizeObserver;e.ResizeObserver===null&&(s=!1);var o=ve({createEl:!s,reportTouchActivity:!1},e);return i=a.call(this,n,o)||this,i.ResizeObserver=e.ResizeObserver||A.ResizeObserver,i.loadListener_=null,i.resizeObserver_=null,i.debouncedHandler_=d0(function(){i.resizeHandler()},100,!1,ee(i)),s?(i.resizeObserver_=new i.ResizeObserver(i.debouncedHandler_),i.resizeObserver_.observe(n.el())):(i.loadListener_=function(){if(!(!i.el_||!i.el_.contentWindow)){var u=i.debouncedHandler_,l=i.unloadListener_=function(){Ne(this,"resize",u),Ne(this,"unload",l),l=null};it(i.el_.contentWindow,"unload",l),it(i.el_.contentWindow,"resize",u)}},i.one("load",i.loadListener_)),i}var r=t.prototype;return r.createEl=function(){return a.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},r.resizeHandler=function(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")},r.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,a.prototype.dispose.call(this)},t}(V);V.registerComponent("ResizeManager",fy);var hy={trackingThreshold:20,liveTolerance:15},py=function(a){W(t,a);function t(n,e){var i,s=ve(hy,e,{createEl:!1});return i=a.call(this,n,s)||this,i.handleVisibilityChange_=function(o){return i.handleVisibilityChange(o)},i.trackLiveHandler_=function(){return i.trackLive_()},i.handlePlay_=function(o){return i.handlePlay(o)},i.handleFirstTimeupdate_=function(o){return i.handleFirstTimeupdate(o)},i.handleSeeked_=function(o){return i.handleSeeked(o)},i.seekToLiveEdge_=function(o){return i.seekToLiveEdge(o)},i.reset_(),i.on(i.player_,"durationchange",function(o){return i.handleDurationchange(o)}),i.on(i.player_,"canplay",function(){return i.toggleTracking()}),Wi&&"hidden"in G&&"visibilityState"in G&&i.on(G,"visibilitychange",i.handleVisibilityChange_),i}var r=t.prototype;return r.handleVisibilityChange=function(){this.player_.duration()===1/0&&(G.hidden?this.stopTracking():this.startTracking())},r.trackLive_=function(){var e=this.player_.seekable();if(!(!e||!e.length)){var i=Number(A.performance.now().toFixed(4)),s=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+s;var o=this.liveCurrentTime(),u=this.player_.currentTime(),l=this.player_.paused()||this.seekedBehindLive_||Math.abs(o-u)>this.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(l=!1),l!==this.behindLiveEdge_&&(this.behindLiveEdge_=l,this.trigger("liveedgechange"))}},r.handleDurationchange=function(){this.toggleTracking()},r.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},r.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,ht),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},r.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},r.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},r.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},r.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},r.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},r.stopTracking=function(){!this.isTracking()||(this.reset_(),this.trigger("liveedgechange"))},r.seekableEnd=function(){for(var e=this.player_.seekable(),i=[],s=e?e.length:0;s--;)i.push(e.end(s));return i.length?i.sort()[i.length-1]:1/0},r.seekableStart=function(){for(var e=this.player_.seekable(),i=[],s=e?e.length:0;s--;)i.push(e.start(s));return i.length?i.sort()[0]:0},r.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},r.isLive=function(){return this.isTracking()},r.atLiveEdge=function(){return!this.behindLiveEdge()},r.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},r.pastSeekEnd=function(){var e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},r.behindLiveEdge=function(){return this.behindLiveEdge_},r.isTracking=function(){return typeof this.trackingInterval_=="number"},r.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},r.dispose=function(){this.off(G,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),a.prototype.dispose.call(this)},t}(V);V.registerComponent("LiveTracker",py);var Is=function(t){var r=t.el();if(r.hasAttribute("src"))return t.triggerSourceset(r.src),!0;var n=t.$$("source"),e=[],i="";if(!n.length)return!1;for(var s=0;s<n.length;s++){var o=n[s].src;o&&e.indexOf(o)===-1&&e.push(o)}return e.length?(e.length===1&&(i=e[0]),t.triggerSourceset(i),!0):!1},my=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var r=G.createElement(this.nodeName.toLowerCase());r.innerHTML=t;for(var n=G.createDocumentFragment();r.childNodes.length;)n.appendChild(r.childNodes[0]);return this.innerText="",A.Element.prototype.appendChild.call(this,n),this.innerHTML}}),gf=function(t,r){for(var n={},e=0;e<t.length&&(n=Object.getOwnPropertyDescriptor(t[e],r),!(n&&n.set&&n.get));e++);return n.enumerable=!0,n.configurable=!0,n},gy=function(t){return gf([t.el(),A.HTMLMediaElement.prototype,A.Element.prototype,my],"innerHTML")},Hl=function(t){var r=t.el();if(!r.resetSourceWatch_){var n={},e=gy(t),i=function(o){return function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];var g=o.apply(r,l);return Is(t),g}};["append","appendChild","insertAdjacentHTML"].forEach(function(s){!r[s]||(n[s]=r[s],r[s]=i(n[s]))}),Object.defineProperty(r,"innerHTML",ve(e,{set:i(e.set)})),r.resetSourceWatch_=function(){r.resetSourceWatch_=null,Object.keys(n).forEach(function(s){r[s]=n[s]}),Object.defineProperty(r,"innerHTML",e)},t.one("sourceset",r.resetSourceWatch_)}},vy=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?qc(A.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return A.Element.prototype.setAttribute.call(this,"src",t),t}}),yy=function(t){return gf([t.el(),A.HTMLMediaElement.prototype,vy],"src")},_y=function(t){if(!!t.featuresSourceset){var r=t.el();if(!r.resetSourceset_){var n=yy(t),e=r.setAttribute,i=r.load;Object.defineProperty(r,"src",ve(n,{set:function(o){var u=n.set.call(r,o);return t.triggerSourceset(r.src),u}})),r.setAttribute=function(s,o){var u=e.call(r,s,o);return/src/i.test(s)&&t.triggerSourceset(r.src),u},r.load=function(){var s=i.call(r);return Is(t)||(t.triggerSourceset(""),Hl(t)),s},r.currentSrc?t.triggerSourceset(r.currentSrc):Is(t)||Hl(t),r.resetSourceset_=function(){r.resetSourceset_=null,r.load=i,r.setAttribute=e,Object.defineProperty(r,"src",n),r.resetSourceWatch_&&r.resetSourceWatch_()}}}},qo=function(t,r,n,e){e===void 0&&(e=!0);var i=function(u){return Object.defineProperty(t,r,{value:u,enumerable:!0,writable:!0})},s={configurable:!0,enumerable:!0,get:function(){var u=n();return i(u),u}};return e&&(s.set=i),Object.defineProperty(t,r,s)},K=function(a){W(t,a);function t(n,e){var i;i=a.call(this,n,e)||this;var s=n.source,o=!1;if(i.featuresVideoFrameCallback=i.featuresVideoFrameCallback&&i.el_.tagName==="VIDEO",s&&(i.el_.currentSrc!==s.src||n.tag&&n.tag.initNetworkState_===3)?i.setSource(s):i.handleLateInit_(i.el_),n.enableSourceset&&i.setupSourcesetHandling_(),i.isScrubbing_=!1,i.el_.hasChildNodes()){for(var u=i.el_.childNodes,l=u.length,c=[];l--;){var g=u[l],m=g.nodeName.toLowerCase();m==="track"&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(g),i.remoteTextTracks().addTrack(g.track),i.textTracks().addTrack(g.track),!o&&!i.el_.hasAttribute("crossorigin")&&Sa(g.src)&&(o=!0)):c.push(g))}for(var _=0;_<c.length;_++)i.el_.removeChild(c[_])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&o&&ie.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),i.restoreMetadataTracksInIOSNativePlayer_(),(jr||vo||mc)&&n.nativeControlsForTouch===!0&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}var r=t.prototype;return r.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.disposeMediaElement(this.el_),this.options_=null,a.prototype.dispose.call(this)},r.setupSourcesetHandling_=function(){_y(this)},r.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),i,s=function(){i=[];for(var l=0;l<e.length;l++){var c=e[l];c.kind==="metadata"&&i.push({track:c,storedMode:c.mode})}};s(),e.addEventListener("change",s),this.on("dispose",function(){return e.removeEventListener("change",s)});var o=function u(){for(var l=0;l<i.length;l++){var c=i[l];c.track.mode==="disabled"&&c.track.mode!==c.storedMode&&(c.track.mode=c.storedMode)}e.removeEventListener("change",u)};this.on("webkitbeginfullscreen",function(){e.removeEventListener("change",s),e.removeEventListener("change",o),e.addEventListener("change",o)}),this.on("webkitendfullscreen",function(){e.removeEventListener("change",s),e.addEventListener("change",s),e.removeEventListener("change",o)})},r.overrideNative_=function(e,i){var s=this;if(i===this["featuresNative"+e+"Tracks"]){var o=e.toLowerCase();this[o+"TracksListeners_"]&&Object.keys(this[o+"TracksListeners_"]).forEach(function(u){var l=s.el()[o+"Tracks"];l.removeEventListener(u,s[o+"TracksListeners_"][u])}),this["featuresNative"+e+"Tracks"]=!i,this[o+"TracksListeners_"]=null,this.proxyNativeTracksForType_(o)}},r.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},r.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},r.proxyNativeTracksForType_=function(e){var i=this,s=st[e],o=this.el()[s.getterName],u=this[s.getterName]();if(!(!this["featuresNative"+s.capitalName+"Tracks"]||!o||!o.addEventListener)){var l={change:function(m){var _={type:"change",target:u,currentTarget:u,srcElement:u};u.trigger(_),e==="text"&&i[$r.remoteText.getterName]().trigger(_)},addtrack:function(m){u.addTrack(m.track)},removetrack:function(m){u.removeTrack(m.track)}},c=function(){for(var m=[],_=0;_<u.length;_++){for(var b=!1,S=0;S<o.length;S++)if(o[S]===u[_]){b=!0;break}b||m.push(u[_])}for(;m.length;)u.removeTrack(m.shift())};this[s.getterName+"Listeners_"]=l,Object.keys(l).forEach(function(g){var m=l[g];o.addEventListener(g,m),i.on("dispose",function(_){return o.removeEventListener(g,m)})}),this.on("loadstart",c),this.on("dispose",function(g){return i.off("loadstart",c)})}},r.proxyNativeTracks_=function(){var e=this;st.names.forEach(function(i){e.proxyNativeTracksForType_(i)})},r.createEl=function(){var e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){var i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=G.createElement("video");var s=this.options_.tag&&Pt(this.options_.tag),o=ve({},s);(!jr||this.options_.nativeControlsForTouch!==!0)&&delete o.controls,Sc(e,be(o,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&Gr(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var u=["loop","muted","playsinline","autoplay"],l=0;l<u.length;l++){var c=u[l],g=this.options_[c];typeof g<"u"&&(g?Gr(e,c,c):ya(e,c),e[c]=g)}return e},r.handleLateInit_=function(e){if(!(e.networkState===0||e.networkState===3)){if(e.readyState===0){var i=!1,s=function(){i=!0};this.on("loadstart",s);var o=function(){i||this.trigger("loadstart")};this.on("loadedmetadata",o),this.ready(function(){this.off("loadstart",s),this.off("loadedmetadata",o),i||this.trigger("loadstart")});return}var u=["loadstart"];u.push("loadedmetadata"),e.readyState>=2&&u.push("loadeddata"),e.readyState>=3&&u.push("canplay"),e.readyState>=4&&u.push("canplaythrough"),this.ready(function(){u.forEach(function(l){this.trigger(l)},this)})}},r.setScrubbing=function(e){this.isScrubbing_=e},r.scrubbing=function(){return this.isScrubbing_},r.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&va?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){ie(i,"Video is not ready. (Video.js)")}},r.duration=function(){var e=this;if(this.el_.duration===1/0&&qt&&jt&&this.el_.currentTime===0){var i=function s(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",s))};return this.on("timeupdate",i),NaN}return this.el_.duration||NaN},r.width=function(){return this.el_.offsetWidth},r.height=function(){return this.el_.offsetHeight},r.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},s=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",function(){e.off("webkitbeginfullscreen",s),e.off("webkitendfullscreen",i)})}},r.supportsFullScreen=function(){if(typeof this.el_.webkitEnterFullScreen=="function"){var e=A.navigator&&A.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},r.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)_t(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},r.exitFullScreen=function(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()},r.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},r.requestVideoFrameCallback=function(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):a.prototype.requestVideoFrameCallback.call(this,e)},r.cancelVideoFrameCallback=function(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):a.prototype.cancelVideoFrameCallback.call(this,e)},r.src=function(e){if(e===void 0)return this.el_.src;this.setSrc(e)},r.reset=function(){t.resetMediaElement(this.el_)},r.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},r.setControls=function(e){this.el_.controls=!!e},r.addTextTrack=function(e,i,s){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,s):a.prototype.addTextTrack.call(this,e,i,s)},r.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return a.prototype.createRemoteTextTrack.call(this,e);var i=G.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i},r.addRemoteTextTrack=function(e,i){var s=a.prototype.addRemoteTextTrack.call(this,e,i);return this.featuresNativeTextTracks&&this.el().appendChild(s),s},r.removeRemoteTextTrack=function(e){if(a.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var i=this.$$("track"),s=i.length;s--;)(e===i[s]||e===i[s].track)&&this.el().removeChild(i[s])},r.getVideoPlaybackQuality=function(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();var e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),A.performance&&typeof A.performance.now=="function"?e.creationTime=A.performance.now():A.performance&&A.performance.timing&&typeof A.performance.timing.navigationStart=="number"&&(e.creationTime=A.Date.now()-A.performance.timing.navigationStart),e},t}(he);qo(K,"TEST_VID",function(){if(!!Yr()){var a=G.createElement("video"),t=G.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",a.appendChild(t),a}});K.isSupported=function(){try{K.TEST_VID.volume=.5}catch{return!1}return!!(K.TEST_VID&&K.TEST_VID.canPlayType)};K.canPlayType=function(a){return K.TEST_VID.canPlayType(a)};K.canPlaySource=function(a,t){return K.canPlayType(a.type)};K.canControlVolume=function(){try{var a=K.TEST_VID.volume;K.TEST_VID.volume=a/2+.1;var t=a!==K.TEST_VID.volume;return t&&$e?(A.setTimeout(function(){K&&K.prototype&&(K.prototype.featuresVolumeControl=a!==K.TEST_VID.volume)}),!1):t}catch{return!1}};K.canMuteVolume=function(){try{var a=K.TEST_VID.muted;return K.TEST_VID.muted=!a,K.TEST_VID.muted?Gr(K.TEST_VID,"muted","muted"):ya(K.TEST_VID,"muted","muted"),a!==K.TEST_VID.muted}catch{return!1}};K.canControlPlaybackRate=function(){if(qt&&jt&&vc<58)return!1;try{var a=K.TEST_VID.playbackRate;return K.TEST_VID.playbackRate=a/2+.1,a!==K.TEST_VID.playbackRate}catch{return!1}};K.canOverrideAttributes=function(){try{var a=function(){};Object.defineProperty(G.createElement("video"),"src",{get:a,set:a}),Object.defineProperty(G.createElement("audio"),"src",{get:a,set:a}),Object.defineProperty(G.createElement("video"),"innerHTML",{get:a,set:a}),Object.defineProperty(G.createElement("audio"),"innerHTML",{get:a,set:a})}catch{return!1}return!0};K.supportsNativeTextTracks=function(){return va||$e&&jt};K.supportsNativeVideoTracks=function(){return!!(K.TEST_VID&&K.TEST_VID.videoTracks)};K.supportsNativeAudioTracks=function(){return!!(K.TEST_VID&&K.TEST_VID.audioTracks)};K.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(a){var t=a[0],r=a[1];qo(K.prototype,t,function(){return K[r]()},!0)});K.prototype.featuresVolumeControl=K.canControlVolume();K.prototype.movingMediaElementInDOM=!$e;K.prototype.featuresFullscreenResize=!0;K.prototype.featuresProgressEvents=!0;K.prototype.featuresTimeupdateEvents=!0;K.prototype.featuresVideoFrameCallback=!!(K.TEST_VID&&K.TEST_VID.requestVideoFrameCallback);var Xn;K.patchCanPlayType=function(){po>=4&&!gc&&!jt&&(Xn=K.TEST_VID&&K.TEST_VID.constructor.prototype.canPlayType,K.TEST_VID.constructor.prototype.canPlayType=function(a){var t=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;return a&&t.test(a)?"maybe":Xn.call(this,a)})};K.unpatchCanPlayType=function(){var a=K.TEST_VID.constructor.prototype.canPlayType;return Xn&&(K.TEST_VID.constructor.prototype.canPlayType=Xn),a};K.patchCanPlayType();K.disposeMediaElement=function(a){if(!!a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src"),typeof a.load=="function"&&function(){try{a.load()}catch{}}()}};K.resetMediaElement=function(a){if(!!a){for(var t=a.querySelectorAll("source"),r=t.length;r--;)a.removeChild(t[r]);a.removeAttribute("src"),typeof a.load=="function"&&function(){try{a.load()}catch{}}()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(a){K.prototype[a]=function(){return this.el_[a]||this.el_.hasAttribute(a)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(a){K.prototype["set"+Ee(a)]=function(t){this.el_[a]=t,t?this.el_.setAttribute(a,a):this.el_.removeAttribute(a)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(a){K.prototype[a]=function(){return this.el_[a]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(a){K.prototype["set"+Ee(a)]=function(t){this.el_[a]=t}});["pause","load","play"].forEach(function(a){K.prototype[a]=function(){return this.el_[a]()}});he.withSourceHandlers(K);K.nativeSourceHandler={};K.nativeSourceHandler.canPlayType=function(a){try{return K.TEST_VID.canPlayType(a)}catch{return""}};K.nativeSourceHandler.canHandleSource=function(a,t){if(a.type)return K.nativeSourceHandler.canPlayType(a.type);if(a.src){var r=Eo(a.src);return K.nativeSourceHandler.canPlayType("video/"+r)}return""};K.nativeSourceHandler.handleSource=function(a,t,r){t.setSrc(a.src)};K.nativeSourceHandler.dispose=function(){};K.registerSourceHandler(K.nativeSourceHandler);he.registerTech("Html5",K);var vf=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ls={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Os=["tiny","xsmall","small","medium","large","xlarge","huge"],Fn={};Os.forEach(function(a){var t=a.charAt(0)==="x"?"x-"+a.substring(1):a;Fn[a]="vjs-layout-"+t});var Ty={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ae=function(a){W(t,a);function t(n,e,i){var s;if(n.id=n.id||e.id||"vjs_video_"+Gt(),e=be(t.getTagSettings(n),e),e.initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if(typeof n.closest=="function"){var o=n.closest("[lang]");o&&o.getAttribute&&(e.language=o.getAttribute("lang"))}else for(var u=n;u&&u.nodeType===1;){if(Pt(u).hasOwnProperty("lang")){e.language=u.getAttribute("lang");break}u=u.parentNode}if(s=a.call(this,null,e,i)||this,s.boundDocumentFullscreenChange_=function(m){return s.documentFullscreenChange_(m)},s.boundFullWindowOnEscKey_=function(m){return s.fullWindowOnEscKey(m)},s.boundUpdateStyleEl_=function(m){return s.updateStyleEl_(m)},s.boundApplyInitTime_=function(m){return s.applyInitTime_(m)},s.boundUpdateCurrentBreakpoint_=function(m){return s.updateCurrentBreakpoint_(m)},s.boundHandleTechClick_=function(m){return s.handleTechClick_(m)},s.boundHandleTechDoubleClick_=function(m){return s.handleTechDoubleClick_(m)},s.boundHandleTechTouchStart_=function(m){return s.handleTechTouchStart_(m)},s.boundHandleTechTouchMove_=function(m){return s.handleTechTouchMove_(m)},s.boundHandleTechTouchEnd_=function(m){return s.handleTechTouchEnd_(m)},s.boundHandleTechTap_=function(m){return s.handleTechTap_(m)},s.isFullscreen_=!1,s.log=fc(s.id_),s.fsApi_=Gn,s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,s.debugEnabled_=!1,s.audioOnlyMode_=!1,s.audioPosterMode_=!1,s.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&Pt(n),s.language(s.options_.language),e.languages){var l={};Object.getOwnPropertyNames(e.languages).forEach(function(m){l[m.toLowerCase()]=e.languages[m]}),s.languages_=l}else s.languages_=t.prototype.options_.languages;s.resetCache_(),s.poster_=e.poster||"",s.controls_=!!e.controls,n.controls=!1,n.removeAttribute("controls"),s.changingSrc_=!1,s.playCallbacks_=[],s.playTerminatedQueue_=[],n.hasAttribute("autoplay")?s.autoplay(!0):s.autoplay(s.options_.autoplay),e.plugins&&Object.keys(e.plugins).forEach(function(m){if(typeof s[m]!="function")throw new Error('plugin "'+m+'" does not exist')}),s.scrubbing_=!1,s.el_=s.createEl(),bo(ee(s),{eventBusKey:"el_"}),s.fsApi_.requestFullscreen&&(it(G,s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_),s.on(s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_)),s.fluid_&&s.on(["playerreset","resize"],s.boundUpdateStyleEl_);var c=ve(s.options_);e.plugins&&Object.keys(e.plugins).forEach(function(m){s[m](e.plugins[m])}),e.debug&&s.debug(!0),s.options_.playerOptions=c,s.middleware_=[],s.playbackRates(e.playbackRates),s.initChildren(),s.isAudio(n.nodeName.toLowerCase()==="audio"),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),jr&&s.addClass("vjs-touch-enabled"),$e||s.addClass("vjs-workinghover"),t.players[s.id_]=ee(s);var g=lc.split(".")[0];return s.addClass("vjs-v"+g),s.userActive(!0),s.reportUserActivity(),s.one("play",function(m){return s.listenForUserActivity_(m)}),s.on("stageclick",function(m){return s.handleStageClick_(m)}),s.on("keydown",function(m){return s.handleKeyDown(m)}),s.on("languagechange",function(m){return s.handleLanguagechange(m)}),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.on("ready",function(){s.audioPosterMode(s.options_.audioPosterMode),s.audioOnlyMode(s.options_.audioOnlyMode)}),s}var r=t.prototype;return r.dispose=function(){var e=this;this.trigger("dispose"),this.off("dispose"),Ne(G,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Ne(G,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),V0(this),qe.names.forEach(function(i){var s=qe[i],o=e[s.getterName]();o&&o.off&&o.off()}),a.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},r.createEl=function(){var e=this.tag,i,s=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o=this.tag.tagName.toLowerCase()==="video-js";s?i=this.el_=e.parentNode:o||(i=this.el_=a.prototype.createEl.call(this,"div"));var u=Pt(e);if(o){for(i=this.el_=e,e=this.tag=G.createElement("video");i.children.length;)e.appendChild(i.firstChild);dr(i,"video-js")||Ft(i,"video-js"),i.appendChild(e),s=this.playerElIngest_=i,Object.keys(i).forEach(function(b){try{e[b]=i[b]}catch{}})}if(e.setAttribute("tabindex","-1"),u.tabindex="-1",(Wi||jt&&yc)&&(e.setAttribute("role","application"),u.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in u&&delete u.width,"height"in u&&delete u.height,Object.getOwnPropertyNames(u).forEach(function(b){o&&b==="class"||i.setAttribute(b,u[b]),o&&e.setAttribute(b,u[b])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused"),A.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=Lc("vjs-styles-dimensions");var l=Xt(".vjs-styles-defaults"),c=Xt("head");c.insertBefore(this.styleEl_,l?l.nextSibling:c.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var g=e.getElementsByTagName("a"),m=0;m<g.length;m++){var _=g.item(m);Ft(_,"vjs-hidden"),_.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!s&&e.parentNode.insertBefore(i,e),Es(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i},r.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");if(e!=="anonymous"&&e!=="use-credentials"){ie.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"');return}this.techCall_("setCrossOrigin",e)},r.width=function(e){return this.dimension("width",e)},r.height=function(e){return this.dimension("height",e)},r.dimension=function(e,i){var s=e+"_";if(i===void 0)return this[s]||0;if(i===""||i==="auto"){this[s]=void 0,this.updateStyleEl_();return}var o=parseFloat(i);if(isNaN(o)){ie.error('Improper value "'+i+'" supplied for for '+e);return}this[s]=o,this.updateStyleEl_()},r.fluid=function(e){var i=this;if(e===void 0)return!!this.fluid_;this.fluid_=!!e,Rt(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),c0(this,function(){i.on(["playerreset","resize"],i.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},r.fill=function(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},r.aspectRatio=function(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},r.updateStyleEl_=function(){if(A.VIDEOJS_NO_DYNAMIC_STYLE===!0){var e=typeof this.width_=="number"?this.width_:this.options_.width,i=typeof this.height_=="number"?this.height_:this.options_.height,s=this.tech_&&this.tech_.el();s&&(e>=0&&(s.width=e),i>=0&&(s.height=i));return}var o,u,l,c;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?l=this.aspectRatio_:this.videoWidth()>0?l=this.videoWidth()+":"+this.videoHeight():l="16:9";var g=l.split(":"),m=g[1]/g[0];this.width_!==void 0?o=this.width_:this.height_!==void 0?o=this.height_/m:o=this.videoWidth()||300,this.height_!==void 0?u=this.height_:u=o*m,/^[^a-zA-Z]/.test(this.id())?c="dimensions-"+this.id():c=this.id()+"-dimensions",this.addClass(c),Fc(this.styleEl_,`
.`+c+` {
width: `+o+`px;
height: `+u+`px;
}
.`+c+`.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: `+m*100+`%;
}
`)},r.loadTech_=function(e,i){var s=this;this.tech_&&this.unloadTech_();var o=Ee(e),u=e.charAt(0).toLowerCase()+e.slice(1);o!=="Html5"&&this.tag&&(he.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1;var l=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(l=!1);var c={source:i,autoplay:l,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+u+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};qe.names.forEach(function(m){var _=qe[m];c[_.getterName]=s[_.privateName]}),be(c,this.options_[o]),be(c,this.options_[u]),be(c,this.options_[e.toLowerCase()]),this.tag&&(c.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(c.startTime=this.cache_.currentTime);var g=he.getTech(e);if(!g)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new g(c),this.tech_.ready(ye(this,this.handleTechReady_),!0),xl.jsonToTextTracks(this.textTracksJson_||[],this.tech_),vf.forEach(function(m){s.on(s.tech_,m,function(_){return s["handleTech"+Ee(m)+"_"](_)})}),Object.keys(ls).forEach(function(m){s.on(s.tech_,m,function(_){if(s.tech_.playbackRate()===0&&s.tech_.seeking()){s.queuedCallbacks_.push({callback:s["handleTech"+ls[m]+"_"].bind(s),event:_});return}s["handleTech"+ls[m]+"_"](_)})}),this.on(this.tech_,"loadstart",function(m){return s.handleTechLoadStart_(m)}),this.on(this.tech_,"sourceset",function(m){return s.handleTechSourceset_(m)}),this.on(this.tech_,"waiting",function(m){return s.handleTechWaiting_(m)}),this.on(this.tech_,"ended",function(m){return s.handleTechEnded_(m)}),this.on(this.tech_,"seeking",function(m){return s.handleTechSeeking_(m)}),this.on(this.tech_,"play",function(m){return s.handleTechPlay_(m)}),this.on(this.tech_,"firstplay",function(m){return s.handleTechFirstPlay_(m)}),this.on(this.tech_,"pause",function(m){return s.handleTechPause_(m)}),this.on(this.tech_,"durationchange",function(m){return s.handleTechDurationChange_(m)}),this.on(this.tech_,"fullscreenchange",function(m,_){return s.handleTechFullscreenChange_(m,_)}),this.on(this.tech_,"fullscreenerror",function(m,_){return s.handleTechFullscreenError_(m,_)}),this.on(this.tech_,"enterpictureinpicture",function(m){return s.handleTechEnterPictureInPicture_(m)}),this.on(this.tech_,"leavepictureinpicture",function(m){return s.handleTechLeavePictureInPicture_(m)}),this.on(this.tech_,"error",function(m){return s.handleTechError_(m)}),this.on(this.tech_,"posterchange",function(m){return s.handleTechPosterChange_(m)}),this.on(this.tech_,"textdata",function(m){return s.handleTechTextData_(m)}),this.on(this.tech_,"ratechange",function(m){return s.handleTechRateChange_(m)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(o!=="Html5"||!this.tag)&&Es(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},r.unloadTech_=function(){var e=this;qe.names.forEach(function(i){var s=qe[i];e[s.privateName]=e[s.getterName]()}),this.textTracksJson_=xl.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},r.tech=function(e){return e===void 0&&ie.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_},r.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},r.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},r.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},r.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())},r.manualAutoplay_=function(e){var i=this;if(!(!this.tech_||typeof e!="string")){var s=function(){var l=i.muted();i.muted(!0);var c=function(){i.muted(l)};i.playTerminatedQueue_.push(c);var g=i.play();if(!!Di(g))return g.catch(function(m){throw c(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(m||""))})},o;if(e==="any"&&!this.muted()?(o=this.play(),Di(o)&&(o=o.catch(s))):e==="muted"&&!this.muted()?o=s():o=this.play(),!!Di(o))return o.then(function(){i.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){i.trigger({type:"autoplay-failure",autoplay:e})})}},r.updateSourceCaches_=function(e){e===void 0&&(e="");var i=e,s="";typeof i!="string"&&(i=e.src,s=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!s&&(s=j0(this,i)),this.cache_.source=ve({},e,{src:i,type:s});for(var o=this.cache_.sources.filter(function(_){return _.src&&_.src===i}),u=[],l=this.$$("source"),c=[],g=0;g<l.length;g++){var m=Pt(l[g]);u.push(m),m.src&&m.src===i&&c.push(m.src)}c.length&&!o.length?this.cache_.sources=u:o.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i},r.handleTechSourceset_=function(e){var i=this;if(!this.changingSrc_){var s=function(c){return i.updateSourceCaches_(c)},o=this.currentSource().src,u=e.src;o&&!/^blob:/.test(o)&&/^blob:/.test(u)&&(!this.lastSource_||this.lastSource_.tech!==u&&this.lastSource_.player!==o)&&(s=function(){}),s(u),e.src||this.tech_.any(["sourceset","loadstart"],function(l){if(l.type!=="sourceset"){var c=i.techGet("currentSrc");i.lastSource_.tech=c,i.updateSourceCaches_(c)}})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},r.hasStarted=function(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},r.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},r.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},r.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var i=this.currentTime(),s=function o(){i!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",o))};this.on("timeupdate",s)},r.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},r.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},r.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},r.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},r.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},r.handleTechFirstPlay_=function(){this.options_.starttime&&(ie.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},r.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},r.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},r.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},r.handleTechClick_=function(e){!this.controls_||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?_t(this.play()):this.pause())},r.handleTechDoubleClick_=function(e){if(!!this.controls_){var i=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(s){return s.contains(e.target)});i||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}},r.handleTechTap_=function(){this.userActive(!this.userActive())},r.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},r.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},r.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},r.handleStageClick_=function(){this.reportUserActivity()},r.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},r.documentFullscreenChange_=function(e){var i=e.target.player;if(!(i&&i!==this)){var s=this.el(),o=G[this.fsApi_.fullscreenElement]===s;!o&&s.matches?o=s.matches(":"+this.fsApi_.fullscreen):!o&&s.msMatchesSelector&&(o=s.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}},r.handleTechFullscreenChange_=function(e,i){var s=this;i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){s.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))},r.handleTechFullscreenError_=function(e,i){this.trigger("fullscreenerror",i)},r.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},r.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},r.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},r.handleTechError_=function(){var e=this.tech_.error();this.error(e)},r.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},r.getCache=function(){return this.cache_},r.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},r.techCall_=function(e,i){this.ready(function(){if(e in B0)return M0(this.middleware_,this.tech_,e,i);if(e in wl)return Dl(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(s){throw ie(s),s}},!0)},r.techGet_=function(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in N0)return R0(this.middleware_,this.tech_,e);if(e in wl)return Dl(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(ie("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",i),i):i.name==="TypeError"?(ie("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",i),this.tech_.isReady_=!1,i):(ie(i),i)}}},r.play=function(){var e=this,i=this.options_.Promise||A.Promise;return i?new i(function(s){e.play_(s)}):this.play_()},r.play_=function(e){var i=this;e===void 0&&(e=_t),this.playCallbacks_.push(e);var s=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),o=Boolean(va||$e);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!s){this.waitToPlay_=function(c){i.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!s&&o&&this.load();return}var u=this.techGet_("play"),l=o&&this.hasClass("vjs-ended");l&&this.resetProgressBar_(),u===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(u)},r.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})},r.runPlayCallbacks_=function(e){var i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(s){s(e)})},r.pause=function(){this.techCall_("pause")},r.paused=function(){return this.techGet_("paused")!==!1},r.played=function(){return this.techGet_("played")||cr(0,0)},r.scrubbing=function(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},r.currentTime=function(e){if(typeof e<"u"){if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0;return}return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime},r.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},r.duration=function(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},r.remainingTime=function(){return this.duration()-this.currentTime()},r.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},r.buffered=function(){var e=this.techGet_("buffered");return(!e||!e.length)&&(e=cr(0,0)),e},r.bufferedPercent=function(){return Vc(this.buffered(),this.duration())},r.bufferedEnd=function(){var e=this.buffered(),i=this.duration(),s=e.end(e.length-1);return s>i&&(s=i),s},r.volume=function(e){var i;if(e!==void 0){i=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i},r.muted=function(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1},r.defaultMuted=function(e){return e!==void 0?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},r.lastVolume_=function(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume},r.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},r.isFullscreen=function(e){if(e!==void 0){var i=this.isFullscreen_;this.isFullscreen_=Boolean(e),this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_},r.requestFullscreen=function(e){var i=this.options_.Promise||A.Promise;if(i){var s=this;return new i(function(o,u){function l(){s.off("fullscreenerror",g),s.off("fullscreenchange",c)}function c(){l(),o()}function g(_,b){l(),u(b)}s.one("fullscreenchange",c),s.one("fullscreenerror",g);var m=s.requestFullscreenHelper_(e);m&&(m.then(l,l),m.then(o,u))})}return this.requestFullscreenHelper_()},r.requestFullscreenHelper_=function(e){var i=this,s;if(this.fsApi_.prefixed||(s=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(s=e)),this.fsApi_.requestFullscreen){var o=this.el_[this.fsApi_.requestFullscreen](s);return o&&o.then(function(){return i.isFullscreen(!0)},function(){return i.isFullscreen(!1)}),o}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},r.exitFullscreen=function(){var e=this.options_.Promise||A.Promise;if(e){var i=this;return new e(function(s,o){function u(){i.off("fullscreenerror",c),i.off("fullscreenchange",l)}function l(){u(),s()}function c(m,_){u(),o(_)}i.one("fullscreenchange",l),i.one("fullscreenerror",c);var g=i.exitFullscreenHelper_();g&&(g.then(u,u),g.then(s,o))})}return this.exitFullscreenHelper_()},r.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var i=G[this.fsApi_.exitFullscreen]();return i&&_t(i.then(function(){return e.isFullscreen(!1)})),i}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},r.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=G.documentElement.style.overflow,it(G,"keydown",this.boundFullWindowOnEscKey_),G.documentElement.style.overflow="hidden",Ft(G.body,"vjs-full-window"),this.trigger("enterFullWindow")},r.fullWindowOnEscKey=function(e){te.isEventKey(e,"Esc")&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},r.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,Ne(G,"keydown",this.boundFullWindowOnEscKey_),G.documentElement.style.overflow=this.docOrigOverflow,zi(G.body,"vjs-full-window"),this.trigger("exitFullWindow")},r.disablePictureInPicture=function(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},r.isInPictureInPicture=function(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_},r.requestPictureInPicture=function(){if("pictureInPictureEnabled"in G&&this.disablePictureInPicture()===!1)return this.techGet_("requestPictureInPicture")},r.exitPictureInPicture=function(){if("pictureInPictureEnabled"in G)return G.exitPictureInPicture()},r.handleKeyDown=function(e){var i=this.options_.userActions;if(!(!i||!i.hotkeys)){var s=function(u){var l=u.tagName.toLowerCase();if(u.isContentEditable)return!0;var c=["button","checkbox","hidden","radio","reset","submit"];if(l==="input")return c.indexOf(u.type)===-1;var g=["textarea"];return g.indexOf(l)!==-1};s(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e))}},r.handleHotkeys=function(e){var i=this.options_.userActions?this.options_.userActions.hotkeys:{},s=i.fullscreenKey,o=s===void 0?function(S){return te.isEventKey(S,"f")}:s,u=i.muteKey,l=u===void 0?function(S){return te.isEventKey(S,"m")}:u,c=i.playPauseKey,g=c===void 0?function(S){return te.isEventKey(S,"k")||te.isEventKey(S,"Space")}:c;if(o.call(this,e)){e.preventDefault(),e.stopPropagation();var m=V.getComponent("FullscreenToggle");G[this.fsApi_.fullscreenEnabled]!==!1&&m.prototype.handleClick.call(this,e)}else if(l.call(this,e)){e.preventDefault(),e.stopPropagation();var _=V.getComponent("MuteToggle");_.prototype.handleClick.call(this,e)}else if(g.call(this,e)){e.preventDefault(),e.stopPropagation();var b=V.getComponent("PlayToggle");b.prototype.handleClick.call(this,e)}},r.canPlayType=function(e){for(var i,s=0,o=this.options_.techOrder;s<o.length;s++){var u=o[s],l=he.getTech(u);if(l||(l=V.getComponent(u)),!l){ie.error('The "'+u+'" tech is undefined. Skipped browser support check for that tech.');continue}if(l.isSupported()&&(i=l.canPlayType(e),i))return i}return""},r.selectSource=function(e){var i=this,s=this.options_.techOrder.map(function(g){return[g,he.getTech(g)]}).filter(function(g){var m=g[0],_=g[1];return _?_.isSupported():(ie.error('The "'+m+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),o=function(m,_,b){var S;return m.some(function(x){return _.some(function(w){if(S=b(x,w),S)return!0})}),S},u,l=function(m){return function(_,b){return m(b,_)}},c=function(m,_){var b=m[0],S=m[1];if(S.canPlaySource(_,i.options_[b.toLowerCase()]))return{source:_,tech:b}};return this.options_.sourceOrder?u=o(e,s,l(c)):u=o(s,e,c),u||!1},r.handleSrc_=function(e,i){var s=this;if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var o=G0(e);if(!o.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=o),this.updateSourceCaches_(o[0]),L0(this,o[0],function(c,g){s.middleware_=g,i||(s.cache_.sources=o),s.updateSourceCaches_(c);var m=s.src_(c);if(m){if(o.length>1)return s.handleSrc_(o.slice(1));s.changingSrc_=!1,s.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),s.triggerReady();return}F0(g,s.tech_)}),this.options_.retryOnError&&o.length>1){var u=function(){s.error(null),s.handleSrc_(o.slice(1),!0)},l=function(){s.off("error",u)};this.one("error",u),this.one("playing",l),this.resetRetryOnError_=function(){s.off("error",u),s.off("playing",l)}}},r.src=function(e){return this.handleSrc_(e,!1)},r.src_=function(e){var i=this,s=this.selectSource([e]);return s?p0(s.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(s.tech,s.source),this.tech_.ready(function(){i.changingSrc_=!1}),!1):!0},r.load=function(){this.techCall_("load")},r.reset=function(){var e=this,i=this.options_.Promise||A.Promise;if(this.paused()||!i)this.doReset_();else{var s=this.play();_t(s.then(function(){return e.doReset_()}))}},r.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Rt(this)&&this.trigger("playerreset")},r.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},r.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar||{},i=e.durationDisplay,s=e.remainingTimeDisplay;i&&i.updateContent(),s&&s.updateContent()},r.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},r.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},r.currentSources=function(){var e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i},r.currentSource=function(){return this.cache_.source||{}},r.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},r.currentType=function(){return this.currentSource()&&this.currentSource().type||""},r.preload=function(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")},r.autoplay=function(e){if(e===void 0)return this.options_.autoplay||!1;var i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)},r.playsinline=function(e){return e!==void 0?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},r.loop=function(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")},r.poster=function(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},r.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},r.controls=function(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},r.usingNativeControls=function(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},r.error=function(e){var i=this;if(e===void 0)return this.error_||null;if(Kt("beforeerror").forEach(function(o){var u=o(i,e);if(!(Ut(u)&&!Array.isArray(u)||typeof u=="string"||typeof u=="number"||u===null)){i.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=u}),this.options_.suppressNotSupportedError&&e&&e.code===4){var s=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],s),this.one("loadstart",function(){this.off(["click","touchstart"],s)});return}if(e===null){this.error_=e,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new ze(e),this.addClass("vjs-error"),ie.error("(CODE:"+this.error_.code+" "+ze.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),Kt("error").forEach(function(o){return o(i,i.error_)})},r.reportUserActivity=function(e){this.userActivity_=!0},r.userActive=function(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},r.listenForUserActivity_=function(){var e,i,s,o=ye(this,this.reportUserActivity),u=function(b){(b.screenX!==i||b.screenY!==s)&&(i=b.screenX,s=b.screenY,o())},l=function(){o(),this.clearInterval(e),e=this.setInterval(o,250)},c=function(b){o(),this.clearInterval(e)};this.on("mousedown",l),this.on("mousemove",u),this.on("mouseup",c),this.on("mouseleave",c);var g=this.getChild("controlBar");g&&!$e&&!qt&&(g.on("mouseenter",function(_){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),g.on("mouseleave",function(_){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o);var m;this.setInterval(function(){if(!!this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(m);var _=this.options_.inactivityTimeout;_<=0||(m=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},_))}},250)},r.playbackRate=function(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},r.defaultPlaybackRate=function(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},r.isAudio=function(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_},r.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var i=this.children(),s=this.getChild("ControlBar"),o=s&&s.currentHeight();i.forEach(function(u){u!==s&&u.el_&&!u.hasClass("vjs-hidden")&&(u.hide(),e.audioOnlyCache_.hiddenChildren.push(u))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(o),this.trigger("audioonlymodechange")},r.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(function(e){return e.show()}),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},r.audioOnlyMode=function(e){var i=this;if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var s=this.options_.Promise||A.Promise;if(s){if(e){var o=[];return this.isInPictureInPicture()&&o.push(this.exitPictureInPicture()),this.isFullscreen()&&o.push(this.exitFullscreen()),this.audioPosterMode()&&o.push(this.audioPosterMode(!1)),s.all(o).then(function(){return i.enableAudioOnlyUI_()})}return s.resolve().then(function(){return i.disableAudioOnlyUI_()})}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},r.enablePosterModeUI_=function(){var e=this.tech_&&this.tech_;e.hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},r.disablePosterModeUI_=function(){var e=this.tech_&&this.tech_;e.show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},r.audioPosterMode=function(e){var i=this;if(typeof e!="boolean"||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var s=this.options_.Promise||A.Promise;if(s){if(e){if(this.audioOnlyMode()){var o=this.audioOnlyMode(!1);return o.then(function(){i.enablePosterModeUI_()})}return s.resolve().then(function(){i.enablePosterModeUI_()})}return s.resolve().then(function(){i.disablePosterModeUI_()})}if(e){this.audioOnlyMode()&&this.audioOnlyMode(!1),this.enablePosterModeUI_();return}this.disablePosterModeUI_()},r.addTextTrack=function(e,i,s){if(this.tech_)return this.tech_.addTextTrack(e,i,s)},r.addRemoteTextTrack=function(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)},r.removeRemoteTextTrack=function(e){e===void 0&&(e={});var i=e,s=i.track;if(s||(s=e),this.tech_)return this.tech_.removeRemoteTextTrack(s)},r.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},r.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},r.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},r.language=function(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Rt(this)&&this.trigger("languagechange"))},r.languages=function(){return ve(t.prototype.options_.languages,this.languages_)},r.toJSON=function(){var e=ve(this.options_),i=e.tracks;e.tracks=[];for(var s=0;s<i.length;s++){var o=i[s];o=ve(o),o.player=void 0,e.tracks[s]=o}return e},r.createModal=function(e,i){var s=this;i=i||{},i.content=e||"";var o=new Zr(this,i);return this.addChild(o),o.on("dispose",function(){s.removeChild(o)}),o.open(),o},r.updateCurrentBreakpoint_=function(){if(!!this.responsive())for(var e=this.currentBreakpoint(),i=this.currentWidth(),s=0;s<Os.length;s++){var o=Os[s],u=this.breakpoints_[o];if(i<=u){if(e===o)return;e&&this.removeClass(Fn[e]),this.addClass(Fn[o]),this.breakpoint_=o;break}}},r.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},r.breakpoints=function(e){return e===void 0?be(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=be({},Ty,e),this.updateCurrentBreakpoint_(),be(this.breakpoints_))},r.responsive=function(e){if(e===void 0)return this.responsive_;e=Boolean(e);var i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e},r.currentBreakpoint=function(){return this.breakpoint_},r.currentBreakpointClass=function(){return Fn[this.breakpoint_]||""},r.loadMedia=function(e,i){var s=this;if(!(!e||typeof e!="object")){this.reset(),this.cache_.media=ve(e);var o=this.cache_.media,u=o.artwork,l=o.poster,c=o.src,g=o.textTracks;!u&&l&&(this.cache_.media.artwork=[{src:l,type:$n(l)}]),c&&this.src(c),l&&this.poster(l),Array.isArray(g)&&g.forEach(function(m){return s.addRemoteTextTrack(m,!1)}),this.ready(i)}},r.getMedia=function(){if(!this.cache_.media){var e=this.poster(),i=this.currentSources(),s=Array.prototype.map.call(this.remoteTextTracks(),function(u){return{kind:u.kind,label:u.label,language:u.language,src:u.src}}),o={src:i,textTracks:s};return e&&(o.poster=e,o.artwork=[{src:o.poster,type:$n(o.poster)}]),o}return ve(this.cache_.media)},t.getTagSettings=function(e){var i={sources:[],tracks:[]},s=Pt(e),o=s["data-setup"];if(dr(e,"vjs-fill")&&(s.fill=!0),dr(e,"vjs-fluid")&&(s.fluid=!0),o!==null){var u=tm(o||"{}"),l=u[0],c=u[1];l&&ie.error(l),be(s,c)}if(be(i,s),e.hasChildNodes())for(var g=e.childNodes,m=0,_=g.length;m<_;m++){var b=g[m],S=b.nodeName.toLowerCase();S==="source"?i.sources.push(Pt(b)):S==="track"&&i.tracks.push(Pt(b))}return i},r.flexNotSupported_=function(){var e=G.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},r.debug=function(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},r.playbackRates=function(e){if(e===void 0)return this.cache_.playbackRates;!Array.isArray(e)||!e.every(function(i){return typeof i=="number"})||(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(V);qe.names.forEach(function(a){var t=qe[a];Ae.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}});Ae.prototype.crossorigin=Ae.prototype.crossOrigin;Ae.players={};var vi=A.navigator;Ae.prototype.options_={techOrder:he.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:vi&&(vi.languages&&vi.languages[0]||vi.userLanguage||vi.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1};["ended","seeking","seekable","networkState","readyState"].forEach(function(a){Ae.prototype[a]=function(){return this.techGet_(a)}});vf.forEach(function(a){Ae.prototype["handleTech"+Ee(a)+"_"]=function(){return this.trigger(a)}});V.registerComponent("Player",Ae);var Yn="plugin",Rr="activePlugins_",Ir={},Qn=function(t){return Ir.hasOwnProperty(t)},Rn=function(t){return Qn(t)?Ir[t]:void 0},yf=function(t,r){t[Rr]=t[Rr]||{},t[Rr][r]=!0},Jn=function(t,r,n){var e=(n?"before":"")+"pluginsetup";t.trigger(e,r),t.trigger(e+":"+r.name,r)},by=function(t,r){var n=function(){Jn(this,{name:t,plugin:r,instance:null},!0);var i=r.apply(this,arguments);return yf(this,t),Jn(this,{name:t,plugin:r,instance:i}),i};return Object.keys(r).forEach(function(e){n[e]=r[e]}),n},ql=function(t,r){return r.prototype.name=t,function(){Jn(this,{name:t,plugin:r,instance:null},!0);for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];var s=Ai(r,[this].concat(e));return this[t]=function(){return s},Jn(this,s.getEventHash()),s}},Ct=function(){function a(r){if(this.constructor===a)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=r,this.log||(this.log=this.player.log.createLogger(this.name)),bo(this),delete this.trigger,Uc(this,this.constructor.defaultState),yf(r,this.name),this.dispose=this.dispose.bind(this),r.on("dispose",this.dispose)}var t=a.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(n){return n===void 0&&(n={}),n.name=this.name,n.plugin=this.constructor,n.instance=this,n},t.trigger=function(n,e){return e===void 0&&(e={}),Jr(this.eventBusEl_,n,this.getEventHash(e))},t.handleStateChanged=function(n){},t.dispose=function(){var n=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[Rr][n]=!1,this.player=this.state=null,e[n]=ql(n,Ir[n])},a.isBasic=function(n){var e=typeof n=="string"?Rn(n):n;return typeof e=="function"&&!a.prototype.isPrototypeOf(e.prototype)},a.registerPlugin=function(n,e){if(typeof n!="string")throw new Error('Illegal plugin name, "'+n+'", must be a string, was '+typeof n+".");if(Qn(n))ie.warn('A plugin named "'+n+'" already exists. You may want to avoid re-registering plugins!');else if(Ae.prototype.hasOwnProperty(n))throw new Error('Illegal plugin name, "'+n+'", cannot share a name with an existing player method!');if(typeof e!="function")throw new Error('Illegal plugin for "'+n+'", must be a function, was '+typeof e+".");return Ir[n]=e,n!==Yn&&(a.isBasic(e)?Ae.prototype[n]=by(n,e):Ae.prototype[n]=ql(n,e)),e},a.deregisterPlugin=function(n){if(n===Yn)throw new Error("Cannot de-register base plugin.");Qn(n)&&(delete Ir[n],delete Ae.prototype[n])},a.getPlugins=function(n){n===void 0&&(n=Object.keys(Ir));var e;return n.forEach(function(i){var s=Rn(i);s&&(e=e||{},e[i]=s)}),e},a.getPluginVersion=function(n){var e=Rn(n);return e&&e.VERSION||""},a}();Ct.getPlugin=Rn;Ct.BASE_PLUGIN_NAME=Yn;Ct.registerPlugin(Yn,Ct);Ae.prototype.usingPlugin=function(a){return!!this[Rr]&&this[Rr][a]===!0};Ae.prototype.hasPlugin=function(a){return!!Qn(a)};var jl=!1,xy=function(t,r){r===void 0&&(r={}),jl||(ie.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),jl=!0);var n=function(){t.apply(this,arguments)},e={};typeof r=="object"?(r.constructor!==Object.prototype.constructor&&(n=r.constructor),e=r):typeof r=="function"&&(n=r),jm(n,t),t&&(n.super_=t);for(var i in e)e.hasOwnProperty(i)&&(n.prototype[i]=e[i]);return n},_f=function(t){return t.indexOf("#")===0?t.slice(1):t};function I(a,t,r){var n=I.getPlayer(a);if(n)return t&&ie.warn('Player "'+a+'" is already initialised. Options will not be applied.'),r&&n.ready(r),n;var e=typeof a=="string"?Xt("#"+_f(a)):a;if(!Qr(e))throw new TypeError("The element or ID supplied is not valid. (videojs)");(!e.ownerDocument.defaultView||!e.ownerDocument.body.contains(e))&&ie.warn("The element supplied is not included in the DOM"),t=t||{},t.restoreEl===!0&&(t.restoreEl=(e.parentNode&&e.parentNode.hasAttribute("data-vjs-player")?e.parentNode:e).cloneNode(!0)),Kt("beforesetup").forEach(function(s){var o=s(e,ve(t));if(!Ut(o)||Array.isArray(o)){ie.error("please return an object in beforesetup hooks");return}t=ve(t,o)});var i=V.getComponent("Player");return n=new i(e,t,r),Kt("setup").forEach(function(s){return s(n)}),n}I.hooks_=It;I.hooks=Kt;I.hook=Xv;I.hookOnce=Yv;I.removeHook=dc;if(A.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&Yr()){var Dn=Xt(".vjs-styles-defaults");if(!Dn){Dn=Lc("vjs-styles-defaults");var ds=Xt("head");ds&&ds.insertBefore(Dn,ds.firstChild),Fc(Dn,`
.video-js {
width: 300px;
height: 150px;
}
.vjs-fluid:not(.vjs-audio-only-mode) {
padding-top: 56.25%
}
`)}}As(1,I);I.VERSION=lc;I.options=Ae.prototype.options_;I.getPlayers=function(){return Ae.players};I.getPlayer=function(a){var t=Ae.players,r;if(typeof a=="string"){var n=_f(a),e=t[n];if(e)return e;r=Xt("#"+n)}else r=a;if(Qr(r)){var i=r,s=i.player,o=i.playerId;if(s||t[o])return s||t[o]}};I.getAllPlayers=function(){return Object.keys(Ae.players).map(function(a){return Ae.players[a]}).filter(Boolean)};I.players=Ae.players;I.getComponent=V.getComponent;I.registerComponent=function(a,t){he.isTech(t)&&ie.warn("The "+a+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),V.registerComponent.call(V,a,t)};I.getTech=he.getTech;I.registerTech=he.registerTech;I.use=O0;Object.defineProperty(I,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(I.middleware,"TERMINATOR",{value:zn,writeable:!1,enumerable:!0});I.browser=r0;I.TOUCH_ENABLED=jr;I.extend=xy;I.mergeOptions=ve;I.bind=ye;I.registerPlugin=Ct.registerPlugin;I.deregisterPlugin=Ct.deregisterPlugin;I.plugin=function(a,t){return ie.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ct.registerPlugin(a,t)};I.getPlugins=Ct.getPlugins;I.getPlugin=Ct.getPlugin;I.getPluginVersion=Ct.getPluginVersion;I.addLanguage=function(a,t){var r;return a=(""+a).toLowerCase(),I.options.languages=ve(I.options.languages,(r={},r[a]=t,r)),I.options.languages[a]};I.log=ie;I.createLogger=fc;I.createTimeRange=I.createTimeRanges=cr;I.formatTime=Kr;I.setFormatTime=Q0;I.resetFormatTime=J0;I.parseUrl=So;I.isCrossOrigin=Sa;I.EventTarget=Ie;I.on=it;I.one=ba;I.off=Ne;I.trigger=Jr;I.xhr=oa.exports;I.TextTrack=$i;I.AudioTrack=jc;I.VideoTrack=Gc;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(a){I[a]=function(){return ie.warn("videojs."+a+"() is deprecated; use videojs.dom."+a+"() instead"),Ic[a].apply(null,arguments)}});I.computedStyle=Mi;I.dom=Ic;I.url=w0;I.defineLazyProperty=qo;I.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});/*! @name @videojs/http-streaming @version 2.16.2 @license Apache-2.0 */var dt=la,Zn=function(t,r,n){return t&&n&&n.responseURL&&r!==n.responseURL?n.responseURL:r},pt=function(t){return I.log.debug?I.log.debug.bind(I,"VHS:",t+" >"):function(){}},Yt=1/30,Tt=Yt*3,Tf=function(t,r){var n=[],e;if(t&&t.length)for(e=0;e<t.length;e++)r(t.start(e),t.end(e))&&n.push([t.start(e),t.end(e)]);return I.createTimeRanges(n)},Or=function(t,r){return Tf(t,function(n,e){return n-Tt<=r&&e+Tt>=r})},wn=function(t,r){return Tf(t,function(n){return n-Yt>=r})},Sy=function(t){if(t.length<2)return I.createTimeRanges();for(var r=[],n=1;n<t.length;n++){var e=t.end(n-1),i=t.start(n);r.push([e,i])}return I.createTimeRanges(r)},Ey=function(t,r){var n=null,e=null,i=0,s=[],o=[];if(!t||!t.length||!r||!r.length)return I.createTimeRange();for(var u=t.length;u--;)s.push({time:t.start(u),type:"start"}),s.push({time:t.end(u),type:"end"});for(u=r.length;u--;)s.push({time:r.start(u),type:"start"}),s.push({time:r.end(u),type:"end"});for(s.sort(function(l,c){return l.time-c.time}),u=0;u<s.length;u++)s[u].type==="start"?(i++,i===2&&(n=s[u].time)):s[u].type==="end"&&(i--,i===1&&(e=s[u].time)),n!==null&&e!==null&&(o.push([n,e]),n=null,e=null);return I.createTimeRanges(o)},bf=function(t){var r=[];if(!t||!t.length)return"";for(var n=0;n<t.length;n++)r.push(t.start(n)+" => "+t.end(n));return r.join(", ")},Cy=function(t,r,n){n===void 0&&(n=1);var e=t.length?t.end(t.length-1):0;return(e-r)/n},ur=function(t){for(var r=[],n=0;n<t.length;n++)r.push({start:t.start(n),end:t.end(n)});return r},Ay=function(t,r){if(t===r)return!1;if(!t&&r||!r&&t||t.length!==r.length)return!0;for(var n=0;n<t.length;n++)if(t.start(n)!==r.start(n)||t.end(n)!==r.end(n))return!0;return!1},Gl=function(t){if(!(!t||!t.length||!t.end))return t.end(t.length-1)},jo=function(t,r){var n=0;if(!t||!t.length)return n;for(var e=0;e<t.length;e++){var i=t.start(e),s=t.end(e);if(!(r>s)){if(r>i&&r<=s){n+=s-r;continue}n+=s-i}}return n},Wl=I.createTimeRange,Go=function(t,r){if(!r.preload)return r.duration;var n=0;return(r.parts||[]).forEach(function(e){n+=e.duration}),(r.preloadHints||[]).forEach(function(e){e.type==="PART"&&(n+=t.partTargetDuration)}),n},Ls=function(t){return(t.segments||[]).reduce(function(r,n,e){return n.parts?n.parts.forEach(function(i,s){r.push({duration:i.duration,segmentIndex:e,partIndex:s,part:i,segment:n})}):r.push({duration:n.duration,segmentIndex:e,partIndex:null,segment:n,part:null}),r},[])},xf=function(t){var r=t.segments&&t.segments.length&&t.segments[t.segments.length-1];return r&&r.parts||[]},Sf=function(t){var r=t.preloadSegment;if(!!r){var n=r.parts,e=r.preloadHints,i=(e||[]).reduce(function(s,o){return s+(o.type==="PART"?1:0)},0);return i+=n&&n.length?n.length:0,i}},Ef=function(t,r){if(r.endList)return 0;if(t&&t.suggestedPresentationDelay)return t.suggestedPresentationDelay;var n=xf(r).length>0;return n&&r.serverControl&&r.serverControl.partHoldBack?r.serverControl.partHoldBack:n&&r.partTargetDuration?r.partTargetDuration*3:r.serverControl&&r.serverControl.holdBack?r.serverControl.holdBack:r.targetDuration?r.targetDuration*3:0},Dy=function(t,r){var n=0,e=r-t.mediaSequence,i=t.segments[e];if(i){if(typeof i.start<"u")return{result:i.start,precise:!0};if(typeof i.end<"u")return{result:i.end-i.duration,precise:!0}}for(;e--;){if(i=t.segments[e],typeof i.end<"u")return{result:n+i.end,precise:!0};if(n+=Go(t,i),typeof i.start<"u")return{result:n+i.start,precise:!0}}return{result:n,precise:!1}},wy=function(t,r){for(var n=0,e,i=r-t.mediaSequence;i<t.segments.length;i++){if(e=t.segments[i],typeof e.start<"u")return{result:e.start-n,precise:!0};if(n+=Go(t,e),typeof e.end<"u")return{result:e.end-n,precise:!0}}return{result:-1,precise:!1}},Cf=function(t,r,n){if(typeof r>"u"&&(r=t.mediaSequence+t.segments.length),r<t.mediaSequence)return 0;var e=Dy(t,r);if(e.precise)return e.result;var i=wy(t,r);return i.precise?i.result:e.result+n},Af=function(t,r,n){if(!t)return 0;if(typeof n!="number"&&(n=0),typeof r>"u"){if(t.totalDuration)return t.totalDuration;if(!t.endList)return A.Infinity}return Cf(t,r,n)},wi=function(t){var r=t.defaultDuration,n=t.durationList,e=t.startIndex,i=t.endIndex,s=0;if(e>i){var o=[i,e];e=o[0],i=o[1]}if(e<0){for(var u=e;u<Math.min(0,i);u++)s+=r;e=0}for(var l=e;l<i;l++)s+=n[l].duration;return s},Df=function(t,r,n,e){if(!t||!t.segments)return null;if(t.endList)return Af(t);if(r===null)return null;r=r||0;var i=Cf(t,t.mediaSequence+t.segments.length,r);return n&&(e=typeof e=="number"?e:Ef(null,t),i-=e),Math.max(0,i)},ky=function(t,r,n){var e=!0,i=r||0,s=Df(t,r,e,n);return s===null?Wl():Wl(i,s)},Py=function(t){for(var r=t.playlist,n=t.currentTime,e=t.startingSegmentIndex,i=t.startingPartIndex,s=t.startTime,o=t.experimentalExactManifestTimings,u=n-s,l=Ls(r),c=0,g=0;g<l.length;g++){var m=l[g];if(e===m.segmentIndex&&!(typeof i=="number"&&typeof m.partIndex=="number"&&i!==m.partIndex)){c=g;break}}if(u<0){if(c>0)for(var _=c-1;_>=0;_--){var b=l[_];if(u+=b.duration,o){if(u<0)continue}else if(u+Yt<=0)continue;return{partIndex:b.partIndex,segmentIndex:b.segmentIndex,startTime:s-wi({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:_})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n}}if(c<0){for(var S=c;S<0;S++)if(u-=r.targetDuration,u<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n};c=0}for(var x=c;x<l.length;x++){var w=l[x];if(u-=w.duration,o){if(u>0)continue}else if(u-Yt>=0)continue;return{partIndex:w.partIndex,segmentIndex:w.segmentIndex,startTime:s+wi({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:x})}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:n}},wf=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},Wo=function(t){return t.excludeUntil&&t.excludeUntil===1/0},Da=function(t){var r=wf(t);return!t.disabled&&!r},Iy=function(t){return t.disabled},Oy=function(t){for(var r=0;r<t.segments.length;r++)if(t.segments[r].key)return!0;return!1},kf=function(t,r){return r.attributes&&r.attributes[t]},Ly=function(t,r,n,e){if(e===void 0&&(e=0),!kf("BANDWIDTH",n))return NaN;var i=t*n.attributes.BANDWIDTH;return(i-e*8)/r},Fs=function(t,r){if(t.playlists.length===1)return!0;var n=r.attributes.BANDWIDTH||Number.MAX_VALUE;return t.playlists.filter(function(e){return Da(e)?(e.attributes.BANDWIDTH||0)<n:!1}).length===0},zo=function(t,r){return!t&&!r||!t&&r||t&&!r?!1:!!(t===r||t.id&&r.id&&t.id===r.id||t.resolvedUri&&r.resolvedUri&&t.resolvedUri===r.resolvedUri||t.uri&&r.uri&&t.uri===r.uri)},zl=function(t,r){var n=t&&t.mediaGroups&&t.mediaGroups.AUDIO||{},e=!1;for(var i in n){for(var s in n[i])if(e=r(n[i][s]),e)break;if(e)break}return!!e},Yi=function(t){if(!t||!t.playlists||!t.playlists.length){var r=zl(t,function(s){return s.playlists&&s.playlists.length||s.uri});return r}for(var n=function(o){var u=t.playlists[o],l=u.attributes&&u.attributes.CODECS;if(l&&l.split(",").every(function(g){return _d(g)}))return"continue";var c=zl(t,function(g){return zo(u,g)});return c?"continue":{v:!1}},e=0;e<t.playlists.length;e++){var i=n(e);if(i!=="continue"&&typeof i=="object")return i.v}return!0},Ye={liveEdgeDelay:Ef,duration:Af,seekable:ky,getMediaInfoForTime:Py,isEnabled:Da,isDisabled:Iy,isBlacklisted:wf,isIncompatible:Wo,playlistEnd:Df,isAes:Oy,hasAttribute:kf,estimateSegmentRequestTime:Ly,isLowestEnabledRendition:Fs,isAudioOnly:Yi,playlistMatch:zo,segmentDurationWithParts:Go},Pf=I.log,$o=function(t,r){return t+"-"+r},Fy=function(t,r,n){return"placeholder-uri-"+t+"-"+r+"-"+n},Ry=function(t){var r=t.onwarn,n=t.oninfo,e=t.manifestString,i=t.customTagParsers,s=i===void 0?[]:i,o=t.customTagMappers,u=o===void 0?[]:o,l=t.experimentalLLHLS,c=new Ym;r&&c.on("warn",r),n&&c.on("info",n),s.forEach(function(S){return c.addParser(S)}),u.forEach(function(S){return c.addTagMapper(S)}),c.push(e),c.end();var g=c.manifest;if(l||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(S){g.hasOwnProperty(S)&&delete g[S]}),g.segments&&g.segments.forEach(function(S){["parts","preloadHints"].forEach(function(x){S.hasOwnProperty(x)&&delete S[x]})})),!g.targetDuration){var m=10;g.segments&&g.segments.length&&(m=g.segments.reduce(function(S,x){return Math.max(S,x.duration)},0)),r&&r("manifest has no targetDuration defaulting to "+m),g.targetDuration=m}var _=xf(g);if(_.length&&!g.partTargetDuration){var b=_.reduce(function(S,x){return Math.max(S,x.duration)},0);r&&(r("manifest has no partTargetDuration defaulting to "+b),Pf.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),g.partTargetDuration=b}return g},ii=function(t,r){!t.mediaGroups||["AUDIO","SUBTITLES"].forEach(function(n){if(!!t.mediaGroups[n])for(var e in t.mediaGroups[n])for(var i in t.mediaGroups[n][e]){var s=t.mediaGroups[n][e][i];r(s,n,e,i)}})},If=function(t){var r=t.playlist,n=t.uri,e=t.id;r.id=e,r.playlistErrors_=0,n&&(r.uri=n),r.attributes=r.attributes||{}},My=function(t){for(var r=t.playlists.length;r--;){var n=t.playlists[r];If({playlist:n,id:$o(r,n.uri)}),n.resolvedUri=dt(t.uri,n.uri),t.playlists[n.id]=n,t.playlists[n.uri]=n,n.attributes.BANDWIDTH||Pf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},Ny=function(t){ii(t,function(r){r.uri&&(r.resolvedUri=dt(t.uri,r.uri))})},By=function(t,r){var n=$o(0,r),e={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:A.location.href,resolvedUri:A.location.href,playlists:[{uri:r,id:n,resolvedUri:r,attributes:{}}]};return e.playlists[n]=e.playlists[0],e.playlists[r]=e.playlists[0],e},Of=function(t,r,n){n===void 0&&(n=Fy),t.uri=r;for(var e=0;e<t.playlists.length;e++)if(!t.playlists[e].uri){var i="placeholder-uri-"+e;t.playlists[e].uri=i}var s=Yi(t);ii(t,function(o,u,l,c){if(!o.playlists||!o.playlists.length){if(s&&u==="AUDIO"&&!o.uri)for(var g=0;g<t.playlists.length;g++){var m=t.playlists[g];if(m.attributes&&m.attributes.AUDIO&&m.attributes.AUDIO===l)return}o.playlists=[ot({},o)]}o.playlists.forEach(function(_,b){var S=n(u,l,c,_),x=$o(b,S);_.uri?_.resolvedUri=_.resolvedUri||dt(t.uri,_.uri):(_.uri=b===0?S:x,_.resolvedUri=_.uri),_.id=_.id||x,_.attributes=_.attributes||{},t.playlists[_.id]=_,t.playlists[_.uri]=_})}),My(t),Ny(t)},ea=I.mergeOptions,Uy=I.EventTarget,Vy=function(t,r){if(r.endList||!r.serverControl)return t;var n={};if(r.serverControl.canBlockReload){var e=r.preloadSegment,i=r.mediaSequence+r.segments.length;if(e){var s=e.parts||[],o=Sf(r)-1;o>-1&&o!==s.length-1&&(n._HLS_part=o),(o>-1||s.length)&&i--}n._HLS_msn=i}if(r.serverControl&&r.serverControl.canSkipUntil&&(n._HLS_skip=r.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var u=new A.URL(t);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(l){!n.hasOwnProperty(l)||u.searchParams.set(l,n[l])}),t=u.toString()}return t},Hy=function(t,r){if(!t)return r;var n=ea(t,r);if(t.preloadHints&&!r.preloadHints&&delete n.preloadHints,t.parts&&!r.parts)delete n.parts;else if(t.parts&&r.parts)for(var e=0;e<r.parts.length;e++)t.parts&&t.parts[e]&&(n.parts[e]=ea(t.parts[e],r.parts[e]));return!t.skipped&&r.skipped&&(n.skipped=!1),t.preload&&!r.preload&&(n.preload=!1),n},qy=function(t,r,n){var e=t.slice(),i=r.slice();n=n||0;for(var s=[],o,u=0;u<i.length;u++){var l=e[u+n],c=i[u];l?(o=l.map||o,s.push(Hy(l,c))):(o&&!c.map&&(c.map=o),s.push(c))}return s},Lf=function(t,r){!t.resolvedUri&&t.uri&&(t.resolvedUri=dt(r,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=dt(r,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=dt(r,t.map.uri)),t.map&&t.map.key&&!t.map.key.resolvedUri&&(t.map.key.resolvedUri=dt(r,t.map.key.uri)),t.parts&&t.parts.length&&t.parts.forEach(function(n){n.resolvedUri||(n.resolvedUri=dt(r,n.uri))}),t.preloadHints&&t.preloadHints.length&&t.preloadHints.forEach(function(n){n.resolvedUri||(n.resolvedUri=dt(r,n.uri))})},Ff=function(t){var r=t.segments||[],n=t.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints){for(var e=0;e<n.preloadHints.length;e++)if(n.preloadHints[e].type==="MAP")return r}n.duration=t.targetDuration,n.preload=!0,r.push(n)}return r},Rf=function(t,r){return t===r||t.segments&&r.segments&&t.segments.length===r.segments.length&&t.endList===r.endList&&t.mediaSequence===r.mediaSequence&&t.preloadSegment===r.preloadSegment},Rs=function(t,r,n){n===void 0&&(n=Rf);var e=ea(t,{}),i=e.playlists[r.id];if(!i||n(i,r))return null;r.segments=Ff(r);var s=ea(i,r);if(s.preloadSegment&&!r.preloadSegment&&delete s.preloadSegment,i.segments){if(r.skip){r.segments=r.segments||[];for(var o=0;o<r.skip.skippedSegments;o++)r.segments.unshift({skipped:!0})}s.segments=qy(i.segments,r.segments,r.mediaSequence-i.mediaSequence)}s.segments.forEach(function(l){Lf(l,s.resolvedUri)});for(var u=0;u<e.playlists.length;u++)e.playlists[u].id===r.id&&(e.playlists[u]=s);return e.playlists[r.id]=s,e.playlists[r.uri]=s,ii(t,function(l,c,g,m){if(!!l.playlists)for(var _=0;_<l.playlists.length;_++)r.id===l.playlists[_].id&&(l.playlists[_]=s)}),e},Ms=function(t,r){var n=t.segments||[],e=n[n.length-1],i=e&&e.parts&&e.parts[e.parts.length-1],s=i&&i.duration||e&&e.duration;return r&&s?s*1e3:(t.partTargetDuration||t.targetDuration||10)*500},Lr=function(a){W(t,a);function t(n,e,i){var s;if(i===void 0&&(i={}),s=a.call(this)||this,!n)throw new Error("A non-empty playlist URL or object is required");s.logger_=pt("PlaylistLoader");var o=i,u=o.withCredentials,l=u===void 0?!1:u,c=o.handleManifestRedirects,g=c===void 0?!1:c;s.src=n,s.vhs_=e,s.withCredentials=l,s.handleManifestRedirects=g;var m=e.options_;return s.customTagParsers=m&&m.customTagParsers||[],s.customTagMappers=m&&m.customTagMappers||[],s.experimentalLLHLS=m&&m.experimentalLLHLS||!1,I.browser.IE_VERSION&&(s.experimentalLLHLS=!1),s.state="HAVE_NOTHING",s.handleMediaupdatetimeout_=s.handleMediaupdatetimeout_.bind(ee(s)),s.on("mediaupdatetimeout",s.handleMediaupdatetimeout_),s}var r=t.prototype;return r.handleMediaupdatetimeout_=function(){var e=this;if(this.state==="HAVE_METADATA"){var i=this.media(),s=dt(this.master.uri,i.uri);this.experimentalLLHLS&&(s=Vy(s,i)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:s,withCredentials:this.withCredentials},function(o,u){if(!!e.request){if(o)return e.playlistRequestError(e.request,e.media(),"HAVE_METADATA");e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}})}},r.playlistRequestError=function(e,i,s){var o=i.uri,u=i.id;this.request=null,s&&(this.state=s),this.error={playlist:this.master.playlists[u],status:e.status,message:"HLS playlist request error at URL: "+o+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},r.parseManifest_=function(e){var i=this,s=e.url,o=e.manifestString;return Ry({onwarn:function(l){var c=l.message;return i.logger_("m3u8-parser warn for "+s+": "+c)},oninfo:function(l){var c=l.message;return i.logger_("m3u8-parser info for "+s+": "+c)},manifestString:o,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},r.haveMetadata=function(e){var i=e.playlistString,s=e.playlistObject,o=e.url,u=e.id;this.request=null,this.state="HAVE_METADATA";var l=s||this.parseManifest_({url:o,manifestString:i});l.lastRequest=Date.now(),If({playlist:l,uri:o,id:u});var c=Rs(this.master,l);this.targetDuration=l.partTargetDuration||l.targetDuration,this.pendingMedia_=null,c?(this.master=c,this.media_=this.master.playlists[u]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Ms(this.media(),!!c)),this.trigger("loadedplaylist")},r.dispose=function(){this.trigger("dispose"),this.stopRequest(),A.clearTimeout(this.mediaUpdateTimeout),A.clearTimeout(this.finalRenditionTimeout),this.off()},r.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},r.media=function(e,i){var s=this;if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(A.clearTimeout(this.finalRenditionTimeout),i){var o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=A.setTimeout(this.media.bind(this,e,!1),o);return}var u=this.state,l=!this.media_||e.id!==this.media_.id,c=this.master.playlists[e.id];if(c&&c.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,l&&(this.trigger("mediachanging"),u==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(Ms(e,!0)),!!l){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(g,m){if(!!s.request){if(e.lastRequest=Date.now(),e.resolvedUri=Zn(s.handleManifestRedirects,e.resolvedUri,m),g)return s.playlistRequestError(s.request,e,u);s.haveMetadata({playlistString:m.responseText,url:e.uri,id:e.id}),u==="HAVE_MASTER"?s.trigger("loadedmetadata"):s.trigger("mediachange")}})}},r.pause=function(){this.mediaUpdateTimeout&&(A.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")},r.load=function(e){var i=this;this.mediaUpdateTimeout&&(A.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var s=this.media();if(e){var o=s?(s.partTargetDuration||s.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=A.setTimeout(function(){i.mediaUpdateTimeout=null,i.load()},o);return}if(!this.started){this.start();return}s&&!s.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")},r.updateMediaUpdateTimeout_=function(e){var i=this;this.mediaUpdateTimeout&&(A.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=A.setTimeout(function(){i.mediaUpdateTimeout=null,i.trigger("mediaupdatetimeout"),i.updateMediaUpdateTimeout_(e)},e))},r.start=function(){var e=this;if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=A.location.href),this.src.resolvedUri=this.src.uri,setTimeout(function(){e.setupInitialPlaylist(e.src)},0);return}this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(i,s){if(!!e.request){if(e.request=null,i)return e.error={status:s.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:s.responseText,code:2},e.state==="HAVE_NOTHING"&&(e.started=!1),e.trigger("error");e.src=Zn(e.handleManifestRedirects,e.src,s);var o=e.parseManifest_({manifestString:s.responseText,url:e.src});e.setupInitialPlaylist(o)}})},r.srcUri=function(){return typeof this.src=="string"?this.src:this.src.uri},r.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists){this.master=e,Of(this.master,this.srcUri()),e.playlists.forEach(function(s){s.segments=Ff(s),s.segments.forEach(function(o){Lf(o,s.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.master.playlists[0]);return}var i=this.srcUri()||A.location.href;this.master=By(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Uy),jy=I.xhr,Gy=I.mergeOptions,Ns=function(t,r,n,e){var i=t.responseType==="arraybuffer"?t.response:t.responseText;!r&&i&&(t.responseTime=Date.now(),t.roundTripTime=t.responseTime-t.requestTime,t.bytesReceived=i.byteLength||i.length,t.bandwidth||(t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3))),n.headers&&(t.responseHeaders=n.headers),r&&r.code==="ETIMEDOUT"&&(t.timedout=!0),!r&&!t.aborted&&n.statusCode!==200&&n.statusCode!==206&&n.statusCode!==0&&(r=new Error("XHR Failed with a response of: "+(t&&(i||t.responseText)))),e(r,t)},Mf=function(){var t=function r(n,e){n=Gy({timeout:45e3},n);var i=r.beforeRequest||I.Vhs.xhr.beforeRequest;if(i&&typeof i=="function"){var s=i(n);s&&(n=s)}var o=I.Vhs.xhr.original===!0?jy:I.Vhs.xhr,u=o(n,function(c,g){return Ns(u,c,g,e)}),l=u.abort;return u.abort=function(){return u.aborted=!0,l.apply(u,arguments)},u.uri=n.uri,u.requestTime=Date.now(),u};return t.original=!0,t},Wy=function(t){var r,n=t.offset;return typeof t.offset=="bigint"||typeof t.length=="bigint"?r=A.BigInt(t.offset)+A.BigInt(t.length)-A.BigInt(1):r=t.offset+t.length-1,"bytes="+n+"-"+r},Bs=function(t){var r={};return t.byterange&&(r.Range=Wy(t.byterange)),r},zy=function(t,r){return t.start(r)+"-"+t.end(r)},$y=function(t,r){var n=t.toString(16);return"00".substring(0,2-n.length)+n+(r%2?" ":"")},Ky=function(t){return t>=32&&t<126?String.fromCharCode(t):"."},Nf=function(t){var r={};return Object.keys(t).forEach(function(n){var e=t[n];bd(e)?r[n]={bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:r[n]=e}),r},ta=function(t){var r=t.byterange||{length:1/0,offset:0};return[r.length,r.offset,t.resolvedUri].join(",")},Bf=function(t){return t.resolvedUri},Uf=function(t){for(var r=Array.prototype.slice.call(t),n=16,e="",i,s,o=0;o<r.length/n;o++)i=r.slice(o*n,o*n+n).map($y).join(""),s=r.slice(o*n,o*n+n).map(Ky).join(""),e+=i+" "+s+`
`;return e},Xy=function(t){var r=t.bytes;return Uf(r)},Yy=function(t){var r="",n;for(n=0;n<t.length;n++)r+=zy(t,n)+" ";return r},Qy=Object.freeze({__proto__:null,createTransferableMessage:Nf,initSegmentId:ta,segmentKeyId:Bf,hexDump:Uf,tagDump:Xy,textRanges:Yy}),Vf=.25,Jy=function(t,r){if(!r.dateTimeObject)return null;var n=r.videoTimingInfo.transmuxerPrependedSeconds,e=r.videoTimingInfo.transmuxedPresentationStart,i=e+n,s=t-i;return new Date(r.dateTimeObject.getTime()+s*1e3)},Zy=function(t){return t.transmuxedPresentationEnd-t.transmuxedPresentationStart-t.transmuxerPrependedSeconds},e_=function(t,r){var n;try{n=new Date(t)}catch{return null}if(!r||!r.segments||r.segments.length===0)return null;var e=r.segments[0];if(n<e.dateTimeObject)return null;for(var i=0;i<r.segments.length-1;i++){e=r.segments[i];var s=r.segments[i+1].dateTimeObject;if(n<s)break}var o=r.segments[r.segments.length-1],u=o.dateTimeObject,l=o.videoTimingInfo?Zy(o.videoTimingInfo):o.duration+o.duration*Vf,c=new Date(u.getTime()+l*1e3);return n>c?null:(n>u&&(e=o),{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:Ye.duration(r,r.mediaSequence+r.segments.indexOf(e)),type:e.videoTimingInfo?"accurate":"estimate"})},t_=function(t,r){if(!r||!r.segments||r.segments.length===0)return null;for(var n=0,e,i=0;i<r.segments.length&&(e=r.segments[i],n=e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationEnd:n+e.duration,!(t<=n));i++);var s=r.segments[r.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<t)return null;if(t>n){if(t>n+s.duration*Vf)return null;e=s}return{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:n-e.duration,type:e.videoTimingInfo?"accurate":"estimate"}},r_=function(t,r){var n,e;try{n=new Date(t),e=new Date(r)}catch{}var i=n.getTime(),s=e.getTime();return(s-i)/1e3},i_=function(t){if(!t.segments||t.segments.length===0)return!1;for(var r=0;r<t.segments.length;r++){var n=t.segments[r];if(!n.dateTimeObject)return!1}return!0},n_=function(t){var r=t.playlist,n=t.time,e=n===void 0?void 0:n,i=t.callback;if(!i)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});var s=t_(e,r);if(!s)return i({message:"valid programTime was not found"});if(s.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});var o={mediaSeconds:e},u=Jy(e,s.segment);return u&&(o.programDateTime=u.toISOString()),i(null,o)},a_=function a(t){var r=t.programTime,n=t.playlist,e=t.retryCount,i=e===void 0?2:e,s=t.seekTo,o=t.pauseAfterSeek,u=o===void 0?!0:o,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(typeof r>"u"||!n||!s)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!i_(n))return c({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});var g=e_(r,n);if(!g)return c({message:r+" was not found in the stream"});var m=g.segment,_=r_(m.dateTimeObject,r);if(g.type==="estimate"){if(i===0)return c({message:r+" is not buffered yet. Try again"});s(g.estimatedStart+_),l.one("seeked",function(){a({programTime:r,playlist:n,retryCount:i-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})});return}var b=m.start+_,S=function(){return c(null,l.currentTime())};l.one("seeked",S),u&&l.pause(),s(b)},cs=function(t,r){if(t.readyState===4)return r()},s_=function(t,r,n){var e=[],i,s=!1,o=function(m,_,b,S){return _.abort(),s=!0,n(m,_,b,S)},u=function(m,_){if(!s){if(m)return o(m,_,"",e);var b=_.responseText.substring(e&&e.byteLength||0,_.responseText.length);if(e=ug(e,xd(b,!0)),i=i||xi(e),e.length<10||i&&e.length<i+2)return cs(_,function(){return o(m,_,"",e)});var S=uo(e);return S==="ts"&&e.length<188?cs(_,function(){return o(m,_,"",e)}):!S&&e.length<376?cs(_,function(){return o(m,_,"",e)}):o(null,_,S,e)}},l={uri:t,beforeSend:function(m){m.overrideMimeType("text/plain; charset=x-user-defined"),m.addEventListener("progress",function(_){return _.total,_.loaded,Ns(m,null,{statusCode:m.status},u)})}},c=r(l,function(g,m){return Ns(c,g,m,u)});return c},o_=I.EventTarget,Hf=I.mergeOptions,$l=function(t,r){if(!Rf(t,r)||t.sidx&&r.sidx&&(t.sidx.offset!==r.sidx.offset||t.sidx.length!==r.sidx.length))return!1;if(!t.sidx&&r.sidx||t.sidx&&!r.sidx||t.segments&&!r.segments||!t.segments&&r.segments)return!1;if(!t.segments&&!r.segments)return!0;for(var n=0;n<t.segments.length;n++){var e=t.segments[n],i=r.segments[n];if(e.uri!==i.uri)return!1;if(!(!e.byterange&&!i.byterange)){var s=e.byterange,o=i.byterange;if(s&&!o||!s&&o||s.offset!==o.offset||s.length!==o.length)return!1}}return!0},u_=function(t,r,n,e){var i=e.attributes.NAME||n;return"placeholder-uri-"+t+"-"+r+"-"+i},l_=function(t){var r=t.masterXml,n=t.srcUrl,e=t.clientOffset,i=t.sidxMapping,s=t.previousManifest,o=Dv(r,{manifestUri:n,clientOffset:e,sidxMapping:i,previousManifest:s});return Of(o,n,u_),o},d_=function(t,r){ii(t,function(n,e,i,s){s in r.mediaGroups[e][i]||delete t.mediaGroups[e][i][s]})},c_=function(t,r,n){for(var e=!0,i=Hf(t,{duration:r.duration,minimumUpdatePeriod:r.minimumUpdatePeriod,timelineStarts:r.timelineStarts}),s=0;s<r.playlists.length;s++){var o=r.playlists[s];if(o.sidx){var u=pa(o.sidx);n&&n[u]&&n[u].sidx&&no(o,n[u].sidx,o.sidx.resolvedUri)}var l=Rs(i,o,$l);l&&(i=l,e=!1)}return ii(r,function(c,g,m,_){if(c.playlists&&c.playlists.length){var b=c.playlists[0].id,S=Rs(i,c.playlists[0],$l);S&&(i=S,_ in i.mediaGroups[g][m]||(i.mediaGroups[g][m][_]=c),i.mediaGroups[g][m][_].playlists[0]=i.playlists[b],e=!1)}}),d_(i,r),r.minimumUpdatePeriod!==t.minimumUpdatePeriod&&(e=!1),e?null:i},f_=function(t,r){var n=Boolean(!t.map&&!r.map),e=n||Boolean(t.map&&r.map&&t.map.byterange.offset===r.map.byterange.offset&&t.map.byterange.length===r.map.byterange.length);return e&&t.uri===r.uri&&t.byterange.offset===r.byterange.offset&&t.byterange.length===r.byterange.length},Kl=function(t,r){var n={};for(var e in t){var i=t[e],s=i.sidx;if(s){var o=pa(s);if(!r[o])break;var u=r[o].sidxInfo;f_(u,s)&&(n[o]=r[o])}}return n},h_=function(t,r){var n=Kl(t.playlists,r),e=n;return ii(t,function(i,s,o,u){if(i.playlists&&i.playlists.length){var l=i.playlists;e=Hf(e,Kl(l,r))}}),e},Us=function(a){W(t,a);function t(n,e,i,s){var o;i===void 0&&(i={}),o=a.call(this)||this,o.masterPlaylistLoader_=s||ee(o),s||(o.isMaster_=!0);var u=i,l=u.withCredentials,c=l===void 0?!1:l,g=u.handleManifestRedirects,m=g===void 0?!1:g;if(o.vhs_=e,o.withCredentials=c,o.handleManifestRedirects=m,!n)throw new Error("A non-empty playlist URL or object is required");return o.on("minimumUpdatePeriod",function(){o.refreshXml_()}),o.on("mediaupdatetimeout",function(){o.refreshMedia_(o.media().id)}),o.state="HAVE_NOTHING",o.loadedPlaylists_={},o.logger_=pt("DashPlaylistLoader"),o.isMaster_?(o.masterPlaylistLoader_.srcUrl=n,o.masterPlaylistLoader_.sidxMapping_={}):o.childPlaylist_=n,o}var r=t.prototype;return r.requestErrored_=function(e,i,s){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:i.status,message:"DASH request error at URL: "+i.uri,response:i.response,code:2},s&&(this.state=s),this.trigger("error"),!0},r.addSidxSegments_=function(e,i,s){var o=this,u=e.sidx&&pa(e.sidx);if(!e.sidx||!u||this.masterPlaylistLoader_.sidxMapping_[u]){this.mediaRequest_=A.setTimeout(function(){return s(!1)},0);return}var l=Zn(this.handleManifestRedirects,e.sidx.resolvedUri),c=function(m,_){if(!o.requestErrored_(m,_,i)){var b=o.masterPlaylistLoader_.sidxMapping_,S;try{S=Ov(Q(_.response).subarray(8))}catch(x){o.requestErrored_(x,_,i);return}return b[u]={sidxInfo:e.sidx,sidx:S},no(e,S,e.sidx.resolvedUri),s(!0)}};this.request=s_(l,this.vhs_.xhr,function(g,m,_,b){if(g)return c(g,m);if(!_||_!=="mp4")return c({status:m.status,message:"Unsupported "+(_||"unknown")+" container type for sidx segment at URL: "+l,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},m);var S=e.sidx.byterange,x=S.offset,w=S.length;if(b.length>=w+x)return c(g,{response:b.subarray(x,x+w),status:m.status,uri:m.uri});o.request=o.vhs_.xhr({uri:l,responseType:"arraybuffer",headers:Bs({byterange:e.sidx.byterange})},c)})},r.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},A.clearTimeout(this.minimumUpdatePeriodTimeout_),A.clearTimeout(this.mediaRequest_),A.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},r.hasPendingRequest=function(){return this.request||this.mediaRequest_},r.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},r.media=function(e){var i=this;if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);var s=this.state;if(typeof e=="string"){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var o=!this.media_||e.id!==this.media_.id;if(o&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,o&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}!o||(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,s,function(u){i.haveMetadata({startingState:s,playlist:e})}))},r.haveMetadata=function(e){var i=e.startingState,s=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[s.id]=s,this.mediaRequest_=null,this.refreshMedia_(s.id),i==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange")},r.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),A.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(A.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)},r.load=function(e){var i=this;A.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var s=this.media();if(e){var o=s?s.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=A.setTimeout(function(){return i.load()},o);return}if(!this.started){this.start();return}s&&!s.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")},r.start=function(){var e=this;if(this.started=!0,!this.isMaster_){this.mediaRequest_=A.setTimeout(function(){return e.haveMaster_()},0);return}this.requestMaster_(function(i,s){e.haveMaster_(),!e.hasPendingRequest()&&!e.media_&&e.media(e.masterPlaylistLoader_.master.playlists[0])})},r.requestMaster_=function(e){var i=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(s,o){if(i.requestErrored_(s,o)){i.state==="HAVE_NOTHING"&&(i.started=!1);return}var u=o.responseText!==i.masterPlaylistLoader_.masterXml_;if(i.masterPlaylistLoader_.masterXml_=o.responseText,o.responseHeaders&&o.responseHeaders.date?i.masterLoaded_=Date.parse(o.responseHeaders.date):i.masterLoaded_=Date.now(),i.masterPlaylistLoader_.srcUrl=Zn(i.handleManifestRedirects,i.masterPlaylistLoader_.srcUrl,o),u){i.handleMaster_(),i.syncClientServerClock_(function(){return e(o,u)});return}return e(o,u)})},r.syncClientServerClock_=function(e){var i=this,s=wv(this.masterPlaylistLoader_.masterXml_);if(s===null)return this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e();if(s.method==="DIRECT")return this.masterPlaylistLoader_.clientOffset_=s.value-Date.now(),e();this.request=this.vhs_.xhr({uri:dt(this.masterPlaylistLoader_.srcUrl,s.value),method:s.method,withCredentials:this.withCredentials},function(o,u){if(!!i.request){if(o)return i.masterPlaylistLoader_.clientOffset_=i.masterLoaded_-Date.now(),e();var l;s.method==="HEAD"?!u.responseHeaders||!u.responseHeaders.date?l=i.masterLoaded_:l=Date.parse(u.responseHeaders.date):l=Date.parse(u.responseText),i.masterPlaylistLoader_.clientOffset_=l-Date.now(),e()}})},r.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},r.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,i=l_({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(i=c_(e,i,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=i||e;var s=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return s&&s!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=s),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(i)},r.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(A.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var i=e.master&&e.master.minimumUpdatePeriod;if(i===0&&(e.media()?i=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof i!="number"||i<=0){i<0&&this.logger_("found invalid minimumUpdatePeriod of "+i+", not setting a timeout");return}this.createMUPTimeout_(i)},r.createMUPTimeout_=function(e){var i=this.masterPlaylistLoader_;i.minimumUpdatePeriodTimeout_=A.setTimeout(function(){i.minimumUpdatePeriodTimeout_=null,i.trigger("minimumUpdatePeriod"),i.createMUPTimeout_(e)},e)},r.refreshXml_=function(){var e=this;this.requestMaster_(function(i,s){!s||(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=h_(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.sidxMapping_),e.addSidxSegments_(e.media(),e.state,function(o){e.refreshMedia_(e.media().id)}))})},r.refreshMedia_=function(e){var i=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var s=this.masterPlaylistLoader_.master.playlists,o=!this.media_||this.media_!==s[e];if(o?this.media_=s[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){var u=function l(){i.media().endList||(i.mediaUpdateTimeout=A.setTimeout(function(){i.trigger("mediaupdatetimeout"),l()},Ms(i.media(),Boolean(o))))};u()}this.trigger("loadedplaylist")},t}(o_),we={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},p_=function(t){for(var r=new Uint8Array(new ArrayBuffer(t.length)),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r.buffer},qf=function(t){return t.on=t.addEventListener,t.off=t.removeEventListener,t},m_=function(t){try{return URL.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch{var r=new BlobBuilder;return r.append(t),URL.createObjectURL(r.getBlob())}},jf=function(t){return function(){var r=m_(t),n=qf(new Worker(r));n.objURL=r;var e=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(r),e.call(this)},n}},Gf=function(t){return"var browserWorkerPolyFill = "+qf.toString()+`;
browserWorkerPolyFill(self);
`+t},Wf=function(t){return t.toString().replace(/^function.+?{/,"").slice(0,-1)},g_=Gf(Wf(function(){var a=function(){this.init=function(){var d={};this.on=function(h,f){d[h]||(d[h]=[]),d[h]=d[h].concat(f)},this.off=function(h,f){var p;return d[h]?(p=d[h].indexOf(f),d[h]=d[h].slice(),d[h].splice(p,1),p>-1):!1},this.trigger=function(h){var f,p,v,y;if(f=d[h],!!f)if(arguments.length===2)for(v=f.length,p=0;p<v;++p)f[p].call(this,arguments[1]);else{for(y=[],p=arguments.length,p=1;p<arguments.length;++p)y.push(arguments[p]);for(v=f.length,p=0;p<v;++p)f[p].apply(this,y)}},this.dispose=function(){d={}}}};a.prototype.pipe=function(T){return this.on("data",function(d){T.push(d)}),this.on("done",function(d){T.flush(d)}),this.on("partialdone",function(d){T.partialFlush(d)}),this.on("endedtimeline",function(d){T.endTimeline(d)}),this.on("reset",function(d){T.reset(d)}),T},a.prototype.push=function(T){this.trigger("data",T)},a.prototype.flush=function(T){this.trigger("done",T)},a.prototype.partialFlush=function(T){this.trigger("partialdone",T)},a.prototype.endTimeline=function(T){this.trigger("endedtimeline",T)},a.prototype.reset=function(T){this.trigger("reset",T)};var t=a,r=Math.pow(2,32),n=function(d){var h=new DataView(d.buffer,d.byteOffset,d.byteLength),f;return h.getBigUint64?(f=h.getBigUint64(0),f<Number.MAX_SAFE_INTEGER?Number(f):f):h.getUint32(0)*r+h.getUint32(4)},e={getUint64:n,MAX_UINT32:r},i=e.MAX_UINT32,s,o,u,l,c,g,m,_,b,S,x,w,O,H,L,F,q,B,R,U,N,X,$,J,oe,fe,re,ae,pe,Re,ue,Qi,nt,At,Wt,Jt;(function(){var T;if($={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(T in $)$.hasOwnProperty(T)&&($[T]=[T.charCodeAt(0),T.charCodeAt(1),T.charCodeAt(2),T.charCodeAt(3)]);J=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),fe=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),oe=new Uint8Array([0,0,0,1]),re=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ae=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),pe={video:re,audio:ae},Qi=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ue=new Uint8Array([0,0,0,0,0,0,0,0]),nt=new Uint8Array([0,0,0,0,0,0,0,0]),At=nt,Wt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Jt=nt,Re=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),s=function(d){var h=[],f=0,p,v,y;for(p=1;p<arguments.length;p++)h.push(arguments[p]);for(p=h.length;p--;)f+=h[p].byteLength;for(v=new Uint8Array(f+8),y=new DataView(v.buffer,v.byteOffset,v.byteLength),y.setUint32(0,v.byteLength),v.set(d,4),p=0,f=8;p<h.length;p++)v.set(h[p],f),f+=h[p].byteLength;return v},o=function(){return s($.dinf,s($.dref,Qi))},u=function(d){return s($.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,d.audioobjecttype<<3|d.samplingfrequencyindex>>>1,d.samplingfrequencyindex<<7|d.channelcount<<3,6,1,2]))},l=function(){return s($.ftyp,J,oe,J,fe)},F=function(d){return s($.hdlr,pe[d])},c=function(d){return s($.mdat,d)},L=function(d){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,d.duration>>>24&255,d.duration>>>16&255,d.duration>>>8&255,d.duration&255,85,196,0,0]);return d.samplerate&&(h[12]=d.samplerate>>>24&255,h[13]=d.samplerate>>>16&255,h[14]=d.samplerate>>>8&255,h[15]=d.samplerate&255),s($.mdhd,h)},H=function(d){return s($.mdia,L(d),F(d.type),m(d))},g=function(d){return s($.mfhd,new Uint8Array([0,0,0,0,(d&4278190080)>>24,(d&16711680)>>16,(d&65280)>>8,d&255]))},m=function(d){return s($.minf,d.type==="video"?s($.vmhd,Re):s($.smhd,ue),o(),B(d))},_=function(d,h){for(var f=[],p=h.length;p--;)f[p]=U(h[p]);return s.apply(null,[$.moof,g(d)].concat(f))},b=function(d){for(var h=d.length,f=[];h--;)f[h]=w(d[h]);return s.apply(null,[$.moov,x(4294967295)].concat(f).concat(S(d)))},S=function(d){for(var h=d.length,f=[];h--;)f[h]=N(d[h]);return s.apply(null,[$.mvex].concat(f))},x=function(d){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(d&4278190080)>>24,(d&16711680)>>16,(d&65280)>>8,d&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return s($.mvhd,h)},q=function(d){var h=d.samples||[],f=new Uint8Array(4+h.length),p,v;for(v=0;v<h.length;v++)p=h[v].flags,f[v+4]=p.dependsOn<<4|p.isDependedOn<<2|p.hasRedundancy;return s($.sdtp,f)},B=function(d){return s($.stbl,R(d),s($.stts,Jt),s($.stsc,At),s($.stsz,Wt),s($.stco,nt))},function(){var T,d;R=function(f){return s($.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),f.type==="video"?T(f):d(f))},T=function(f){var p=f.sps||[],v=f.pps||[],y=[],E=[],C,k;for(C=0;C<p.length;C++)y.push((p[C].byteLength&65280)>>>8),y.push(p[C].byteLength&255),y=y.concat(Array.prototype.slice.call(p[C]));for(C=0;C<v.length;C++)E.push((v[C].byteLength&65280)>>>8),E.push(v[C].byteLength&255),E=E.concat(Array.prototype.slice.call(v[C]));if(k=[$.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(f.width&65280)>>8,f.width&255,(f.height&65280)>>8,f.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s($.avcC,new Uint8Array([1,f.profileIdc,f.profileCompatibility,f.levelIdc,255].concat([p.length],y,[v.length],E))),s($.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],f.sarRatio){var D=f.sarRatio[0],P=f.sarRatio[1];k.push(s($.pasp,new Uint8Array([(D&4278190080)>>24,(D&16711680)>>16,(D&65280)>>8,D&255,(P&4278190080)>>24,(P&16711680)>>16,(P&65280)>>8,P&255])))}return s.apply(null,k)},d=function(f){return s($.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(f.channelcount&65280)>>8,f.channelcount&255,(f.samplesize&65280)>>8,f.samplesize&255,0,0,0,0,(f.samplerate&65280)>>8,f.samplerate&255,0,0]),u(f))}}(),O=function(d){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(d.id&4278190080)>>24,(d.id&16711680)>>16,(d.id&65280)>>8,d.id&255,0,0,0,0,(d.duration&4278190080)>>24,(d.duration&16711680)>>16,(d.duration&65280)>>8,d.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(d.width&65280)>>8,d.width&255,0,0,(d.height&65280)>>8,d.height&255,0,0]);return s($.tkhd,h)},U=function(d){var h,f,p,v,y,E,C;return h=s($.tfhd,new Uint8Array([0,0,0,58,(d.id&4278190080)>>24,(d.id&16711680)>>16,(d.id&65280)>>8,d.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),E=Math.floor(d.baseMediaDecodeTime/i),C=Math.floor(d.baseMediaDecodeTime%i),f=s($.tfdt,new Uint8Array([1,0,0,0,E>>>24&255,E>>>16&255,E>>>8&255,E&255,C>>>24&255,C>>>16&255,C>>>8&255,C&255])),y=32+20+8+16+8+8,d.type==="audio"?(p=X(d,y),s($.traf,h,f,p)):(v=q(d),p=X(d,v.length+y),s($.traf,h,f,p,v))},w=function(d){return d.duration=d.duration||4294967295,s($.trak,O(d),H(d))},N=function(d){var h=new Uint8Array([0,0,0,0,(d.id&4278190080)>>24,(d.id&16711680)>>16,(d.id&65280)>>8,d.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return d.type!=="video"&&(h[h.length-1]=0),s($.trex,h)},function(){var T,d,h;h=function(p,v){var y=0,E=0,C=0,k=0;return p.length&&(p[0].duration!==void 0&&(y=1),p[0].size!==void 0&&(E=2),p[0].flags!==void 0&&(C=4),p[0].compositionTimeOffset!==void 0&&(k=8)),[0,0,y|E|C|k,1,(p.length&4278190080)>>>24,(p.length&16711680)>>>16,(p.length&65280)>>>8,p.length&255,(v&4278190080)>>>24,(v&16711680)>>>16,(v&65280)>>>8,v&255]},d=function(p,v){var y,E,C,k,D,P;for(k=p.samples||[],v+=8+12+16*k.length,C=h(k,v),E=new Uint8Array(C.length+k.length*16),E.set(C),y=C.length,P=0;P<k.length;P++)D=k[P],E[y++]=(D.duration&4278190080)>>>24,E[y++]=(D.duration&16711680)>>>16,E[y++]=(D.duration&65280)>>>8,E[y++]=D.duration&255,E[y++]=(D.size&4278190080)>>>24,E[y++]=(D.size&16711680)>>>16,E[y++]=(D.size&65280)>>>8,E[y++]=D.size&255,E[y++]=D.flags.isLeading<<2|D.flags.dependsOn,E[y++]=D.flags.isDependedOn<<6|D.flags.hasRedundancy<<4|D.flags.paddingValue<<1|D.flags.isNonSyncSample,E[y++]=D.flags.degradationPriority&240<<8,E[y++]=D.flags.degradationPriority&15,E[y++]=(D.compositionTimeOffset&4278190080)>>>24,E[y++]=(D.compositionTimeOffset&16711680)>>>16,E[y++]=(D.compositionTimeOffset&65280)>>>8,E[y++]=D.compositionTimeOffset&255;return s($.trun,E)},T=function(p,v){var y,E,C,k,D,P;for(k=p.samples||[],v+=8+12+8*k.length,C=h(k,v),y=new Uint8Array(C.length+k.length*8),y.set(C),E=C.length,P=0;P<k.length;P++)D=k[P],y[E++]=(D.duration&4278190080)>>>24,y[E++]=(D.duration&16711680)>>>16,y[E++]=(D.duration&65280)>>>8,y[E++]=D.duration&255,y[E++]=(D.size&4278190080)>>>24,y[E++]=(D.size&16711680)>>>16,y[E++]=(D.size&65280)>>>8,y[E++]=D.size&255;return s($.trun,y)},X=function(p,v){return p.type==="audio"?T(p,v):d(p,v)}}();var mt={ftyp:l,mdat:c,moof:_,moov:b,initSegment:function(d){var h=l(),f=b(d),p;return p=new Uint8Array(h.byteLength+f.byteLength),p.set(h),p.set(f,h.byteLength),p}},gr=function(d){var h,f,p=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,p.byteLength=0,h=0;h<d.length;h++)f=d[h],f.nalUnitType==="access_unit_delimiter_rbsp"?(p.length&&(p.duration=f.dts-p.dts,v.byteLength+=p.byteLength,v.nalCount+=p.length,v.duration+=p.duration,v.push(p)),p=[f],p.byteLength=f.data.byteLength,p.pts=f.pts,p.dts=f.dts):(f.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(p.keyFrame=!0),p.duration=f.dts-p.dts,p.byteLength+=f.data.byteLength,p.push(f));return v.length&&(!p.duration||p.duration<=0)&&(p.duration=v[v.length-1].duration),v.byteLength+=p.byteLength,v.nalCount+=p.length,v.duration+=p.duration,v.push(p),v},vr=function(d){var h,f,p=[],v=[];for(p.byteLength=0,p.nalCount=0,p.duration=0,p.pts=d[0].pts,p.dts=d[0].dts,v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=d[0].pts,v.dts=d[0].dts,h=0;h<d.length;h++)f=d[h],f.keyFrame?(p.length&&(v.push(p),v.byteLength+=p.byteLength,v.nalCount+=p.nalCount,v.duration+=p.duration),p=[f],p.nalCount=f.length,p.byteLength=f.byteLength,p.pts=f.pts,p.dts=f.dts,p.duration=f.duration):(p.duration+=f.duration,p.nalCount+=f.length,p.byteLength+=f.byteLength,p.push(f));return v.length&&p.duration<=0&&(p.duration=v[v.length-1].duration),v.byteLength+=p.byteLength,v.nalCount+=p.nalCount,v.duration+=p.duration,v.push(p),v},yr=function(d){var h;return!d[0][0].keyFrame&&d.length>1&&(h=d.shift(),d.byteLength-=h.byteLength,d.nalCount-=h.nalCount,d[0][0].dts=h.dts,d[0][0].pts=h.pts,d[0][0].duration+=h.duration),d},lh=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Jo=function(d,h){var f=lh();return f.dataOffset=h,f.compositionTimeOffset=d.pts-d.dts,f.duration=d.duration,f.size=4*d.length,f.size+=d.byteLength,d.keyFrame&&(f.flags.dependsOn=2,f.flags.isNonSyncSample=0),f},dh=function(d,h){var f,p,v,y,E,C=h||0,k=[];for(f=0;f<d.length;f++)for(y=d[f],p=0;p<y.length;p++)E=y[p],v=Jo(E,C),C+=v.size,k.push(v);return k},ch=function(d){var h,f,p,v,y,E,C=0,k=d.byteLength,D=d.nalCount,P=k+4*D,M=new Uint8Array(P),z=new DataView(M.buffer);for(h=0;h<d.length;h++)for(v=d[h],f=0;f<v.length;f++)for(y=v[f],p=0;p<y.length;p++)E=y[p],z.setUint32(C,E.data.byteLength),C+=4,M.set(E.data,C),C+=E.data.byteLength;return M},fh=function(d,h){var f,p=h||0,v=[];return f=Jo(d,p),v.push(f),v},hh=function(d){var h,f,p=0,v=d.byteLength,y=d.length,E=v+4*y,C=new Uint8Array(E),k=new DataView(C.buffer);for(h=0;h<d.length;h++)f=d[h],k.setUint32(p,f.data.byteLength),p+=4,C.set(f.data,p),p+=f.data.byteLength;return C},ni={groupNalsIntoFrames:gr,groupFramesIntoGops:vr,extendFirstKeyFrame:yr,generateSampleTable:dh,concatenateNalData:ch,generateSampleTableForFrame:fh,concatenateNalDataForFrame:hh},zt=[33,16,5,32,164,27],wa=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],le=function(d){for(var h=[];d--;)h.push(0);return h},ph=function(d){return Object.keys(d).reduce(function(h,f){return h[f]=new Uint8Array(d[f].reduce(function(p,v){return p.concat(v)},[])),h},{})},ka,mh=function(){if(!ka){var d={96e3:[zt,[227,64],le(154),[56]],88200:[zt,[231],le(170),[56]],64e3:[zt,[248,192],le(240),[56]],48e3:[zt,[255,192],le(268),[55,148,128],le(54),[112]],44100:[zt,[255,192],le(268),[55,163,128],le(84),[112]],32e3:[zt,[255,192],le(268),[55,234],le(226),[112]],24e3:[zt,[255,192],le(268),[55,255,128],le(268),[111,112],le(126),[224]],16e3:[zt,[255,192],le(268),[55,255,128],le(268),[111,255],le(269),[223,108],le(195),[1,192]],12e3:[wa,le(268),[3,127,248],le(268),[6,255,240],le(268),[13,255,224],le(268),[27,253,128],le(259),[56]],11025:[wa,le(268),[3,127,248],le(268),[6,255,240],le(268),[13,255,224],le(268),[27,255,192],le(268),[55,175,128],le(108),[112]],8e3:[wa,le(268),[3,121,16],le(47),[7]]};ka=ph(d)}return ka},Pa=9e4,Ia,Oa,Ji,La,Zo,eu,tu;Ia=function(d){return d*Pa},Oa=function(d,h){return d*h},Ji=function(d){return d/Pa},La=function(d,h){return d/h},Zo=function(d,h){return Ia(La(d,h))},eu=function(d,h){return Oa(Ji(d),h)},tu=function(d,h,f){return Ji(f?d:d-h)};var se={ONE_SECOND_IN_TS:Pa,secondsToVideoTs:Ia,secondsToAudioTs:Oa,videoTsToSeconds:Ji,audioTsToSeconds:La,audioTsToVideoTs:Zo,videoTsToAudioTs:eu,metadataTsToSeconds:tu},gh=function(d){var h,f,p=0;for(h=0;h<d.length;h++)f=d[h],p+=f.data.byteLength;return p},vh=function(d,h,f,p){var v,y=0,E=0,C=0,k=0,D,P,M;if(!!h.length&&(v=se.audioTsToVideoTs(d.baseMediaDecodeTime,d.samplerate),y=Math.ceil(se.ONE_SECOND_IN_TS/(d.samplerate/1024)),f&&p&&(E=v-Math.max(f,p),C=Math.floor(E/y),k=C*y),!(C<1||k>se.ONE_SECOND_IN_TS/2))){for(D=mh()[d.samplerate],D||(D=h[0].data),P=0;P<C;P++)M=h[0],h.splice(0,0,{data:D,dts:M.dts-y,pts:M.pts-y});return d.baseMediaDecodeTime-=Math.floor(se.videoTsToAudioTs(k,d.samplerate)),k}},yh=function(d,h,f){return h.minSegmentDts>=f?d:(h.minSegmentDts=1/0,d.filter(function(p){return p.dts>=f?(h.minSegmentDts=Math.min(h.minSegmentDts,p.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},_h=function(d){var h,f,p=[];for(h=0;h<d.length;h++)f=d[h],p.push({size:f.data.byteLength,duration:1024});return p},Th=function(d){var h,f,p=0,v=new Uint8Array(gh(d));for(h=0;h<d.length;h++)f=d[h],v.set(f.data,p),p+=f.data.byteLength;return v},Zi={prefixWithSilence:vh,trimAdtsFramesByEarliestDts:yh,generateSampleTable:_h,concatenateFrameData:Th},bh=se.ONE_SECOND_IN_TS,xh=function(d,h){typeof h.pts=="number"&&(d.timelineStartInfo.pts===void 0&&(d.timelineStartInfo.pts=h.pts),d.minSegmentPts===void 0?d.minSegmentPts=h.pts:d.minSegmentPts=Math.min(d.minSegmentPts,h.pts),d.maxSegmentPts===void 0?d.maxSegmentPts=h.pts:d.maxSegmentPts=Math.max(d.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(d.timelineStartInfo.dts===void 0&&(d.timelineStartInfo.dts=h.dts),d.minSegmentDts===void 0?d.minSegmentDts=h.dts:d.minSegmentDts=Math.min(d.minSegmentDts,h.dts),d.maxSegmentDts===void 0?d.maxSegmentDts=h.dts:d.maxSegmentDts=Math.max(d.maxSegmentDts,h.dts))},Sh=function(d){delete d.minSegmentDts,delete d.maxSegmentDts,delete d.minSegmentPts,delete d.maxSegmentPts},Eh=function(d,h){var f,p,v=d.minSegmentDts;return h||(v-=d.timelineStartInfo.dts),f=d.timelineStartInfo.baseMediaDecodeTime,f+=v,f=Math.max(0,f),d.type==="audio"&&(p=d.samplerate/bh,f*=p,f=Math.floor(f)),f},ut={clearDtsInfo:Sh,calculateTrackBaseMediaDecodeTime:Eh,collectDtsInfo:xh},ru=4,Ch=128,Ah=function(d){for(var h=0,f={payloadType:-1,payloadSize:0},p=0,v=0;h<d.byteLength&&d[h]!==Ch;){for(;d[h]===255;)p+=255,h++;for(p+=d[h++];d[h]===255;)v+=255,h++;if(v+=d[h++],!f.payload&&p===ru){var y=String.fromCharCode(d[h+3],d[h+4],d[h+5],d[h+6]);if(y==="GA94"){f.payloadType=p,f.payloadSize=v,f.payload=d.subarray(h,h+v);break}else f.payload=void 0}h+=v,p=0,v=0}return f},Dh=function(d){return d.payload[0]!==181||(d.payload[1]<<8|d.payload[2])!==49||String.fromCharCode(d.payload[3],d.payload[4],d.payload[5],d.payload[6])!=="GA94"||d.payload[7]!==3?null:d.payload.subarray(8,d.payload.length-1)},wh=function(d,h){var f=[],p,v,y,E;if(!(h[0]&64))return f;for(v=h[0]&31,p=0;p<v;p++)y=p*3,E={type:h[y+2]&3,pts:d},h[y+2]&4&&(E.ccData=h[y+3]<<8|h[y+4],f.push(E));return f},kh=function(d){for(var h=d.byteLength,f=[],p=1,v,y;p<h-2;)d[p]===0&&d[p+1]===0&&d[p+2]===3?(f.push(p+2),p+=2):p++;if(f.length===0)return d;v=h-f.length,y=new Uint8Array(v);var E=0;for(p=0;p<v;E++,p++)E===f[0]&&(E++,f.shift()),y[p]=d[E];return y},ai={parseSei:Ah,parseUserData:Dh,parseCaptionPackets:wh,discardEmulationPreventionBytes:kh,USER_DATA_REGISTERED_ITU_T_T35:ru},Ze=function T(d){d=d||{},T.prototype.init.call(this),this.parse708captions_=typeof d.parse708captions=="boolean"?d.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Te(0,0),new Te(0,1),new Te(1,0),new Te(1,1)],this.parse708captions_&&(this.cc708Stream_=new me({captionServices:d.captionServices})),this.reset(),this.ccStreams_.forEach(function(h){h.on("data",this.trigger.bind(this,"data")),h.on("partialdone",this.trigger.bind(this,"partialdone")),h.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ze.prototype=new t,Ze.prototype.push=function(T){var d,h,f;if(T.nalUnitType==="sei_rbsp"&&(d=ai.parseSei(T.escapedRBSP),!!d.payload&&d.payloadType===ai.USER_DATA_REGISTERED_ITU_T_T35&&(h=ai.parseUserData(d),!!h))){if(T.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(T.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}f=ai.parseCaptionPackets(T.pts,h),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==T.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=T.dts}},Ze.prototype.flushCCStreams=function(T){this.ccStreams_.forEach(function(d){return T==="flush"?d.flush():d.partialFlush()},this)},Ze.prototype.flushStream=function(T){if(!this.captionPackets_.length){this.flushCCStreams(T);return}this.captionPackets_.forEach(function(d,h){d.presortIndex=h}),this.captionPackets_.sort(function(d,h){return d.pts===h.pts?d.presortIndex-h.presortIndex:d.pts-h.pts}),this.captionPackets_.forEach(function(d){d.type<2?this.dispatchCea608Packet(d):this.dispatchCea708Packet(d)},this),this.captionPackets_.length=0,this.flushCCStreams(T)},Ze.prototype.flush=function(){return this.flushStream("flush")},Ze.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ze.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(T){T.reset()})},Ze.prototype.dispatchCea608Packet=function(T){this.setsTextOrXDSActive(T)?this.activeCea608Channel_[T.type]=null:this.setsChannel1Active(T)?this.activeCea608Channel_[T.type]=0:this.setsChannel2Active(T)&&(this.activeCea608Channel_[T.type]=1),this.activeCea608Channel_[T.type]!==null&&this.ccStreams_[(T.type<<1)+this.activeCea608Channel_[T.type]].push(T)},Ze.prototype.setsChannel1Active=function(T){return(T.ccData&30720)===4096},Ze.prototype.setsChannel2Active=function(T){return(T.ccData&30720)===6144},Ze.prototype.setsTextOrXDSActive=function(T){return(T.ccData&28928)===256||(T.ccData&30974)===4138||(T.ccData&30974)===6186},Ze.prototype.dispatchCea708Packet=function(T){this.parse708captions_&&this.cc708Stream_.push(T)};var Ph={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Ih=function(d){var h=Ph[d]||d;return d&4096&&d===h?"":String.fromCharCode(h)},en=function(d){return 32<=d&&d<=127||160<=d&&d<=255},Dt=function(d){this.windowNum=d,this.reset()};Dt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Dt.prototype.getText=function(){return this.rows.join(`
`)},Dt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Dt.prototype.newLine=function(T){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(T),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Dt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Dt.prototype.addText=function(T){this.rows[this.rowIdx]+=T},Dt.prototype.backspace=function(){if(!this.isEmpty()){var T=this.rows[this.rowIdx];this.rows[this.rowIdx]=T.substr(0,T.length-1)}};var tn=function(d,h,f){this.serviceNum=d,this.text="",this.currentWindow=new Dt(-1),this.windows=[],this.stream=f,typeof h=="string"&&this.createTextDecoder(h)};tn.prototype.init=function(T,d){this.startPts=T;for(var h=0;h<8;h++)this.windows[h]=new Dt(h),typeof d=="function"&&(this.windows[h].beforeRowOverflow=d)},tn.prototype.setCurrentWindow=function(T){this.currentWindow=this.windows[T]},tn.prototype.createTextDecoder=function(T){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(T)}catch(d){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+T+" encoding. "+d})}};var me=function T(d){d=d||{},T.prototype.init.call(this);var h=this,f=d.captionServices||{},p={},v;Object.keys(f).forEach(function(y){v=f[y],/^SERVICE/.test(y)&&(p[y]=v.encoding)}),this.serviceEncodings=p,this.current708Packet=null,this.services={},this.push=function(y){y.type===3?(h.new708Packet(),h.add708Bytes(y)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(y))}};me.prototype=new t,me.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},me.prototype.add708Bytes=function(T){var d=T.ccData,h=d>>>8,f=d&255;this.current708Packet.ptsVals.push(T.pts),this.current708Packet.data.push(h),this.current708Packet.data.push(f)},me.prototype.push708Packet=function(){var T=this.current708Packet,d=T.data,h=null,f=null,p=0,v=d[p++];for(T.seq=v>>6,T.sizeCode=v&63;p<d.length;p++)v=d[p++],h=v>>5,f=v&31,h===7&&f>0&&(v=d[p++],h=v),this.pushServiceBlock(h,p,f),f>0&&(p+=f-1)},me.prototype.pushServiceBlock=function(T,d,h){var f,p=d,v=this.current708Packet.data,y=this.services[T];for(y||(y=this.initService(T,p));p<d+h&&p<v.length;p++)f=v[p],en(f)?p=this.handleText(p,y):f===24?p=this.multiByteCharacter(p,y):f===16?p=this.extendedCommands(p,y):128<=f&&f<=135?p=this.setCurrentWindow(p,y):152<=f&&f<=159?p=this.defineWindow(p,y):f===136?p=this.clearWindows(p,y):f===140?p=this.deleteWindows(p,y):f===137?p=this.displayWindows(p,y):f===138?p=this.hideWindows(p,y):f===139?p=this.toggleWindows(p,y):f===151?p=this.setWindowAttributes(p,y):f===144?p=this.setPenAttributes(p,y):f===145?p=this.setPenColor(p,y):f===146?p=this.setPenLocation(p,y):f===143?y=this.reset(p,y):f===8?y.currentWindow.backspace():f===12?y.currentWindow.clearText():f===13?y.currentWindow.pendingNewLine=!0:f===14?y.currentWindow.clearText():f===141&&p++},me.prototype.extendedCommands=function(T,d){var h=this.current708Packet.data,f=h[++T];return en(f)&&(T=this.handleText(T,d,{isExtended:!0})),T},me.prototype.getPts=function(T){return this.current708Packet.ptsVals[Math.floor(T/2)]},me.prototype.initService=function(T,d){var f="SERVICE"+T,h=this,f,p;return f in this.serviceEncodings&&(p=this.serviceEncodings[f]),this.services[T]=new tn(T,p,h),this.services[T].init(this.getPts(d),function(v){h.flushDisplayed(v,h.services[T])}),this.services[T]},me.prototype.handleText=function(T,d,h){var f=h&&h.isExtended,p=h&&h.isMultiByte,v=this.current708Packet.data,y=f?4096:0,E=v[T],C=v[T+1],k=d.currentWindow,D,P;return d.textDecoder_&&!f?(p?(P=[E,C],T++):P=[E],D=d.textDecoder_.decode(new Uint8Array(P))):D=Ih(y|E),k.pendingNewLine&&!k.isEmpty()&&k.newLine(this.getPts(T)),k.pendingNewLine=!1,k.addText(D),T},me.prototype.multiByteCharacter=function(T,d){var h=this.current708Packet.data,f=h[T+1],p=h[T+2];return en(f)&&en(p)&&(T=this.handleText(++T,d,{isMultiByte:!0})),T},me.prototype.setCurrentWindow=function(T,d){var h=this.current708Packet.data,f=h[T],p=f&7;return d.setCurrentWindow(p),T},me.prototype.defineWindow=function(T,d){var h=this.current708Packet.data,f=h[T],p=f&7;d.setCurrentWindow(p);var v=d.currentWindow;return f=h[++T],v.visible=(f&32)>>5,v.rowLock=(f&16)>>4,v.columnLock=(f&8)>>3,v.priority=f&7,f=h[++T],v.relativePositioning=(f&128)>>7,v.anchorVertical=f&127,f=h[++T],v.anchorHorizontal=f,f=h[++T],v.anchorPoint=(f&240)>>4,v.rowCount=f&15,f=h[++T],v.columnCount=f&63,f=h[++T],v.windowStyle=(f&56)>>3,v.penStyle=f&7,v.virtualRowCount=v.rowCount+1,T},me.prototype.setWindowAttributes=function(T,d){var h=this.current708Packet.data,f=h[T],p=d.currentWindow.winAttr;return f=h[++T],p.fillOpacity=(f&192)>>6,p.fillRed=(f&48)>>4,p.fillGreen=(f&12)>>2,p.fillBlue=f&3,f=h[++T],p.borderType=(f&192)>>6,p.borderRed=(f&48)>>4,p.borderGreen=(f&12)>>2,p.borderBlue=f&3,f=h[++T],p.borderType+=(f&128)>>5,p.wordWrap=(f&64)>>6,p.printDirection=(f&48)>>4,p.scrollDirection=(f&12)>>2,p.justify=f&3,f=h[++T],p.effectSpeed=(f&240)>>4,p.effectDirection=(f&12)>>2,p.displayEffect=f&3,T},me.prototype.flushDisplayed=function(T,d){for(var h=[],f=0;f<8;f++)d.windows[f].visible&&!d.windows[f].isEmpty()&&h.push(d.windows[f].getText());d.endPts=T,d.text=h.join(`
`),this.pushCaption(d),d.startPts=T},me.prototype.pushCaption=function(T){T.text!==""&&(this.trigger("data",{startPts:T.startPts,endPts:T.endPts,text:T.text,stream:"cc708_"+T.serviceNum}),T.text="",T.startPts=T.endPts)},me.prototype.displayWindows=function(T,d){var h=this.current708Packet.data,f=h[++T],p=this.getPts(T);this.flushDisplayed(p,d);for(var v=0;v<8;v++)f&1<<v&&(d.windows[v].visible=1);return T},me.prototype.hideWindows=function(T,d){var h=this.current708Packet.data,f=h[++T],p=this.getPts(T);this.flushDisplayed(p,d);for(var v=0;v<8;v++)f&1<<v&&(d.windows[v].visible=0);return T},me.prototype.toggleWindows=function(T,d){var h=this.current708Packet.data,f=h[++T],p=this.getPts(T);this.flushDisplayed(p,d);for(var v=0;v<8;v++)f&1<<v&&(d.windows[v].visible^=1);return T},me.prototype.clearWindows=function(T,d){var h=this.current708Packet.data,f=h[++T],p=this.getPts(T);this.flushDisplayed(p,d);for(var v=0;v<8;v++)f&1<<v&&d.windows[v].clearText();return T},me.prototype.deleteWindows=function(T,d){var h=this.current708Packet.data,f=h[++T],p=this.getPts(T);this.flushDisplayed(p,d);for(var v=0;v<8;v++)f&1<<v&&d.windows[v].reset();return T},me.prototype.setPenAttributes=function(T,d){var h=this.current708Packet.data,f=h[T],p=d.currentWindow.penAttr;return f=h[++T],p.textTag=(f&240)>>4,p.offset=(f&12)>>2,p.penSize=f&3,f=h[++T],p.italics=(f&128)>>7,p.underline=(f&64)>>6,p.edgeType=(f&56)>>3,p.fontStyle=f&7,T},me.prototype.setPenColor=function(T,d){var h=this.current708Packet.data,f=h[T],p=d.currentWindow.penColor;return f=h[++T],p.fgOpacity=(f&192)>>6,p.fgRed=(f&48)>>4,p.fgGreen=(f&12)>>2,p.fgBlue=f&3,f=h[++T],p.bgOpacity=(f&192)>>6,p.bgRed=(f&48)>>4,p.bgGreen=(f&12)>>2,p.bgBlue=f&3,f=h[++T],p.edgeRed=(f&48)>>4,p.edgeGreen=(f&12)>>2,p.edgeBlue=f&3,T},me.prototype.setPenLocation=function(T,d){var h=this.current708Packet.data,f=h[T],p=d.currentWindow.penLoc;return d.currentWindow.pendingNewLine=!0,f=h[++T],p.row=f&15,f=h[++T],p.column=f&63,T},me.prototype.reset=function(T,d){var h=this.getPts(T);return this.flushDisplayed(h,d),this.initService(d.serviceNum,T)};var Oh={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},rn=function(d){return d===null?"":(d=Oh[d]||d,String.fromCharCode(d))},nn=14,Lh=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Zt=function(){for(var d=[],h=nn+1;h--;)d.push("");return d},Te=function T(d,h){T.prototype.init.call(this),this.field_=d||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(f){var p,v,y,E,C;if(p=f.ccData&32639,p===this.lastControlCode_){this.lastControlCode_=null;return}if((p&61440)===4096?this.lastControlCode_=p:p!==this.PADDING_&&(this.lastControlCode_=null),y=p>>>8,E=p&255,p!==this.PADDING_)if(p===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(p===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(f.pts),this.flushDisplayed(f.pts),v=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=v,this.startPts_=f.pts;else if(p===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(f.pts);else if(p===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(f.pts);else if(p===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(f.pts);else if(p===this.CARRIAGE_RETURN_)this.clearFormatting(f.pts),this.flushDisplayed(f.pts),this.shiftRowsUp_(),this.startPts_=f.pts;else if(p===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(p===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(f.pts),this.displayed_=Zt();else if(p===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Zt();else if(p===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(f.pts),this.displayed_=Zt()),this.mode_="paintOn",this.startPts_=f.pts;else if(this.isSpecialCharacter(y,E))y=(y&3)<<8,C=rn(y|E),this[this.mode_](f.pts,C),this.column_++;else if(this.isExtCharacter(y,E))this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),y=(y&3)<<8,C=rn(y|E),this[this.mode_](f.pts,C),this.column_++;else if(this.isMidRowCode(y,E))this.clearFormatting(f.pts),this[this.mode_](f.pts," "),this.column_++,(E&14)===14&&this.addFormatting(f.pts,["i"]),(E&1)===1&&this.addFormatting(f.pts,["u"]);else if(this.isOffsetControlCode(y,E))this.column_+=E&3;else if(this.isPAC(y,E)){var k=Lh.indexOf(p&7968);this.mode_==="rollUp"&&(k-this.rollUpRows_+1<0&&(k=this.rollUpRows_-1),this.setRollUp(f.pts,k)),k!==this.row_&&(this.clearFormatting(f.pts),this.row_=k),E&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(f.pts,["u"]),(p&16)===16&&(this.column_=((p&14)>>1)*4),this.isColorPAC(E)&&(E&14)===14&&this.addFormatting(f.pts,["i"])}else this.isNormalChar(y)&&(E===0&&(E=null),C=rn(y),C+=rn(E),this[this.mode_](f.pts,C),this.column_+=C.length)}};Te.prototype=new t,Te.prototype.flushDisplayed=function(T){var d=this.displayed_.map(function(h,f){try{return h.trim()}catch{return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."}),""}},this).join(`
`).replace(/^\n+|\n+$/g,"");d.length&&this.trigger("data",{startPts:this.startPts_,endPts:T,text:d,stream:this.name_})},Te.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Zt(),this.nonDisplayed_=Zt(),this.lastControlCode_=null,this.column_=0,this.row_=nn,this.rollUpRows_=2,this.formatting_=[]},Te.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Te.prototype.isSpecialCharacter=function(T,d){return T===this.EXT_&&d>=48&&d<=63},Te.prototype.isExtCharacter=function(T,d){return(T===this.EXT_+1||T===this.EXT_+2)&&d>=32&&d<=63},Te.prototype.isMidRowCode=function(T,d){return T===this.EXT_&&d>=32&&d<=47},Te.prototype.isOffsetControlCode=function(T,d){return T===this.OFFSET_&&d>=33&&d<=35},Te.prototype.isPAC=function(T,d){return T>=this.BASE_&&T<this.BASE_+8&&d>=64&&d<=127},Te.prototype.isColorPAC=function(T){return T>=64&&T<=79||T>=96&&T<=127},Te.prototype.isNormalChar=function(T){return T>=32&&T<=127},Te.prototype.setRollUp=function(T,d){if(this.mode_!=="rollUp"&&(this.row_=nn,this.mode_="rollUp",this.flushDisplayed(T),this.nonDisplayed_=Zt(),this.displayed_=Zt()),d!==void 0&&d!==this.row_)for(var h=0;h<this.rollUpRows_;h++)this.displayed_[d-h]=this.displayed_[this.row_-h],this.displayed_[this.row_-h]="";d===void 0&&(d=this.row_),this.topRow_=d-this.rollUpRows_+1},Te.prototype.addFormatting=function(T,d){this.formatting_=this.formatting_.concat(d);var h=d.reduce(function(f,p){return f+"<"+p+">"},"");this[this.mode_](T,h)},Te.prototype.clearFormatting=function(T){if(!!this.formatting_.length){var d=this.formatting_.reverse().reduce(function(h,f){return h+"</"+f+">"},"");this.formatting_=[],this[this.mode_](T,d)}},Te.prototype.popOn=function(T,d){var h=this.nonDisplayed_[this.row_];h+=d,this.nonDisplayed_[this.row_]=h},Te.prototype.rollUp=function(T,d){var h=this.displayed_[this.row_];h+=d,this.displayed_[this.row_]=h},Te.prototype.shiftRowsUp_=function(){var T;for(T=0;T<this.topRow_;T++)this.displayed_[T]="";for(T=this.row_+1;T<nn+1;T++)this.displayed_[T]="";for(T=this.topRow_;T<this.row_;T++)this.displayed_[T]=this.displayed_[T+1];this.displayed_[this.row_]=""},Te.prototype.paintOn=function(T,d){var h=this.displayed_[this.row_];h+=d,this.displayed_[this.row_]=h};var an={CaptionStream:Ze,Cea608Stream:Te,Cea708Stream:me},Oe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Fh=8589934592,Rh=4294967296,iu="shared",Fa=function(d,h){var f=1;for(d>h&&(f=-1);Math.abs(h-d)>Rh;)d+=f*Fh;return d},nu=function T(d){var h,f;T.prototype.init.call(this),this.type_=d||iu,this.push=function(p){this.type_!==iu&&p.type!==this.type_||(f===void 0&&(f=p.dts),p.dts=Fa(p.dts,f),p.pts=Fa(p.pts,f),h=p.dts,this.trigger("data",p))},this.flush=function(){f=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){f=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};nu.prototype=new t;var au={TimestampRolloverStream:nu,handleRollover:Fa},su=function(d,h,f){var p,v="";for(p=h;p<f;p++)v+="%"+("00"+d[p].toString(16)).slice(-2);return v},sn=function(d,h,f){return decodeURIComponent(su(d,h,f))},Mh=function(d,h,f){return unescape(su(d,h,f))},on=function(d){return d[0]<<21|d[1]<<14|d[2]<<7|d[3]},ou={TXXX:function(d){var h;if(d.data[0]===3){for(h=1;h<d.data.length;h++)if(d.data[h]===0){d.description=sn(d.data,1,h),d.value=sn(d.data,h+1,d.data.length).replace(/\0*$/,"");break}d.data=d.value}},WXXX:function(d){var h;if(d.data[0]===3){for(h=1;h<d.data.length;h++)if(d.data[h]===0){d.description=sn(d.data,1,h),d.url=sn(d.data,h+1,d.data.length);break}}},PRIV:function(d){var h;for(h=0;h<d.data.length;h++)if(d.data[h]===0){d.owner=Mh(d.data,0,h);break}d.privateData=d.data.subarray(h+1),d.data=d.privateData}},un;un=function(d){var h={descriptor:d&&d.descriptor},f=0,p=[],v=0,y;if(un.prototype.init.call(this),this.dispatchType=Oe.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(y=0;y<h.descriptor.length;y++)this.dispatchType+=("00"+h.descriptor[y].toString(16)).slice(-2);this.push=function(E){var C,k,D,P,M,z;if(E.type==="timed-metadata"){if(E.dataAlignmentIndicator&&(v=0,p.length=0),p.length===0&&(E.data.length<10||E.data[0]!=="I".charCodeAt(0)||E.data[1]!=="D".charCodeAt(0)||E.data[2]!=="3".charCodeAt(0))){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(p.push(E),v+=E.data.byteLength,p.length===1&&(f=on(E.data.subarray(6,10)),f+=10),!(v<f)){for(C={data:new Uint8Array(f),frames:[],pts:p[0].pts,dts:p[0].dts},M=0;M<f;)C.data.set(p[0].data.subarray(0,f-M),M),M+=p[0].data.byteLength,v-=p[0].data.byteLength,p.shift();k=10,C.data[5]&64&&(k+=4,k+=on(C.data.subarray(10,14)),f-=on(C.data.subarray(16,20)));do{if(D=on(C.data.subarray(k+4,k+8)),D<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});return}if(z=String.fromCharCode(C.data[k],C.data[k+1],C.data[k+2],C.data[k+3]),P={id:z,data:C.data.subarray(k+10,k+D+10)},P.key=P.id,ou[P.id]&&(ou[P.id](P),P.owner==="com.apple.streaming.transportStreamTimestamp")){var Y=P.data,j=(Y[3]&1)<<30|Y[4]<<22|Y[5]<<14|Y[6]<<6|Y[7]>>>2;j*=4,j+=Y[7]&3,P.timeStamp=j,C.pts===void 0&&C.dts===void 0&&(C.pts=P.timeStamp,C.dts=P.timeStamp),this.trigger("timestamp",P)}C.frames.push(P),k+=10,k+=D}while(k<f);this.trigger("data",C)}}}},un.prototype=new t;var Nh=un,Bh=au.TimestampRolloverStream,ln,si,dn,_r=188,Ra=71;ln=function(){var d=new Uint8Array(_r),h=0;ln.prototype.init.call(this),this.push=function(f){var p=0,v=_r,y;for(h?(y=new Uint8Array(f.byteLength+h),y.set(d.subarray(0,h)),y.set(f,h),h=0):y=f;v<y.byteLength;){if(y[p]===Ra&&y[v]===Ra){this.trigger("data",y.subarray(p,v)),p+=_r,v+=_r;continue}p++,v++}p<y.byteLength&&(d.set(y.subarray(p),0),h=y.byteLength-p)},this.flush=function(){h===_r&&d[0]===Ra&&(this.trigger("data",d),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},ln.prototype=new t,si=function(){var d,h,f,p;si.prototype.init.call(this),p=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,d=function(y,E){var C=0;E.payloadUnitStartIndicator&&(C+=y[C]+1),E.type==="pat"?h(y.subarray(C),E):f(y.subarray(C),E)},h=function(y,E){E.section_number=y[7],E.last_section_number=y[8],p.pmtPid=(y[10]&31)<<8|y[11],E.pmtPid=p.pmtPid},f=function(y,E){var C,k,D,P;if(!!(y[5]&1)){for(p.programMapTable={video:null,audio:null,"timed-metadata":{}},C=(y[1]&15)<<8|y[2],k=3+C-4,D=(y[10]&15)<<8|y[11],P=12+D;P<k;){var M=y[P],z=(y[P+1]&31)<<8|y[P+2];M===Oe.H264_STREAM_TYPE&&p.programMapTable.video===null?p.programMapTable.video=z:M===Oe.ADTS_STREAM_TYPE&&p.programMapTable.audio===null?p.programMapTable.audio=z:M===Oe.METADATA_STREAM_TYPE&&(p.programMapTable["timed-metadata"][z]=M),P+=((y[P+3]&15)<<8|y[P+4])+5}E.programMapTable=p.programMapTable}},this.push=function(v){var y={},E=4;if(y.payloadUnitStartIndicator=!!(v[1]&64),y.pid=v[1]&31,y.pid<<=8,y.pid|=v[2],(v[3]&48)>>>4>1&&(E+=v[E]+1),y.pid===0)y.type="pat",d(v.subarray(E),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",d(v.subarray(E),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,E,y]):this.processPes_(v,E,y)},this.processPes_=function(v,y,E){E.pid===this.programMapTable.video?E.streamType=Oe.H264_STREAM_TYPE:E.pid===this.programMapTable.audio?E.streamType=Oe.ADTS_STREAM_TYPE:E.streamType=this.programMapTable["timed-metadata"][E.pid],E.type="pes",E.data=v.subarray(y),this.trigger("data",E)}},si.prototype=new t,si.STREAM_TYPES={h264:27,adts:15},dn=function(){var d=this,h=!1,f={data:[],size:0},p={data:[],size:0},v={data:[],size:0},y,E=function(D,P){var M,z=D[0]<<16|D[1]<<8|D[2];P.data=new Uint8Array,z===1&&(P.packetLength=6+(D[4]<<8|D[5]),P.dataAlignmentIndicator=(D[6]&4)!==0,M=D[7],M&192&&(P.pts=(D[9]&14)<<27|(D[10]&255)<<20|(D[11]&254)<<12|(D[12]&255)<<5|(D[13]&254)>>>3,P.pts*=4,P.pts+=(D[13]&6)>>>1,P.dts=P.pts,M&64&&(P.dts=(D[14]&14)<<27|(D[15]&255)<<20|(D[16]&254)<<12|(D[17]&255)<<5|(D[18]&254)>>>3,P.dts*=4,P.dts+=(D[18]&6)>>>1)),P.data=D.subarray(9+D[8]))},C=function(D,P,M){var z=new Uint8Array(D.size),Y={type:P},j=0,Z=0,De=!1,Ve;if(!(!D.data.length||D.size<9)){for(Y.trackId=D.data[0].pid,j=0;j<D.data.length;j++)Ve=D.data[j],z.set(Ve.data,Z),Z+=Ve.data.byteLength;E(z,Y),De=P==="video"||Y.packetLength<=D.size,(M||De)&&(D.size=0,D.data.length=0),De&&d.trigger("data",Y)}};dn.prototype.init.call(this),this.push=function(k){({pat:function(){},pes:function(){var P,M;switch(k.streamType){case Oe.H264_STREAM_TYPE:P=f,M="video";break;case Oe.ADTS_STREAM_TYPE:P=p,M="audio";break;case Oe.METADATA_STREAM_TYPE:P=v,M="timed-metadata";break;default:return}k.payloadUnitStartIndicator&&C(P,M,!0),P.data.push(k),P.size+=k.data.byteLength},pmt:function(){var P={type:"metadata",tracks:[]};y=k.programMapTable,y.video!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&P.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),h=!0,d.trigger("data",P)}})[k.type]()},this.reset=function(){f.size=0,f.data.length=0,p.size=0,p.data.length=0,this.trigger("reset")},this.flushStreams_=function(){C(f,"video"),C(p,"audio"),C(v,"timed-metadata")},this.flush=function(){if(!h&&y){var k={type:"metadata",tracks:[]};y.video!==null&&k.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&k.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),d.trigger("data",k)}h=!1,this.flushStreams_(),this.trigger("done")}},dn.prototype=new t;var uu={PAT_PID:0,MP2T_PACKET_LENGTH:_r,TransportPacketStream:ln,TransportParseStream:si,ElementaryStream:dn,TimestampRolloverStream:Bh,CaptionStream:an.CaptionStream,Cea608Stream:an.Cea608Stream,Cea708Stream:an.Cea708Stream,MetadataStream:Nh};for(var Ma in Oe)Oe.hasOwnProperty(Ma)&&(uu[Ma]=Oe[Ma]);var wt=uu,Uh=se.ONE_SECOND_IN_TS,cn,lu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];cn=function(d){var h,f=0;cn.prototype.init.call(this),this.skipWarn_=function(p,v){this.trigger("log",{level:"warn",message:"adts skiping bytes "+p+" to "+v+" in frame "+f+" outside syncword"})},this.push=function(p){var v=0,y,E,C,k,D;if(d||(f=0),p.type==="audio"){h&&h.length?(C=h,h=new Uint8Array(C.byteLength+p.data.byteLength),h.set(C),h.set(p.data,C.byteLength)):h=p.data;for(var P;v+7<h.length;){if(h[v]!==255||(h[v+1]&246)!==240){typeof P!="number"&&(P=v),v++;continue}if(typeof P=="number"&&(this.skipWarn_(P,v),P=null),E=(~h[v+1]&1)*2,y=(h[v+3]&3)<<11|h[v+4]<<3|(h[v+5]&224)>>5,k=((h[v+6]&3)+1)*1024,D=k*Uh/lu[(h[v+2]&60)>>>2],h.byteLength-v<y)break;this.trigger("data",{pts:p.pts+f*D,dts:p.dts+f*D,sampleCount:k,audioobjecttype:(h[v+2]>>>6&3)+1,channelcount:(h[v+2]&1)<<2|(h[v+3]&192)>>>6,samplerate:lu[(h[v+2]&60)>>>2],samplingfrequencyindex:(h[v+2]&60)>>>2,samplesize:16,data:h.subarray(v+7+E,v+y)}),f++,v+=y}typeof P=="number"&&(this.skipWarn_(P,v),P=null),h=h.subarray(v)}},this.flush=function(){f=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},cn.prototype=new t;var du=cn,cu;cu=function(d){var h=d.byteLength,f=0,p=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+p},this.loadWord=function(){var v=d.byteLength-h,y=new Uint8Array(4),E=Math.min(4,h);if(E===0)throw new Error("no bytes available");y.set(d.subarray(v,v+E)),f=new DataView(y.buffer).getUint32(0),p=E*8,h-=E},this.skipBits=function(v){var y;p>v?(f<<=v,p-=v):(v-=p,y=Math.floor(v/8),v-=y*8,h-=y,this.loadWord(),f<<=v,p-=v)},this.readBits=function(v){var y=Math.min(p,v),E=f>>>32-y;return p-=y,p>0?f<<=y:h>0&&this.loadWord(),y=v-y,y>0?E<<y|this.readBits(y):E},this.skipLeadingZeros=function(){var v;for(v=0;v<p;++v)if((f&2147483648>>>v)!==0)return f<<=v,p-=v,v;return this.loadWord(),v+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var v=this.skipLeadingZeros();return this.readBits(v+1)-1},this.readExpGolomb=function(){var v=this.readUnsignedExpGolomb();return 1&v?1+v>>>1:-1*(v>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Vh=cu,fn,oi,fu;oi=function(){var d=0,h,f;oi.prototype.init.call(this),this.push=function(p){var v;f?(v=new Uint8Array(f.byteLength+p.data.byteLength),v.set(f),v.set(p.data,f.byteLength),f=v):f=p.data;for(var y=f.byteLength;d<y-3;d++)if(f[d+2]===1){h=d+5;break}for(;h<y;)switch(f[h]){case 0:if(f[h-1]!==0){h+=2;break}else if(f[h-2]!==0){h++;break}d+3!==h-2&&this.trigger("data",f.subarray(d+3,h-2));do h++;while(f[h]!==1&&h<y);d=h-2,h+=3;break;case 1:if(f[h-1]!==0||f[h-2]!==0){h+=3;break}this.trigger("data",f.subarray(d+3,h-2)),d=h-2,h+=3;break;default:h+=3;break}f=f.subarray(d),h-=d,d=0},this.reset=function(){f=null,d=0,this.trigger("reset")},this.flush=function(){f&&f.byteLength>3&&this.trigger("data",f.subarray(d+3)),f=null,d=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},oi.prototype=new t,fu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},fn=function(){var d=new oi,h,f,p,v,y,E,C;fn.prototype.init.call(this),h=this,this.push=function(k){k.type==="video"&&(f=k.trackId,p=k.pts,v=k.dts,d.push(k))},d.on("data",function(k){var D={trackId:f,pts:p,dts:v,data:k,nalUnitTypeCode:k[0]&31};switch(D.nalUnitTypeCode){case 5:D.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:D.nalUnitType="sei_rbsp",D.escapedRBSP=y(k.subarray(1));break;case 7:D.nalUnitType="seq_parameter_set_rbsp",D.escapedRBSP=y(k.subarray(1)),D.config=E(D.escapedRBSP);break;case 8:D.nalUnitType="pic_parameter_set_rbsp";break;case 9:D.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",D)}),d.on("done",function(){h.trigger("done")}),d.on("partialdone",function(){h.trigger("partialdone")}),d.on("reset",function(){h.trigger("reset")}),d.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){d.flush()},this.partialFlush=function(){d.partialFlush()},this.reset=function(){d.reset()},this.endTimeline=function(){d.endTimeline()},C=function(D,P){var M=8,z=8,Y,j;for(Y=0;Y<D;Y++)z!==0&&(j=P.readExpGolomb(),z=(M+j+256)%256),M=z===0?M:z},y=function(D){for(var P=D.byteLength,M=[],z=1,Y,j;z<P-2;)D[z]===0&&D[z+1]===0&&D[z+2]===3?(M.push(z+2),z+=2):z++;if(M.length===0)return D;Y=P-M.length,j=new Uint8Array(Y);var Z=0;for(z=0;z<Y;Z++,z++)Z===M[0]&&(Z++,M.shift()),j[z]=D[Z];return j},E=function(D){var P=0,M=0,z=0,Y=0,j,Z,De,Ve,ir,qa,Iu,Ou,Lu,ja,Fu,xe=[1,1],Ru,nr;if(j=new Vh(D),Z=j.readUnsignedByte(),Ve=j.readUnsignedByte(),De=j.readUnsignedByte(),j.skipUnsignedExpGolomb(),fu[Z]&&(ir=j.readUnsignedExpGolomb(),ir===3&&j.skipBits(1),j.skipUnsignedExpGolomb(),j.skipUnsignedExpGolomb(),j.skipBits(1),j.readBoolean()))for(Fu=ir!==3?8:12,nr=0;nr<Fu;nr++)j.readBoolean()&&(nr<6?C(16,j):C(64,j));if(j.skipUnsignedExpGolomb(),qa=j.readUnsignedExpGolomb(),qa===0)j.readUnsignedExpGolomb();else if(qa===1)for(j.skipBits(1),j.skipExpGolomb(),j.skipExpGolomb(),Iu=j.readUnsignedExpGolomb(),nr=0;nr<Iu;nr++)j.skipExpGolomb();if(j.skipUnsignedExpGolomb(),j.skipBits(1),Ou=j.readUnsignedExpGolomb(),Lu=j.readUnsignedExpGolomb(),ja=j.readBits(1),ja===0&&j.skipBits(1),j.skipBits(1),j.readBoolean()&&(P=j.readUnsignedExpGolomb(),M=j.readUnsignedExpGolomb(),z=j.readUnsignedExpGolomb(),Y=j.readUnsignedExpGolomb()),j.readBoolean()&&j.readBoolean()){switch(Ru=j.readUnsignedByte(),Ru){case 1:xe=[1,1];break;case 2:xe=[12,11];break;case 3:xe=[10,11];break;case 4:xe=[16,11];break;case 5:xe=[40,33];break;case 6:xe=[24,11];break;case 7:xe=[20,11];break;case 8:xe=[32,11];break;case 9:xe=[80,33];break;case 10:xe=[18,11];break;case 11:xe=[15,11];break;case 12:xe=[64,33];break;case 13:xe=[160,99];break;case 14:xe=[4,3];break;case 15:xe=[3,2];break;case 16:xe=[2,1];break;case 255:{xe=[j.readUnsignedByte()<<8|j.readUnsignedByte(),j.readUnsignedByte()<<8|j.readUnsignedByte()];break}}xe&&xe[0]/xe[1]}return{profileIdc:Z,levelIdc:De,profileCompatibility:Ve,width:(Ou+1)*16-P*2-M*2,height:(2-ja)*(Lu+1)*16-z*2-Y*2,sarRatio:xe}}},fn.prototype=new t;var Hh={H264Stream:fn,NalByteStream:oi},qh=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],hu=function(d,h){var f=d[h+6]<<21|d[h+7]<<14|d[h+8]<<7|d[h+9],p=d[h+5],v=(p&16)>>4;return f=f>=0?f:0,v?f+20:f+10},jh=function T(d,h){return d.length-h<10||d[h]!=="I".charCodeAt(0)||d[h+1]!=="D".charCodeAt(0)||d[h+2]!=="3".charCodeAt(0)?h:(h+=hu(d,h),T(d,h))},Gh=function(d){var h=jh(d,0);return d.length>=h+2&&(d[h]&255)===255&&(d[h+1]&240)===240&&(d[h+1]&22)===16},pu=function(d){return d[0]<<21|d[1]<<14|d[2]<<7|d[3]},Wh=function(d,h,f){var p,v="";for(p=h;p<f;p++)v+="%"+("00"+d[p].toString(16)).slice(-2);return v},zh=function(d,h,f){return unescape(Wh(d,h,f))},$h=function(d,h){var f=(d[h+5]&224)>>5,p=d[h+4]<<3,v=d[h+3]&3<<11;return v|p|f},Kh=function(d,h){return d[h]==="I".charCodeAt(0)&&d[h+1]==="D".charCodeAt(0)&&d[h+2]==="3".charCodeAt(0)?"timed-metadata":d[h]&!0&&(d[h+1]&240)===240?"audio":null},Xh=function(d){for(var h=0;h+5<d.length;){if(d[h]!==255||(d[h+1]&246)!==240){h++;continue}return qh[(d[h+2]&60)>>>2]}return null},Yh=function(d){var h,f,p,v;h=10,d[5]&64&&(h+=4,h+=pu(d.subarray(10,14)));do{if(f=pu(d.subarray(h+4,h+8)),f<1)return null;if(v=String.fromCharCode(d[h],d[h+1],d[h+2],d[h+3]),v==="PRIV"){p=d.subarray(h+10,h+f+10);for(var y=0;y<p.byteLength;y++)if(p[y]===0){var E=zh(p,0,y);if(E==="com.apple.streaming.transportStreamTimestamp"){var C=p.subarray(y+1),k=(C[3]&1)<<30|C[4]<<22|C[5]<<14|C[6]<<6|C[7]>>>2;return k*=4,k+=C[7]&3,k}break}}h+=10,h+=f}while(h<d.byteLength);return null},hn={isLikelyAacData:Gh,parseId3TagSize:hu,parseAdtsSize:$h,parseType:Kh,parseSampleRate:Xh,parseAacTimestamp:Yh},pn;pn=function(){var d=new Uint8Array,h=0;pn.prototype.init.call(this),this.setTimestamp=function(f){h=f},this.push=function(f){var p=0,v=0,y,E,C,k;for(d.length?(k=d.length,d=new Uint8Array(f.byteLength+k),d.set(d.subarray(0,k)),d.set(f,k)):d=f;d.length-v>=3;){if(d[v]==="I".charCodeAt(0)&&d[v+1]==="D".charCodeAt(0)&&d[v+2]==="3".charCodeAt(0)){if(d.length-v<10||(p=hn.parseId3TagSize(d,v),v+p>d.length))break;E={type:"timed-metadata",data:d.subarray(v,v+p)},this.trigger("data",E),v+=p;continue}else if((d[v]&255)===255&&(d[v+1]&240)===240){if(d.length-v<7||(p=hn.parseAdtsSize(d,v),v+p>d.length))break;C={type:"audio",data:d.subarray(v,v+p),pts:h,dts:h},this.trigger("data",C),v+=p;continue}v++}y=d.length-v,y>0?d=d.subarray(v):d=new Uint8Array},this.reset=function(){d=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){d=new Uint8Array,this.trigger("endedtimeline")}},pn.prototype=new t;var Qh=pn,Jh=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Na=Jh,Zh=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ba=Zh,ep=Hh.H264Stream,tp=hn.isLikelyAacData,rp=se.ONE_SECOND_IN_TS,ui,Tr,mn,er,ip=function(d,h){h.stream=d,this.trigger("log",h)},mu=function(d,h){for(var f=Object.keys(h),p=0;p<f.length;p++){var v=f[p];v==="headOfPipeline"||!h[v].on||h[v].on("log",ip.bind(d,v))}},gu=function(d,h){var f;if(d.length!==h.length)return!1;for(f=0;f<d.length;f++)if(d[f]!==h[f])return!1;return!0},Ua=function(d,h,f,p,v,y){var E=f-h,C=p-h,k=v-f;return{start:{dts:d,pts:d+E},end:{dts:d+C,pts:d+k},prependedContentDuration:y,baseMediaDecodeTime:d}};Tr=function(d,h){var f=[],p,v=0,y=0,E=1/0;h=h||{},p=h.firstSequenceNumber||0,Tr.prototype.init.call(this),this.push=function(C){ut.collectDtsInfo(d,C),d&&Na.forEach(function(k){d[k]=C[k]}),f.push(C)},this.setEarliestDts=function(C){v=C},this.setVideoBaseMediaDecodeTime=function(C){E=C},this.setAudioAppendStart=function(C){y=C},this.flush=function(){var C,k,D,P,M,z,Y;if(f.length===0){this.trigger("done","AudioSegmentStream");return}C=Zi.trimAdtsFramesByEarliestDts(f,d,v),d.baseMediaDecodeTime=ut.calculateTrackBaseMediaDecodeTime(d,h.keepOriginalTimestamps),Y=Zi.prefixWithSilence(d,C,y,E),d.samples=Zi.generateSampleTable(C),D=mt.mdat(Zi.concatenateFrameData(C)),f=[],k=mt.moof(p,[d]),P=new Uint8Array(k.byteLength+D.byteLength),p++,P.set(k),P.set(D,k.byteLength),ut.clearDtsInfo(d),M=Math.ceil(rp*1024/d.samplerate),C.length&&(z=C.length*M,this.trigger("segmentTimingInfo",Ua(se.audioTsToVideoTs(d.baseMediaDecodeTime,d.samplerate),C[0].dts,C[0].pts,C[0].dts+z,C[0].pts+z,Y||0)),this.trigger("timingInfo",{start:C[0].pts,end:C[0].pts+z})),this.trigger("data",{track:d,boxes:P}),this.trigger("done","AudioSegmentStream")},this.reset=function(){ut.clearDtsInfo(d),f=[],this.trigger("reset")}},Tr.prototype=new t,ui=function(d,h){var f,p=[],v=[],y,E;h=h||{},f=h.firstSequenceNumber||0,ui.prototype.init.call(this),delete d.minPTS,this.gopCache_=[],this.push=function(C){ut.collectDtsInfo(d,C),C.nalUnitType==="seq_parameter_set_rbsp"&&!y&&(y=C.config,d.sps=[C.data],Ba.forEach(function(k){d[k]=y[k]},this)),C.nalUnitType==="pic_parameter_set_rbsp"&&!E&&(E=C.data,d.pps=[C.data]),p.push(C)},this.flush=function(){for(var C,k,D,P,M,z,Y=0,j,Z;p.length&&p[0].nalUnitType!=="access_unit_delimiter_rbsp";)p.shift();if(p.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(C=ni.groupNalsIntoFrames(p),D=ni.groupFramesIntoGops(C),D[0][0].keyFrame||(k=this.getGopForFusion_(p[0],d),k?(Y=k.duration,D.unshift(k),D.byteLength+=k.byteLength,D.nalCount+=k.nalCount,D.pts=k.pts,D.dts=k.dts,D.duration+=k.duration):D=ni.extendFirstKeyFrame(D)),v.length){var De;if(h.alignGopsAtEnd?De=this.alignGopsAtEnd_(D):De=this.alignGopsAtStart_(D),!De){this.gopCache_.unshift({gop:D.pop(),pps:d.pps,sps:d.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}ut.clearDtsInfo(d),D=De}ut.collectDtsInfo(d,D),d.samples=ni.generateSampleTable(D),M=mt.mdat(ni.concatenateNalData(D)),d.baseMediaDecodeTime=ut.calculateTrackBaseMediaDecodeTime(d,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",D.map(function(Ve){return{pts:Ve.pts,dts:Ve.dts,byteLength:Ve.byteLength}})),j=D[0],Z=D[D.length-1],this.trigger("segmentTimingInfo",Ua(d.baseMediaDecodeTime,j.dts,j.pts,Z.dts+Z.duration,Z.pts+Z.duration,Y)),this.trigger("timingInfo",{start:D[0].pts,end:D[D.length-1].pts+D[D.length-1].duration}),this.gopCache_.unshift({gop:D.pop(),pps:d.pps,sps:d.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.trigger("baseMediaDecodeTime",d.baseMediaDecodeTime),this.trigger("timelineStartInfo",d.timelineStartInfo),P=mt.moof(f,[d]),z=new Uint8Array(P.byteLength+M.byteLength),f++,z.set(P),z.set(M,P.byteLength),this.trigger("data",{track:d,boxes:z}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),p=[],this.gopCache_.length=0,v.length=0,this.trigger("reset")},this.resetStream_=function(){ut.clearDtsInfo(d),y=void 0,E=void 0},this.getGopForFusion_=function(C){var k=45e3,D=1e4,P=1/0,M,z,Y,j,Z;for(Z=0;Z<this.gopCache_.length;Z++)j=this.gopCache_[Z],Y=j.gop,!(!(d.pps&&gu(d.pps[0],j.pps[0]))||!(d.sps&&gu(d.sps[0],j.sps[0])))&&(Y.dts<d.timelineStartInfo.dts||(M=C.dts-Y.dts-Y.duration,M>=-D&&M<=k&&(!z||P>M)&&(z=j,P=M)));return z?z.gop:null},this.alignGopsAtStart_=function(C){var k,D,P,M,z,Y,j,Z;for(z=C.byteLength,Y=C.nalCount,j=C.duration,k=D=0;k<v.length&&D<C.length&&(P=v[k],M=C[D],P.pts!==M.pts);){if(M.pts>P.pts){k++;continue}D++,z-=M.byteLength,Y-=M.nalCount,j-=M.duration}return D===0?C:D===C.length?null:(Z=C.slice(D),Z.byteLength=z,Z.duration=j,Z.nalCount=Y,Z.pts=Z[0].pts,Z.dts=Z[0].dts,Z)},this.alignGopsAtEnd_=function(C){var k,D,P,M,z,Y;for(k=v.length-1,D=C.length-1,z=null,Y=!1;k>=0&&D>=0;){if(P=v[k],M=C[D],P.pts===M.pts){Y=!0;break}if(P.pts>M.pts){k--;continue}k===v.length-1&&(z=D),D--}if(!Y&&z===null)return null;var j;if(Y?j=D:j=z,j===0)return C;var Z=C.slice(j),De=Z.reduce(function(Ve,ir){return Ve.byteLength+=ir.byteLength,Ve.duration+=ir.duration,Ve.nalCount+=ir.nalCount,Ve},{byteLength:0,duration:0,nalCount:0});return Z.byteLength=De.byteLength,Z.duration=De.duration,Z.nalCount=De.nalCount,Z.pts=Z[0].pts,Z.dts=Z[0].dts,Z},this.alignGopsWith=function(C){v=C}},ui.prototype=new t,er=function(d,h){this.numberOfTracks=0,this.metadataStream=h,d=d||{},typeof d.remux<"u"?this.remuxTracks=!!d.remux:this.remuxTracks=!0,typeof d.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=d.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,er.prototype.init.call(this),this.push=function(f){if(f.text)return this.pendingCaptions.push(f);if(f.frames)return this.pendingMetadata.push(f);this.pendingTracks.push(f.track),this.pendingBytes+=f.boxes.byteLength,f.track.type==="video"&&(this.videoTrack=f.track,this.pendingBoxes.push(f.boxes)),f.track.type==="audio"&&(this.audioTrack=f.track,this.pendingBoxes.unshift(f.boxes))}},er.prototype=new t,er.prototype.flush=function(T){var d=0,h={captions:[],captionStreams:{},metadata:[],info:{}},f,p,v,y=0,E;if(this.pendingTracks.length<this.numberOfTracks){if(T!=="VideoSegmentStream"&&T!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(y=this.videoTrack.timelineStartInfo.pts,Ba.forEach(function(C){h.info[C]=this.videoTrack[C]},this)):this.audioTrack&&(y=this.audioTrack.timelineStartInfo.pts,Na.forEach(function(C){h.info[C]=this.audioTrack[C]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?h.type=this.pendingTracks[0].type:h.type="combined",this.emittedTracks+=this.pendingTracks.length,v=mt.initSegment(this.pendingTracks),h.initSegment=new Uint8Array(v.byteLength),h.initSegment.set(v),h.data=new Uint8Array(this.pendingBytes),E=0;E<this.pendingBoxes.length;E++)h.data.set(this.pendingBoxes[E],d),d+=this.pendingBoxes[E].byteLength;for(E=0;E<this.pendingCaptions.length;E++)f=this.pendingCaptions[E],f.startTime=se.metadataTsToSeconds(f.startPts,y,this.keepOriginalTimestamps),f.endTime=se.metadataTsToSeconds(f.endPts,y,this.keepOriginalTimestamps),h.captionStreams[f.stream]=!0,h.captions.push(f);for(E=0;E<this.pendingMetadata.length;E++)p=this.pendingMetadata[E],p.cueTime=se.metadataTsToSeconds(p.pts,y,this.keepOriginalTimestamps),h.metadata.push(p);for(h.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",h),E=0;E<h.captions.length;E++)f=h.captions[E],this.trigger("caption",f);for(E=0;E<h.metadata.length;E++)p=h.metadata[E],this.trigger("id3Frame",p)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},er.prototype.setRemux=function(T){this.remuxTracks=T},mn=function(d){var h=this,f=!0,p,v;mn.prototype.init.call(this),d=d||{},this.baseMediaDecodeTime=d.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new wt.MetadataStream,y.aacStream=new Qh,y.audioTimestampRolloverStream=new wt.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new wt.TimestampRolloverStream("timed-metadata"),y.adtsStream=new du,y.coalesceStream=new er(d,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(E){y.aacStream.setTimestamp(E.timeStamp)}),y.aacStream.on("data",function(E){E.type!=="timed-metadata"&&E.type!=="audio"||y.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Tr(v,d),y.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!p}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),mu(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new wt.MetadataStream,y.packetStream=new wt.TransportPacketStream,y.parseStream=new wt.TransportParseStream,y.elementaryStream=new wt.ElementaryStream,y.timestampRolloverStream=new wt.TimestampRolloverStream,y.adtsStream=new du,y.h264Stream=new ep,y.captionStream=new wt.CaptionStream(d),y.coalesceStream=new er(d,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(E){var C;if(E.type==="metadata"){for(C=E.tracks.length;C--;)!p&&E.tracks[C].type==="video"?(p=E.tracks[C],p.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!v&&E.tracks[C].type==="audio"&&(v=E.tracks[C],v.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);p&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new ui(p,d),y.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(k){v&&!d.keepOriginalTimestamps&&(v.timelineStartInfo=k,y.audioSegmentStream.setEarliestDts(k.dts-h.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(k){v&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(k)}),y.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),v&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Tr(v,d),y.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!p})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(E){E.dispatchType=y.metadataStream.dispatchType,h.trigger("id3Frame",E)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),mu(this,y)},this.setBaseMediaDecodeTime=function(y){var E=this.transmuxPipeline_;d.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,ut.clearDtsInfo(v),E.audioTimestampRolloverStream&&E.audioTimestampRolloverStream.discontinuity()),p&&(E.videoSegmentStream&&(E.videoSegmentStream.gopCache_=[]),p.timelineStartInfo.dts=void 0,p.timelineStartInfo.pts=void 0,ut.clearDtsInfo(p),E.captionStream.reset()),E.timestampRolloverStream&&E.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var E=this.transmuxPipeline_;d.remux=y,E&&E.coalesceStream&&E.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){p&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var E=this;return function(C){C.stream=y,E.trigger("log",C)}},this.push=function(y){if(f){var E=tp(y);E&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!E&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),f=!1}this.transmuxPipeline_.headOfPipeline.push(y)},this.flush=function(){f=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},mn.prototype=new t;var np={Transmuxer:mn,VideoSegmentStream:ui,AudioSegmentStream:Tr,AUDIO_PROPERTIES:Na,VIDEO_PROPERTIES:Ba,generateSegmentTimingInfo:Ua},ap=function(d){return d>>>0},sp=function(d){return("00"+d.toString(16)).slice(-2)},gn={toUnsigned:ap,toHexString:sp},op=function(d){var h="";return h+=String.fromCharCode(d[0]),h+=String.fromCharCode(d[1]),h+=String.fromCharCode(d[2]),h+=String.fromCharCode(d[3]),h},tr=op,up=gn.toUnsigned,lp=function T(d,h){var f=[],p,v,y,E,C;if(!h.length)return null;for(p=0;p<d.byteLength;)v=up(d[p]<<24|d[p+1]<<16|d[p+2]<<8|d[p+3]),y=tr(d.subarray(p+4,p+8)),E=v>1?p+v:d.byteLength,y===h[0]&&(h.length===1?f.push(d.subarray(p+8,E)):(C=T(d.subarray(p+8,E),h.slice(1)),C.length&&(f=f.concat(C)))),p=E;return f},ge=lp,dp=gn.toUnsigned,cp=e.getUint64,fp=function(d){var h={version:d[0],flags:new Uint8Array(d.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=cp(d.subarray(4)):h.baseMediaDecodeTime=dp(d[4]<<24|d[5]<<16|d[6]<<8|d[7]),h},vu=fp,hp=function(d){return{isLeading:(d[0]&12)>>>2,dependsOn:d[0]&3,isDependedOn:(d[1]&192)>>>6,hasRedundancy:(d[1]&48)>>>4,paddingValue:(d[1]&14)>>>1,isNonSyncSample:d[1]&1,degradationPriority:d[2]<<8|d[3]}},yu=hp,pp=function(d){var h={version:d[0],flags:new Uint8Array(d.subarray(1,4)),samples:[]},f=new DataView(d.buffer,d.byteOffset,d.byteLength),p=h.flags[2]&1,v=h.flags[2]&4,y=h.flags[1]&1,E=h.flags[1]&2,C=h.flags[1]&4,k=h.flags[1]&8,D=f.getUint32(4),P=8,M;for(p&&(h.dataOffset=f.getInt32(P),P+=4),v&&D&&(M={flags:yu(d.subarray(P,P+4))},P+=4,y&&(M.duration=f.getUint32(P),P+=4),E&&(M.size=f.getUint32(P),P+=4),k&&(h.version===1?M.compositionTimeOffset=f.getInt32(P):M.compositionTimeOffset=f.getUint32(P),P+=4),h.samples.push(M),D--);D--;)M={},y&&(M.duration=f.getUint32(P),P+=4),E&&(M.size=f.getUint32(P),P+=4),C&&(M.flags=yu(d.subarray(P,P+4)),P+=4),k&&(h.version===1?M.compositionTimeOffset=f.getInt32(P):M.compositionTimeOffset=f.getUint32(P),P+=4),h.samples.push(M);return h},_u=pp,mp=function(d){var h=new DataView(d.buffer,d.byteOffset,d.byteLength),f={version:d[0],flags:new Uint8Array(d.subarray(1,4)),trackId:h.getUint32(4)},p=f.flags[2]&1,v=f.flags[2]&2,y=f.flags[2]&8,E=f.flags[2]&16,C=f.flags[2]&32,k=f.flags[0]&65536,D=f.flags[0]&131072,P;return P=8,p&&(P+=4,f.baseDataOffset=h.getUint32(12),P+=4),v&&(f.sampleDescriptionIndex=h.getUint32(P),P+=4),y&&(f.defaultSampleDuration=h.getUint32(P),P+=4),E&&(f.defaultSampleSize=h.getUint32(P),P+=4),C&&(f.defaultSampleFlags=h.getUint32(P)),k&&(f.durationIsEmpty=!0),!p&&D&&(f.baseDataOffsetIsMoof=!0),f},Tu=mp,bu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},li;typeof window<"u"?li=window:typeof bu<"u"?li=bu:typeof self<"u"?li=self:li={};var di=li,gp=ai.discardEmulationPreventionBytes,vp=an.CaptionStream,yp=function(d,h){for(var f=d,p=0;p<h.length;p++){var v=h[p];if(f<v.size)return v;f-=v.size}return null},_p=function(d,h,f){var p=new DataView(d.buffer,d.byteOffset,d.byteLength),v={logs:[],seiNals:[]},y,E,C,k;for(E=0;E+4<d.length;E+=C)if(C=p.getUint32(E),E+=4,!(C<=0))switch(d[E]&31){case 6:var D=d.subarray(E+1,E+1+C),P=yp(E,h);if(y={nalUnitType:"sei_rbsp",size:C,data:D,escapedRBSP:gp(D),trackId:f},P)y.pts=P.pts,y.dts=P.dts,k=P;else if(k)y.pts=k.pts,y.dts=k.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+E+" for trackId "+f+". See mux.js#223."});break}v.seiNals.push(y);break}return v},Tp=function(d,h,f){var p=h,v=f.defaultSampleDuration||0,y=f.defaultSampleSize||0,E=f.trackId,C=[];return d.forEach(function(k){var D=_u(k),P=D.samples;P.forEach(function(M){M.duration===void 0&&(M.duration=v),M.size===void 0&&(M.size=y),M.trackId=E,M.dts=p,M.compositionTimeOffset===void 0&&(M.compositionTimeOffset=0),typeof p=="bigint"?(M.pts=p+di.BigInt(M.compositionTimeOffset),p+=di.BigInt(M.duration)):(M.pts=p+M.compositionTimeOffset,p+=M.duration)}),C=C.concat(P)}),C},bp=function(d,h){var f=ge(d,["moof","traf"]),p=ge(d,["mdat"]),v={},y=[];return p.forEach(function(E,C){var k=f[C];y.push({mdat:E,traf:k})}),y.forEach(function(E){var C=E.mdat,k=E.traf,D=ge(k,["tfhd"]),P=Tu(D[0]),M=P.trackId,z=ge(k,["tfdt"]),Y=z.length>0?vu(z[0]).baseMediaDecodeTime:0,j=ge(k,["trun"]),Z,De;h===M&&j.length>0&&(Z=Tp(j,Y,P),De=_p(C,Z,M),v[M]||(v[M]={seiNals:[],logs:[]}),v[M].seiNals=v[M].seiNals.concat(De.seiNals),v[M].logs=v[M].logs.concat(De.logs))}),v},xp=function(d,h,f){var p;if(h===null)return null;p=bp(d,h);var v=p[h]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:f}},Sp=function(){var d=!1,h,f,p,v,y,E;this.isInitialized=function(){return d},this.init=function(C){h=new vp,d=!0,E=C?C.isPartial:!1,h.on("data",function(k){k.startTime=k.startPts/v,k.endTime=k.endPts/v,y.captions.push(k),y.captionStreams[k.stream]=!0}),h.on("log",function(k){y.logs.push(k)})},this.isNewInit=function(C,k){return C&&C.length===0||k&&typeof k=="object"&&Object.keys(k).length===0?!1:p!==C[0]||v!==k[p]},this.parse=function(C,k,D){var P;if(this.isInitialized()){if(!k||!D)return null;if(this.isNewInit(k,D))p=k[0],v=D[p];else if(p===null||!v)return f.push(C),null}else return null;for(;f.length>0;){var M=f.shift();this.parse(M,k,D)}return P=xp(C,p,v),P&&P.logs&&(y.logs=y.logs.concat(P.logs)),P===null||!P.seiNals?y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null:(this.pushNals(P.seiNals),this.flushStream(),y)},this.pushNals=function(C){if(!this.isInitialized()||!C||C.length===0)return null;C.forEach(function(k){h.push(k)})},this.flushStream=function(){if(!this.isInitialized())return null;E?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){f=[],p=null,v=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Ep=Sp,vn=gn.toUnsigned,ci=gn.toHexString,Cp=e.getUint64,xu,Su,Eu,Cu,Au,Va;xu=function(d){var h={},f=ge(d,["moov","trak"]);return f.reduce(function(p,v){var y,E,C,k,D;return y=ge(v,["tkhd"])[0],!y||(E=y[0],C=E===0?12:20,k=vn(y[C]<<24|y[C+1]<<16|y[C+2]<<8|y[C+3]),D=ge(v,["mdia","mdhd"])[0],!D)?null:(E=D[0],C=E===0?12:20,p[k]=vn(D[C]<<24|D[C+1]<<16|D[C+2]<<8|D[C+3]),p)},h)},Su=function(d,h){var f;f=ge(h,["moof","traf"]);var p=f.reduce(function(v,y){var E=ge(y,["tfhd"])[0],C=vn(E[4]<<24|E[5]<<16|E[6]<<8|E[7]),k=d[C]||9e4,D=ge(y,["tfdt"])[0],P=new DataView(D.buffer,D.byteOffset,D.byteLength),M;D[0]===1?M=Cp(D.subarray(4,12)):M=P.getUint32(4);var z;return typeof M=="bigint"?z=M/di.BigInt(k):typeof M=="number"&&!isNaN(M)&&(z=M/k),z<Number.MAX_SAFE_INTEGER&&(z=Number(z)),z<v&&(v=z),v},1/0);return typeof p=="bigint"||isFinite(p)?p:0},Eu=function(d,h){var f=ge(h,["moof","traf"]),p=0,v=0,y;if(f&&f.length){var E=ge(f[0],["tfhd"])[0],C=ge(f[0],["trun"])[0],k=ge(f[0],["tfdt"])[0];if(E){var D=Tu(E);y=D.trackId}if(k){var P=vu(k);p=P.baseMediaDecodeTime}if(C){var M=_u(C);M.samples&&M.samples.length&&(v=M.samples[0].compositionTimeOffset||0)}}var z=d[y]||9e4;typeof p=="bigint"&&(v=di.BigInt(v),z=di.BigInt(z));var Y=(p+v)/z;return typeof Y=="bigint"&&Y<Number.MAX_SAFE_INTEGER&&(Y=Number(Y)),Y},Cu=function(d){var h=ge(d,["moov","trak"]),f=[];return h.forEach(function(p){var v=ge(p,["mdia","hdlr"]),y=ge(p,["tkhd"]);v.forEach(function(E,C){var k=tr(E.subarray(8,12)),D=y[C],P,M,z;k==="vide"&&(P=new DataView(D.buffer,D.byteOffset,D.byteLength),M=P.getUint8(0),z=M===0?P.getUint32(12):P.getUint32(20),f.push(z))})}),f},Va=function(d){var h=d[0],f=h===0?12:20;return vn(d[f]<<24|d[f+1]<<16|d[f+2]<<8|d[f+3])},Au=function(d){var h=ge(d,["moov","trak"]),f=[];return h.forEach(function(p){var v={},y=ge(p,["tkhd"])[0],E,C;y&&(E=new DataView(y.buffer,y.byteOffset,y.byteLength),C=E.getUint8(0),v.id=C===0?E.getUint32(12):E.getUint32(20));var k=ge(p,["mdia","hdlr"])[0];if(k){var D=tr(k.subarray(8,12));D==="vide"?v.type="video":D==="soun"?v.type="audio":v.type=D}var P=ge(p,["mdia","minf","stbl","stsd"])[0];if(P){var M=P.subarray(8);v.codec=tr(M.subarray(4,8));var z=ge(M,[v.codec])[0],Y,j;z&&(/^[asm]vc[1-9]$/i.test(v.codec)?(Y=z.subarray(78),j=tr(Y.subarray(4,8)),j==="avcC"&&Y.length>11?(v.codec+=".",v.codec+=ci(Y[9]),v.codec+=ci(Y[10]),v.codec+=ci(Y[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(Y=z.subarray(28),j=tr(Y.subarray(4,8)),j==="esds"&&Y.length>20&&Y[19]!==0?(v.codec+="."+ci(Y[19]),v.codec+="."+ci(Y[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var Z=ge(p,["mdia","mdhd"])[0];Z&&(v.timescale=Va(Z)),f.push(v)}),f};var Du={findBox:ge,parseType:tr,timescale:xu,startTime:Su,compositionStartTime:Eu,videoTrackIds:Cu,tracks:Au,getTimescaleFromMediaHeader:Va},wu=function(d){var h=d[1]&31;return h<<=8,h|=d[2],h},yn=function(d){return!!(d[1]&64)},_n=function(d){var h=0;return(d[3]&48)>>>4>1&&(h+=d[4]+1),h},Ap=function(d,h){var f=wu(d);return f===0?"pat":f===h?"pmt":h?"pes":null},Dp=function(d){var h=yn(d),f=4+_n(d);return h&&(f+=d[f]+1),(d[f+10]&31)<<8|d[f+11]},wp=function(d){var h={},f=yn(d),p=4+_n(d);if(f&&(p+=d[p]+1),!!(d[p+5]&1)){var v,y,E;v=(d[p+1]&15)<<8|d[p+2],y=3+v-4,E=(d[p+10]&15)<<8|d[p+11];for(var C=12+E;C<y;){var k=p+C;h[(d[k+1]&31)<<8|d[k+2]]=d[k],C+=((d[k+3]&15)<<8|d[k+4])+5}return h}},kp=function(d,h){var f=wu(d),p=h[f];switch(p){case Oe.H264_STREAM_TYPE:return"video";case Oe.ADTS_STREAM_TYPE:return"audio";case Oe.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Pp=function(d){var h=yn(d);if(!h)return null;var f=4+_n(d);if(f>=d.byteLength)return null;var p=null,v;return v=d[f+7],v&192&&(p={},p.pts=(d[f+9]&14)<<27|(d[f+10]&255)<<20|(d[f+11]&254)<<12|(d[f+12]&255)<<5|(d[f+13]&254)>>>3,p.pts*=4,p.pts+=(d[f+13]&6)>>>1,p.dts=p.pts,v&64&&(p.dts=(d[f+14]&14)<<27|(d[f+15]&255)<<20|(d[f+16]&254)<<12|(d[f+17]&255)<<5|(d[f+18]&254)>>>3,p.dts*=4,p.dts+=(d[f+18]&6)>>>1)),p},Ha=function(d){switch(d){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Ip=function(d){for(var h=4+_n(d),f=d.subarray(h),p=0,v=0,y=!1,E;v<f.byteLength-3;v++)if(f[v+2]===1){p=v+5;break}for(;p<f.byteLength;)switch(f[p]){case 0:if(f[p-1]!==0){p+=2;break}else if(f[p-2]!==0){p++;break}v+3!==p-2&&(E=Ha(f[v+3]&31),E==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0));do p++;while(f[p]!==1&&p<f.length);v=p-2,p+=3;break;case 1:if(f[p-1]!==0||f[p-2]!==0){p+=3;break}E=Ha(f[v+3]&31),E==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0),v=p-2,p+=3;break;default:p+=3;break}return f=f.subarray(v),p-=v,v=0,f&&f.byteLength>3&&(E=Ha(f[v+3]&31),E==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0)),y},Op={parseType:Ap,parsePat:Dp,parsePmt:wp,parsePayloadUnitStartIndicator:yn,parsePesType:kp,parsePesTime:Pp,videoPacketContainsKeyFrame:Ip},br=au.handleRollover,de={};de.ts=Op,de.aac=hn;var rr=se.ONE_SECOND_IN_TS,Ue=188,gt=71,Lp=function(d,h){for(var f=0,p=Ue,v,y;p<d.byteLength;){if(d[f]===gt&&d[p]===gt){switch(v=d.subarray(f,p),y=de.ts.parseType(v,h.pid),y){case"pat":h.pid=de.ts.parsePat(v);break;case"pmt":var E=de.ts.parsePmt(v);h.table=h.table||{},Object.keys(E).forEach(function(C){h.table[C]=E[C]});break}f+=Ue,p+=Ue;continue}f++,p++}},ku=function(d,h,f){for(var p=0,v=Ue,y,E,C,k,D,P=!1;v<=d.byteLength;){if(d[p]===gt&&(d[v]===gt||v===d.byteLength)){switch(y=d.subarray(p,v),E=de.ts.parseType(y,h.pid),E){case"pes":C=de.ts.parsePesType(y,h.table),k=de.ts.parsePayloadUnitStartIndicator(y),C==="audio"&&k&&(D=de.ts.parsePesTime(y),D&&(D.type="audio",f.audio.push(D),P=!0));break}if(P)break;p+=Ue,v+=Ue;continue}p++,v++}for(v=d.byteLength,p=v-Ue,P=!1;p>=0;){if(d[p]===gt&&(d[v]===gt||v===d.byteLength)){switch(y=d.subarray(p,v),E=de.ts.parseType(y,h.pid),E){case"pes":C=de.ts.parsePesType(y,h.table),k=de.ts.parsePayloadUnitStartIndicator(y),C==="audio"&&k&&(D=de.ts.parsePesTime(y),D&&(D.type="audio",f.audio.push(D),P=!0));break}if(P)break;p-=Ue,v-=Ue;continue}p--,v--}},Fp=function(d,h,f){for(var p=0,v=Ue,y,E,C,k,D,P,M,z,Y=!1,j={data:[],size:0};v<d.byteLength;){if(d[p]===gt&&d[v]===gt){switch(y=d.subarray(p,v),E=de.ts.parseType(y,h.pid),E){case"pes":if(C=de.ts.parsePesType(y,h.table),k=de.ts.parsePayloadUnitStartIndicator(y),C==="video"&&(k&&!Y&&(D=de.ts.parsePesTime(y),D&&(D.type="video",f.video.push(D),Y=!0)),!f.firstKeyFrame)){if(k&&j.size!==0){for(P=new Uint8Array(j.size),M=0;j.data.length;)z=j.data.shift(),P.set(z,M),M+=z.byteLength;if(de.ts.videoPacketContainsKeyFrame(P)){var Z=de.ts.parsePesTime(P);Z?(f.firstKeyFrame=Z,f.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}j.size=0}j.data.push(y),j.size+=y.byteLength}break}if(Y&&f.firstKeyFrame)break;p+=Ue,v+=Ue;continue}p++,v++}for(v=d.byteLength,p=v-Ue,Y=!1;p>=0;){if(d[p]===gt&&d[v]===gt){switch(y=d.subarray(p,v),E=de.ts.parseType(y,h.pid),E){case"pes":C=de.ts.parsePesType(y,h.table),k=de.ts.parsePayloadUnitStartIndicator(y),C==="video"&&k&&(D=de.ts.parsePesTime(y),D&&(D.type="video",f.video.push(D),Y=!0));break}if(Y)break;p-=Ue,v-=Ue;continue}p--,v--}},Rp=function(d,h){if(d.audio&&d.audio.length){var f=h;(typeof f>"u"||isNaN(f))&&(f=d.audio[0].dts),d.audio.forEach(function(y){y.dts=br(y.dts,f),y.pts=br(y.pts,f),y.dtsTime=y.dts/rr,y.ptsTime=y.pts/rr})}if(d.video&&d.video.length){var p=h;if((typeof p>"u"||isNaN(p))&&(p=d.video[0].dts),d.video.forEach(function(y){y.dts=br(y.dts,p),y.pts=br(y.pts,p),y.dtsTime=y.dts/rr,y.ptsTime=y.pts/rr}),d.firstKeyFrame){var v=d.firstKeyFrame;v.dts=br(v.dts,p),v.pts=br(v.pts,p),v.dtsTime=v.dts/rr,v.ptsTime=v.pts/rr}}},Mp=function(d){for(var h=!1,f=0,p=null,v=null,y=0,E=0,C;d.length-E>=3;){var k=de.aac.parseType(d,E);switch(k){case"timed-metadata":if(d.length-E<10){h=!0;break}if(y=de.aac.parseId3TagSize(d,E),y>d.length){h=!0;break}v===null&&(C=d.subarray(E,E+y),v=de.aac.parseAacTimestamp(C)),E+=y;break;case"audio":if(d.length-E<7){h=!0;break}if(y=de.aac.parseAdtsSize(d,E),y>d.length){h=!0;break}p===null&&(C=d.subarray(E,E+y),p=de.aac.parseSampleRate(C)),f++,E+=y;break;default:E++;break}if(h)return null}if(p===null||v===null)return null;var D=rr/p,P={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+f*1024*D,pts:v+f*1024*D}]};return P},Np=function(d){var h={pid:null,table:null},f={};Lp(d,h);for(var p in h.table)if(h.table.hasOwnProperty(p)){var v=h.table[p];switch(v){case Oe.H264_STREAM_TYPE:f.video=[],Fp(d,h,f),f.video.length===0&&delete f.video;break;case Oe.ADTS_STREAM_TYPE:f.audio=[],ku(d,h,f),f.audio.length===0&&delete f.audio;break}}return f},Bp=function(d,h){var f=de.aac.isLikelyAacData(d),p;return f?p=Mp(d):p=Np(d),!p||!p.audio&&!p.video?null:(Rp(p,h),p)},Up={inspect:Bp,parseAudioPes_:ku},Vp=function(d,h){h.on("data",function(f){var p=f.initSegment;f.initSegment={data:p.buffer,byteOffset:p.byteOffset,byteLength:p.byteLength};var v=f.data;f.data=v.buffer,d.postMessage({action:"data",segment:f,byteOffset:v.byteOffset,byteLength:v.byteLength},[f.data])}),h.on("done",function(f){d.postMessage({action:"done"})}),h.on("gopInfo",function(f){d.postMessage({action:"gopInfo",gopInfo:f})}),h.on("videoSegmentTimingInfo",function(f){var p={start:{decode:se.videoTsToSeconds(f.start.dts),presentation:se.videoTsToSeconds(f.start.pts)},end:{decode:se.videoTsToSeconds(f.end.dts),presentation:se.videoTsToSeconds(f.end.pts)},baseMediaDecodeTime:se.videoTsToSeconds(f.baseMediaDecodeTime)};f.prependedContentDuration&&(p.prependedContentDuration=se.videoTsToSeconds(f.prependedContentDuration)),d.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:p})}),h.on("audioSegmentTimingInfo",function(f){var p={start:{decode:se.videoTsToSeconds(f.start.dts),presentation:se.videoTsToSeconds(f.start.pts)},end:{decode:se.videoTsToSeconds(f.end.dts),presentation:se.videoTsToSeconds(f.end.pts)},baseMediaDecodeTime:se.videoTsToSeconds(f.baseMediaDecodeTime)};f.prependedContentDuration&&(p.prependedContentDuration=se.videoTsToSeconds(f.prependedContentDuration)),d.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:p})}),h.on("id3Frame",function(f){d.postMessage({action:"id3Frame",id3Frame:f})}),h.on("caption",function(f){d.postMessage({action:"caption",caption:f})}),h.on("trackinfo",function(f){d.postMessage({action:"trackinfo",trackInfo:f})}),h.on("audioTimingInfo",function(f){d.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:se.videoTsToSeconds(f.start),end:se.videoTsToSeconds(f.end)}})}),h.on("videoTimingInfo",function(f){d.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:se.videoTsToSeconds(f.start),end:se.videoTsToSeconds(f.end)}})}),h.on("log",function(f){d.postMessage({action:"log",log:f})})},Pu=function(){function T(h,f){this.options=f||{},this.self=h,this.init()}var d=T.prototype;return d.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new np.Transmuxer(this.options),Vp(this.self,this.transmuxer)},d.pushMp4Captions=function(f){this.captionParser||(this.captionParser=new Ep,this.captionParser.init());var p=new Uint8Array(f.data,f.byteOffset,f.byteLength),v=this.captionParser.parse(p,f.trackIds,f.timescales);this.self.postMessage({action:"mp4Captions",captions:v&&v.captions||[],logs:v&&v.logs||[],data:p.buffer},[p.buffer])},d.probeMp4StartTime=function(f){var p=f.timescales,v=f.data,y=Du.startTime(p,v);this.self.postMessage({action:"probeMp4StartTime",startTime:y,data:v},[v.buffer])},d.probeMp4Tracks=function(f){var p=f.data,v=Du.tracks(p);this.self.postMessage({action:"probeMp4Tracks",tracks:v,data:p},[p.buffer])},d.probeTs=function(f){var p=f.data,v=f.baseStartTime,y=typeof v=="number"&&!isNaN(v)?v*se.ONE_SECOND_IN_TS:void 0,E=Up.inspect(p,y),C=null;E&&(C={hasVideo:E.video&&E.video.length===2||!1,hasAudio:E.audio&&E.audio.length===2||!1},C.hasVideo&&(C.videoStart=E.video[0].ptsTime),C.hasAudio&&(C.audioStart=E.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:C,data:p},[p.buffer])},d.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},d.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},d.push=function(f){var p=new Uint8Array(f.data,f.byteOffset,f.byteLength);this.transmuxer.push(p)},d.reset=function(){this.transmuxer.reset()},d.setTimestampOffset=function(f){var p=f.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(se.secondsToVideoTs(p)))},d.setAudioAppendStart=function(f){this.transmuxer.setAudioAppendStart(Math.ceil(se.secondsToVideoTs(f.appendStart)))},d.setRemux=function(f){this.transmuxer.setRemux(f.remux)},d.flush=function(f){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},d.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},d.alignGopsWith=function(f){this.transmuxer.alignGopsWith(f.gopsToAlignWith.slice())},T}();self.onmessage=function(T){if(T.data.action==="init"&&T.data.options){this.messageHandlers=new Pu(self,T.data.options);return}this.messageHandlers||(this.messageHandlers=new Pu(self)),T.data&&T.data.action&&T.data.action!=="init"&&this.messageHandlers[T.data.action]&&this.messageHandlers[T.data.action](T.data)}})),v_=jf(g_),y_=function(t,r,n){var e=t.data.segment,i=e.type,s=e.initSegment,o=e.captions,u=e.captionStreams,l=e.metadata,c=e.videoFrameDtsTime,g=e.videoFramePtsTime;r.buffer.push({captions:o,captionStreams:u,metadata:l});var m=t.data.segment.boxes||{data:t.data.segment.data},_={type:i,data:new Uint8Array(m.data,m.data.byteOffset,m.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};typeof c<"u"&&(_.videoFrameDtsTime=c),typeof g<"u"&&(_.videoFramePtsTime=g),n(_)},__=function(t){var r=t.transmuxedData,n=t.callback;r.buffer=[],n(r)},T_=function(t,r){r.gopInfo=t.data.gopInfo},zf=function(t){var r=t.transmuxer,n=t.bytes,e=t.audioAppendStart,i=t.gopsToAlignWith,s=t.remux,o=t.onData,u=t.onTrackInfo,l=t.onAudioTimingInfo,c=t.onVideoTimingInfo,g=t.onVideoSegmentTimingInfo,m=t.onAudioSegmentTimingInfo,_=t.onId3,b=t.onCaptions,S=t.onDone,x=t.onEndedTimeline,w=t.onTransmuxerLog,O=t.isEndOfTimeline,H={buffer:[]},L=O,F=function(U){r.currentTransmux===t&&(U.data.action==="data"&&y_(U,H,o),U.data.action==="trackinfo"&&u(U.data.trackInfo),U.data.action==="gopInfo"&&T_(U,H),U.data.action==="audioTimingInfo"&&l(U.data.audioTimingInfo),U.data.action==="videoTimingInfo"&&c(U.data.videoTimingInfo),U.data.action==="videoSegmentTimingInfo"&&g(U.data.videoSegmentTimingInfo),U.data.action==="audioSegmentTimingInfo"&&m(U.data.audioSegmentTimingInfo),U.data.action==="id3Frame"&&_([U.data.id3Frame],U.data.id3Frame.dispatchType),U.data.action==="caption"&&b(U.data.caption),U.data.action==="endedtimeline"&&(L=!1,x()),U.data.action==="log"&&w(U.data.log),U.data.type==="transmuxed"&&(L||(r.onmessage=null,__({transmuxedData:H,callback:S}),$f(r))))};if(r.onmessage=F,e&&r.postMessage({action:"setAudioAppendStart",appendStart:e}),Array.isArray(i)&&r.postMessage({action:"alignGopsWith",gopsToAlignWith:i}),typeof s<"u"&&r.postMessage({action:"setRemux",remux:s}),n.byteLength){var q=n instanceof ArrayBuffer?n:n.buffer,B=n instanceof ArrayBuffer?0:n.byteOffset;r.postMessage({action:"push",data:q,byteOffset:B,byteLength:n.byteLength},[q])}O&&r.postMessage({action:"endTimeline"}),r.postMessage({action:"flush"})},$f=function(t){t.currentTransmux=null,t.transmuxQueue.length&&(t.currentTransmux=t.transmuxQueue.shift(),typeof t.currentTransmux=="function"?t.currentTransmux():zf(t.currentTransmux))},Xl=function(t,r){t.postMessage({action:r}),$f(t)},Kf=function(t,r){if(!r.currentTransmux){r.currentTransmux=t,Xl(r,t);return}r.transmuxQueue.push(Xl.bind(null,r,t))},b_=function(t){Kf("reset",t)},x_=function(t){Kf("endTimeline",t)},Xf=function(t){if(!t.transmuxer.currentTransmux){t.transmuxer.currentTransmux=t,zf(t);return}t.transmuxer.transmuxQueue.push(t)},S_=function(t){var r=new v_;r.currentTransmux=null,r.transmuxQueue=[];var n=r.terminate;return r.terminate=function(){return r.currentTransmux=null,r.transmuxQueue.length=0,n.call(r)},r.postMessage({action:"init",options:t}),r},fs={reset:b_,endTimeline:x_,transmux:Xf,createTransmuxer:S_},ra=function(t){var r=t.transmuxer,n=t.endAction||t.action,e=t.callback,i=ot({},t,{endAction:null,transmuxer:null,callback:null}),s=function l(c){c.data.action===n&&(r.removeEventListener("message",l),c.data.data&&(c.data.data=new Uint8Array(c.data.data,t.byteOffset||0,t.byteLength||c.data.data.byteLength),t.data&&(t.data=c.data.data)),e(c.data))};if(r.addEventListener("message",s),t.data){var o=t.data instanceof ArrayBuffer;i.byteOffset=o?0:t.data.byteOffset,i.byteLength=t.data.byteLength;var u=[o?t.data:t.data.buffer];r.postMessage(i,u)}else r.postMessage(i)},bt={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Vs=function(t){t.forEach(function(r){r.abort()})},E_=function(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}},C_=function(t){var r=t.target,n=Date.now()-r.requestTime,e={bandwidth:1/0,bytesReceived:0,roundTripTime:n||0};return e.bytesReceived=t.loaded,e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3),e},Ko=function(t,r){return r.timedout?{status:r.status,message:"HLS request timed-out at URL: "+r.uri,code:bt.TIMEOUT,xhr:r}:r.aborted?{status:r.status,message:"HLS request aborted at URL: "+r.uri,code:bt.ABORTED,xhr:r}:t?{status:r.status,message:"HLS request errored at URL: "+r.uri,code:bt.FAILURE,xhr:r}:r.responseType==="arraybuffer"&&r.response.byteLength===0?{status:r.status,message:"Empty HLS response at URL: "+r.uri,code:bt.FAILURE,xhr:r}:null},Yl=function(t,r,n){return function(e,i){var s=i.response,o=Ko(e,i);if(o)return n(o,t);if(s.byteLength!==16)return n({status:i.status,message:"Invalid HLS key at URL: "+i.uri,code:bt.FAILURE,xhr:i},t);for(var u=new DataView(s),l=new Uint32Array([u.getUint32(0),u.getUint32(4),u.getUint32(8),u.getUint32(12)]),c=0;c<r.length;c++)r[c].bytes=l;return n(null,t)}},Yf=function(t,r){var n=uo(t.map.bytes);if(n!=="mp4"){var e=t.map.resolvedUri||t.map.uri;return r({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+e,code:bt.FAILURE})}ra({action:"probeMp4Tracks",data:t.map.bytes,transmuxer:t.transmuxer,callback:function(s){var o=s.tracks,u=s.data;return t.map.bytes=u,o.forEach(function(l){t.map.tracks=t.map.tracks||{},!t.map.tracks[l.type]&&(t.map.tracks[l.type]=l,typeof l.id=="number"&&l.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[l.id]=l.timescale))}),r(null)}})},A_=function(t){var r=t.segment,n=t.finishProcessingFn;return function(e,i){var s=Ko(e,i);if(s)return n(s,r);var o=new Uint8Array(i.response);if(r.map.key)return r.map.encryptedBytes=o,n(null,r);r.map.bytes=o,Yf(r,function(u){if(u)return u.xhr=i,u.status=i.status,n(u,r);n(null,r)})}},D_=function(t){var r=t.segment,n=t.finishProcessingFn,e=t.responseType;return function(i,s){var o=Ko(i,s);if(o)return n(o,r);var u=e==="arraybuffer"||!s.responseText?s.response:p_(s.responseText.substring(r.lastReachedChar||0));return r.stats=E_(s),r.key?r.encryptedBytes=new Uint8Array(u):r.bytes=new Uint8Array(u),n(null,r)}},w_=function(t){var r=t.segment,n=t.bytes,e=t.trackInfoFn,i=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,u=t.id3Fn,l=t.captionsFn,c=t.isEndOfTimeline,g=t.endedTimelineFn,m=t.dataFn,_=t.doneFn,b=t.onTransmuxerLog,S=r.map&&r.map.tracks||{},x=Boolean(S.audio&&S.video),w=i.bind(null,r,"audio","start"),O=i.bind(null,r,"audio","end"),H=i.bind(null,r,"video","start"),L=i.bind(null,r,"video","end"),F=function(){return Xf({bytes:n,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:x,onData:function(R){R.type=R.type==="combined"?"video":R.type,m(r,R)},onTrackInfo:function(R){e&&(x&&(R.isMuxed=!0),e(r,R))},onAudioTimingInfo:function(R){w&&typeof R.start<"u"&&(w(R.start),w=null),O&&typeof R.end<"u"&&O(R.end)},onVideoTimingInfo:function(R){H&&typeof R.start<"u"&&(H(R.start),H=null),L&&typeof R.end<"u"&&L(R.end)},onVideoSegmentTimingInfo:function(R){s(R)},onAudioSegmentTimingInfo:function(R){o(R)},onId3:function(R,U){u(r,R,U)},onCaptions:function(R){l(r,[R])},isEndOfTimeline:c,onEndedTimeline:function(){g()},onTransmuxerLog:b,onDone:function(R){!_||(R.type=R.type==="combined"?"video":R.type,_(null,r,R))}})};ra({action:"probeTs",transmuxer:r.transmuxer,data:n,baseStartTime:r.baseStartTime,callback:function(B){r.bytes=n=B.data;var R=B.result;R&&(e(r,{hasAudio:R.hasAudio,hasVideo:R.hasVideo,isMuxed:x}),e=null,R.hasAudio&&!x&&w(R.audioStart),R.hasVideo&&H(R.videoStart),w=null,H=null),F()}})},Qf=function(t){var r=t.segment,n=t.bytes,e=t.trackInfoFn,i=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,u=t.id3Fn,l=t.captionsFn,c=t.isEndOfTimeline,g=t.endedTimelineFn,m=t.dataFn,_=t.doneFn,b=t.onTransmuxerLog,S=new Uint8Array(n);if($v(S)){r.isFmp4=!0;var x=r.map.tracks,w={isFmp4:!0,hasVideo:!!x.video,hasAudio:!!x.audio};x.audio&&x.audio.codec&&x.audio.codec!=="enca"&&(w.audioCodec=x.audio.codec),x.video&&x.video.codec&&x.video.codec!=="encv"&&(w.videoCodec=x.video.codec),x.video&&x.audio&&(w.isMuxed=!0),e(r,w);var O=function(L){m(r,{data:S,type:w.hasAudio&&!w.isMuxed?"audio":"video"}),L&&L.length&&l(r,L),_(null,r,{})};ra({action:"probeMp4StartTime",timescales:r.map.timescales,data:S,transmuxer:r.transmuxer,callback:function(L){var F=L.data,q=L.startTime;if(n=F.buffer,r.bytes=S=F,w.hasAudio&&!w.isMuxed&&i(r,"audio","start",q),w.hasVideo&&i(r,"video","start",q),!x.video||!F.byteLength||!r.transmuxer){O();return}ra({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:S,timescales:r.map.timescales,trackIds:[x.video.id],callback:function(R){n=R.data.buffer,r.bytes=S=R.data,R.logs.forEach(function(U){b(I.mergeOptions(U,{stream:"mp4CaptionParser"}))}),O(R.captions)}})}});return}if(!r.transmuxer){_(null,r,{});return}if(typeof r.container>"u"&&(r.container=uo(S)),r.container!=="ts"&&r.container!=="aac"){e(r,{hasAudio:!1,hasVideo:!1}),_(null,r,{});return}w_({segment:r,bytes:n,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:g,dataFn:m,doneFn:_,onTransmuxerLog:b})},Jf=function(t,r){var n=t.id,e=t.key,i=t.encryptedBytes,s=t.decryptionWorker,o=function l(c){if(c.data.source===n){s.removeEventListener("message",l);var g=c.data.decrypted;r(new Uint8Array(g.bytes,g.byteOffset,g.byteLength))}};s.addEventListener("message",o);var u;e.bytes.slice?u=e.bytes.slice():u=new Uint32Array(Array.prototype.slice.call(e.bytes)),s.postMessage(Nf({source:n,encrypted:i,key:u,iv:e.iv}),[i.buffer,u.buffer])},k_=function(t){var r=t.decryptionWorker,n=t.segment,e=t.trackInfoFn,i=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,u=t.id3Fn,l=t.captionsFn,c=t.isEndOfTimeline,g=t.endedTimelineFn,m=t.dataFn,_=t.doneFn,b=t.onTransmuxerLog;Jf({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:r},function(S){n.bytes=S,Qf({segment:n,bytes:n.bytes,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:g,dataFn:m,doneFn:_,onTransmuxerLog:b})})},P_=function(t){var r=t.activeXhrs,n=t.decryptionWorker,e=t.trackInfoFn,i=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,u=t.id3Fn,l=t.captionsFn,c=t.isEndOfTimeline,g=t.endedTimelineFn,m=t.dataFn,_=t.doneFn,b=t.onTransmuxerLog,S=0,x=!1;return function(w,O){if(!x){if(w)return x=!0,Vs(r),_(w,O);if(S+=1,S===r.length){var H=function(){if(O.encryptedBytes)return k_({decryptionWorker:n,segment:O,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:g,dataFn:m,doneFn:_,onTransmuxerLog:b});Qf({segment:O,bytes:O.bytes,trackInfoFn:e,timingInfoFn:i,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:o,id3Fn:u,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:g,dataFn:m,doneFn:_,onTransmuxerLog:b})};if(O.endOfAllRequests=Date.now(),O.map&&O.map.encryptedBytes&&!O.map.bytes)return Jf({decryptionWorker:n,id:O.requestId+"-init",encryptedBytes:O.map.encryptedBytes,key:O.map.key},function(L){O.map.bytes=L,Yf(O,function(F){if(F)return Vs(r),_(F,O);H()})});H()}}}},I_=function(t){var r=t.loadendState,n=t.abortFn;return function(e){var i=e.target;i.aborted&&n&&!r.calledAbortFn&&(n(),r.calledAbortFn=!0)}},O_=function(t){var r=t.segment,n=t.progressFn;return t.trackInfoFn,t.timingInfoFn,t.videoSegmentTimingInfoFn,t.audioSegmentTimingInfoFn,t.id3Fn,t.captionsFn,t.isEndOfTimeline,t.endedTimelineFn,t.dataFn,function(e){var i=e.target;if(!i.aborted)return r.stats=I.mergeOptions(r.stats,C_(e)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),n(e,r)}},L_=function(t){var r=t.xhr,n=t.xhrOptions,e=t.decryptionWorker,i=t.segment,s=t.abortFn,o=t.progressFn,u=t.trackInfoFn,l=t.timingInfoFn,c=t.videoSegmentTimingInfoFn,g=t.audioSegmentTimingInfoFn,m=t.id3Fn,_=t.captionsFn,b=t.isEndOfTimeline,S=t.endedTimelineFn,x=t.dataFn,w=t.doneFn,O=t.onTransmuxerLog,H=[],L=P_({activeXhrs:H,decryptionWorker:e,trackInfoFn:u,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:g,id3Fn:m,captionsFn:_,isEndOfTimeline:b,endedTimelineFn:S,dataFn:x,doneFn:w,onTransmuxerLog:O});if(i.key&&!i.key.bytes){var F=[i.key];i.map&&!i.map.bytes&&i.map.key&&i.map.key.resolvedUri===i.key.resolvedUri&&F.push(i.map.key);var q=I.mergeOptions(n,{uri:i.key.resolvedUri,responseType:"arraybuffer"}),B=Yl(i,F,L),R=r(q,B);H.push(R)}if(i.map&&!i.map.bytes){var U=i.map.key&&(!i.key||i.key.resolvedUri!==i.map.key.resolvedUri);if(U){var N=I.mergeOptions(n,{uri:i.map.key.resolvedUri,responseType:"arraybuffer"}),X=Yl(i,[i.map.key],L),$=r(N,X);H.push($)}var J=I.mergeOptions(n,{uri:i.map.resolvedUri,responseType:"arraybuffer",headers:Bs(i.map)}),oe=A_({segment:i,finishProcessingFn:L}),fe=r(J,oe);H.push(fe)}var re=I.mergeOptions(n,{uri:i.part&&i.part.resolvedUri||i.resolvedUri,responseType:"arraybuffer",headers:Bs(i)}),ae=D_({segment:i,finishProcessingFn:L,responseType:re.responseType}),pe=r(re,ae);pe.addEventListener("progress",O_({segment:i,progressFn:o,trackInfoFn:u,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:g,id3Fn:m,captionsFn:_,isEndOfTimeline:b,endedTimelineFn:S,dataFn:x})),H.push(pe);var Re={};return H.forEach(function(ue){ue.addEventListener("loadend",I_({loadendState:Re,abortFn:s}))}),function(){return Vs(H)}},F_=pt("CodecUtils"),R_=function(t){var r=t.attributes||{};if(r.CODECS)return vt(r.CODECS)},Zf=function(t,r){var n=r.attributes||{};return t&&t.mediaGroups&&t.mediaGroups.AUDIO&&n.AUDIO&&t.mediaGroups.AUDIO[n.AUDIO]},M_=function(t,r){if(!Zf(t,r))return!0;var n=r.attributes||{},e=t.mediaGroups.AUDIO[n.AUDIO];for(var i in e)if(!e[i].uri&&!e[i].playlists)return!0;return!1},ia=function(t){var r={};return t.forEach(function(n){var e=n.mediaType,i=n.type,s=n.details;r[e]=r[e]||[],r[e].push(yd(""+i+s))}),Object.keys(r).forEach(function(n){if(r[n].length>1){F_("multiple "+n+" codecs found as attributes: "+r[n].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),r[n]=null;return}r[n]=r[n][0]}),r},Ql=function(t){var r=0;return t.audio&&r++,t.video&&r++,r},ki=function(t,r){var n=r.attributes||{},e=ia(R_(r)||[]);if(Zf(t,r)&&!e.audio&&!M_(t,r)){var i=ia(Jm(t,n.AUDIO)||[]);i.audio&&(e.audio=i.audio)}return e},kn=pt("PlaylistSelector"),Jl=function(t){if(!(!t||!t.playlist)){var r=t.playlist;return JSON.stringify({id:r.id,bandwidth:t.bandwidth,width:t.width,height:t.height,codecs:r.attributes&&r.attributes.CODECS||""})}},na=function(t,r){if(!t)return"";var n=A.getComputedStyle(t);return n?n[r]:""},Mr=function(t,r){var n=t.slice();t.sort(function(e,i){var s=r(e,i);return s===0?n.indexOf(e)-n.indexOf(i):s})},Xo=function(t,r){var n,e;return t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||A.Number.MAX_VALUE,r.attributes.BANDWIDTH&&(e=r.attributes.BANDWIDTH),e=e||A.Number.MAX_VALUE,n-e},N_=function(t,r){var n,e;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||A.Number.MAX_VALUE,r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(e=r.attributes.RESOLUTION.width),e=e||A.Number.MAX_VALUE,n===e&&t.attributes.BANDWIDTH&&r.attributes.BANDWIDTH?t.attributes.BANDWIDTH-r.attributes.BANDWIDTH:n-e},eh=function(t,r,n,e,i,s){if(!!t){var o={bandwidth:r,width:n,height:e,limitRenditionByPlayerDimensions:i},u=t.playlists;Ye.isAudioOnly(t)&&(u=s.getAudioTrackPlaylists_(),o.audioOnly=!0);var l=u.map(function(N){var X,$=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.width,J=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.height;return X=N.attributes&&N.attributes.BANDWIDTH,X=X||A.Number.MAX_VALUE,{bandwidth:X,width:$,height:J,playlist:N}});Mr(l,function(N,X){return N.bandwidth-X.bandwidth}),l=l.filter(function(N){return!Ye.isIncompatible(N.playlist)});var c=l.filter(function(N){return Ye.isEnabled(N.playlist)});c.length||(c=l.filter(function(N){return!Ye.isDisabled(N.playlist)}));var g=c.filter(function(N){return N.bandwidth*we.BANDWIDTH_VARIANCE<r}),m=g[g.length-1],_=g.filter(function(N){return N.bandwidth===m.bandwidth})[0];if(i===!1){var b=_||c[0]||l[0];if(b&&b.playlist){var S="sortedPlaylistReps";return _&&(S="bandwidthBestRep"),c[0]&&(S="enabledPlaylistReps"),kn("choosing "+Jl(b)+" using "+S+" with options",o),b.playlist}return kn("could not choose a playlist with options",o),null}var x=g.filter(function(N){return N.width&&N.height});Mr(x,function(N,X){return N.width-X.width});var w=x.filter(function(N){return N.width===n&&N.height===e});m=w[w.length-1];var O=w.filter(function(N){return N.bandwidth===m.bandwidth})[0],H,L,F;O||(H=x.filter(function(N){return N.width>n||N.height>e}),L=H.filter(function(N){return N.width===H[0].width&&N.height===H[0].height}),m=L[L.length-1],F=L.filter(function(N){return N.bandwidth===m.bandwidth})[0]);var q;if(s.experimentalLeastPixelDiffSelector){var B=x.map(function(N){return N.pixelDiff=Math.abs(N.width-n)+Math.abs(N.height-e),N});Mr(B,function(N,X){return N.pixelDiff===X.pixelDiff?X.bandwidth-N.bandwidth:N.pixelDiff-X.pixelDiff}),q=B[0]}var R=q||F||O||_||c[0]||l[0];if(R&&R.playlist){var U="sortedPlaylistReps";return q?U="leastPixelDiffRep":F?U="resolutionPlusOneRep":O?U="resolutionBestRep":_?U="bandwidthBestRep":c[0]&&(U="enabledPlaylistReps"),kn("choosing "+Jl(R)+" using "+U+" with options",o),R.playlist}return kn("could not choose a playlist with options",o),null}},Zl=function(){var t=this.useDevicePixelRatio&&A.devicePixelRatio||1;return eh(this.playlists.master,this.systemBandwidth,parseInt(na(this.tech_.el(),"width"),10)*t,parseInt(na(this.tech_.el(),"height"),10)*t,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},B_=function(t){var r=-1,n=-1;if(t<0||t>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var e=this.useDevicePixelRatio&&A.devicePixelRatio||1;return r<0&&(r=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(r=t*this.systemBandwidth+(1-t)*r,n=this.systemBandwidth),eh(this.playlists.master,r,parseInt(na(this.tech_.el(),"width"),10)*e,parseInt(na(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},U_=function(t){var r=t.master,n=t.currentTime,e=t.bandwidth,i=t.duration,s=t.segmentDuration,o=t.timeUntilRebuffer,u=t.currentTimeline,l=t.syncController,c=r.playlists.filter(function(S){return!Ye.isIncompatible(S)}),g=c.filter(Ye.isEnabled);g.length||(g=c.filter(function(S){return!Ye.isDisabled(S)}));var m=g.filter(Ye.hasAttribute.bind(null,"BANDWIDTH")),_=m.map(function(S){var x=l.getSyncPoint(S,i,u,n),w=x?1:2,O=Ye.estimateSegmentRequestTime(s,e,S),H=O*w-o;return{playlist:S,rebufferingImpact:H}}),b=_.filter(function(S){return S.rebufferingImpact<=0});return Mr(b,function(S,x){return Xo(x.playlist,S.playlist)}),b.length?b[0]:(Mr(_,function(S,x){return S.rebufferingImpact-x.rebufferingImpact}),_[0]||null)},V_=function(){var t=this,r=this.playlists.master.playlists.filter(Ye.isEnabled);Mr(r,function(e,i){return Xo(e,i)});var n=r.filter(function(e){return!!ki(t.playlists.master,e).video});return n[0]||null},H_=function(t){var r=0,n;return t.bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach(function(e){n.set(e,r),r+=e.byteLength})),n},q_=function(t,r,n){if(!t[n]){r.trigger({type:"usage",name:"vhs-608"}),r.trigger({type:"usage",name:"hls-608"});var e=n;/^cc708_/.test(n)&&(e="SERVICE"+n.split("_")[1]);var i=r.textTracks().getTrackById(e);if(i)t[n]=i;else{var s=r.options_.vhs&&r.options_.vhs.captionServices||{},o=n,u=n,l=!1,c=s[e];c&&(o=c.label,u=c.language,l=c.default),t[n]=r.addRemoteTextTrack({kind:"captions",id:e,default:l,label:o,language:u},!1).track}}},j_=function(t){var r=t.inbandTextTracks,n=t.captionArray,e=t.timestampOffset;if(!!n){var i=A.WebKitDataCue||A.VTTCue;n.forEach(function(s){var o=s.stream;r[o].addCue(new i(s.startTime+e,s.endTime+e,s.text))})}},G_=function(t){Object.defineProperties(t.frame,{id:{get:function(){return I.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return I.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return I.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})},W_=function(t){var r=t.inbandTextTracks,n=t.metadataArray,e=t.timestampOffset,i=t.videoDuration;if(!!n){var s=A.WebKitDataCue||A.VTTCue,o=r.metadataTrack_;if(!!o&&(n.forEach(function(_){var b=_.cueTime+e;typeof b!="number"||A.isNaN(b)||b<0||!(b<1/0)||_.frames.forEach(function(S){var x=new s(b,b,S.value||S.url||S.data||"");x.frame=S,x.value=S,G_(x),o.addCue(x)})}),!(!o.cues||!o.cues.length))){for(var u=o.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var g=l.reduce(function(_,b){var S=_[b.startTime]||[];return S.push(b),_[b.startTime]=S,_},{}),m=Object.keys(g).sort(function(_,b){return Number(_)-Number(b)});m.forEach(function(_,b){var S=g[_],x=Number(m[b+1])||i;S.forEach(function(w){w.endTime=x})})}}},z_=function(t,r,n){t.metadataTrack_||(t.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,t.metadataTrack_.inBandMetadataTrackDispatchType=r)},Ei=function(t,r,n){var e,i;if(!!n&&!!n.cues)for(e=n.cues.length;e--;)i=n.cues[e],i.startTime>=t&&i.endTime<=r&&n.removeCue(i)},$_=function(t){var r=t.cues;if(!!r)for(var n=0;n<r.length;n++){for(var e=[],i=0,s=0;s<r.length;s++)r[n].startTime===r[s].startTime&&r[n].endTime===r[s].endTime&&r[n].text===r[s].text&&(i++,i>1&&e.push(r[s]));e.length&&e.forEach(function(o){return t.removeCue(o)})}},K_=function(t,r,n){if(typeof r>"u"||r===null||!t.length)return[];var e=Math.ceil((r-n+3)*jn.ONE_SECOND_IN_TS),i;for(i=0;i<t.length&&!(t[i].pts>e);i++);return t.slice(i)},X_=function(t,r,n){if(!r.length)return t;if(n)return r.slice();var e=r[0].pts,i=0;for(i;i<t.length&&!(t[i].pts>=e);i++);return t.slice(0,i).concat(r)},Y_=function(t,r,n,e){for(var i=Math.ceil((r-e)*jn.ONE_SECOND_IN_TS),s=Math.ceil((n-e)*jn.ONE_SECOND_IN_TS),o=t.slice(),u=t.length;u--&&!(t[u].pts<=s););if(u===-1)return o;for(var l=u+1;l--&&!(t[l].pts<=i););return l=Math.max(l,0),o.splice(l,u-l+1),o},Q_=function(t,r){if(!t&&!r||!t&&r||t&&!r)return!1;if(t===r)return!0;var n=Object.keys(t).sort(),e=Object.keys(r).sort();if(n.length!==e.length)return!1;for(var i=0;i<n.length;i++){var s=n[i];if(s!==e[i]||t[s]!==r[s])return!1}return!0},th=22,J_=function(t,r,n){r=r||[];for(var e=[],i=0,s=0;s<r.length;s++){var o=r[s];if(t===o.timeline&&(e.push(s),i+=o.duration,i>n))return s}return e.length===0?0:e[e.length-1]},yi=1,Z_=500,ed=function(t){return typeof t=="number"&&isFinite(t)},Pn=1/60,eT=function(t,r,n){return t!=="main"||!r||!n?null:!n.hasAudio&&!n.hasVideo?"Neither audio nor video found in segment.":r.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!r.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null},tT=function(t,r,n){var e=r-we.BACK_BUFFER_LENGTH;t.length&&(e=Math.max(e,t.start(0)));var i=r-n;return Math.min(i,e)},kr=function(t){var r=t.startOfSegment,n=t.duration,e=t.segment,i=t.part,s=t.playlist,o=s.mediaSequence,u=s.id,l=s.segments,c=l===void 0?[]:l,g=t.mediaIndex,m=t.partIndex,_=t.timeline,b=c.length-1,S="mediaIndex/partIndex increment";t.getMediaInfoForTime?S="getMediaInfoForTime ("+t.getMediaInfoForTime+")":t.isSyncRequest&&(S="getSyncSegmentCandidate (isSyncRequest)"),t.independent&&(S+=" with independent "+t.independent);var x=typeof m=="number",w=t.segment.uri?"segment":"pre-segment",O=x?Sf({preloadSegment:e})-1:0;return w+" ["+(o+g)+"/"+(o+b)+"]"+(x?" part ["+m+"/"+O+"]":"")+(" segment start/end ["+e.start+" => "+e.end+"]")+(x?" part start/end ["+i.start+" => "+i.end+"]":"")+(" startOfSegment ["+r+"]")+(" duration ["+n+"]")+(" timeline ["+_+"]")+(" selected by ["+S+"]")+(" playlist ["+u+"]")},td=function(t){return t+"TimingInfo"},rT=function(t){var r=t.segmentTimeline,n=t.currentTimeline,e=t.startOfSegment,i=t.buffered,s=t.overrideCheck;return!s&&r===n?null:r<n?e:i.length?i.end(i.length-1):e},rd=function(t){var r=t.timelineChangeController,n=t.currentTimeline,e=t.segmentTimeline,i=t.loaderType,s=t.audioDisabled;if(n===e)return!1;if(i==="audio"){var o=r.lastTimelineChange({type:"main"});return!o||o.to!==e}if(i==="main"&&s){var u=r.pendingTimelineChange({type:"audio"});return!(u&&u.to===e)}return!1},iT=function(t){var r=0;return["video","audio"].forEach(function(n){var e=t[n+"TimingInfo"];if(!!e){var i=e.start,s=e.end,o;typeof i=="bigint"||typeof s=="bigint"?o=A.BigInt(s)-A.BigInt(i):typeof i=="number"&&typeof s=="number"&&(o=s-i),typeof o<"u"&&o>r&&(r=o)}}),typeof r=="bigint"&&r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r},id=function(t){var r=t.segmentDuration,n=t.maxDuration;return r?Math.round(r)>n+Yt:!1},nT=function(t,r){if(r!=="hls")return null;var n=iT({audioTimingInfo:t.audioTimingInfo,videoTimingInfo:t.videoTimingInfo});if(!n)return null;var e=t.playlist.targetDuration,i=id({segmentDuration:n,maxDuration:e*2}),s=id({segmentDuration:n,maxDuration:e}),o="Segment with index "+t.mediaIndex+" "+("from playlist "+t.playlist.id+" ")+("has a duration of "+n+" ")+("when the reported duration is "+t.duration+" ")+("and the target duration is "+e+". ")+"For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return i||s?{severity:i?"warn":"info",message:o}:null},Hs=function(a){W(t,a);function t(n,e){var i;if(i=a.call(this)||this,!n)throw new TypeError("Initialization settings are required");if(typeof n.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!n.mediaSource)throw new TypeError("No MediaSource specified");return i.bandwidth=n.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.partIndex=null,i.hasPlayed_=n.hasPlayed,i.currentTime_=n.currentTime,i.seekable_=n.seekable,i.seeking_=n.seeking,i.duration_=n.duration,i.mediaSource_=n.mediaSource,i.vhs_=n.vhs,i.loaderType_=n.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=n.segmentMetadataTrack,i.goalBufferLength_=n.goalBufferLength,i.sourceType_=n.sourceType,i.sourceUpdater_=n.sourceUpdater,i.inbandTextTracks_=n.inbandTextTracks,i.state_="INIT",i.timelineChangeController_=n.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.parse708captions_=n.parse708captions,i.useDtsForTimestampOffset_=n.useDtsForTimestampOffset,i.captionServices_=n.captionServices,i.experimentalExactManifestTimings=n.experimentalExactManifestTimings,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=I.browser.IE_VERSION>=11,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=n.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=n.decrypter,i.syncController_=n.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",function(){i.isEndOfStream_()||(i.ended_=!1)}),i.fetchAtBuffer_=!1,i.logger_=pt("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(ee(i),"state",{get:function(){return this.state_},set:function(o){o!==this.state_&&(this.logger_(this.state_+" -> "+o),this.state_=o,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i.loaderType_==="main"&&i.timelineChangeController_.on("pendingtimelinechange",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i.loaderType_==="audio"&&i.timelineChangeController_.on("timelinechange",function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i}var r=t.prototype;return r.createTransmuxer_=function(){return fs.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},r.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},r.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&A.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},r.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},r.abort=function(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()},r.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,A.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},r.checkForAbort_=function(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e},r.error=function(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},r.endOfStream=function(){this.ended_=!0,this.transmuxer_&&fs.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},r.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return I.createTimeRanges();if(this.loaderType_==="main"){var i=e.hasAudio,s=e.hasVideo,o=e.isMuxed;if(s&&i&&!this.audioDisabled_&&!o)return this.sourceUpdater_.buffered();if(s)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},r.initSegmentForMap=function(e,i){if(i===void 0&&(i=!1),!e)return null;var s=ta(e),o=this.initSegments_[s];return i&&!o&&e.bytes&&(this.initSegments_[s]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e},r.segmentKey=function(e,i){if(i===void 0&&(i=!1),!e)return null;var s=Bf(e),o=this.keyCache_[s];this.cacheEncryptionKeys_&&i&&!o&&e.bytes&&(this.keyCache_[s]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});var u={resolvedUri:(o||e).resolvedUri};return o&&(u.bytes=o.bytes),u},r.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},r.load=function(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}},r.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},r.playlist=function(e,i){if(i===void 0&&(i={}),!!e){var s=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));var u=null;if(s&&(s.id?u=s.id:s.uri&&(u=s.uri)),this.logger_("playlist update ["+u+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!s||s.uri!==e.uri){this.mediaIndex!==null&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}var l=e.mediaSequence-s.mediaSequence;if(this.logger_("live window shift ["+l+"]"),this.mediaIndex!==null)if(this.mediaIndex-=l,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var c=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!c.parts||!c.parts.length||!c.parts[this.partIndex])){var g=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=g}}o&&(o.mediaIndex-=l,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(s,e)}},r.pause=function(){this.checkBufferTimeout_&&(A.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},r.paused=function(){return this.checkBufferTimeout_===null},r.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},r.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},r.resyncLoader=function(){this.transmuxer_&&fs.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},r.remove=function(e,i,s,o){if(s===void 0&&(s=function(){}),o===void 0&&(o=!1),i===1/0&&(i=this.duration_()),i<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}var u=1,l=function(){u--,u===0&&s()};(o||!this.audioDisabled_)&&(u++,this.sourceUpdater_.removeAudio(e,i,l)),(o||this.loaderType_==="main")&&(this.gopBuffer_=Y_(this.gopBuffer_,e,i,this.timeMapping_),u++,this.sourceUpdater_.removeVideo(e,i,l));for(var c in this.inbandTextTracks_)Ei(e,i,this.inbandTextTracks_[c]);Ei(e,i,this.segmentMetadataTrack_),l()},r.monitorBuffer_=function(){this.checkBufferTimeout_&&A.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=A.setTimeout(this.monitorBufferTick_.bind(this),1)},r.monitorBufferTick_=function(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&A.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=A.setTimeout(this.monitorBufferTick_.bind(this),Z_)},r.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();!e||(typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},r.isEndOfStream_=function(e,i,s){if(e===void 0&&(e=this.mediaIndex),i===void 0&&(i=this.playlist_),s===void 0&&(s=this.partIndex),!i||!this.mediaSource_)return!1;var o=typeof e=="number"&&i.segments[e],u=e+1===i.segments.length,l=!o||!o.parts||s+1===o.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&u&&l},r.chooseNextRequest_=function(){var e=this.buffered_(),i=Gl(e)||0,s=jo(e,this.currentTime_()),o=!this.hasPlayed_()&&s>=1,u=s>=this.goalBufferLength_(),l=this.playlist_.segments;if(!l.length||o||u)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var c={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(c.isSyncRequest)c.mediaIndex=J_(this.currentTimeline_,l,i);else if(this.mediaIndex!==null){var g=l[this.mediaIndex],m=typeof this.partIndex=="number"?this.partIndex:-1;c.startOfSegment=g.end?g.end:i,g.parts&&g.parts[m+1]?(c.mediaIndex=this.mediaIndex,c.partIndex=m+1):c.mediaIndex=this.mediaIndex+1}else{var _=Ye.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?i:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),b=_.segmentIndex,S=_.startTime,x=_.partIndex;c.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+i:"currentTime "+this.currentTime_(),c.mediaIndex=b,c.startOfSegment=S,c.partIndex=x}var w=l[c.mediaIndex],O=w&&typeof c.partIndex=="number"&&w.parts&&w.parts[c.partIndex];if(!w||typeof c.partIndex=="number"&&!O)return null;if(typeof c.partIndex!="number"&&w.parts&&(c.partIndex=0,O=w.parts[0]),!s&&O&&!O.independent)if(c.partIndex===0){var H=l[c.mediaIndex-1],L=H.parts&&H.parts.length&&H.parts[H.parts.length-1];L&&L.independent&&(c.mediaIndex-=1,c.partIndex=H.parts.length-1,c.independent="previous segment")}else w.parts[c.partIndex-1].independent&&(c.partIndex-=1,c.independent="previous part");var F=this.mediaSource_&&this.mediaSource_.readyState==="ended";return c.mediaIndex>=l.length-1&&F&&!this.seeking_()?null:this.generateSegmentInfo_(c)},r.generateSegmentInfo_=function(e){var i=e.independent,s=e.playlist,o=e.mediaIndex,u=e.startOfSegment,l=e.isSyncRequest,c=e.partIndex,g=e.forceTimestampOffset,m=e.getMediaInfoForTime,_=s.segments[o],b=typeof c=="number"&&_.parts[c],S={requestId:"segment-loader-"+Math.random(),uri:b&&b.resolvedUri||_.resolvedUri,mediaIndex:o,partIndex:b?c:null,isSyncRequest:l,startOfSegment:u,playlist:s,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:_.timeline,duration:b&&b.duration||_.duration,segment:_,part:b,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:m,independent:i},x=typeof g<"u"?g:this.isPendingTimestampOffset_;S.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:_.timeline,currentTimeline:this.currentTimeline_,startOfSegment:u,buffered:this.buffered_(),overrideCheck:x});var w=Gl(this.sourceUpdater_.audioBuffered());return typeof w=="number"&&(S.audioAppendStart=w-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(S.gopsToAlignWith=K_(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),S},r.timestampOffsetForSegment_=function(e){return rT(e)},r.earlyAbortWhenNeeded_=function(e){if(!(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var i=this.currentTime_(),s=e.bandwidth,o=this.pendingSegment_.duration,u=Ye.estimateSegmentRequestTime(o,s,this.playlist_,e.bytesReceived),l=Cy(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(!(u<=l)){var c=U_({master:this.vhs_.playlists.master,currentTime:i,bandwidth:s,duration:this.duration_(),segmentDuration:o,timeUntilRebuffer:l,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!!c){var g=u-l,m=g-c.rebufferingImpact,_=.5;l<=Yt&&(_=1),!(!c.playlist||c.playlist.uri===this.playlist_.uri||m<_)&&(this.bandwidth=c.playlist.attributes.BANDWIDTH*we.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},r.handleAbort_=function(e){this.logger_("Aborting "+kr(e)),this.mediaRequestsAborted+=1},r.handleProgress_=function(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress")},r.handleTrackInfo_=function(e,i){this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},Q_(this.currentMediaInfo_,i)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=i,this.currentMediaInfo_=i,this.logger_("trackinfo update",i),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=i,this.hasEnoughInfoToAppend_()&&this.processCallQueue_())))},r.handleTimingInfo_=function(e,i,s,o){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var u=this.pendingSegment_,l=td(i);u[l]=u[l]||{},u[l][s]=o,this.logger_("timinginfo: "+i+" - "+s+" - "+o),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},r.handleCaptions_=function(e,i){var s=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(i.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}var o=this.pendingSegment_;if(!o.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,i));return}var u=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),l={};i.forEach(function(c){l[c.stream]=l[c.stream]||{startTime:1/0,captions:[],endTime:0};var g=l[c.stream];g.startTime=Math.min(g.startTime,c.startTime+u),g.endTime=Math.max(g.endTime,c.endTime+u),g.captions.push(c)}),Object.keys(l).forEach(function(c){var g=l[c],m=g.startTime,_=g.endTime,b=g.captions,S=s.inbandTextTracks_;s.logger_("adding cues from "+m+" -> "+_+" for "+c),q_(S,s.vhs_.tech_,c),Ei(m,_,S[c]),j_({captionArray:b,inbandTextTracks:S,timestampOffset:u})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},r.handleId3_=function(e,i,s){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var o=this.pendingSegment_;if(!o.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,s));return}var u=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();z_(this.inbandTextTracks_,s,this.vhs_.tech_),W_({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:u,videoDuration:this.duration_()})}},r.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},r.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(i){return i()})},r.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(i){return i()})},r.hasEnoughInfoToLoad_=function(){if(this.loaderType_!=="audio")return!0;var e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!rd({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1},r.getCurrentMediaInfo_=function(e){return e===void 0&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},r.getMediaInfo_=function(e){return e===void 0&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},r.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},r.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,i=this.getCurrentMediaInfo_();if(!e||!i)return!1;var s=i.hasAudio,o=i.hasVideo,u=i.isMuxed;return!(o&&!e.videoTimingInfo||s&&!this.audioDisabled_&&!u&&!e.audioTimingInfo||rd({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},r.handleData_=function(e,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){this.callQueue_.push(this.handleData_.bind(this,e,i));return}var s=this.pendingSegment_;if(this.setTimeMapping_(s.timeline),this.updateMediaSecondsLoaded_(s.part||s.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),s.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),s.isFmp4=e.isFmp4,s.timingInfo=s.timingInfo||{},s.isFmp4)this.trigger("fmp4"),s.timingInfo.start=s[td(i.type)].start;else{var o=this.getCurrentMediaInfo_(),u=this.loaderType_==="main"&&o&&o.hasVideo,l;u&&(l=s.videoTimingInfo.start),s.timingInfo.start=this.trueSegmentStart_({currentStart:s.timingInfo.start,playlist:s.playlist,mediaIndex:s.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:u,firstVideoFrameTimeForData:l,videoTimingInfo:s.videoTimingInfo,audioTimingInfo:s.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(s,i.type),this.updateSourceBufferTimestampOffset_(s),s.isSyncRequest){this.updateTimingInfoEnd_(s),this.syncController_.saveSegmentTimingInfo({segmentInfo:s,shouldSaveTimelineMapping:this.loaderType_==="main"});var c=this.chooseNextRequest_();if(c.mediaIndex!==s.mediaIndex||c.partIndex!==s.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}s.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(s,i)}}},r.updateAppendInitSegmentStatus=function(e,i){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[i]!==e.playlist&&(this.appendInitSegment_[i]=!0)},r.getInitSegmentAndUpdateState_=function(e){var i=e.type,s=e.initSegment,o=e.map,u=e.playlist;if(o){var l=ta(o);if(this.activeInitSegmentId_===l)return null;s=this.initSegmentForMap(o,!0).bytes,this.activeInitSegmentId_=l}return s&&this.appendInitSegment_[i]?(this.playlistOfLastInitSegment_[i]=u,this.appendInitSegment_[i]=!1,this.activeInitSegmentId_=null,s):null},r.handleQuotaExceededError_=function(e,i){var s=this,o=e.segmentInfo,u=e.type,l=e.bytes,c=this.sourceUpdater_.audioBuffered(),g=this.sourceUpdater_.videoBuffered();c.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+ur(c).join(", ")),g.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+ur(g).join(", "));var m=c.length?c.start(0):0,_=c.length?c.end(c.length-1):0,b=g.length?g.start(0):0,S=g.length?g.end(g.length-1):0;if(_-m<=yi&&S-b<=yi){this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. "+("Appended byte length: "+l.byteLength+", ")+("audio buffer: "+ur(c).join(", ")+", ")+("video buffer: "+ur(g).join(", ")+", ")),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:o,type:u,bytes:l}));var x=this.currentTime_(),w=x-yi;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+w),this.remove(0,w,function(){s.logger_("On QUOTA_EXCEEDED_ERR, retrying append in "+yi+"s"),s.waitingOnRemove_=!1,s.quotaExceededErrorRetryTimeout_=A.setTimeout(function(){s.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),s.quotaExceededErrorRetryTimeout_=null,s.processCallQueue_()},yi*1e3)},!0)},r.handleAppendError_=function(e,i){var s=e.segmentInfo,o=e.type,u=e.bytes;if(!!i){if(i.code===th){this.handleQuotaExceededError_({segmentInfo:s,type:o,bytes:u});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",i),this.error(o+" append of "+u.length+"b failed for segment "+("#"+s.mediaIndex+" in playlist "+s.playlist.id)),this.trigger("appenderror")}},r.appendToSourceBuffer_=function(e){var i=e.segmentInfo,s=e.type,o=e.initSegment,u=e.data,l=e.bytes;if(!l){var c=[u],g=u.byteLength;o&&(c.unshift(o),g+=o.byteLength),l=H_({bytes:g,segments:c})}this.sourceUpdater_.appendBuffer({segmentInfo:i,type:s,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:i,type:s,bytes:l}))},r.handleSegmentTimingInfo_=function(e,i,s){if(!(!this.pendingSegment_||i!==this.pendingSegment_.requestId)){var o=this.pendingSegment_.segment,u=e+"TimingInfo";o[u]||(o[u]={}),o[u].transmuxerPrependedSeconds=s.prependedContentDuration||0,o[u].transmuxedPresentationStart=s.start.presentation,o[u].transmuxedDecodeStart=s.start.decode,o[u].transmuxedPresentationEnd=s.end.presentation,o[u].transmuxedDecodeEnd=s.end.decode,o[u].baseMediaDecodeTime=s.baseMediaDecodeTime}},r.appendData_=function(e,i){var s=i.type,o=i.data;if(!(!o||!o.byteLength)&&!(s==="audio"&&this.audioDisabled_)){var u=this.getInitSegmentAndUpdateState_({type:s,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:s,initSegment:u,data:o})}},r.loadSegment_=function(e){var i=this;if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(function(){var s=ot({},e,{forceTimestampOffset:!0});ot(e,i.generateSegmentInfo_(s)),i.isPendingTimestampOffset_=!1,i.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)},r.updateTransmuxerAndRequestSegment_=function(e){var i=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var s=this.createSimplifiedSegmentObj_(e),o=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),u=this.mediaIndex!==null,l=e.timeline!==this.currentTimeline_&&e.timeline>0,c=o||u&&l;this.logger_("Requesting "+kr(e)),s.map&&!s.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=L_({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:s,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:c,endedTimelineFn:function(){i.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(m){var _=m.message,b=m.level,S=m.stream;i.logger_(kr(e)+" logged from transmuxer stream "+S+" as a "+b+": "+_)}})},r.trimBackBuffer_=function(e){var i=tT(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)},r.createSimplifiedSegmentObj_=function(e){var i=e.segment,s=e.part,o={resolvedUri:s?s.resolvedUri:i.resolvedUri,byterange:s?s.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},u=e.playlist.segments[e.mediaIndex-1];if(u&&u.timeline===i.timeline&&(u.videoTimingInfo?o.baseStartTime=u.videoTimingInfo.transmuxedDecodeEnd:u.audioTimingInfo&&(o.baseStartTime=u.audioTimingInfo.transmuxedDecodeEnd)),i.key){var l=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(i.key),o.key.iv=l}return i.map&&(o.map=this.initSegmentForMap(i.map)),o},r.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},r.saveBandwidthRelatedStats_=function(e,i){if(this.pendingSegment_.byteLength=i.bytesReceived,e<Pn){this.logger_("Ignoring segment's bandwidth because its duration of "+e+(" is less than the min to record "+Pn));return}this.bandwidth=i.bandwidth,this.roundTrip=i.roundTripTime},r.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},r.segmentRequestFinished_=function(e,i,s){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,s));return}if(this.saveTransferStats_(i.stats),!!this.pendingSegment_&&i.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===bt.ABORTED)return;if(this.pause(),e.code===bt.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}var o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,i.stats),o.endOfAllRequests=i.endOfAllRequests,s.gopInfo&&(this.gopBuffer_=X_(this.gopBuffer_,s.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}},r.setTimeMapping_=function(e){var i=this.syncController_.mappingForTimeline(e);i!==null&&(this.timeMapping_=i)},r.updateMediaSecondsLoaded_=function(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},r.shouldUpdateTransmuxerTimestampOffset_=function(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()},r.trueSegmentStart_=function(e){var i=e.currentStart,s=e.playlist,o=e.mediaIndex,u=e.firstVideoFrameTimeForData,l=e.currentVideoTimestampOffset,c=e.useVideoTimingInfo,g=e.videoTimingInfo,m=e.audioTimingInfo;if(typeof i<"u")return i;if(!c)return m.start;var _=s.segments[o-1];return o===0||!_||typeof _.start>"u"||_.end!==u+l?u:g.start},r.waitForAppendsToComplete_=function(e){var i=this.getCurrentMediaInfo_(e);if(!i){this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),this.trigger("error");return}var s=i.hasAudio,o=i.hasVideo,u=i.isMuxed,l=this.loaderType_==="main"&&o,c=!this.audioDisabled_&&s&&!u;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}l&&e.waitingOnAppends++,c&&e.waitingOnAppends++,l&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),c&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},r.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())},r.checkForIllegalMediaSwitch=function(e){var i=eT(this.loaderType_,this.getCurrentMediaInfo_(),e);return i?(this.error({message:i,blacklistDuration:1/0}),this.trigger("error"),!0):!1},r.updateSourceBufferTimestampOffset_=function(e){if(!(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")){var i=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset")}},r.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var i=e.videoTimingInfo,s=e.audioTimingInfo,o=e.timingInfo;return this.useDtsForTimestampOffset_?i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:s&&typeof s.transmuxedDecodeStart=="number"?s.transmuxedDecodeStart:o.start:o.start},r.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var i=this.getMediaInfo_(),s=this.loaderType_==="main"&&i&&i.hasVideo,o=s&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;!o||(e.timingInfo.end=typeof o.end=="number"?o.end:o.start+e.duration)},r.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});var i=nT(e,this.sourceType_);if(i&&(i.severity==="warn"?I.log.warn(i.message):this.logger_(i.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_("Throwing away un-appended sync request "+kr(e));return}this.logger_("Appended "+kr(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var s=e.segment,o=e.part,u=s.end&&this.currentTime_()-s.end>e.playlist.targetDuration*3,l=o&&o.end&&this.currentTime_()-o.end>e.playlist.partTargetDuration*3;if(u||l){this.logger_("bad "+(u?"segment":"part")+" "+kr(e)),this.resetEverything();return}var c=this.mediaIndex!==null;c&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()},r.recordThroughput_=function(e){if(e.duration<Pn){this.logger_("Ignoring segment's throughput because its duration of "+e.duration+(" is less than the min to record "+Pn));return}var i=this.throughput.rate,s=Date.now()-e.endOfAllRequests+1,o=Math.floor(e.byteLength/s*8*1e3);this.throughput.rate+=(o-i)/++this.throughput.count},r.addSegmentMetadataCue_=function(e){if(!!this.segmentMetadataTrack_){var i=e.segment,s=i.start,o=i.end;if(!(!ed(s)||!ed(o))){Ei(s,o,this.segmentMetadataTrack_);var u=A.WebKitDataCue||A.VTTCue,l={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:s,end:o},c=JSON.stringify(l),g=new u(s,o,c);g.value=l,this.segmentMetadataTrack_.addCue(g)}}},t}(I.EventTarget);function Ot(){}var rh=function(t){return typeof t!="string"?t:t.replace(/./,function(r){return r.toUpperCase()})},aT=["video","audio"],qs=function(t,r){var n=r[t+"Buffer"];return n&&n.updating||r.queuePending[t]},sT=function(t,r){for(var n=0;n<r.length;n++){var e=r[n];if(e.type==="mediaSource")return null;if(e.type===t)return n}return null},Yo=function a(t,r){if(r.queue.length!==0){var n=0,e=r.queue[n];if(e.type==="mediaSource"){!r.updating()&&r.mediaSource.readyState!=="closed"&&(r.queue.shift(),e.action(r),e.doneFn&&e.doneFn(),a("audio",r),a("video",r));return}if(t!=="mediaSource"&&!(!r.ready()||r.mediaSource.readyState==="closed"||qs(t,r))){if(e.type!==t){if(n=sT(t,r.queue),n===null)return;e=r.queue[n]}if(r.queue.splice(n,1),r.queuePending[t]=e,e.action(t,r),!e.doneFn){r.queuePending[t]=null,a(t,r);return}}}},ih=function(t,r){var n=r[t+"Buffer"],e=rh(t);!n||(n.removeEventListener("updateend",r["on"+e+"UpdateEnd_"]),n.removeEventListener("error",r["on"+e+"Error_"]),r.codecs[t]=null,r[t+"Buffer"]=null)},yt=function(t,r){return t&&r&&Array.prototype.indexOf.call(t.sourceBuffers,r)!==-1},et={appendBuffer:function(t,r,n){return function(e,i){var s=i[e+"Buffer"];if(!!yt(i.mediaSource,s)){i.logger_("Appending segment "+r.mediaIndex+"'s "+t.length+" bytes to "+e+"Buffer");try{s.appendBuffer(t)}catch(o){i.logger_("Error with code "+o.code+" "+(o.code===th?"(QUOTA_EXCEEDED_ERR) ":"")+("when appending segment "+r.mediaIndex+" to "+e+"Buffer")),i.queuePending[e]=null,n(o)}}}},remove:function(t,r){return function(n,e){var i=e[n+"Buffer"];if(!!yt(e.mediaSource,i)){e.logger_("Removing "+t+" to "+r+" from "+n+"Buffer");try{i.remove(t,r)}catch{e.logger_("Remove "+t+" to "+r+" from "+n+"Buffer failed")}}}},timestampOffset:function(t){return function(r,n){var e=n[r+"Buffer"];!yt(n.mediaSource,e)||(n.logger_("Setting "+r+"timestampOffset to "+t),e.timestampOffset=t)}},callback:function(t){return function(r,n){t()}},endOfStream:function(t){return function(r){if(r.mediaSource.readyState==="open"){r.logger_("Calling mediaSource endOfStream("+(t||"")+")");try{r.mediaSource.endOfStream(t)}catch(n){I.log.warn("Failed to call media source endOfStream",n)}}}},duration:function(t){return function(r){r.logger_("Setting mediaSource duration to "+t);try{r.mediaSource.duration=t}catch(n){I.log.warn("Failed to set media source duration",n)}}},abort:function(){return function(t,r){if(r.mediaSource.readyState==="open"){var n=r[t+"Buffer"];if(!!yt(r.mediaSource,n)){r.logger_("calling abort on "+t+"Buffer");try{n.abort()}catch(e){I.log.warn("Failed to abort on "+t+"Buffer",e)}}}}},addSourceBuffer:function(t,r){return function(n){var e=rh(t),i=Pi(r);n.logger_("Adding "+t+"Buffer with codec "+r+" to mediaSource");var s=n.mediaSource.addSourceBuffer(i);s.addEventListener("updateend",n["on"+e+"UpdateEnd_"]),s.addEventListener("error",n["on"+e+"Error_"]),n.codecs[t]=r,n[t+"Buffer"]=s}},removeSourceBuffer:function(t){return function(r){var n=r[t+"Buffer"];if(ih(t,r),!!yt(r.mediaSource,n)){r.logger_("Removing "+t+"Buffer with codec "+r.codecs[t]+" from mediaSource");try{r.mediaSource.removeSourceBuffer(n)}catch(e){I.log.warn("Failed to removeSourceBuffer "+t+"Buffer",e)}}}},changeType:function(t){return function(r,n){var e=n[r+"Buffer"],i=Pi(t);!yt(n.mediaSource,e)||n.codecs[r]!==t&&(n.logger_("changing "+r+"Buffer codec from "+n.codecs[r]+" to "+t),e.changeType(i),n.codecs[r]=t)}}},tt=function(t){var r=t.type,n=t.sourceUpdater,e=t.action,i=t.doneFn,s=t.name;n.queue.push({type:r,action:e,doneFn:i,name:s}),Yo(r,n)},nd=function(t,r){return function(n){if(r.queuePending[t]){var e=r.queuePending[t].doneFn;r.queuePending[t]=null,e&&e(r[t+"Error_"])}Yo(t,r)}},nh=function(a){W(t,a);function t(n){var e;return e=a.call(this)||this,e.mediaSource=n,e.sourceopenListener_=function(){return Yo("mediaSource",ee(e))},e.mediaSource.addEventListener("sourceopen",e.sourceopenListener_),e.logger_=pt("SourceUpdater"),e.audioTimestampOffset_=0,e.videoTimestampOffset_=0,e.queue=[],e.queuePending={audio:null,video:null},e.delayedAudioAppendQueue_=[],e.videoAppendQueued_=!1,e.codecs={},e.onVideoUpdateEnd_=nd("video",ee(e)),e.onAudioUpdateEnd_=nd("audio",ee(e)),e.onVideoError_=function(i){e.videoError_=i},e.onAudioError_=function(i){e.audioError_=i},e.createdSourceBuffers_=!1,e.initializedEme_=!1,e.triggeredReady_=!1,e}var r=t.prototype;return r.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},r.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},r.hasInitializedAnyEme=function(){return this.initializedEme_},r.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},r.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},r.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},r.addSourceBuffer=function(e,i){tt({type:"mediaSource",sourceUpdater:this,action:et.addSourceBuffer(e,i),name:"addSourceBuffer"})},r.abort=function(e){tt({type:e,sourceUpdater:this,action:et.abort(e),name:"abort"})},r.removeSourceBuffer=function(e){if(!this.canRemoveSourceBuffer()){I.log.error("removeSourceBuffer is not supported!");return}tt({type:"mediaSource",sourceUpdater:this,action:et.removeSourceBuffer(e),name:"removeSourceBuffer"})},r.canRemoveSourceBuffer=function(){return!I.browser.IE_VERSION&&!I.browser.IS_FIREFOX&&A.MediaSource&&A.MediaSource.prototype&&typeof A.MediaSource.prototype.removeSourceBuffer=="function"},t.canChangeType=function(){return A.SourceBuffer&&A.SourceBuffer.prototype&&typeof A.SourceBuffer.prototype.changeType=="function"},r.canChangeType=function(){return this.constructor.canChangeType()},r.changeType=function(e,i){if(!this.canChangeType()){I.log.error("changeType is not supported!");return}tt({type:e,sourceUpdater:this,action:et.changeType(i),name:"changeType"})},r.addOrChangeSourceBuffers=function(e){var i=this;if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(function(s){var o=e[s];if(!i.hasCreatedSourceBuffers())return i.addSourceBuffer(s,o);i.canChangeType()&&i.changeType(s,o)})},r.appendBuffer=function(e,i){var s=this,o=e.segmentInfo,u=e.type,l=e.bytes;if(this.processedAppend_=!0,u==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_("delayed audio append of "+l.length+" until video append");return}var c=i;if(tt({type:u,sourceUpdater:this,action:et.appendBuffer(l,o||{mediaIndex:-1},c),doneFn:i,name:"appendBuffer"}),u==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var g=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+g.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,g.forEach(function(m){s.appendBuffer.apply(s,m)})}},r.audioBuffered=function(){return yt(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:I.createTimeRange()},r.videoBuffered=function(){return yt(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:I.createTimeRange()},r.buffered=function(){var e=yt(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=yt(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():Ey(this.audioBuffered(),this.videoBuffered())},r.setDuration=function(e,i){i===void 0&&(i=Ot),tt({type:"mediaSource",sourceUpdater:this,action:et.duration(e),name:"duration",doneFn:i})},r.endOfStream=function(e,i){e===void 0&&(e=null),i===void 0&&(i=Ot),typeof e!="string"&&(e=void 0),tt({type:"mediaSource",sourceUpdater:this,action:et.endOfStream(e),name:"endOfStream",doneFn:i})},r.removeAudio=function(e,i,s){if(s===void 0&&(s=Ot),!this.audioBuffered().length||this.audioBuffered().end(0)===0){s();return}tt({type:"audio",sourceUpdater:this,action:et.remove(e,i),doneFn:s,name:"remove"})},r.removeVideo=function(e,i,s){if(s===void 0&&(s=Ot),!this.videoBuffered().length||this.videoBuffered().end(0)===0){s();return}tt({type:"video",sourceUpdater:this,action:et.remove(e,i),doneFn:s,name:"remove"})},r.updating=function(){return!!(qs("audio",this)||qs("video",this))},r.audioTimestampOffset=function(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(tt({type:"audio",sourceUpdater:this,action:et.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},r.videoTimestampOffset=function(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset!==e&&(tt({type:"video",sourceUpdater:this,action:et.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},r.audioQueueCallback=function(e){!this.audioBuffer||tt({type:"audio",sourceUpdater:this,action:et.callback(e),name:"callback"})},r.videoQueueCallback=function(e){!this.videoBuffer||tt({type:"video",sourceUpdater:this,action:et.callback(e),name:"callback"})},r.dispose=function(){var e=this;this.trigger("dispose"),aT.forEach(function(i){e.abort(i),e.canRemoveSourceBuffer()?e.removeSourceBuffer(i):e[i+"QueueCallback"](function(){return ih(i,e)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(I.EventTarget),ad=function(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))},sd=new Uint8Array(`
`.split("").map(function(a){return a.charCodeAt(0)})),oT=function(a){W(t,a);function t(){return a.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return t}(Ss(Error)),uT=function(a){W(t,a);function t(n,e){var i;return e===void 0&&(e={}),i=a.call(this,n,e)||this,i.mediaSource_=null,i.subtitlesTrack_=null,i.loaderType_="subtitle",i.featuresNativeTextTracks_=n.featuresNativeTextTracks,i.loadVttJs=n.loadVttJs,i.shouldSaveSegmentTimingInfo_=!1,i}var r=t.prototype;return r.createTransmuxer_=function(){return null},r.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return I.createTimeRanges();var e=this.subtitlesTrack_.cues,i=e[0].startTime,s=e[e.length-1].startTime;return I.createTimeRanges([[i,s]])},r.initSegmentForMap=function(e,i){if(i===void 0&&(i=!1),!e)return null;var s=ta(e),o=this.initSegments_[s];if(i&&!o&&e.bytes){var u=sd.byteLength+e.bytes.byteLength,l=new Uint8Array(u);l.set(e.bytes),l.set(sd,e.bytes.byteLength),this.initSegments_[s]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:l}}return o||e},r.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},r.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},r.track=function(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)},r.remove=function(e,i){Ei(e,i,this.subtitlesTrack_)},r.fillBuffer_=function(){var e=this,i=this.chooseNextRequest_();if(!!i){if(this.syncController_.timestampOffsetForTimeline(i.timeline)===null){var s=function(){e.state="READY",e.paused()||e.monitorBuffer_()};this.syncController_.one("timestampoffset",s),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(i)}},r.timestampOffsetForSegment_=function(){return null},r.chooseNextRequest_=function(){return this.skipEmptySegments_(a.prototype.chooseNextRequest_.call(this))},r.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},r.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},r.segmentRequestFinished_=function(e,i,s){var o=this;if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===bt.TIMEOUT&&this.handleTimeout_(),e.code===bt.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}var u=this.pendingSegment_;this.saveBandwidthRelatedStats_(u.duration,i.stats),i.key&&this.segmentKey(i.key,!0),this.state="APPENDING",this.trigger("appending");var l=u.segment;if(l.map&&(l.map.bytes=i.map.bytes),u.bytes=i.bytes,typeof A.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(function(){return o.segmentRequestFinished_(e,i,s)},function(){return o.stopForError({message:"Error loading vtt.js"})});return}l.requested=!0;try{this.parseVTTCues_(u)}catch(c){this.stopForError({message:c.message});return}if(this.updateTimeMapping_(u,this.syncController_.timelines[u.timeline],this.playlist_),u.cues.length?u.timingInfo={start:u.cues[0].startTime,end:u.cues[u.cues.length-1].endTime}:u.timingInfo={start:u.startOfSegment,end:u.startOfSegment+u.duration},u.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}u.byteLength=u.bytes.byteLength,this.mediaSecondsLoaded+=l.duration,u.cues.forEach(function(c){o.subtitlesTrack_.addCue(o.featuresNativeTextTracks_?new A.VTTCue(c.startTime,c.endTime,c.text):c)}),$_(this.subtitlesTrack_),this.handleAppendsDone_()},r.handleData_=function(){},r.updateTimingInfoEnd_=function(){},r.parseVTTCues_=function(e){var i,s=!1;if(typeof A.WebVTT!="function")throw new oT;typeof A.TextDecoder=="function"?i=new A.TextDecoder("utf8"):(i=A.WebVTT.StringDecoder(),s=!0);var o=new A.WebVTT.Parser(A,A.vttjs,i);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=function(c){e.timestampmap=c},o.onparsingerror=function(c){I.log.warn("Error encountered when parsing cues: "+c.message)},e.segment.map){var u=e.segment.map.bytes;s&&(u=ad(u)),o.parse(u)}var l=e.bytes;s&&(l=ad(l)),o.parse(l),o.flush()},r.updateTimeMapping_=function(e,i,s){var o=e.segment;if(!!i){if(!e.cues.length){o.empty=!0;return}var u=e.timestampmap,l=u.MPEGTS/jn.ONE_SECOND_IN_TS-u.LOCAL+i.mapping;if(e.cues.forEach(function(m){m.startTime+=l,m.endTime+=l}),!s.syncInfo){var c=e.cues[0].startTime,g=e.cues[e.cues.length-1].startTime;s.syncInfo={mediaSequence:s.mediaSequence+e.mediaIndex,time:Math.min(c,g-o.duration)}}}},t}(Hs),lT=function(t,r){for(var n=t.cues,e=0;e<n.length;e++){var i=n[e];if(r>=i.adStartTime&&r<=i.adEndTime)return i}return null},dT=function(t,r,n){if(n===void 0&&(n=0),!!t.segments)for(var e=n,i,s=0;s<t.segments.length;s++){var o=t.segments[s];if(i||(i=lT(r,e+o.duration/2)),i){if("cueIn"in o){i.endTime=e,i.adEndTime=e,e+=o.duration,i=null;continue}if(e<i.endTime){e+=o.duration;continue}i.endTime+=o.duration}else if("cueOut"in o&&(i=new A.VTTCue(e,e+o.duration,o.cueOut),i.adStartTime=e,i.adEndTime=e+parseFloat(o.cueOut),r.addCue(i)),"cueOutCont"in o){var u=o.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];i=new A.VTTCue(e,e+o.duration,""),i.adStartTime=e-l,i.adEndTime=i.adStartTime+c,r.addCue(i)}e+=o.duration}},cT=86400,od=[{name:"VOD",run:function(t,r,n,e,i){if(n!==1/0){var s={time:0,segmentIndex:0,partIndex:null};return s}return null}},{name:"ProgramDateTime",run:function(t,r,n,e,i){if(!Object.keys(t.timelineToDatetimeMappings).length)return null;var s=null,o=null,u=Ls(r);i=i||0;for(var l=0;l<u.length;l++){var c=r.endList||i===0?l:u.length-(l+1),g=u[c],m=g.segment,_=t.timelineToDatetimeMappings[m.timeline];if(!(!_||!m.dateTimeObject)){var b=m.dateTimeObject.getTime()/1e3,S=b+_;if(m.parts&&typeof g.partIndex=="number")for(var x=0;x<g.partIndex;x++)S+=m.parts[x].duration;var w=Math.abs(i-S);if(o!==null&&(w===0||o<w))break;o=w,s={time:S,segmentIndex:g.segmentIndex,partIndex:g.partIndex}}}return s}},{name:"Segment",run:function(t,r,n,e,i){var s=null,o=null;i=i||0;for(var u=Ls(r),l=0;l<u.length;l++){var c=r.endList||i===0?l:u.length-(l+1),g=u[c],m=g.segment,_=g.part&&g.part.start||m&&m.start;if(m.timeline===e&&typeof _<"u"){var b=Math.abs(i-_);if(o!==null&&o<b)break;(!s||o===null||o>=b)&&(o=b,s={time:_,segmentIndex:g.segmentIndex,partIndex:g.partIndex})}}return s}},{name:"Discontinuity",run:function(t,r,n,e,i){var s=null;if(i=i||0,r.discontinuityStarts&&r.discontinuityStarts.length)for(var o=null,u=0;u<r.discontinuityStarts.length;u++){var l=r.discontinuityStarts[u],c=r.discontinuitySequence+u+1,g=t.discontinuities[c];if(g){var m=Math.abs(i-g.time);if(o!==null&&o<m)break;(!s||o===null||o>=m)&&(o=m,s={time:g.time,segmentIndex:l,partIndex:null})}}return s}},{name:"Playlist",run:function(t,r,n,e,i){if(r.syncInfo){var s={time:r.syncInfo.time,segmentIndex:r.syncInfo.mediaSequence-r.mediaSequence,partIndex:null};return s}return null}}],fT=function(a){W(t,a);function t(n){var e;return e=a.call(this)||this,e.timelines=[],e.discontinuities=[],e.timelineToDatetimeMappings={},e.logger_=pt("SyncController"),e}var r=t.prototype;return r.getSyncPoint=function(e,i,s,o){var u=this.runStrategies_(e,i,s,o);return u.length?this.selectSyncPoint_(u,{key:"time",value:o}):null},r.getExpiredTime=function(e,i){if(!e||!e.segments)return null;var s=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!s.length)return null;var o=this.selectSyncPoint_(s,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+wi({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))},r.runStrategies_=function(e,i,s,o){for(var u=[],l=0;l<od.length;l++){var c=od[l],g=c.run(this,e,i,s,o);g&&(g.strategy=c.name,u.push({strategy:c.name,syncPoint:g}))}return u},r.selectSyncPoint_=function(e,i){for(var s=e[0].syncPoint,o=Math.abs(e[0].syncPoint[i.key]-i.value),u=e[0].strategy,l=1;l<e.length;l++){var c=Math.abs(e[l].syncPoint[i.key]-i.value);c<o&&(o=c,s=e[l].syncPoint,u=e[l].strategy)}return this.logger_("syncPoint for ["+i.key+": "+i.value+"] chosen with strategy"+(" ["+u+"]: [time:"+s.time+",")+(" segmentIndex:"+s.segmentIndex)+(typeof s.partIndex=="number"?",partIndex:"+s.partIndex:"")+"]"),s},r.saveExpiredSegmentInfo=function(e,i){var s=i.mediaSequence-e.mediaSequence;if(s>cT){I.log.warn("Not saving expired segment info. Media sequence gap "+s+" is too large.");return}for(var o=s-1;o>=0;o--){var u=e.segments[o];if(u&&typeof u.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+o,time:u.start},this.logger_("playlist refresh sync: [time:"+i.syncInfo.time+","+(" mediaSequence: "+i.syncInfo.mediaSequence+"]")),this.trigger("syncinfoupdate");break}}},r.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var i=e.segments[0],s=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-s}},r.saveSegmentTimingInfo=function(e){var i=e.segmentInfo,s=e.shouldSaveTimelineMapping,o=this.calculateSegmentTimeMapping_(i,i.timingInfo,s),u=i.segment;o&&(this.saveDiscontinuitySyncInfo_(i),i.playlist.syncInfo||(i.playlist.syncInfo={mediaSequence:i.playlist.mediaSequence+i.mediaIndex,time:u.start}));var l=u.dateTimeObject;u.discontinuity&&s&&l&&(this.timelineToDatetimeMappings[u.timeline]=-(l.getTime()/1e3))},r.timestampOffsetForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time},r.mappingForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping},r.calculateSegmentTimeMapping_=function(e,i,s){var o=e.segment,u=e.part,l=this.timelines[e.timeline],c,g;if(typeof e.timestampOffset=="number")l={time:e.startOfSegment,mapping:e.startOfSegment-i.start},s&&(this.timelines[e.timeline]=l,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": "+("[time: "+l.time+"] [mapping: "+l.mapping+"]"))),c=e.startOfSegment,g=i.end+l.mapping;else if(l)c=i.start+l.mapping,g=i.end+l.mapping;else return!1;return u&&(u.start=c,u.end=g),(!o.start||c<o.start)&&(o.start=c),o.end=g,!0},r.saveDiscontinuitySyncInfo_=function(e){var i=e.playlist,s=e.segment;if(s.discontinuity)this.discontinuities[s.timeline]={time:s.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(var o=0;o<i.discontinuityStarts.length;o++){var u=i.discontinuityStarts[o],l=i.discontinuitySequence+o+1,c=u-e.mediaIndex,g=Math.abs(c);if(!this.discontinuities[l]||this.discontinuities[l].accuracy>g){var m=void 0;c<0?m=s.start-wi({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:u}):m=s.end+wi({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:u}),this.discontinuities[l]={time:m,accuracy:g}}}},r.dispose=function(){this.trigger("dispose"),this.off()},t}(I.EventTarget),hT=function(a){W(t,a);function t(){var n;return n=a.call(this)||this,n.pendingTimelineChanges_={},n.lastTimelineChanges_={},n}var r=t.prototype;return r.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},r.pendingTimelineChange=function(e){var i=e.type,s=e.from,o=e.to;return typeof s=="number"&&typeof o=="number"&&(this.pendingTimelineChanges_[i]={type:i,from:s,to:o},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[i]},r.lastTimelineChange=function(e){var i=e.type,s=e.from,o=e.to;return typeof s=="number"&&typeof o=="number"&&(this.lastTimelineChanges_[i]={type:i,from:s,to:o},delete this.pendingTimelineChanges_[i],this.trigger("timelinechange")),this.lastTimelineChanges_[i]},r.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(I.EventTarget),pT=Gf(Wf(function(){var a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t(L,F,q){return q={path:F,exports:{},require:function(R,U){return r(R,U==null?q.path:U)}},L(q,q.exports),q.exports}function r(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var n=t(function(L){function F(B,R){for(var U=0;U<R.length;U++){var N=R[U];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(B,N.key,N)}}function q(B,R,U){return R&&F(B.prototype,R),U&&F(B,U),B}L.exports=q,L.exports.default=L.exports,L.exports.__esModule=!0}),e=t(function(L){function F(q,B){return L.exports=F=Object.setPrototypeOf||function(U,N){return U.__proto__=N,U},L.exports.default=L.exports,L.exports.__esModule=!0,F(q,B)}L.exports=F,L.exports.default=L.exports,L.exports.__esModule=!0}),i=t(function(L){function F(q,B){q.prototype=Object.create(B.prototype),q.prototype.constructor=q,e(q,B)}L.exports=F,L.exports.default=L.exports,L.exports.__esModule=!0}),s=function(){function L(){this.listeners={}}var F=L.prototype;return F.on=function(B,R){this.listeners[B]||(this.listeners[B]=[]),this.listeners[B].push(R)},F.off=function(B,R){if(!this.listeners[B])return!1;var U=this.listeners[B].indexOf(R);return this.listeners[B]=this.listeners[B].slice(0),this.listeners[B].splice(U,1),U>-1},F.trigger=function(B){var R=this.listeners[B];if(!!R)if(arguments.length===2)for(var U=R.length,N=0;N<U;++N)R[N].call(this,arguments[1]);else for(var X=Array.prototype.slice.call(arguments,1),$=R.length,J=0;J<$;++J)R[J].apply(this,X)},F.dispose=function(){this.listeners={}},F.pipe=function(B){this.on("data",function(R){B.push(R)})},L}();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function o(L){return L.subarray(0,L.byteLength-L[L.byteLength-1])}/*! @name aes-decrypter @version 3.1.3 @license Apache-2.0 */var u=function(){var F=[[[],[],[],[],[]],[[],[],[],[],[]]],q=F[0],B=F[1],R=q[4],U=B[4],N,X,$,J=[],oe=[],fe,re,ae,pe,Re,ue;for(N=0;N<256;N++)oe[(J[N]=N<<1^(N>>7)*283)^N]=N;for(X=$=0;!R[X];X^=fe||1,$=oe[$]||1)for(pe=$^$<<1^$<<2^$<<3^$<<4,pe=pe>>8^pe&255^99,R[X]=pe,U[pe]=X,ae=J[re=J[fe=J[X]]],ue=ae*16843009^re*65537^fe*257^X*16843008,Re=J[pe]*257^pe*16843008,N=0;N<4;N++)q[N][X]=Re=Re<<24^Re>>>8,B[N][pe]=ue=ue<<24^ue>>>8;for(N=0;N<5;N++)q[N]=q[N].slice(0),B[N]=B[N].slice(0);return F},l=null,c=function(){function L(q){l||(l=u()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var B,R,U,N=this._tables[0][4],X=this._tables[1],$=q.length,J=1;if($!==4&&$!==6&&$!==8)throw new Error("Invalid aes key size");var oe=q.slice(0),fe=[];for(this._key=[oe,fe],B=$;B<4*$+28;B++)U=oe[B-1],(B%$===0||$===8&&B%$===4)&&(U=N[U>>>24]<<24^N[U>>16&255]<<16^N[U>>8&255]<<8^N[U&255],B%$===0&&(U=U<<8^U>>>24^J<<24,J=J<<1^(J>>7)*283)),oe[B]=oe[B-$]^U;for(R=0;B;R++,B--)U=oe[R&3?B:B-4],B<=4||R<4?fe[R]=U:fe[R]=X[0][N[U>>>24]]^X[1][N[U>>16&255]]^X[2][N[U>>8&255]]^X[3][N[U&255]]}var F=L.prototype;return F.decrypt=function(B,R,U,N,X,$){var J=this._key[1],oe=B^J[0],fe=N^J[1],re=U^J[2],ae=R^J[3],pe,Re,ue,Qi=J.length/4-2,nt,At=4,Wt=this._tables[1],Jt=Wt[0],mt=Wt[1],gr=Wt[2],vr=Wt[3],yr=Wt[4];for(nt=0;nt<Qi;nt++)pe=Jt[oe>>>24]^mt[fe>>16&255]^gr[re>>8&255]^vr[ae&255]^J[At],Re=Jt[fe>>>24]^mt[re>>16&255]^gr[ae>>8&255]^vr[oe&255]^J[At+1],ue=Jt[re>>>24]^mt[ae>>16&255]^gr[oe>>8&255]^vr[fe&255]^J[At+2],ae=Jt[ae>>>24]^mt[oe>>16&255]^gr[fe>>8&255]^vr[re&255]^J[At+3],At+=4,oe=pe,fe=Re,re=ue;for(nt=0;nt<4;nt++)X[(3&-nt)+$]=yr[oe>>>24]<<24^yr[fe>>16&255]<<16^yr[re>>8&255]<<8^yr[ae&255]^J[At++],pe=oe,oe=fe,fe=re,re=ae,ae=pe},L}(),g=function(L){i(F,L);function F(){var B;return B=L.call(this,s)||this,B.jobs=[],B.delay=1,B.timeout_=null,B}var q=F.prototype;return q.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},q.push=function(R){this.jobs.push(R),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},F}(s),m=function(F){return F<<24|(F&65280)<<8|(F&16711680)>>8|F>>>24},_=function(F,q,B){var R=new Int32Array(F.buffer,F.byteOffset,F.byteLength>>2),U=new c(Array.prototype.slice.call(q)),N=new Uint8Array(F.byteLength),X=new Int32Array(N.buffer),$,J,oe,fe,re,ae,pe,Re,ue;for($=B[0],J=B[1],oe=B[2],fe=B[3],ue=0;ue<R.length;ue+=4)re=m(R[ue]),ae=m(R[ue+1]),pe=m(R[ue+2]),Re=m(R[ue+3]),U.decrypt(re,ae,pe,Re,X,ue),X[ue]=m(X[ue]^$),X[ue+1]=m(X[ue+1]^J),X[ue+2]=m(X[ue+2]^oe),X[ue+3]=m(X[ue+3]^fe),$=re,J=ae,oe=pe,fe=Re;return N},b=function(){function L(q,B,R,U){var N=L.STEP,X=new Int32Array(q.buffer),$=new Uint8Array(q.byteLength),J=0;for(this.asyncStream_=new g,this.asyncStream_.push(this.decryptChunk_(X.subarray(J,J+N),B,R,$)),J=N;J<X.length;J+=N)R=new Uint32Array([m(X[J-4]),m(X[J-3]),m(X[J-2]),m(X[J-1])]),this.asyncStream_.push(this.decryptChunk_(X.subarray(J,J+N),B,R,$));this.asyncStream_.push(function(){U(null,o($))})}var F=L.prototype;return F.decryptChunk_=function(B,R,U,N){return function(){var X=_(B,R,U);N.set(X,B.byteOffset)}},n(L,null,[{key:"STEP",get:function(){return 32e3}}]),L}(),S;typeof window<"u"?S=window:typeof a<"u"?S=a:typeof self<"u"?S=self:S={};var x=S,w=function(F){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(F):F&&F.buffer instanceof ArrayBuffer},O=x.BigInt||Number;O("0x1"),O("0x100"),O("0x10000"),O("0x1000000"),O("0x100000000"),O("0x10000000000"),O("0x1000000000000"),O("0x100000000000000"),O("0x10000000000000000");var H=function(F){var q={};return Object.keys(F).forEach(function(B){var R=F[B];w(R)?q[B]={bytes:R.buffer,byteOffset:R.byteOffset,byteLength:R.byteLength}:q[B]=R}),q};self.onmessage=function(L){var F=L.data,q=new Uint8Array(F.encrypted.bytes,F.encrypted.byteOffset,F.encrypted.byteLength),B=new Uint32Array(F.key.bytes,F.key.byteOffset,F.key.byteLength/4),R=new Uint32Array(F.iv.bytes,F.iv.byteOffset,F.iv.byteLength/4);new b(q,B,R,function(U,N){self.postMessage(H({source:F.source,decrypted:N}),[N.buffer])})}})),mT=jf(pT),gT=function(t){var r=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(r="main-desc"),r},aa=function(t,r){t.abort(),t.pause(),r&&r.activePlaylistLoader&&(r.activePlaylistLoader.pause(),r.activePlaylistLoader=null)},js=function(t,r){r.activePlaylistLoader=t,t.load()},vT=function(t,r){return function(){var n=r.segmentLoaders,e=n[t],i=n.main,s=r.mediaTypes[t],o=s.activeTrack(),u=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastGroup_;if(!(u&&c&&u.id===c.id)&&(s.lastGroup_=u,s.lastTrack_=o,aa(e,s),!(!u||u.isMasterPlaylist))){if(!u.playlistLoader){l&&i.resetEverything();return}e.resyncLoader(),js(u.playlistLoader,s)}}},yT=function(t,r){return function(){var n=r.segmentLoaders[t],e=r.mediaTypes[t];e.lastGroup_=null,n.abort(),n.pause()}},_T=function(t,r){return function(){var n=r.masterPlaylistLoader,e=r.segmentLoaders,i=e[t],s=e.main,o=r.mediaTypes[t],u=o.activeTrack(),l=o.getActiveGroup(),c=o.activePlaylistLoader,g=o.lastTrack_;if(!(g&&u&&g.id===u.id)&&(o.lastGroup_=l,o.lastTrack_=u,aa(i,o),!!l)){if(l.isMasterPlaylist){if(!u||!g||u.id===g.id)return;var m=r.vhs.masterPlaylistController_,_=m.selectPlaylist();if(m.media()===_)return;o.logger_("track change. Switching master audio from "+g.id+" to "+u.id),n.pause(),s.resetEverything(),m.fastQualityChange_(_);return}if(t==="AUDIO"){if(!l.playlistLoader){s.setAudio(!0),s.resetEverything();return}i.setAudio(!0),s.setAudio(!1)}if(c===l.playlistLoader){js(l.playlistLoader,o);return}i.track&&i.track(u),i.resetEverything(),js(l.playlistLoader,o)}}},sa={AUDIO:function(t,r){return function(){var n=r.segmentLoaders[t],e=r.mediaTypes[t],i=r.blacklistCurrentPlaylist;aa(n,e);var s=e.activeTrack(),o=e.activeGroup(),u=(o.filter(function(g){return g.default})[0]||o[0]).id,l=e.tracks[u];if(s===l){i({message:"Problem encountered loading the default audio track."});return}I.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var c in e.tracks)e.tracks[c].enabled=e.tracks[c]===l;e.onTrackChanged()}},SUBTITLES:function(t,r){return function(){var n=r.segmentLoaders[t],e=r.mediaTypes[t];I.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),aa(n,e);var i=e.activeTrack();i&&(i.mode="disabled"),e.onTrackChanged()}}},ud={AUDIO:function(t,r,n){if(!!r){var e=n.tech,i=n.requestOptions,s=n.segmentLoaders[t];r.on("loadedmetadata",function(){var o=r.media();s.playlist(o,i),(!e.paused()||o.endList&&e.preload()!=="none")&&s.load()}),r.on("loadedplaylist",function(){s.playlist(r.media(),i),e.paused()||s.load()}),r.on("error",sa[t](t,n))}},SUBTITLES:function(t,r,n){var e=n.tech,i=n.requestOptions,s=n.segmentLoaders[t],o=n.mediaTypes[t];r.on("loadedmetadata",function(){var u=r.media();s.playlist(u,i),s.track(o.activeTrack()),(!e.paused()||u.endList&&e.preload()!=="none")&&s.load()}),r.on("loadedplaylist",function(){s.playlist(r.media(),i),e.paused()||s.load()}),r.on("error",sa[t](t,n))}},TT={AUDIO:function(t,r){var n=r.vhs,e=r.sourceType,i=r.segmentLoaders[t],s=r.requestOptions,o=r.master.mediaGroups,u=r.mediaTypes[t],l=u.groups,c=u.tracks,g=u.logger_,m=r.masterPlaylistLoader,_=Yi(m.master);(!o[t]||Object.keys(o[t]).length===0)&&(o[t]={main:{default:{default:!0}}},_&&(o[t].main.default.playlists=m.master.playlists));for(var b in o[t]){l[b]||(l[b]=[]);for(var S in o[t][b]){var x=o[t][b][S],w=void 0;if(_?(g("AUDIO group '"+b+"' label '"+S+"' is a master playlist"),x.isMasterPlaylist=!0,w=null):e==="vhs-json"&&x.playlists?w=new Lr(x.playlists[0],n,s):x.resolvedUri?w=new Lr(x.resolvedUri,n,s):x.playlists&&e==="dash"?w=new Us(x.playlists[0],n,s,m):w=null,x=I.mergeOptions({id:S,playlistLoader:w},x),ud[t](t,x.playlistLoader,r),l[b].push(x),typeof c[S]>"u"){var O=new I.AudioTrack({id:S,kind:gT(x),enabled:!1,language:x.language,default:x.default,label:S});c[S]=O}}}i.on("error",sa[t](t,r))},SUBTITLES:function(t,r){var n=r.tech,e=r.vhs,i=r.sourceType,s=r.segmentLoaders[t],o=r.requestOptions,u=r.master.mediaGroups,l=r.mediaTypes[t],c=l.groups,g=l.tracks,m=r.masterPlaylistLoader;for(var _ in u[t]){c[_]||(c[_]=[]);for(var b in u[t][_])if(!u[t][_][b].forced){var S=u[t][_][b],x=void 0;if(i==="hls")x=new Lr(S.resolvedUri,e,o);else if(i==="dash"){var w=S.playlists.filter(function(H){return H.excludeUntil!==1/0});if(!w.length)return;x=new Us(S.playlists[0],e,o,m)}else i==="vhs-json"&&(x=new Lr(S.playlists?S.playlists[0]:S.resolvedUri,e,o));if(S=I.mergeOptions({id:b,playlistLoader:x},S),ud[t](t,S.playlistLoader,r),c[_].push(S),typeof g[b]>"u"){var O=n.addRemoteTextTrack({id:b,kind:"subtitles",default:S.default&&S.autoselect,language:S.language,label:b},!1).track;g[b]=O}}}s.on("error",sa[t](t,r))},"CLOSED-CAPTIONS":function(t,r){var n=r.tech,e=r.master.mediaGroups,i=r.mediaTypes[t],s=i.groups,o=i.tracks;for(var u in e[t]){s[u]||(s[u]=[]);for(var l in e[t][u]){var c=e[t][u][l];if(!!/^(?:CC|SERVICE)/.test(c.instreamId)){var g=n.options_.vhs&&n.options_.vhs.captionServices||{},m={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(g[m.instreamId]&&(m=I.mergeOptions(m,g[m.instreamId])),m.default===void 0&&delete m.default,s[u].push(I.mergeOptions({id:l},c)),typeof o[l]>"u"){var _=n.addRemoteTextTrack({id:m.instreamId,kind:"captions",default:m.default,language:m.language,label:m.label},!1).track;o[l]=_}}}}}},bT=function a(t,r){for(var n=0;n<t.length;n++)if(zo(r,t[n])||t[n].playlists&&a(t[n].playlists,r))return!0;return!1},xT=function(t,r){return function(n){var e=r.masterPlaylistLoader,i=r.mediaTypes[t].groups,s=e.media();if(!s)return null;var o=null;s.attributes[t]&&(o=i[s.attributes[t]]);var u=Object.keys(i);if(!o)if(t==="AUDIO"&&u.length>1&&Yi(r.master))for(var l=0;l<u.length;l++){var c=i[u[l]];if(bT(c,s)){o=c;break}}else i.main?o=i.main:u.length===1&&(o=i[u[0]]);return typeof n>"u"?o:n===null||!o?null:o.filter(function(g){return g.id===n.id})[0]||null}},ST={AUDIO:function(t,r){return function(){var n=r.mediaTypes[t].tracks;for(var e in n)if(n[e].enabled)return n[e];return null}},SUBTITLES:function(t,r){return function(){var n=r.mediaTypes[t].tracks;for(var e in n)if(n[e].mode==="showing"||n[e].mode==="hidden")return n[e];return null}}},ET=function(t,r){var n=r.mediaTypes;return function(){var e=n[t].activeTrack();return e?n[t].activeGroup(e):null}},CT=function(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(b){TT[b](b,t)});var r=t.mediaTypes,n=t.masterPlaylistLoader,e=t.tech,i=t.vhs,s=t.segmentLoaders,o=s.AUDIO,u=s.main;["AUDIO","SUBTITLES"].forEach(function(b){r[b].activeGroup=xT(b,t),r[b].activeTrack=ST[b](b,t),r[b].onGroupChanged=vT(b,t),r[b].onGroupChanging=yT(b,t),r[b].onTrackChanged=_T(b,t),r[b].getActiveGroup=ET(b,t)});var l=r.AUDIO.activeGroup();if(l){var c=(l.filter(function(b){return b.default})[0]||l[0]).id;r.AUDIO.tracks[c].enabled=!0,r.AUDIO.onGroupChanged(),r.AUDIO.onTrackChanged();var g=r.AUDIO.getActiveGroup();g.playlistLoader?(u.setAudio(!1),o.setAudio(!0)):u.setAudio(!0)}n.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(b){return r[b].onGroupChanged()})}),n.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(b){return r[b].onGroupChanging()})});var m=function(){r.AUDIO.onTrackChanged(),e.trigger({type:"usage",name:"vhs-audio-change"}),e.trigger({type:"usage",name:"hls-audio-change"})};e.audioTracks().addEventListener("change",m),e.remoteTextTracks().addEventListener("change",r.SUBTITLES.onTrackChanged),i.on("dispose",function(){e.audioTracks().removeEventListener("change",m),e.remoteTextTracks().removeEventListener("change",r.SUBTITLES.onTrackChanged)}),e.clearTracks("audio");for(var _ in r.AUDIO.tracks)e.audioTracks().addTrack(r.AUDIO.tracks[_])},AT=function(){var t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(r){t[r]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Ot,activeTrack:Ot,getActiveGroup:Ot,onGroupChanged:Ot,onTrackChanged:Ot,lastTrack_:null,logger_:pt("MediaGroups["+r+"]")}}),t},DT=60*2,kt,wT=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],kT=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},PT=function(t){var r=t.currentPlaylist,n=t.buffered,e=t.currentTime,i=t.nextPlaylist,s=t.bufferLowWaterLine,o=t.bufferHighWaterLine,u=t.duration,l=t.experimentalBufferBasedABR,c=t.log;if(!i)return I.log.warn("We received no playlist to switch to. Please check your stream."),!1;var g="allowing switch "+(r&&r.id||"null")+" -> "+i.id;if(!r)return c(g+" as current playlist is not set"),!0;if(i.id===r.id)return!1;var m=Boolean(Or(n,e).length);if(!r.endList)return!m&&typeof r.partTargetDuration=="number"?(c("not "+g+" as current playlist is live llhls, but currentTime isn't in buffered."),!1):(c(g+" as current playlist is live"),!0);var _=jo(n,e),b=l?we.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:we.MAX_BUFFER_LOW_WATER_LINE;if(u<b)return c(g+" as duration < max low water line ("+u+" < "+b+")"),!0;var S=i.attributes.BANDWIDTH,x=r.attributes.BANDWIDTH;if(S<x&&(!l||_<o)){var w=g+" as next bandwidth < current bandwidth ("+S+" < "+x+")";return l&&(w+=" and forwardBuffer < bufferHighWaterLine ("+_+" < "+o+")"),c(w),!0}if((!l||S>x)&&_>=s){var O=g+" as forwardBuffer >= bufferLowWaterLine ("+_+" >= "+s+")";return l&&(O+=" and next bandwidth > current bandwidth ("+S+" > "+x+")"),c(O),!0}return c("not "+g+" as no switching criteria met"),!1},IT=function(a){W(t,a);function t(n){var e;e=a.call(this)||this;var i=n.src,s=n.handleManifestRedirects,o=n.withCredentials,u=n.tech,l=n.bandwidth,c=n.externVhs,g=n.useCueTags,m=n.blacklistDuration,_=n.enableLowInitialPlaylist,b=n.sourceType,S=n.cacheEncryptionKeys,x=n.experimentalBufferBasedABR,w=n.experimentalLeastPixelDiffSelector,O=n.captionServices;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");var H=n.maxPlaylistRetries;(H===null||typeof H>"u")&&(H=1/0),kt=c,e.experimentalBufferBasedABR=Boolean(x),e.experimentalLeastPixelDiffSelector=Boolean(w),e.withCredentials=o,e.tech_=u,e.vhs_=u.vhs,e.sourceType_=b,e.useCueTags_=g,e.blacklistDuration=m,e.maxPlaylistRetries=H,e.enableLowInitialPlaylist=_,e.useCueTags_&&(e.cueTagsTrack_=e.tech_.addTextTrack("metadata","ad-cues"),e.cueTagsTrack_.inBandMetadataTrackDispatchType=""),e.requestOptions_={withCredentials:o,handleManifestRedirects:s,maxPlaylistRetries:H,timeout:null},e.on("error",e.pauseLoading),e.mediaTypes_=AT(),e.mediaSource=new A.MediaSource,e.handleDurationChange_=e.handleDurationChange_.bind(ee(e)),e.handleSourceOpen_=e.handleSourceOpen_.bind(ee(e)),e.handleSourceEnded_=e.handleSourceEnded_.bind(ee(e)),e.mediaSource.addEventListener("durationchange",e.handleDurationChange_),e.mediaSource.addEventListener("sourceopen",e.handleSourceOpen_),e.mediaSource.addEventListener("sourceended",e.handleSourceEnded_),e.seekable_=I.createTimeRanges(),e.hasPlayed_=!1,e.syncController_=new fT(n),e.segmentMetadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,e.decrypter_=new mT,e.sourceUpdater_=new nh(e.mediaSource),e.inbandTextTracks_={},e.timelineChangeController_=new hT;var L={vhs:e.vhs_,parse708captions:n.parse708captions,useDtsForTimestampOffset:n.useDtsForTimestampOffset,captionServices:O,mediaSource:e.mediaSource,currentTime:e.tech_.currentTime.bind(e.tech_),seekable:function(){return e.seekable()},seeking:function(){return e.tech_.seeking()},duration:function(){return e.duration()},hasPlayed:function(){return e.hasPlayed_},goalBufferLength:function(){return e.goalBufferLength()},bandwidth:l,syncController:e.syncController_,decrypter:e.decrypter_,sourceType:e.sourceType_,inbandTextTracks:e.inbandTextTracks_,cacheEncryptionKeys:S,sourceUpdater:e.sourceUpdater_,timelineChangeController:e.timelineChangeController_,experimentalExactManifestTimings:n.experimentalExactManifestTimings};e.masterPlaylistLoader_=e.sourceType_==="dash"?new Us(i,e.vhs_,e.requestOptions_):new Lr(i,e.vhs_,e.requestOptions_),e.setupMasterPlaylistLoaderListeners_(),e.mainSegmentLoader_=new Hs(I.mergeOptions(L,{segmentMetadataTrack:e.segmentMetadataTrack_,loaderType:"main"}),n),e.audioSegmentLoader_=new Hs(I.mergeOptions(L,{loaderType:"audio"}),n),e.subtitleSegmentLoader_=new uT(I.mergeOptions(L,{loaderType:"vtt",featuresNativeTextTracks:e.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(B,R){function U(){u.off("vttjserror",N),B()}function N(){u.off("vttjsloaded",U),R()}u.one("vttjsloaded",U),u.one("vttjserror",N),u.addWebVttScript_()})}}),n),e.setupSegmentLoaderListeners_(),e.experimentalBufferBasedABR&&(e.masterPlaylistLoader_.one("loadedplaylist",function(){return e.startABRTimer_()}),e.tech_.on("pause",function(){return e.stopABRTimer_()}),e.tech_.on("play",function(){return e.startABRTimer_()})),wT.forEach(function(q){e[q+"_"]=kT.bind(ee(e),q)}),e.logger_=pt("MPC"),e.triggeredFmp4Usage=!1,e.tech_.preload()==="none"?(e.loadOnPlay_=function(){e.loadOnPlay_=null,e.masterPlaylistLoader_.load()},e.tech_.one("play",e.loadOnPlay_)):e.masterPlaylistLoader_.load(),e.timeToLoadedData__=-1,e.mainAppendsToLoadedData__=-1,e.audioAppendsToLoadedData__=-1;var F=e.tech_.preload()==="none"?"play":"loadstart";return e.tech_.one(F,function(){var q=Date.now();e.tech_.one("loadeddata",function(){e.timeToLoadedData__=Date.now()-q,e.mainAppendsToLoadedData__=e.mainSegmentLoader_.mediaAppends,e.audioAppendsToLoadedData__=e.audioSegmentLoader_.mediaAppends})}),e}var r=t.prototype;return r.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},r.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},r.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),i=this.audioAppendsToLoadedData_();return e===-1||i===-1?-1:e+i},r.timeToLoadedData_=function(){return this.timeToLoadedData__},r.checkABR_=function(e){e===void 0&&(e="abr");var i=this.selectPlaylist();i&&this.shouldSwitchToMedia_(i)&&this.switchMedia_(i,e)},r.switchMedia_=function(e,i,s){var o=this.media(),u=o&&(o.id||o.uri),l=e.id||e.uri;u&&u!==l&&(this.logger_("switch media "+u+" -> "+l+" from "+i),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+i})),this.masterPlaylistLoader_.media(e,s)},r.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=A.setInterval(function(){return e.checkABR_()},250)},r.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(A.clearInterval(this.abrTimer_),this.abrTimer_=null)},r.getAudioTrackPlaylists_=function(){var e=this.master(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;var s=e.mediaGroups.AUDIO,o=Object.keys(s),u;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)u=this.mediaTypes_.AUDIO.activeTrack();else{var l=s.main||o.length&&s[o[0]];for(var c in l)if(l[c].default){u={label:c};break}}if(!u)return i;var g=[];for(var m in s)if(s[m][u.label]){var _=s[m][u.label];if(_.playlists&&_.playlists.length)g.push.apply(g,_.playlists);else if(_.uri)g.push(_);else if(e.playlists.length)for(var b=0;b<e.playlists.length;b++){var S=e.playlists[b];S.attributes&&S.attributes.AUDIO&&S.attributes.AUDIO===m&&g.push(S)}}return g.length?g:i},r.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var i=e.masterPlaylistLoader_.media(),s=i.targetDuration*1.5*1e3;Fs(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=s,i.endList&&e.tech_.preload()!=="none"&&(e.mainSegmentLoader_.playlist(i,e.requestOptions_),e.mainSegmentLoader_.load()),CT({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),i),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){e.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var i=e.masterPlaylistLoader_.media();if(!i){e.excludeUnsupportedVariants_();var s;if(e.enableLowInitialPlaylist&&(s=e.selectInitialPlaylist()),s||(s=e.selectPlaylist()),!s||!e.shouldSwitchToMedia_(s))return;e.initialMedia_=s,e.switchMedia_(e.initialMedia_,"initial");var o=e.sourceType_==="vhs-json"&&e.initialMedia_.segments;if(!o)return;i=e.initialMedia_}e.handleUpdatedMediaPlaylist(i)}),this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var i=e.masterPlaylistLoader_.media(),s=i.targetDuration*1.5*1e3;Fs(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=s,e.masterPlaylistLoader_.load(),e.mainSegmentLoader_.playlist(i,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var i=e.masterPlaylistLoader_.media();if(i.lastExcludeReason_!=="playlist-unchanged"){var s=e.stuckAtPlaylistEnd_(i);s&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck"))}}),this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},r.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},r.triggerPresenceUsage_=function(e,i){var s=e.mediaGroups||{},o=!0,u=Object.keys(s.AUDIO);for(var l in s.AUDIO)for(var c in s.AUDIO[l]){var g=s.AUDIO[l][c];g.uri||(o=!1)}o&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(s.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),kt.Playlist.isAes(i)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),u.length&&Object.keys(s.AUDIO[u[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},r.shouldSwitchToMedia_=function(e){var i=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,s=this.tech_.currentTime(),o=this.bufferLowWaterLine(),u=this.bufferHighWaterLine(),l=this.tech_.buffered();return PT({buffered:l,currentTime:s,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:u,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},r.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(s){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},DT))});var i=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var o=e.getCodecsOrExclude_();!o||e.sourceUpdater_.addOrChangeSourceBuffers(o)};this.mainSegmentLoader_.on("trackinfo",i),this.audioSegmentLoader_.on("trackinfo",i),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},r.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},r.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},r.smoothQualityChange_=function(e){e===void 0&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},r.fastQualityChange_=function(e){var i=this;if(e===void 0&&(e=this.selectPlaylist()),e===this.masterPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){I.browser.IE_VERSION||I.browser.IS_EDGE?i.tech_.setCurrentTime(i.tech_.currentTime()+.04):i.tech_.setCurrentTime(i.tech_.currentTime())})},r.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}},r.setupFirstPlay=function(){var e=this,i=this.masterPlaylistLoader_.media();if(!i||this.tech_.paused()||this.hasPlayed_)return!1;if(!i.endList){var s=this.seekable();if(!s.length)return!1;if(I.browser.IE_VERSION&&this.tech_.readyState()===0)return this.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.tech_.setCurrentTime(s.end(0)),e.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(s.end(0))}return this.hasPlayed_=!0,this.load(),!0},r.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,function(i){})}this.trigger("sourceopen")},r.handleSourceEnded_=function(){if(!!this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(!(!e||!e.length)){var i=this.duration();e[e.length-1].endTime=isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i}}},r.handleDurationChange_=function(){this.tech_.trigger("durationchange")},r.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var i=this.mainSegmentLoader_.getCurrentMediaInfo_();!i||i.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}!e||(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},r.stuckAtPlaylistEnd_=function(e){var i=this.seekable();if(!i.length)return!1;var s=this.syncController_.getExpiredTime(e,this.duration());if(s===null)return!1;var o=kt.Playlist.playlistEnd(e,s),u=this.tech_.currentTime(),l=this.tech_.buffered();if(!l.length)return o-u<=Tt;var c=l.end(l.length-1);return c-u<=Tt&&o-c<=Tt},r.blacklistCurrentPlaylist=function(e,i){e===void 0&&(e={});var s=e.playlist||this.masterPlaylistLoader_.media();if(i=i||e.blacklistDuration||this.blacklistDuration,!s){this.error=e,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}s.playlistErrors_++;var o=this.masterPlaylistLoader_.master.playlists,u=o.filter(Da),l=u.length===1&&u[0]===s;if(o.length===1&&i!==1/0)return I.log.warn("Problem encountered with playlist "+s.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(l);if(l){var c=!1;o.forEach(function(w){if(w!==s){var O=w.excludeUntil;typeof O<"u"&&O!==1/0&&(c=!0,delete w.excludeUntil)}}),c&&(I.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}var g;s.playlistErrors_>this.maxPlaylistRetries?g=1/0:g=Date.now()+i*1e3,s.excludeUntil=g,e.reason&&(s.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var m=this.selectPlaylist();if(!m){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}var _=e.internal?this.logger_:I.log.warn,b=e.message?" "+e.message:"";_((e.internal?"Internal problem":"Problem")+" encountered with playlist "+s.id+"."+(b+" Switching to playlist "+m.id+".")),m.attributes.AUDIO!==s.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),m.attributes.SUBTITLES!==s.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var S=m.targetDuration/2*1e3||5*1e3,x=typeof m.lastRequest=="number"&&Date.now()-m.lastRequest<=S;return this.switchMedia_(m,"exclude",l||x)},r.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},r.delegateLoaders_=function(e,i){var s=this,o=[],u=e==="all";(u||e==="main")&&o.push(this.masterPlaylistLoader_);var l=[];(u||e==="audio")&&l.push("AUDIO"),(u||e==="subtitle")&&(l.push("CLOSED-CAPTIONS"),l.push("SUBTITLES")),l.forEach(function(c){var g=s.mediaTypes_[c]&&s.mediaTypes_[c].activePlaylistLoader;g&&o.push(g)}),["main","audio","subtitle"].forEach(function(c){var g=s[c+"SegmentLoader_"];g&&(e===c||e==="all")&&o.push(g)}),o.forEach(function(c){return i.forEach(function(g){typeof c[g]=="function"&&c[g]()})})},r.setCurrentTime=function(e){var i=Or(this.tech_.buffered(),e);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())||!this.masterPlaylistLoader_.media().segments)return 0;if(i&&i.length)return e;this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),this.load()},r.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:kt.Playlist.duration(e):1/0:0},r.seekable=function(){return this.seekable_},r.onSyncInfoUpdate_=function(){var e;if(!!this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(!!i){var s=this.syncController_.getExpiredTime(i,this.duration());if(s!==null){var o=this.masterPlaylistLoader_.master,u=kt.Playlist.seekable(i,s,kt.Playlist.liveEdgeDelay(o,i));if(u.length!==0&&!(this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),s=this.syncController_.getExpiredTime(i,this.duration()),s===null||(e=kt.Playlist.seekable(i,s,kt.Playlist.liveEdgeDelay(o,i)),e.length===0)))){var l,c;this.seekable_&&this.seekable_.length&&(l=this.seekable_.end(0),c=this.seekable_.start(0)),e?e.start(0)>u.end(0)||u.start(0)>e.end(0)?this.seekable_=u:this.seekable_=I.createTimeRanges([[e.start(0)>u.start(0)?e.start(0):u.start(0),e.end(0)<u.end(0)?e.end(0):u.end(0)]]):this.seekable_=u,!(this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===l&&this.seekable_.start(0)===c)&&(this.logger_("seekable updated ["+bf(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},r.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){var i=this.seekable();if(!i.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<i.end(i.length-1))&&this.sourceUpdater_.setDuration(i.end(i.length-1));return}var s=this.tech_.buffered(),o=kt.Playlist.duration(this.masterPlaylistLoader_.media());s.length>0&&(o=Math.max(o,s.end(s.length-1))),this.mediaSource.duration!==o&&this.sourceUpdater_.setDuration(o)},r.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(i){var s=e.mediaTypes_[i].groups;for(var o in s)s[o].forEach(function(u){u.playlistLoader&&u.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},r.master=function(){return this.masterPlaylistLoader_.master},r.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},r.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),s=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!s)},r.getCodecsOrExclude_=function(){var e=this,i={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},s=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();i.video=i.main;var o=ki(this.master(),s),u={},l=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(i.main.hasVideo&&(u.video=o.video||i.main.videoCodec||eg),i.main.isMuxed&&(u.video+=","+(o.audio||i.main.audioCodec||Wu)),(i.main.hasAudio&&!i.main.isMuxed||i.audio.hasAudio||l)&&(u.audio=o.audio||i.main.audioCodec||i.audio.audioCodec||Wu,i.audio.isFmp4=i.main.hasAudio&&!i.main.isMuxed?i.main.isFmp4:i.audio.isFmp4),!u.audio&&!u.video){this.blacklistCurrentPlaylist({playlist:s,message:"Could not determine codecs for playlist.",blacklistDuration:1/0});return}var c=function(w,O){return w?In(O):Ka(O)},g={},m;if(["video","audio"].forEach(function(x){if(u.hasOwnProperty(x)&&!c(i[x].isFmp4,u[x])){var w=i[x].isFmp4?"browser":"muxer";g[w]=g[w]||[],g[w].push(u[x]),x==="audio"&&(m=w)}}),l&&m&&s.attributes.AUDIO){var _=s.attributes.AUDIO;this.master().playlists.forEach(function(x){var w=x.attributes&&x.attributes.AUDIO;w===_&&x!==s&&(x.excludeUntil=1/0)}),this.logger_("excluding audio group "+_+" as "+m+' does not support codec(s): "'+u.audio+'"')}if(Object.keys(g).length){var b=Object.keys(g).reduce(function(x,w){return x&&(x+=", "),x+=w+' does not support codec(s): "'+g[w].join(",")+'"',x},"")+".";this.blacklistCurrentPlaylist({playlist:s,internal:!0,message:b,blacklistDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var S=[];if(["video","audio"].forEach(function(x){var w=(vt(e.sourceUpdater_.codecs[x]||"")[0]||{}).type,O=(vt(u[x]||"")[0]||{}).type;w&&O&&w.toLowerCase()!==O.toLowerCase()&&S.push('"'+e.sourceUpdater_.codecs[x]+'" -> "'+u[x]+'"')}),S.length){this.blacklistCurrentPlaylist({playlist:s,message:"Codec switching not supported: "+S.join(", ")+".",blacklistDuration:1/0,internal:!0});return}}return u},r.tryToCreateSourceBuffers_=function(){if(!(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers())&&!!this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(!!e){this.sourceUpdater_.createSourceBuffers(e);var i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}}},r.excludeUnsupportedVariants_=function(){var e=this,i=this.master().playlists,s=[];Object.keys(i).forEach(function(o){var u=i[o];if(s.indexOf(u.id)===-1){s.push(u.id);var l=ki(e.master,u),c=[];l.audio&&!Ka(l.audio)&&!In(l.audio)&&c.push("audio codec "+l.audio),l.video&&!Ka(l.video)&&!In(l.video)&&c.push("video codec "+l.video),l.text&&l.text==="stpp.ttml.im1t"&&c.push("text codec "+l.text),c.length&&(u.excludeUntil=1/0,e.logger_("excluding "+u.id+" for unsupported: "+c.join(", ")))}})},r.excludeIncompatibleVariants_=function(e){var i=this,s=[],o=this.master().playlists,u=ia(vt(e)),l=Ql(u),c=u.video&&vt(u.video)[0]||null,g=u.audio&&vt(u.audio)[0]||null;Object.keys(o).forEach(function(m){var _=o[m];if(!(s.indexOf(_.id)!==-1||_.excludeUntil===1/0)){s.push(_.id);var b=[],S=ki(i.masterPlaylistLoader_.master,_),x=Ql(S);if(!(!S.audio&&!S.video)){if(x!==l&&b.push('codec count "'+x+'" !== "'+l+'"'),!i.sourceUpdater_.canChangeType()){var w=S.video&&vt(S.video)[0]||null,O=S.audio&&vt(S.audio)[0]||null;w&&c&&w.type.toLowerCase()!==c.type.toLowerCase()&&b.push('video codec "'+w.type+'" !== "'+c.type+'"'),O&&g&&O.type.toLowerCase()!==g.type.toLowerCase()&&b.push('audio codec "'+O.type+'" !== "'+g.type+'"')}b.length&&(_.excludeUntil=1/0,i.logger_("blacklisting "+_.id+": "+b.join(" && ")))}}})},r.updateAdCues_=function(e){var i=0,s=this.seekable();s.length&&(i=s.start(0)),dT(e,this.cueTagsTrack_,i)},r.goalBufferLength=function(){var e=this.tech_.currentTime(),i=we.GOAL_BUFFER_LENGTH,s=we.GOAL_BUFFER_LENGTH_RATE,o=Math.max(i,we.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*s,o)},r.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),i=we.BUFFER_LOW_WATER_LINE,s=we.BUFFER_LOW_WATER_LINE_RATE,o=Math.max(i,we.MAX_BUFFER_LOW_WATER_LINE),u=Math.max(i,we.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*s,this.experimentalBufferBasedABR?u:o)},r.bufferHighWaterLine=function(){return we.BUFFER_HIGH_WATER_LINE},t}(I.EventTarget),OT=function(t,r,n){return function(e){var i=t.master.playlists[r],s=Wo(i),o=Da(i);return typeof e>"u"?o:(e?delete i.disabled:i.disabled=!0,e!==o&&!s&&(n(),e?t.trigger("renditionenabled"):t.trigger("renditiondisabled")),e)}},LT=function(t,r,n){var e=t.masterPlaylistController_,i=t.options_.smoothQualityChange,s=i?"smooth":"fast",o=e[s+"QualityChange_"].bind(e);if(r.attributes){var u=r.attributes.RESOLUTION;this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=r.attributes.BANDWIDTH,this.frameRate=r.attributes["FRAME-RATE"]}this.codecs=ki(e.master(),r),this.playlist=r,this.id=n,this.enabled=OT(t.playlists,r.id,o)},FT=function(t){t.representations=function(){var r=t.masterPlaylistController_.master(),n=Yi(r)?t.masterPlaylistController_.getAudioTrackPlaylists_():r.playlists;return n?n.filter(function(e){return!Wo(e)}).map(function(e,i){return new LT(t,e,e.id)}):[]}},ld=["seeking","seeked","pause","playing","error"],RT=function(){function a(r){var n=this;this.masterPlaylistController_=r.masterPlaylistController,this.tech_=r.tech,this.seekable=r.seekable,this.allowSeeksWithinUnsafeLiveWindow=r.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=r.liveRangeSafeTimeDelta,this.media=r.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=pt("PlaybackWatcher"),this.logger_("initialize");var e=function(){return n.monitorCurrentTime_()},i=function(){return n.monitorCurrentTime_()},s=function(){return n.techWaiting_()},o=function(){return n.cancelTimer_()},u=this.masterPlaylistController_,l=["main","subtitle","audio"],c={};l.forEach(function(m){c[m]={reset:function(){return n.resetSegmentDownloads_(m)},updateend:function(){return n.checkSegmentDownloads_(m)}},u[m+"SegmentLoader_"].on("appendsdone",c[m].updateend),u[m+"SegmentLoader_"].on("playlistupdate",c[m].reset),n.tech_.on(["seeked","seeking"],c[m].reset)});var g=function(_){["main","audio"].forEach(function(b){u[b+"SegmentLoader_"][_]("appended",n.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){n.fixesBadSeeks_()&&(n.consecutiveUpdates=0,n.lastRecordedTime=n.tech_.currentTime(),g("off"))},this.clearSeekingAppendCheck_=function(){return g("off")},this.watchForBadSeeking_=function(){n.clearSeekingAppendCheck_(),g("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(ld,o),this.tech_.on("canplay",i),this.tech_.one("play",e),this.dispose=function(){n.clearSeekingAppendCheck_(),n.logger_("dispose"),n.tech_.off("waiting",s),n.tech_.off(ld,o),n.tech_.off("canplay",i),n.tech_.off("play",e),n.tech_.off("seeking",n.watchForBadSeeking_),n.tech_.off("seeked",n.clearSeekingAppendCheck_),l.forEach(function(m){u[m+"SegmentLoader_"].off("appendsdone",c[m].updateend),u[m+"SegmentLoader_"].off("playlistupdate",c[m].reset),n.tech_.off(["seeked","seeking"],c[m].reset)}),n.checkCurrentTimeTimeout_&&A.clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}var t=a.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&A.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=A.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(n){var e=this.masterPlaylistController_[n+"SegmentLoader_"];this[n+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+n+" loader"),this[n+"StalledDownloads_"]=0,this[n+"Buffered_"]=e.buffered_()},t.checkSegmentDownloads_=function(n){var e=this.masterPlaylistController_,i=e[n+"SegmentLoader_"],s=i.buffered_(),o=Ay(this[n+"Buffered_"],s);if(this[n+"Buffered_"]=s,o){this.resetSegmentDownloads_(n);return}this[n+"StalledDownloads_"]++,this.logger_("found #"+this[n+"StalledDownloads_"]+" "+n+" appends that did not increase buffer (possible stalled download)",{playlistId:i.playlist_&&i.playlist_.id,buffered:ur(s)}),!(this[n+"StalledDownloads_"]<10)&&(this.logger_(n+" loader stalled download exclusion"),this.resetSegmentDownloads_(n),this.tech_.trigger({type:"usage",name:"vhs-"+n+"-download-exclusion"}),n!=="subtitle"&&e.blacklistCurrentPlaylist({message:"Excessive "+n+" segment downloading detected."},1/0))},t.checkCurrentTime_=function(){if(!(this.tech_.paused()||this.tech_.seeking())){var n=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===n&&(!e.length||n+Tt>=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&n===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):n===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=n)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){var n=this.tech_.seeking();if(!n)return!1;var e=this.seekable(),i=this.tech_.currentTime(),s=this.afterSeekableWindow_(e,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow),o;if(s){var u=e.end(e.length-1);o=u}if(this.beforeSeekableWindow_(e,i)){var l=e.start(0);o=l+(l===e.end(0)?0:Tt)}if(typeof o<"u")return this.logger_("Trying to seek outside of seekable at time "+i+" with "+("seekable range "+bf(e)+". Seeking to ")+(o+".")),this.tech_.setCurrentTime(o),!0;for(var c=this.masterPlaylistController_.sourceUpdater_,g=this.tech_.buffered(),m=c.audioBuffer?c.audioBuffered():null,_=c.videoBuffer?c.videoBuffered():null,b=this.media(),S=b.partTargetDuration?b.partTargetDuration:(b.targetDuration-Yt)*2,x=[m,_],w=0;w<x.length;w++)if(!!x[w]){var O=jo(x[w],i);if(O<S)return!1}var H=wn(g,i);return H.length===0?!1:(o=H.start(0)+Tt,this.logger_("Buffered region starts ("+H.start(0)+") "+(" just beyond seek point ("+i+"). Seeking to "+o+".")),this.tech_.setCurrentTime(o),!0)},t.waiting_=function(){if(!this.techWaiting_()){var n=this.tech_.currentTime(),e=this.tech_.buffered(),i=Or(e,n);if(i.length&&n+3<=i.end(0)){this.cancelTimer_(),this.tech_.setCurrentTime(n),this.logger_("Stopped at "+n+" while inside a buffered region "+("["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}}},t.techWaiting_=function(){var n=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()||this.timer_!==null)return!0;if(this.beforeSeekableWindow_(n,e)){var i=n.end(n.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to "+("live point (seekable end) "+i)),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var s=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,o=this.tech_.buffered(),u=this.videoUnderflow_({audioBuffered:s.audioBuffered(),videoBuffered:s.videoBuffered(),currentTime:e});if(u)return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var l=wn(o,e);if(l.length>0){var c=l.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+c+", seeking "+("to "+l.start(0))),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),c*1e3,e),!0}return!1},t.afterSeekableWindow_=function(n,e,i,s){if(s===void 0&&(s=!1),!n.length)return!1;var o=n.end(n.length-1)+Tt,u=!i.endList;return u&&s&&(o=n.end(n.length-1)+i.targetDuration*3),e>o},t.beforeSeekableWindow_=function(n,e){return!!(n.length&&n.start(0)>0&&e<n.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(n){var e=n.videoBuffered,i=n.audioBuffered,s=n.currentTime;if(!!e){var o;if(e.length&&i.length){var u=Or(e,s-3),l=Or(e,s),c=Or(i,s);c.length&&!l.length&&u.length&&(o={start:u.end(0),end:c.end(0)})}else{var g=wn(e,s);g.length||(o=this.gapFromVideoUnderflow_(e,s))}return o?(this.logger_("Encountered a gap in video from "+o.start+" to "+o.end+". "+("Seeking to current time "+s)),!0):!1}},t.skipTheGap_=function(n){var e=this.tech_.buffered(),i=this.tech_.currentTime(),s=wn(e,i);this.cancelTimer_(),!(s.length===0||i!==n)&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",n,"nextRange start:",s.start(0)),this.tech_.setCurrentTime(s.start(0)+Yt),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(n,e){for(var i=Sy(n),s=0;s<i.length;s++){var o=i.start(s),u=i.end(s);if(e-o<4&&e-o>2)return{start:o,end:u}}return null},a}(),MT={errorInterval:30,getSource:function(t){var r=this.tech({IWillNotUseThisInPlugins:!0}),n=r.currentSource_||this.currentSource();return t(n)}},NT=function a(t,r){var n=0,e=0,i=I.mergeOptions(MT,r);t.ready(function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var s=function(){e&&t.currentTime(e)},o=function(m){m!=null&&(e=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(m),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){if(Date.now()-n<i.errorInterval*1e3){t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),t.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!i.getSource||typeof i.getSource!="function"){I.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return n=Date.now(),i.getSource.call(t,o)},l=function g(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",g)},c=function(m){l(),a(t,m)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=c},BT=function(t){NT(this,t)},ah="2.16.2",UT="6.0.1",VT="0.22.1",HT="4.8.0",qT="3.1.3",Fe={PlaylistLoader:Lr,Playlist:Ye,utils:Qy,STANDARD_PLAYLIST_SELECTOR:Zl,INITIAL_PLAYLIST_SELECTOR:V_,lastBandwidthSelector:Zl,movingAverageBandwidthSelector:B_,comparePlaylistBandwidth:Xo,comparePlaylistResolution:N_,xhr:Mf()};Object.keys(we).forEach(function(a){Object.defineProperty(Fe,a,{get:function(){return I.log.warn("using Vhs."+a+" is UNSAFE be sure you know what you are doing"),we[a]},set:function(r){if(I.log.warn("using Vhs."+a+" is UNSAFE be sure you know what you are doing"),typeof r!="number"||r<0){I.log.warn("value of Vhs."+a+" must be greater than or equal to 0");return}we[a]=r}})});var sh="videojs-vhs",oh=function(t,r){for(var n=r.media(),e=-1,i=0;i<t.length;i++)if(t[i].id===n.id){e=i;break}t.selectedIndex_=e,t.trigger({selectedIndex:e,type:"change"})},jT=function(t,r){r.representations().forEach(function(n){t.addQualityLevel(n)}),oh(t,r.playlists)};Fe.canPlaySource=function(){return I.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var GT=function(t,r,n){if(!t)return t;var e={};r&&r.attributes&&r.attributes.CODECS&&(e=ia(vt(r.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(e.audio=n.attributes.CODECS);var i=Pi(e.video),s=Pi(e.audio),o={};for(var u in t)o[u]={},s&&(o[u].audioContentType=s),i&&(o[u].videoContentType=i),r.contentProtection&&r.contentProtection[u]&&r.contentProtection[u].pssh&&(o[u].pssh=r.contentProtection[u].pssh),typeof t[u]=="string"&&(o[u].url=t[u]);return I.mergeOptions(t,o)},WT=function(t,r){return t.reduce(function(n,e){if(!e.contentProtection)return n;var i=r.reduce(function(s,o){var u=e.contentProtection[o];return u&&u.pssh&&(s[o]={pssh:u.pssh}),s},{});return Object.keys(i).length&&n.push(i),n},[])},zT=function(t){var r=t.player,n=t.sourceKeySystems,e=t.audioMedia,i=t.mainPlaylists;if(!r.eme.initializeMediaKeys)return Promise.resolve();var s=e?i.concat([e]):i,o=WT(s,Object.keys(n)),u=[],l=[];return o.forEach(function(c){l.push(new Promise(function(g,m){r.tech_.one("keysessioncreated",g)})),u.push(new Promise(function(g,m){r.eme.initializeMediaKeys({keySystems:c},function(_){if(_){m(_);return}g()})}))}),Promise.race([Promise.all(u),Promise.race(l)])},$T=function(t){var r=t.player,n=t.sourceKeySystems,e=t.media,i=t.audioMedia,s=GT(n,e,i);return s?(r.currentSource().keySystems=s,s&&!r.eme?(I.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},uh=function(){if(!A.localStorage)return null;var t=A.localStorage.getItem(sh);if(!t)return null;try{return JSON.parse(t)}catch{return null}},KT=function(t){if(!A.localStorage)return!1;var r=uh();r=r?I.mergeOptions(r,t):t;try{A.localStorage.setItem(sh,JSON.stringify(r))}catch{return!1}return r},XT=function(t){return t.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(t.substring(t.indexOf(",")+1)):t};Fe.supportsNativeHls=function(){if(!G||!G.createElement)return!1;var a=G.createElement("video");if(!I.getTech("Html5").isSupported())return!1;var t=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return t.some(function(r){return/maybe|probably/i.test(a.canPlayType(r))})}();Fe.supportsNativeDash=function(){return!G||!G.createElement||!I.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(G.createElement("video").canPlayType("application/dash+xml"))}();Fe.supportsTypeNatively=function(a){return a==="hls"?Fe.supportsNativeHls:a==="dash"?Fe.supportsNativeDash:!1};Fe.isSupported=function(){return I.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var YT=I.getComponent("Component"),Qo=function(a){W(t,a);function t(n,e,i){var s;if(s=a.call(this,e,I.mergeOptions(i.hls,i.vhs))||this,i.hls&&Object.keys(i.hls).length&&I.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),typeof i.initialBandwidth=="number"&&(s.options_.bandwidth=i.initialBandwidth),s.logger_=pt("VhsHandler"),e.options_&&e.options_.playerId){var o=I(e.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return I.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),e.trigger({type:"usage",name:"hls-player-access"}),ee(s)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return I.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),e.trigger({type:"usage",name:"vhs-player-access"}),ee(s)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return I.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),ee(s)},configurable:!0}),s.player_=o}if(s.tech_=e,s.source_=n,s.stats={},s.ignoreNextSeekingEvent_=!1,s.setOptions_(),s.options_.overrideNative&&e.overrideNativeAudioTracks&&e.overrideNativeVideoTracks)e.overrideNativeAudioTracks(!0),e.overrideNativeVideoTracks(!0);else if(s.options_.overrideNative&&(e.featuresNativeVideoTracks||e.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return s.on(G,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(u){var l=G.fullscreenElement||G.webkitFullscreenElement||G.mozFullScreenElement||G.msFullscreenElement;l&&l.contains(s.tech_.el())?s.masterPlaylistController_.fastQualityChange_():s.masterPlaylistController_.checkABR_()}),s.on(s.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),s.on(s.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),s.on(s.tech_,"play",s.play),s}var r=t.prototype;return r.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects!==!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,typeof this.options_.blacklistDuration!="number"&&(this.options_.blacklistDuration=5*60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){var i=uh();i&&i.bandwidth&&(this.options_.bandwidth=i.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),i&&i.throughput&&(this.options_.throughput=i.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=we.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===we.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(s){typeof e.source_[s]<"u"&&(e.options_[s]=e.source_[s])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},r.src=function(e,i){var s=this;if(!!e){this.setOptions_(),this.options_.src=XT(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=Fe,this.options_.sourceType=Td(i),this.options_.seekTo=function(l){s.tech_.setCurrentTime(l)},this.options_.smoothQualityChange&&I.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new IT(this.options_);var o=I.mergeOptions({liveRangeSafeTimeDelta:Tt},this.options_,{seekable:function(){return s.seekable()},media:function(){return s.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new RT(o),this.masterPlaylistController_.on("error",function(){var l=I.players[s.tech_.options_.playerId],c=s.masterPlaylistController_.error;typeof c=="object"&&!c.code?c.code=3:typeof c=="string"&&(c={message:c,code:3}),l.error(c)});var u=this.options_.experimentalBufferBasedABR?Fe.movingAverageBandwidthSelector(.55):Fe.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):u.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Fe.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(c){this.masterPlaylistController_.selectPlaylist=c.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(c){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=c,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var c=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,g=A.navigator.connection||A.navigator.mozConnection||A.navigator.webkitConnection,m=1e7;if(this.options_.useNetworkInformationApi&&g){var _=g.downlink*1e3*1e3;_>=m&&c>=m?c=Math.max(c,_):c=_}return c},set:function(c){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=c,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var c=1/(this.bandwidth||1),g;this.throughput>0?g=1/this.throughput:g=0;var m=Math.floor(1/(c+g));return m},set:function(){I.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return s.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return s.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return s.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return s.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return s.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return s.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return s.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return s.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return s.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return s.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return s.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return s.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return s.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return ur(s.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return s.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return s.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return s.tech_.name_},enumerable:!0},duration:{get:function(){return s.tech_.duration()},enumerable:!0},master:{get:function(){return s.playlists.master},enumerable:!0},playerDimensions:{get:function(){return s.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return ur(s.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return s.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){s.options_.useBandwidthFromLocalStorage&&KT({bandwidth:s.bandwidth,throughput:Math.round(s.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){FT(s)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){s.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=A.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},r.createKeySessions_=function(){var e=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),zT({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:i&&i.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(s){e.logger_("error while creating EME key session",s),e.player_.error({message:"Failed to initialize media keys for EME",code:3})})},r.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},r.setupEme_=function(){var e=this,i=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,s=$T({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:i&&i.media()});if(this.player_.tech_.on("keystatuschange",function(o){if(o.status==="output-restricted"){var u=e.masterPlaylistController_.master();if(!(!u||!u.playlists)){var l=[];if(u.playlists.forEach(function(g){g&&g.attributes&&g.attributes.RESOLUTION&&g.attributes.RESOLUTION.height>=720&&(!g.excludeUntil||g.excludeUntil<1/0)&&(g.excludeUntil=1/0,l.push(g))}),l.length){var c;(c=I.log).warn.apply(c,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(l)),e.masterPlaylistController_.fastQualityChange_()}}}}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),I.browser.IE_VERSION===11||!s){this.masterPlaylistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()},r.setupQualityLevels_=function(){var e=this,i=I.players[this.tech_.options_.playerId];!i||!i.qualityLevels||this.qualityLevels_||(this.qualityLevels_=i.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){jT(e.qualityLevels_,e)}),this.playlists.on("mediachange",function(){oh(e.qualityLevels_,e.playlists)}))},t.version=function(){return{"@videojs/http-streaming":ah,"mux.js":UT,"mpd-parser":VT,"m3u8-parser":HT,"aes-decrypter":qT}},r.version=function(){return this.constructor.version()},r.canChangeType=function(){return nh.canChangeType()},r.play=function(){this.masterPlaylistController_.play()},r.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},r.duration=function(){return this.masterPlaylistController_.duration()},r.seekable=function(){return this.masterPlaylistController_.seekable()},r.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&A.URL.revokeObjectURL&&(A.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),a.prototype.dispose.call(this)},r.convertToProgramTime=function(e,i){return n_({playlist:this.masterPlaylistController_.media(),time:e,callback:i})},r.seekToProgramTime=function(e,i,s,o){return s===void 0&&(s=!0),o===void 0&&(o=2),a_({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:o,pauseAfterSeek:s,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})},t}(YT),Ui={name:"videojs-http-streaming",VERSION:ah,canHandleSource:function(t,r){r===void 0&&(r={});var n=I.mergeOptions(I.options,r);return Ui.canPlayType(t.type,n)},handleSource:function(t,r,n){n===void 0&&(n={});var e=I.mergeOptions(I.options,n);return r.vhs=new Qo(t,r,e),I.hasOwnProperty("hls")||Object.defineProperty(r,"hls",{get:function(){return I.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),r.vhs},configurable:!0}),r.vhs.xhr=Mf(),r.vhs.src(t.src,t.type),r.vhs},canPlayType:function(t,r){var n=Td(t);if(!n)return"";var e=Ui.getOverrideNative(r),i=Fe.supportsTypeNatively(n),s=!i||e;return s?"maybe":""},getOverrideNative:function(t){t===void 0&&(t={});var r=t,n=r.vhs,e=n===void 0?{}:n,i=r.hls,s=i===void 0?{}:i,o=!(I.browser.IS_ANY_SAFARI||I.browser.IS_IOS),u=e.overrideNative,l=u===void 0?o:u,c=s.overrideNative,g=c===void 0?!1:c;return g||l}},QT=function(){return In("avc1.4d400d,mp4a.40.2")};QT()&&I.getTech("Html5").registerSourceHandler(Ui,0);I.VhsHandler=Qo;Object.defineProperty(I,"HlsHandler",{get:function(){return I.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Qo},configurable:!0});I.VhsSourceHandler=Ui;Object.defineProperty(I,"HlsSourceHandler",{get:function(){return I.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Ui},configurable:!0});I.Vhs=Fe;Object.defineProperty(I,"Hls",{get:function(){return I.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Fe},configurable:!0});I.use||(I.registerComponent("Hls",Fe),I.registerComponent("Vhs",Fe));I.options.vhs=I.options.vhs||{};I.options.hls=I.options.hls||{};if(!I.getPlugin||!I.getPlugin("reloadSourceOnError")){var JT=I.registerPlugin||I.plugin;JT("reloadSourceOnError",BT)}const ZT={class:"videoPlay"},eb=["src"],tb=Hp({__name:"video",props:{videoSrc:{type:String,required:!0},autoPlay:{type:Boolean,required:!1,default:!1}},setup(a){const t=a,r=qp();let n;const e=async()=>{await Kp();const i={muted:!0,controls:!0,autoplay:!0,loop:!0,language:"zh-CN",techOrder:["html5"]};n=I(r.value,i,()=>{I.log("\u64AD\u653E\u5668\u5DF2\u7ECF\u51C6\u5907\u597D\u4E86!"),t.autoPlay&&t.videoSrc&&n.play(),n.on("ended",()=>{I.log("\u64AD\u653E\u7ED3\u675F\u4E86!")}),n.on("error",()=>{I.log("\u64AD\u653E\u5668\u89E3\u6790\u51FA\u9519!")})})};return jp(()=>{e()}),Gp(()=>t.videoSrc,()=>{n.pause(),n.src(t.videoSrc),n.load(),t.videoSrc&&n.play()}),Wp(()=>{n==null||n.dispose()}),(i,s)=>(zp(),$p("div",ZT,[Mu("video",{ref_key:"m3u8_video",ref:r,class:"video-js vjs-default-skin vjs-big-play-centered",controls:""},[Mu("source",{src:a.videoSrc},null,8,eb)],512)]))}});const ib=Xp(tb,[["__scopeId","data-v-7d285012"],["__file","/Users/luce/Desktop/\u6570\u5B57\u4E09\u519C/Agriculture-front-end/src/components/video/video.vue"]]);export{ib as V};