"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}ct(ht,Ft)
ct(ht,Ft.prototype)
function Vt(e,t){if(t(e))return!0
if(e=e.firstChild)do{if(Vt(e,t))return!0}while(e=e.nextSibling)}function Ht(){}function qt(e,t,i,n){e&&e._inc++
i.namespaceURI===st.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function Wt(e,t,i){if(e&&e._inc){e._inc++
var n=t.childNodes
if(i)n[n.length++]=i
else{for(var r=t.firstChild,a=0;r;){n[a++]=r
r=r.nextSibling}n.length=a}}}function Gt(e,t){var i=t.previousSibling,n=t.nextSibling
i?i.nextSibling=n:e.firstChild=n
n?n.previousSibling=i:e.lastChild=i
Wt(e.ownerDocument,e)
return t}function zt(e,t,i){var n=t.parentNode
n&&n.removeChild(t)
if(t.nodeType===St){var r=t.firstChild
if(null==r)return t
var a=t.lastChild}else r=a=t
var s=i?i.previousSibling:e.lastChild
r.previousSibling=s
a.nextSibling=i
s?s.nextSibling=r:e.firstChild=r
null==i?e.lastChild=a:i.previousSibling=a
do{r.parentNode=e}while(r!==a&&(r=r.nextSibling))
Wt(e.ownerDocument||e,e)
t.nodeType==St&&(t.firstChild=t.lastChild=null)
return t}Ht.prototype={nodeName:"#document",nodeType:Tt,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==St){for(var i=e.firstChild;i;){var n=i.nextSibling
this.insertBefore(i,t)
i=n}return e}null==this.documentElement&&e.nodeType==pt&&(this.documentElement=e)
return zt(this,e,t),e.ownerDocument=this,e},removeChild:function(e){this.documentElement==e&&(this.documentElement=null)
return Gt(this,e)},importNode:function(e,t){return ci(this,e,t)},getElementById:function(e){var t=null
Vt(this.documentElement,(function(i){if(i.nodeType==pt&&i.getAttribute("id")==e){t=i
return!0}}))
return t},getElementsByClassName:function(e){var t=lt(e)
return new Lt(this,(function(i){var n=[]
t.length>0&&Vt(i.documentElement,(function(r){if(r!==i&&r.nodeType===pt){var a=r.getAttribute("class")
if(a){var s=e===a
if(!s){var o=lt(a)
s=t.every((u=o,function(e){return u&&-1!==u.indexOf(e)}))}s&&n.push(r)}}var u}))
return n}))},createElement:function(e){var t=new Kt
t.ownerDocument=this
t.nodeName=e
t.tagName=e
t.localName=e
t.childNodes=new Ot;(t.attributes=new Rt)._ownerElement=t
return t},createDocumentFragment:function(){var e=new ni
e.ownerDocument=this
e.childNodes=new Ot
return e},createTextNode:function(e){var t=new Qt
t.ownerDocument=this
t.appendData(e)
return t},createComment:function(e){var t=new $t
t.ownerDocument=this
t.appendData(e)
return t},createCDATASection:function(e){var t=new Jt
t.ownerDocument=this
t.appendData(e)
return t},createProcessingInstruction:function(e,t){var i=new ri
i.ownerDocument=this
i.tagName=i.target=e
i.nodeValue=i.data=t
return i},createAttribute:function(e){var t=new Xt
t.ownerDocument=this
t.name=e
t.nodeName=e
t.localName=e
t.specified=!0
return t},createEntityReference:function(e){var t=new ii
t.ownerDocument=this
t.nodeName=e
return t},createElementNS:function(e,t){var i=new Kt,n=t.split(":"),r=i.attributes=new Rt
i.childNodes=new Ot
i.ownerDocument=this
i.nodeName=t
i.tagName=t
i.namespaceURI=e
if(2==n.length){i.prefix=n[0]
i.localName=n[1]}else i.localName=t
r._ownerElement=i
return i},createAttributeNS:function(e,t){var i=new Xt,n=t.split(":")
i.ownerDocument=this
i.nodeName=t
i.name=t
i.namespaceURI=e
i.specified=!0
if(2==n.length){i.prefix=n[0]
i.localName=n[1]}else i.localName=t
return i}}
dt(Ht,Ft)
function Kt(){this._nsMap={}}Kt.prototype={nodeType:pt,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e)
return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e)
i.value=i.nodeValue=""+t
this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e)
t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===St?this.insertBefore(e,null):function(e,t){var i=t.parentNode
if(i){var n=e.lastChild
i.removeChild(t)
n=e.lastChild}n=e.lastChild
t.parentNode=e
t.previousSibling=n
t.nextSibling=null
n?n.nextSibling=t:e.firstChild=t
e.lastChild=t
Wt(e.ownerDocument,e,t)
return t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t)
i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t)
return i&&i.value||""},setAttributeNS:function(e,t,i){var n=this.ownerDocument.createAttributeNS(e,t)
n.value=n.nodeValue=""+i
this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new Lt(this,(function(t){var i=[]
Vt(t,(function(n){n===t||n.nodeType!=pt||"*"!==e&&n.tagName!=e||i.push(n)}))
return i}))},getElementsByTagNameNS:function(e,t){return new Lt(this,(function(i){var n=[]
Vt(i,(function(r){r===i||r.nodeType!==pt||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)}))
return n}))}}
Ht.prototype.getElementsByTagName=Kt.prototype.getElementsByTagName
Ht.prototype.getElementsByTagNameNS=Kt.prototype.getElementsByTagNameNS
dt(Kt,Ft)
function Xt(){}Xt.prototype.nodeType=ft
dt(Xt,Ft)
function Yt(){}Yt.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e
this.nodeValue=this.data=e
this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(wt[It])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t)
this.nodeValue=this.data=i
this.length=i.length}}
dt(Yt,Ft)
function Qt(){}Qt.prototype={nodeName:"#text",nodeType:mt,splitText:function(e){var t=this.data,i=t.substring(e)
t=t.substring(0,e)
this.data=this.nodeValue=t
this.length=t.length
var n=this.ownerDocument.createTextNode(i)
this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)
return n}}
dt(Qt,Yt)
function $t(){}$t.prototype={nodeName:"#comment",nodeType:bt}
dt($t,Yt)
function Jt(){}Jt.prototype={nodeName:"#cdata-section",nodeType:gt}
dt(Jt,Yt)
function Zt(){}Zt.prototype.nodeType=kt
dt(Zt,Ft)
function ei(){}ei.prototype.nodeType=Et
dt(ei,Ft)
function ti(){}ti.prototype.nodeType=yt
dt(ti,Ft)
function ii(){}ii.prototype.nodeType=vt
dt(ii,Ft)
function ni(){}ni.prototype.nodeName="#document-fragment"
ni.prototype.nodeType=St
dt(ni,Ft)
function ri(){}ri.prototype.nodeType=_t
dt(ri,Ft)
function ai(){}ai.prototype.serializeToString=function(e,t,i){return si.call(e,t,i)}
Ft.prototype.toString=si
function si(e,t){var i=[],n=9==this.nodeType&&this.documentElement||this,r=n.prefix,a=n.namespaceURI
if(a&&null==r){if(null==(r=n.lookupPrefix(a)))var s=[{namespace:a,prefix:null}]}li(this,i,e,t,s)
return i.join("")}function oi(e,t,i){var n=e.prefix||"",r=e.namespaceURI
if(!r)return!1
if("xml"===n&&r===st.XML||r===st.XMLNS)return!1
for(var a=i.length;a--;){var s=i[a]
if(s.prefix===n)return s.namespace!==r}return!0}function ui(e,t,i){e.push(" ",t,'="',i.replace(/[<&"]/g,jt),'"')}function li(e,t,i,n,r){r||(r=[])
if(n){if(!(e=n(e)))return
if("string"==typeof e){t.push(e)
return}}switch(e.nodeType){case pt:var a=e.attributes,s=a.length,o=e.firstChild,u=e.tagName,l=u
if(!(i=st.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var c,d=0;d<a.length;d++)if("xmlns"===a.item(d).name){c=a.item(d).value
break}if(!c)for(var h=r.length-1;h>=0;h--){if(""===(p=r[h]).prefix&&p.namespace===e.namespaceURI){c=p.namespace
break}}if(c!==e.namespaceURI)for(h=r.length-1;h>=0;h--){var p
if((p=r[h]).namespace===e.namespaceURI){p.prefix&&(l=p.prefix+":"+u)
break}}}t.push("<",l)
for(var f=0;f<s;f++){"xmlns"==(m=a.item(f)).prefix?r.push({prefix:m.localName,namespace:m.value}):"xmlns"==m.nodeName&&r.push({prefix:"",namespace:m.value})}for(f=0;f<s;f++){var m
if(oi(m=a.item(f),0,r)){ui(t,(g=m.prefix||"")?"xmlns:"+g:"xmlns",v=m.namespaceURI)
r.push({prefix:g,namespace:v})}li(m,t,i,n,r)}if(u===l&&oi(e,0,r)){var g,v
ui(t,(g=e.prefix||"")?"xmlns:"+g:"xmlns",v=e.namespaceURI)
r.push({prefix:g,namespace:v})}if(o||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){t.push(">")
if(i&&/^script$/i.test(u))for(;o;){o.data?t.push(o.data):li(o,t,i,n,r.slice())
o=o.nextSibling}else for(;o;){li(o,t,i,n,r.slice())
o=o.nextSibling}t.push("</",l,">")}else t.push("/>")
return
case Tt:case St:for(o=e.firstChild;o;){li(o,t,i,n,r.slice())
o=o.nextSibling}return
case ft:return ui(t,e.name,e.value)
case mt:return t.push(e.data.replace(/[<&]/g,jt).replace(/]]>/g,"]]&gt;"))
case gt:return t.push("<![CDATA[",e.data,"]]>")
case bt:return t.push("\x3c!--",e.data,"--\x3e")
case kt:var y=e.publicId,_=e.systemId
t.push("<!DOCTYPE ",e.name)
if(y){t.push(" PUBLIC ",y)
_&&"."!=_&&t.push(" ",_)
t.push(">")}else if(_&&"."!=_)t.push(" SYSTEM ",_,">")
else{var b=e.internalSubset
b&&t.push(" [",b,"]")
t.push(">")}return
case _t:return t.push("<?",e.target," ",e.data,"?>")
case vt:return t.push("&",e.nodeName,";")
default:t.push("??",e.nodeName)}}function ci(e,t,i){var n
switch(t.nodeType){case pt:(n=t.cloneNode(!1)).ownerDocument=e
case St:break
case ft:i=!0}n||(n=t.cloneNode(!1))
n.ownerDocument=e
n.parentNode=null
if(i)for(var r=t.firstChild;r;){n.appendChild(ci(e,r,i))
r=r.nextSibling}return n}function di(e,t,i){var n=new t.constructor
for(var r in t){var a=t[r]
"object"!=typeof a&&a!=n[r]&&(n[r]=a)}t.childNodes&&(n.childNodes=new Ot)
n.ownerDocument=e
switch(n.nodeType){case pt:var s=t.attributes,o=n.attributes=new Rt,u=s.length
o._ownerElement=n
for(var l=0;l<u;l++)n.setAttributeNode(di(e,s.item(l),!0))
break
case ft:i=!0}if(i)for(var c=t.firstChild;c;){n.appendChild(di(e,c,i))
c=c.nextSibling}return n}function hi(e,t,i){e[t]=i}try{if(Object.defineProperty){Object.defineProperty(Lt.prototype,"length",{get:function(){Dt(this)
return this.$$length}})
Object.defineProperty(Ft.prototype,"textContent",{get:function(){return P_(this)},set:function(e){switch(this.nodeType){case pt:case St:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e))
break
default:this.data=e
this.value=e
this.nodeValue=e}}})
function P_(e){switch(e.nodeType){case pt:case St:var t=[]
e=e.firstChild
for(;e;){7!==e.nodeType&&8!==e.nodeType&&t.push(P_(e))
e=e.nextSibling}return t.join("")
default:return e.nodeValue}}hi=function(e,t,i){e["$$"+t]=i}}}catch(x_){}var pi={DocumentType:Zt,DOMException:At,DOMImplementation:Bt,Element:Kt,Node:Ft,NodeList:Ot,XMLSerializer:ai},fi=w((function(e,t){var i=at.freeze
t.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'})
t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"})
t.entityMap=t.HTML_ENTITIES})),mi=(fi.XML_ENTITIES,fi.HTML_ENTITIES,fi.entityMap,at.NAMESPACE),gi=/[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]/,vi=new RegExp("[\\-\\.0-9"+gi.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),yi=new RegExp("^"+gi.source+vi.source+"*(?::"+gi.source+vi.source+"*)?$")
function _i(e,t){this.message=e
this.locator=t
Error.captureStackTrace&&Error.captureStackTrace(this,_i)}_i.prototype=new Error
_i.prototype.name=_i.name
function bi(){}bi.prototype={parse:function(e,t,i){var n=this.domBuilder
n.startDocument()
wi(t,t={})
!function(e,t,i,n,r){function a(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e)
return String.fromCharCode(t,i)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1)
if(t in i)return i[t]
if("#"===t.charAt(0))return a(parseInt(t.substr(1).replace("x","0x")))
r.error("entity not found:"+e)
return e}function o(t){if(t>m){var i=e.substring(m,t).replace(/&#?\w+;/g,s)
h&&u(m)
n.characters(i,0,t-m)
m=t}}function u(t,i){for(;t>=c&&(i=d.exec(e));){l=i.index
c=l+i[0].length
h.lineNumber++}h.columnNumber=t-l+1}var l=0,c=0,d=/.*(?:\r\n?|\n)|.*$/g,h=n.locator,p=[{currentNSMap:t}],f={},m=0
for(;;){try{var g=e.indexOf("<",m)
if(g<0){if(!e.substr(m).match(/^\s*$/)){var v=n.doc,y=v.createTextNode(e.substr(m))
v.appendChild(y)
n.currentElement=y}return}g>m&&o(g)
switch(e.charAt(g+1)){case"/":var _=e.indexOf(">",g+3),b=e.substring(g+2,_).replace(/[ \t\n\r]+$/g,""),T=p.pop()
if(_<0){b=e.substring(g+2).replace(/[\s<].*/,"")
r.error("end tag name: "+b+" is not complete:"+T.tagName)
_=g+1+b.length}else if(b.match(/\s</)){b=b.replace(/[\s<].*/,"")
r.error("end tag name: "+b+" maybe not complete")
_=g+1+b.length}var k=T.localNSMap,S=T.tagName==b
if(S||T.tagName&&T.tagName.toLowerCase()==b.toLowerCase()){n.endElement(T.uri,T.localName,b)
if(k)for(var E in k)n.endPrefixMapping(E)
S||r.fatalError("end tag name: "+b+" is not match the current start tagName:"+T.tagName)}else p.push(T)
_++
break
case"?":h&&u(g)
_=Pi(e,g,n)
break
case"!":h&&u(g)
_=Ii(e,g,n,r)
break
default:h&&u(g)
var C=new xi,w=p[p.length-1].currentNSMap,I=(_=ki(e,g,C,w,s,r),C.length)
if(!C.closed&&Ci(e,_,C.tagName,f)){C.closed=!0
i.nbsp||r.warning("unclosed xml attribute")}if(h&&I){for(var P=Ti(h,{}),x=0;x<I;x++){var A=C[x]
u(A.offset)
A.locator=Ti(h,{})}n.locator=P
Si(C,n,w)&&p.push(C)
n.locator=h}else Si(C,n,w)&&p.push(C)
mi.isHTML(C.uri)&&!C.closed?_=Ei(e,_,C.tagName,s,n):_++}}catch(e){if(e instanceof _i)throw e
r.error("element parse error: "+e)
_=-1}_>m?m=_:o(Math.max(g,m)+1)}}(e,t,i,n,this.errorHandler)
n.endDocument()}}
function Ti(e,t){t.lineNumber=e.lineNumber
t.columnNumber=e.columnNumber
return t}function ki(e,t,i,n,r,a){function s(e,t,n){i.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined")
i.addValue(e,t,n)}for(var o,u=++t,l=0;;){var c=e.charAt(u)
switch(c){case"=":if(1===l){o=e.slice(t,u)
l=3}else{if(2!==l)throw new Error("attribute equal must after attrName")
l=3}break
case"'":case'"':if(3===l||1===l){if(1===l){a.warning('attribute value must after "="')
o=e.slice(t,u)}t=u+1
if(!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match")
s(o,d=e.slice(t,u).replace(/&#?\w+;/g,r),t-1)
l=5}else{if(4!=l)throw new Error('attribute value must after "="')
s(o,d=e.slice(t,u).replace(/&#?\w+;/g,r),t)
a.warning('attribute "'+o+'" missed start quot('+c+")!!")
t=u+1
l=5}break
case"/":switch(l){case 0:i.setTagName(e.slice(t,u))
case 5:case 6:case 7:l=7
i.closed=!0
case 4:case 1:case 2:break
default:throw new Error("attribute invalid close char('/')")}break
case"":a.error("unexpected end of input")
0==l&&i.setTagName(e.slice(t,u))
return u
case">":switch(l){case 0:i.setTagName(e.slice(t,u))
case 5:case 6:case 7:break
case 4:case 1:if("/"===(d=e.slice(t,u)).slice(-1)){i.closed=!0
d=d.slice(0,-1)}case 2:2===l&&(d=o)
if(4==l){a.warning('attribute "'+d+'" missed quot(")!')
s(o,d.replace(/&#?\w+;/g,r),t)}else{mi.isHTML(n[""])&&d.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!')
s(d,d,t)}break
case 3:throw new Error("attribute value missed!!")}return u
case"":c=" "
default:if(c<=" ")switch(l){case 0:i.setTagName(e.slice(t,u))
l=6
break
case 1:o=e.slice(t,u)
l=2
break
case 4:var d=e.slice(t,u).replace(/&#?\w+;/g,r)
a.warning('attribute "'+d+'" missed quot(")!!')
s(o,d,t)
case 5:l=6}else switch(l){case 2:i.tagName
mi.isHTML(n[""])&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+o+'" missed value!! "'+o+'" instead2!!')
s(o,o,t)
t=u
l=1
break
case 5:a.warning('attribute space is required"'+o+'"!!')
case 6:l=1
t=u
break
case 3:l=4
t=u
break
case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function Si(e,t,i){for(var n=e.tagName,r=null,a=e.length;a--;){var s=e[a],o=s.qName,u=s.value
if((h=o.indexOf(":"))>0)var l=s.prefix=o.slice(0,h),c=o.slice(h+1),d="xmlns"===l&&c
else{c=o
l=null
d="xmlns"===o&&""}s.localName=c
if(!1!==d){if(null==r){r={}
wi(i,i={})}i[d]=r[d]=u
s.uri=mi.XMLNS
t.startPrefixMapping(d,u)}}for(a=e.length;a--;){if(l=(s=e[a]).prefix){"xml"===l&&(s.uri=mi.XML)
"xmlns"!==l&&(s.uri=i[l||""])}}var h
if((h=n.indexOf(":"))>0){l=e.prefix=n.slice(0,h)
c=e.localName=n.slice(h+1)}else{l=null
c=e.localName=n}var p=e.uri=i[l||""]
t.startElement(p,c,n,e)
if(!e.closed){e.currentNSMap=i
e.localNSMap=r
return!0}t.endElement(p,c,n)
if(r)for(l in r)t.endPrefixMapping(l)}function Ei(e,t,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf("</"+i+">",t),s=e.substring(t+1,a)
if(/[&<]/.test(s)){if(/^script$/i.test(i)){r.characters(s,0,s.length)
return a}s=s.replace(/&#?\w+;/g,n)
r.characters(s,0,s.length)
return a}}return t+1}function Ci(e,t,i,n){var r=n[i]
if(null==r){(r=e.lastIndexOf("</"+i+">"))<t&&(r=e.lastIndexOf("</"+i))
n[i]=r}return r<t}function wi(e,t){for(var i in e)t[i]=e[i]}function Ii(e,t,i,n){if("-"===e.charAt(t+2)){if("-"===e.charAt(t+3)){if((r=e.indexOf("--\x3e",t+4))>t){i.comment(e,t+4,r-t-4)
return r+3}n.error("Unclosed comment")
return-1}return-1}if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9)
i.startCDATA()
i.characters(e,t+9,r-t-9)
i.endCDATA()
return r+3}var a=function(e,t){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g
r.lastIndex=t
r.exec(e)
for(;i=r.exec(e);){n.push(i)
if(i[1])return n}}(e,t),s=a.length
if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=!1,l=!1
if(s>3)if(/^public$/i.test(a[2][0])){u=a[3][0]
l=s>4&&a[4][0]}else/^system$/i.test(a[2][0])&&(l=a[3][0])
var c=a[s-1]
i.startDTD(o,u,l)
i.endDTD()
return c.index+c[0].length}return-1}function Pi(e,t,i){var n=e.indexOf("?>",t)
if(n){var r=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/)
if(r){r[0].length
i.processingInstruction(r[1],r[2])
return n+2}return-1}return-1}function xi(){this.attributeNames={}}xi.prototype={setTagName:function(e){if(!yi.test(e))throw new Error("invalid tagName:"+e)
this.tagName=e},addValue:function(e,t,i){if(!yi.test(e))throw new Error("invalid attribute:"+e)
this.attributeNames[e]=this.length
this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}}
var Ai={XMLReader:bi,ParseError:_i},Oi=pi.DOMImplementation,Li=at.NAMESPACE,Di=Ai.ParseError,Ri=Ai.XMLReader
function Mi(e){this.options=e||{locator:{}}}Mi.prototype.parseFromString=function(e,t){var i=this.options,n=new Ri,r=i.domBuilder||new Ni,a=i.errorHandler,s=i.locator,o=i.xmlns||{},u=/\/x?html?$/.test(t),l=u?fi.HTML_ENTITIES:fi.XML_ENTITIES
s&&r.setDocumentLocator(s)
n.errorHandler=function(e,t,i){if(!e){if(t instanceof Ni)return t
e=t}var n={},r=e instanceof Function
i=i||{}
function a(t){var a=e[t]
!a&&r&&(a=2==e.length?function(i){e(t,i)}:e)
n[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+Bi(i))}||function(){}}a("warning")
a("error")
a("fatalError")
return n}(a,r,s)
n.domBuilder=i.domBuilder||r
u&&(o[""]=Li.HTML)
o.xml=o.xml||Li.XML
e&&"string"==typeof e?n.parse(e,o,l):n.errorHandler.error("invalid doc source")
return r.doc}
function Ni(){this.cdata=!1}function Ui(e,t){t.lineNumber=e.lineNumber
t.columnNumber=e.columnNumber}Ni.prototype={startDocument:function(){this.doc=(new Oi).createDocument(null,null,null)
this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,n){var r=this.doc,a=r.createElementNS(e,i||t),s=n.length
ji(this,a)
this.currentElement=a
this.locator&&Ui(this.locator,a)
for(var o=0;o<s;o++){e=n.getURI(o)
var u=n.getValue(o),l=(i=n.getQName(o),r.createAttributeNS(e,i))
this.locator&&Ui(n.getLocator(o),l)
l.value=l.nodeValue=u
a.setAttributeNode(l)}},endElement:function(e,t,i){var n=this.currentElement
n.tagName
this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t)
this.locator&&Ui(this.locator,i)
ji(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=Fi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e)
else n=this.doc.createTextNode(e)
this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n)
this.locator&&Ui(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=Fi.apply(this,arguments)
var n=this.doc.createComment(e)
this.locator&&Ui(this.locator,n)
ji(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var n=this.doc.implementation
if(n&&n.createDocumentType){var r=n.createDocumentType(e,t,i)
this.locator&&Ui(this.locator,r)
ji(this,r)
this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,Bi(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,Bi(this.locator))},fatalError:function(e){throw new Di(e,this.locator)}}
function Bi(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function Fi(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){Ni.prototype[e]=function(){return null}}))
function ji(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}var Vi={__DOMHandler:Ni,DOMParser:Mi,DOMImplementation:pi.DOMImplementation,XMLSerializer:pi.XMLSerializer}.DOMParser,Hi=function(e){return!!e&&"object"==typeof e},qi=function e(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n]
return i.reduce((function(t,i){if("object"!=typeof i)return t
Object.keys(i).forEach((function(n){Array.isArray(t[n])&&Array.isArray(i[n])?t[n]=t[n].concat(i[n]):Hi(t[n])&&Hi(i[n])?t[n]=e(t[n],i[n]):t[n]=i[n]}))
return t}),{})},Wi=function(e){return Object.keys(e).map((function(t){return e[t]}))},Gi=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},zi=function(e){if(!e.length)return[]
for(var t=[],i=0;i<e.length;i++)t.push(e[i])
return t},Ki=function(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i
return-1},Xi="INVALID_NUMBER_OF_PERIOD",Yi="DASH_EMPTY_MANIFEST",Qi="DASH_INVALID_XML",$i="NO_BASE_URL",Ji="SEGMENT_TIME_UNSPECIFIED",Zi="UNSUPPORTED_UTC_TIMING_SCHEME",en=function(e){var t=e.baseUrl,i=void 0===t?"":t,n=e.source,r=void 0===n?"":n,a=e.range,s=void 0===a?"":a,o=e.indexRange,u=void 0===o?"":o,l={uri:r,resolvedUri:tt(i||"",r)}
if(s||u){var c,d=(s||u).split("-"),h=x.BigInt?x.BigInt(d[0]):parseInt(d[0],10),p=x.BigInt?x.BigInt(d[1]):parseInt(d[1],10)
h<Number.MAX_SAFE_INTEGER&&"bigint"==typeof h&&(h=Number(h))
p<Number.MAX_SAFE_INTEGER&&"bigint"==typeof p&&(p=Number(p))
"bigint"==typeof(c="bigint"==typeof p||"bigint"==typeof h?x.BigInt(p)-x.BigInt(h)+x.BigInt(1):p-h+1)&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c))
l.byterange={length:c,offset:h}}return l},tn=function(e){e&&"number"!=typeof e&&(e=parseInt(e,10))
return isNaN(e)?null:e},nn={static:function(e){var t=e.duration,i=e.timescale,n=void 0===i?1:i,r=e.sourceDuration,a=e.periodDuration,s=tn(e.endNumber),o=t/n
return"number"==typeof s?{start:0,end:s}:"number"==typeof a?{start:0,end:a/o}:{start:0,end:r/o}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,n=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.periodStart,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=tn(e.endNumber),f=(t+i)/1e3,m=n+u,g=f+c-m,v=Math.ceil(g*a/s),y=Math.floor((f-m-h)*a/s),_=Math.floor((f-m)*a/s)
return{start:Math.max(0,y),end:"number"==typeof p?p:Math.min(v,_)}}},rn=function(e){var t=e.type,i=e.duration,n=e.timescale,r=void 0===n?1:n,a=e.periodDuration,s=e.sourceDuration,o=nn[t](e),u=function(e,t){for(var i=[],n=e;n<t;n++)i.push(n)
return i}(o.start,o.end).map(function(e){return function(t){var i=e.duration,n=e.timescale,r=void 0===n?1:n,a=e.periodStart,s=e.startNumber
return{number:(void 0===s?1:s)+t,duration:i/r,timeline:a,time:t*i}}}(e))
if("static"===t){var l=u.length-1,c="number"==typeof a?a:s
u[l].duration=c-i/r*l}return u},an=function(e){var t=e.baseUrl,i=e.initialization,n=void 0===i?{}:i,r=e.sourceDuration,a=e.indexRange,s=void 0===a?"":a,o=e.periodStart,u=e.presentationTime,l=e.number,c=void 0===l?0:l,d=e.duration
if(!t)throw new Error($i)
var h=en({baseUrl:t,source:n.sourceURL,range:n.range}),p=en({baseUrl:t,source:t,indexRange:s})
p.map=h
if(d){var f=rn(e)
if(f.length){p.duration=f[0].duration
p.timeline=f[0].timeline}}else if(r){p.duration=r
p.timeline=o}p.presentationTime=u||o
p.number=c
return[p]},sn=function(e,t,i){var n,r=e.sidx.map?e.sidx.map:null,a=e.sidx.duration,s=e.timeline||0,o=e.sidx.byterange,u=o.offset+o.length,l=t.timescale,c=t.references.filter((function(e){return 1!==e.referenceType})),d=[],h=e.endList?"static":"dynamic",p=e.sidx.timeline,f=p,m=e.mediaSequence||0
n="bigint"==typeof t.firstOffset?x.BigInt(u)+t.firstOffset:u+t.firstOffset
for(var g=0;g<c.length;g++){var v=t.references[g],y=v.referencedSize,_=v.subsegmentDuration,b=void 0
b="bigint"==typeof n?n+x.BigInt(y)-x.BigInt(1):n+y-1
var T=an({baseUrl:i,timescale:l,timeline:s,periodStart:p,presentationTime:f,number:m,duration:_,sourceDuration:a,indexRange:n+"-"+b,type:h})[0]
r&&(T.map=r)
d.push(T)
n+="bigint"==typeof n?x.BigInt(y):y
f+=_/l
m++}e.segments=d
return e},on=["AUDIO","SUBTITLES"],un=1/60,ln=function(e){return(t=e,i=function(e){return e.timeline},Wi(t.reduce((function(e,t){t.forEach((function(t){e[i(t)]=t}))
return e}),{}))).sort((function(e,t){return e.timeline>t.timeline?1:-1}))
var t,i},cn=function(e){var t,i,n=[]
t=e,i=function(e,t,i,r){n=n.concat(e.playlists||[])},on.forEach((function(e){for(var n in t.mediaGroups[e])for(var r in t.mediaGroups[e][n]){var a=t.mediaGroups[e][n][r]
i(a,e,n,r)}}))
return n},dn=function(e){var t=e.playlist,i=e.mediaSequence
t.mediaSequence=i
t.segments.forEach((function(e,i){e.number=t.mediaSequence+i}))},hn=function(e){var t=e.oldManifest,i=e.newManifest,n=t.playlists.concat(cn(t)),r=i.playlists.concat(cn(i))
i.timelineStarts=ln([t.timelineStarts,i.timelineStarts])
!function(e){var t=e.oldPlaylists,i=e.newPlaylists,n=e.timelineStarts
i.forEach((function(e){e.discontinuitySequence=Ki(n,(function(t){return t.timeline===e.timeline}))
var i=function(e,t){for(var i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i]
return null}(t,e.attributes.NAME)
if(i&&!e.sidx){var r=e.segments[0],a=Ki(i.segments,(function(e){return Math.abs(e.presentationTime-r.presentationTime)<un}))
if(-1!==a){if(i.segments[a].discontinuity&&!r.discontinuity){r.discontinuity=!0
e.discontinuityStarts.unshift(0)
e.discontinuitySequence--}dn({playlist:e,mediaSequence:i.segments[a].number})}else{dn({playlist:e,mediaSequence:i.mediaSequence+i.segments.length})
e.segments[0].discontinuity=!0
e.discontinuityStarts.unshift(0);(!i.segments.length&&e.timeline>i.timeline||i.segments.length&&e.timeline>i.segments[i.segments.length-1].timeline)&&e.discontinuitySequence--}}}))}({oldPlaylists:n,newPlaylists:r,timelineStarts:i.timelineStarts})
return i},pn=function(e){return e&&e.uri+"-"+function(e){var t
t="bigint"==typeof e.offset||"bigint"==typeof e.length?x.BigInt(e.offset)+x.BigInt(e.length)-x.BigInt(1):e.offset+e.length-1
return e.offset+"-"+t}(e.byterange)},fn=function(e){return Wi(e.reduce((function(e,t){var i=t.attributes.id+(t.attributes.lang||"")
if(e[i]){if(t.segments){var n
t.segments[0]&&(t.segments[0].discontinuity=!0);(n=e[i].segments).push.apply(n,t.segments)}t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)}else{e[i]=t
e[i].attributes.timelineStarts=[]}e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart})
return e}),{})).map((function(e){e.discontinuityStarts=(t=e.segments||[],i="discontinuity",t.reduce((function(e,t,n){t[i]&&e.push(n)
return e}),[]))
var t,i
return e}))},mn=function(e,t){var i=pn(e.sidx),n=i&&t[i]&&t[i].sidx
n&&sn(e,n,e.sidx.resolvedUri)
return e},gn=function(e,t){void 0===t&&(t={})
if(!Object.keys(t).length)return e
for(var i in e)e[i]=mn(e[i],t)
return e},vn=function(e){var t,i=e.attributes,n=e.segments,r=e.sidx,a=e.discontinuityStarts,s={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuityStarts:a,timelineStarts:i.timelineStarts,segments:n}
i.contentProtection&&(s.contentProtection=i.contentProtection)
r&&(s.sidx=r)
return s},yn=function(e){var t=e.attributes
return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},_n=function(e){var t=e.attributes
return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},bn=function(e){var t=e.attributes
return"text/vtt"===t.mimeType||"text"===t.contentType},Tn=function(e){return e?Object.keys(e).reduce((function(t,i){var n=e[i]
return t.concat(n.playlists)}),[]):[]},kn=function(e){var t,i=e.dashPlaylists,n=e.locations,r=e.sidxMapping,a=void 0===r?{}:r,s=e.previousManifest
if(!i.length)return{}
var o=i[0].attributes,u=o.sourceDuration,l=o.type,c=o.suggestedPresentationDelay,d=o.minimumUpdatePeriod,h=fn(i.filter(yn)).map(vn),p=fn(i.filter(_n)),f=fn(i.filter(bn)),m=i.map((function(e){return e.attributes.captionServices})).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:u,playlists:gn(h,a)}
d>=0&&(g.minimumUpdatePeriod=1e3*d)
n&&(g.locations=n)
"dynamic"===l&&(g.suggestedPresentationDelay=c)
var v,y,_=0===g.playlists.length,b=p.length?function(e,t,i){void 0===t&&(t={})
void 0===i&&(i=!1)
var n,r=e.reduce((function(e,r){var a=r.attributes.role&&r.attributes.role.value||"",s=r.attributes.lang||"",o=r.attributes.label||"main"
if(s&&!r.attributes.label){var u=a?" ("+a+")":""
o=""+r.attributes.lang+u}e[o]||(e[o]={language:s,autoselect:!0,default:"main"===a,playlists:[],uri:""})
var l=mn(function(e,t){var i,n=e.attributes,r=e.segments,a=e.sidx,s=e.mediaSequence,o=e.discontinuitySequence,u=e.discontinuityStarts,l={attributes:(i={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuitySequence:o,discontinuityStarts:u,timelineStarts:n.timelineStarts,mediaSequence:s,segments:r}
n.contentProtection&&(l.contentProtection=n.contentProtection)
a&&(l.sidx=a)
if(t){l.attributes.AUDIO="audio"
l.attributes.SUBTITLES="subs"}return l}(r,i),t)
e[o].playlists.push(l)
void 0===n&&"main"===a&&((n=r).default=!0)
return e}),{})
n||(r[Object.keys(r)[0]].default=!0)
return r}(p,a,_):null,T=f.length?function(e,t){void 0===t&&(t={})
return e.reduce((function(e,i){var n=i.attributes.lang||"text"
e[n]||(e[n]={language:n,default:!1,autoselect:!1,playlists:[],uri:""})
e[n].playlists.push(mn(function(e){var t,i=e.attributes,n=e.segments,r=e.mediaSequence,a=e.discontinuityStarts,s=e.discontinuitySequence
if(void 0===n){n=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}]
i.duration=i.sourceDuration}var o=((t={NAME:i.id,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,t)
i.codecs&&(o.CODECS=i.codecs)
return{attributes:o,uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:a,discontinuitySequence:s,mediaSequence:r,segments:n}}(i),t))
return e}),{})}(f,a):null,k=h.concat(Tn(b),Tn(T)),S=k.map((function(e){return e.timelineStarts}))
g.timelineStarts=ln(S)
v=k,y=g.timelineStarts,v.forEach((function(e){e.mediaSequence=0
e.discontinuitySequence=Ki(y,(function(t){return t.timeline===e.timeline}))
e.segments&&e.segments.forEach((function(e,t){e.number=t}))}))
b&&(g.mediaGroups.AUDIO.audio=b)
T&&(g.mediaGroups.SUBTITLES.subs=T)
m.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=m.reduce((function(e,t){if(!t)return e
t.forEach((function(t){var i=t.channel,n=t.language
e[n]={autoselect:!1,default:!1,instreamId:i,language:n}
t.hasOwnProperty("aspectRatio")&&(e[n].aspectRatio=t.aspectRatio)
t.hasOwnProperty("easyReader")&&(e[n].easyReader=t.easyReader)
t.hasOwnProperty("3D")&&(e[n]["3D"]=t["3D"])}))
return e}),{}))
return s?hn({oldManifest:s,newManifest:g}):g},Sn=function(e,t,i){var n=e.NOW,r=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.periodStart,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(n+r)/1e3+(void 0===c?0:c)-(a+l)
return Math.ceil((d*o-t)/i)},En=function(e,t){for(var i=e.type,n=e.minimumUpdatePeriod,r=void 0===n?0:n,a=e.media,s=void 0===a?"":a,o=e.sourceDuration,u=e.timescale,l=void 0===u?1:u,c=e.startNumber,d=void 0===c?1:c,h=e.periodStart,p=[],f=-1,m=0;m<t.length;m++){var g=t[m],v=g.d,y=g.r||0,_=g.t||0
f<0&&(f=_)
_&&_>f&&(f=_)
var b=void 0
if(y<0){var T=m+1
b=T===t.length?"dynamic"===i&&r>0&&s.indexOf("$Number$")>0?Sn(e,f,v):(o*l-f)/v:(t[T].t-f)/v}else b=y+1
for(var k=d+p.length+b,S=d+p.length;S<k;){p.push({number:S,duration:v/l,time:f,timeline:h})
f+=v
S++}}return p},Cn=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,wn=function(e,t){return e.replace(Cn,function(e){return function(t,i,n,r){if("$$"===t)return"$"
if(void 0===e[i])return t
var a=""+e[i]
if("RepresentationID"===i)return a
r=n?parseInt(r,10):1
return a.length>=r?a:""+new Array(r-a.length+1).join("0")+a}}(t))},In=function(e,t){var i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},n=e.initialization,r=void 0===n?{sourceURL:"",range:""}:n,a=en({baseUrl:e.baseUrl,source:wn(r.sourceURL,i),range:r.range}),s=function(e,t){return e.duration||t?e.duration?rn(e):En(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t)
return s.map((function(t){i.Number=t.number
i.Time=t.time
var n=wn(e.media||"",i),r=e.timescale||1,s=e.presentationTimeOffset||0,o=e.periodStart+(t.time-s)/r
return{uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:tt(e.baseUrl||"",n),map:a,number:t.number,presentationTime:o}}))},Pn=function(e,t){var i=e.duration,n=e.segmentUrls,r=void 0===n?[]:n,a=e.periodStart
if(!i&&!t||i&&t)throw new Error(Ji)
var s,o=r.map((function(t){return function(e,t){var i=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,a=en({baseUrl:i,source:r.sourceURL,range:r.range}),s=en({baseUrl:i,source:t.media,range:t.mediaRange})
s.map=a
return s}(e,t)}))
i&&(s=rn(e))
t&&(s=En(e,t))
return s.map((function(t,i){if(o[i]){var n=o[i],r=e.timescale||1,s=e.presentationTimeOffset||0
n.timeline=t.timeline
n.duration=t.duration
n.number=t.number
n.presentationTime=a+(t.time-s)/r
return n}})).filter((function(e){return e}))},xn=function(e){var t,i,n=e.attributes,r=e.segmentInfo
if(r.template){i=In
t=qi(n,r.template)}else if(r.base){i=an
t=qi(n,r.base)}else if(r.list){i=Pn
t=qi(n,r.list)}var a={attributes:n}
if(!i)return a
var s=i(t,r.segmentTimeline)
if(t.duration){var o=t,u=o.duration,l=o.timescale,c=void 0===l?1:l
t.duration=u/c}else s.length?t.duration=s.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0
a.attributes=t
a.segments=s
if(r.base&&t.indexRange){a.sidx=s[0]
a.segments=[]}return a},An=function(e,t){return zi(e.childNodes).filter((function(e){return e.tagName===t}))},On=function(e){return e.textContent.trim()},Ln=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e)
if(!t)return 0
var i=t.slice(1),n=i[0],r=i[1],a=i[2],s=i[3],o=i[4],u=i[5]
return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},Dn={mediaPresentationDuration:function(e){return Ln(e)},availabilityStartTime:function(e){return function(e){/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z")
return Date.parse(e)}(e)/1e3},minimumUpdatePeriod:function(e){return Ln(e)},suggestedPresentationDelay:function(e){return Ln(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Ln(e)},start:function(e){return Ln(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10)
return isNaN(t)?Ln(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Rn=function(e){return e&&e.attributes?zi(e.attributes).reduce((function(e,t){var i=Dn[t.name]||Dn.DEFAULT
e[t.name]=i(t.value)
return e}),{}):{}},Mn={"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"},Nn=function(e,t){return t.length?Gi(e.map((function(e){return t.map((function(t){return tt(e,On(t))}))}))):e},Un=function(e){var t=An(e,"SegmentTemplate")[0],i=An(e,"SegmentList")[0],n=i&&An(i,"SegmentURL").map((function(e){return qi({tag:"SegmentURL"},Rn(e))})),r=An(e,"SegmentBase")[0],a=i||t,s=a&&An(a,"SegmentTimeline")[0],o=i||r||t,u=o&&An(o,"Initialization")[0],l=t&&Rn(t)
l&&u?l.initialization=u&&Rn(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization})
var c={template:l,segmentTimeline:s&&An(s,"S").map((function(e){return Rn(e)})),list:i&&qi(Rn(i),{segmentUrls:n,initialization:Rn(u)}),base:r&&qi(Rn(r),{initialization:Rn(u)})}
Object.keys(c).forEach((function(e){c[e]||delete c[e]}))
return c},Bn=function(e,t,i){return function(n){var r=Rn(n),a=Nn(t,An(n,"BaseURL")),s=An(n,"Role")[0],o={role:Rn(s)},u=qi(e,r,o),l=An(n,"Accessibility")[0],c=function(e){if("urn:scte:dash:cc:cea-608:2015"===e.schemeIdUri)return("string"!=typeof e.value?[]:e.value.split(";")).map((function(e){var t,i
i=e
if(/^CC\d=/.test(e)){var n=e.split("=")
t=n[0]
i=n[1]}else/^CC\d$/.test(e)&&(t=e)
return{channel:t,language:i}}))
if("urn:scte:dash:cc:cea-708:2015"===e.schemeIdUri)return("string"!=typeof e.value?[]:e.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0}
if(/=/.test(e)){var i=e.split("="),n=i[0],r=i[1],a=void 0===r?"":r
t.channel=n
t.language=e
a.split(",").forEach((function(e){var i=e.split(":"),n=i[0],r=i[1]
"lang"===n?t.language=r:"er"===n?t.easyReader=Number(r):"war"===n?t.aspectRatio=Number(r):"3D"===n&&(t["3D"]=Number(r))}))}else t.language=e
t.channel&&(t.channel="SERVICE"+t.channel)
return t}))}(Rn(l))
c&&(u=qi(u,{captionServices:c}))
var d=An(n,"Label")[0]
if(d&&d.childNodes.length){var h=d.childNodes[0].nodeValue.trim()
u=qi(u,{label:h})}var p=An(n,"ContentProtection").reduce((function(e,t){var i=Rn(t),n=Mn[i.schemeIdUri]
if(n){e[n]={attributes:i}
var r=An(t,"cenc:pssh")[0]
if(r){var a=On(r),s=a&&Le(a)
e[n].pssh=s}}return e}),{})
Object.keys(p).length&&(u=qi(u,{contentProtection:p}))
var f=Un(n),m=An(n,"Representation"),g=qi(i,f)
return Gi(m.map(function(e,t,i){return function(n){var r=An(n,"BaseURL"),a=Nn(t,r),s=qi(e,Rn(n)),o=Un(n)
return a.map((function(e){return{segmentInfo:qi(i,o),attributes:qi(s,{baseUrl:e})}}))}}(u,a,g)))}},Fn=function(e,t){return function(i,n){var r=Nn(t,An(i.node,"BaseURL")),a=qi(e,{periodStart:i.attributes.start})
"number"==typeof i.attributes.duration&&(a.periodDuration=i.attributes.duration)
var s=An(i.node,"AdaptationSet"),o=Un(i.node)
return Gi(s.map(Bn(a,r,o)))}},jn=function(e){if(""===e)throw new Error(Yi)
var t,i,n=new Vi
try{i=(t=n.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(Qi)
return i},Vn=function(e,t){void 0===t&&(t={})
var i=function(e,t){void 0===t&&(t={})
var i=t,n=i.manifestUri,r=void 0===n?"":n,a=i.NOW,s=void 0===a?Date.now():a,o=i.clientOffset,u=void 0===o?0:o,l=An(e,"Period")
if(!l.length)throw new Error(Xi)
var c=An(e,"Location"),d=Rn(e),h=Nn([r],An(e,"BaseURL"))
d.type=d.type||"static"
d.sourceDuration=d.mediaPresentationDuration||0
d.NOW=s
d.clientOffset=u
c.length&&(d.locations=c.map(On))
var p=[]
l.forEach((function(e,t){var i=Rn(e),n=p[t-1]
i.start=function(e){var t=e.attributes,i=e.priorPeriodAttributes,n=e.mpdType
return"number"==typeof t.start?t.start:i&&"number"==typeof i.start&&"number"==typeof i.duration?i.start+i.duration:i||"static"!==n?null:0}({attributes:i,priorPeriodAttributes:n?n.attributes:null,mpdType:d.type})
p.push({node:e,attributes:i})}))
return{locations:d.locations,representationInfo:Gi(p.map(Fn(d,h)))}}(jn(e),t),n=i.representationInfo.map(xn)
return kn({dashPlaylists:n,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},Hn=function(e){return function(e){var t=An(e,"UTCTiming")[0]
if(!t)return null
var i=Rn(t)
switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.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":i.method="GET"
break
case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT"
i.value=Date.parse(i.value)
break
default:throw new Error(Zi)}return i}(jn(e))},qn=Math.pow(2,32),Wn=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength)
return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*qn+i.getUint32(4)},Gn=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12
if(0===i.version){i.earliestPresentationTime=t.getUint32(n)
i.firstOffset=t.getUint32(n+4)
n+=8}else{i.earliestPresentationTime=Wn(e.subarray(n))
i.firstOffset=Wn(e.subarray(n+8))
n+=16}n+=2
var r=t.getUint16(n)
n+=2
for(;r>0;n+=12,r--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)})
return i},zn=function(e){return function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer}(e)},Kn=function(e){if(e instanceof Uint8Array)return e
Array.isArray(e)||zn(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e])
return new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)},Xn=x.BigInt||Number,Yn=[Xn("0x1"),Xn("0x100"),Xn("0x10000"),Xn("0x1000000"),Xn("0x100000000"),Xn("0x10000000000"),Xn("0x1000000000000"),Xn("0x100000000000000"),Xn("0x10000000000000000")],Qn=function(e,t){var i=void 0===t?{}:t,n=i.signed,r=void 0!==n&&n,a=i.le,s=void 0!==a&&a
e=Kn(e)
var o=s?"reduce":"reduceRight",u=(e[o]?e[o]:Array.prototype[o]).call(e,(function(t,i,n){var r=s?n:Math.abs(n+1-e.length)
return t+Xn(i)*Yn[r]}),Xn(0))
if(r){var l=Yn[e.length]/Xn(2)-Xn(1)
if((u=Xn(u))>l){u-=l
u-=l
u-=Xn(2)}}return Number(u)},$n=function(e,t){var i=(void 0===t?{}:t).le,n=void 0!==i&&i;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0)
e=Xn(e)
for(var r,a=(r=e,Math.ceil(function(e){return e.toString(2).length}(r)/8)),s=new Uint8Array(new ArrayBuffer(a)),o=0;o<a;o++){var u=n?o:Math.abs(o+1-s.length)
s[u]=Number(e/Yn[o]&Xn(255))
if(e<0){s[u]=Math.abs(~s[u])
s[u]-=0===o?1:2}}return s},Jn=function(e,t){"string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString())
if("string"!=typeof e)return new Uint8Array
t||(e=unescape(encodeURIComponent(e)))
for(var i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n)
return i},Zn=function(e,t,i){var n=void 0===i?{}:i,r=n.offset,a=void 0===r?0:r,s=n.mask,o=void 0===s?[]:s
e=Kn(e)
var u=(t=Kn(t)).every?t.every:Array.prototype.every
return t.length&&e.length-a>=t.length&&u.call(t,(function(t,i){return t===(o[i]?o[i]&e[a+i]:e[a+i])}))},er=Kn([73,68,51]),tr=function e(t,i){void 0===i&&(i=0)
if((t=Kn(t)).length-i<10||!Zn(t,er,{offset:i}))return i
i+=function(e,t){void 0===t&&(t=0)
var i=(e=Kn(e))[t+5],n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9]
return(16&i)>>4?n+20:n+10}(t,i)
return e(t,i)},ir=function(e){return"string"==typeof e?Jn(e):e},nr=function e(t,i,n){void 0===n&&(n=!1)
i=function(e){return Array.isArray(e)?e.map((function(e){return ir(e)})):[ir(e)]}(i)
t=Kn(t)
var r=[]
if(!i.length)return r
for(var a=0;a<t.length;){var s=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,o=t.subarray(a+4,a+8)
if(0===s)break
var u=a+s
if(u>t.length){if(n)break
u=t.length}var l=t.subarray(a+8,u)
Zn(o,i[0])&&(1===i.length?r.push(l):r.push.apply(r,e(l,i.slice(1),n)))
a=u}return r},rr={EBML:Kn([26,69,223,163]),DocType:Kn([66,130]),Segment:Kn([24,83,128,103]),SegmentInfo:Kn([21,73,169,102]),Tracks:Kn([22,84,174,107]),Track:Kn([174]),TrackNumber:Kn([215]),DefaultDuration:Kn([35,227,131]),TrackEntry:Kn([174]),TrackType:Kn([131]),FlagDefault:Kn([136]),CodecID:Kn([134]),CodecPrivate:Kn([99,162]),VideoTrack:Kn([224]),AudioTrack:Kn([225]),Cluster:Kn([31,67,182,117]),Timestamp:Kn([231]),TimestampScale:Kn([42,215,177]),BlockGroup:Kn([160]),BlockDuration:Kn([155]),Block:Kn([161]),SimpleBlock:Kn([163])},ar=[128,64,32,16,8,4,2,1],sr=function(e,t,i,n){void 0===i&&(i=!0)
void 0===n&&(n=!1)
var r=function(e){for(var t=1,i=0;i<ar.length&&!(e&ar[i]);i++)t++
return t}(e[t]),a=e.subarray(t,t+r)
i&&((a=Array.prototype.slice.call(e,t,t+r))[0]^=ar[r-1])
return{length:r,value:Qn(a,{signed:n}),bytes:a}},or=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map((function(t){return e(t)})):"number"==typeof t?$n(t):t},ur=function e(t,i,n){if(n>=i.length)return i.length
var r=sr(i,n,!1)
if(Zn(t.bytes,r.bytes))return n
var a=sr(i,n+r.length)
return e(t,i,n+a.length+a.value+r.length)},lr=function e(t,i){i=function(e){return Array.isArray(e)?e.map((function(e){return or(e)})):[or(e)]}(i)
t=Kn(t)
var n=[]
if(!i.length)return n
for(var r=0;r<t.length;){var a=sr(t,r,!1),s=sr(t,r+a.length),o=r+a.length+s.length
if(127===s.value){s.value=ur(a,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)
Zn(i[0],a.bytes)&&(1===i.length?n.push(l):n=n.concat(e(l,i.slice(1))))
r+=a.length+s.length+l.length}return n},cr=Kn([0,0,0,1]),dr=Kn([0,0,1]),hr=Kn([0,0,3]),pr=function(e){for(var t=[],i=1;i<e.length-2;){if(Zn(e.subarray(i,i+3),hr)){t.push(i+2)
i++}i++}if(0===t.length)return e
var n=e.length-t.length,r=new Uint8Array(n),a=0
for(i=0;i<n;a++,i++){if(a===t[0]){a++
t.shift()}r[i]=e[a]}return r},fr=function(e,t,i,n){void 0===n&&(n=1/0)
e=Kn(e)
i=[].concat(i)
for(var r,a=0,s=0;a<e.length&&(s<n||r);){var o=void 0
Zn(e.subarray(a),cr)?o=4:Zn(e.subarray(a),dr)&&(o=3)
if(o){s++
if(r)return pr(e.subarray(r,a))
var u=void 0
"h264"===t?u=31&e[a+o]:"h265"===t&&(u=e[a+o]>>1&63);-1!==i.indexOf(u)&&(r=a+o)
a+=o+("h264"===t?1:2)}else a++}return e.subarray(0,0)},mr={webm:Kn([119,101,98,109]),matroska:Kn([109,97,116,114,111,115,107,97]),flac:Kn([102,76,97,67]),ogg:Kn([79,103,103,83]),ac3:Kn([11,119]),riff:Kn([82,73,70,70]),avi:Kn([65,86,73]),wav:Kn([87,65,86,69]),"3gp":Kn([102,116,121,112,51,103]),mp4:Kn([102,116,121,112]),fmp4:Kn([115,116,121,112]),mov:Kn([102,116,121,112,113,116]),moov:Kn([109,111,111,118]),moof:Kn([109,111,111,102])},gr={aac:function(e){var t=tr(e)
return Zn(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=tr(e)
return Zn(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=lr(e,[rr.EBML,rr.DocType])[0]
return Zn(t,mr.webm)},mkv:function(e){var t=lr(e,[rr.EBML,rr.DocType])[0]
return Zn(t,mr.matroska)},mp4:function(e){return!gr["3gp"](e)&&!gr.mov(e)&&(!(!Zn(e,mr.mp4,{offset:4})&&!Zn(e,mr.fmp4,{offset:4}))||(!(!Zn(e,mr.moof,{offset:4})&&!Zn(e,mr.moov,{offset:4}))||void 0))},mov:function(e){return Zn(e,mr.mov,{offset:4})},"3gp":function(e){return Zn(e,mr["3gp"],{offset:4})},ac3:function(e){var t=tr(e)
return Zn(e,mr.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0]
for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0
t+=1}return!1},flac:function(e){var t=tr(e)
return Zn(e,mr.flac,{offset:t})},ogg:function(e){return Zn(e,mr.ogg)},avi:function(e){return Zn(e,mr.riff)&&Zn(e,mr.avi,{offset:8})},wav:function(e){return Zn(e,mr.riff)&&Zn(e,mr.wav,{offset:8})},h264:function(e){return function(e,t,i){return fr(e,"h264",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return fr(e,"h265",t,i)}(e,[32,33],3).length}},vr=Object.keys(gr).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"])
vr.forEach((function(e){var t=gr[e]
gr[e]=function(e){return t(Kn(e))}}))
var yr,_r,br,Tr,kr=gr,Sr=function(e){e=Kn(e)
for(var t=0;t<vr.length;t++){var i=vr[t]
if(kr[i](e))return i}return""},Er=9e4
0
0
0
yr=function(e){return e*Er},_r=function(e,t){return e*t},br=function(e){return e/Er},Tr=function(e,t){return e/t}
for(var Cr,wr=Er,Ir="7.19.0",Pr={},xr=function(e,t){Pr[e]=Pr[e]||[]
t&&(Pr[e]=Pr[e].concat(t))
return Pr[e]},Ar=function(e,t){var i=xr(e).indexOf(t)
if(i<=-1)return!1
Pr[e]=Pr[e].slice()
Pr[e].splice(i,1)
return!0},Or={prefixed:!0},Lr=[["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"]],Dr=Lr[0],Rr=0;Rr<Lr.length;Rr++)if(Lr[Rr][1]in L){Cr=Lr[Rr]
break}if(Cr){for(var Mr=0;Mr<Cr.length;Mr++)Or[Dr[Mr]]=Cr[Mr]
Or.prefixed=Cr[0]!==Dr[0]}var Nr=[]
var Ur=function e(t){var i,n="info",r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r]
i("log",n,t)}
i=function(e,t){return function(i,n,r){var a=t.levels[n],s=new RegExp("^("+a+")$")
"log"!==i&&r.unshift(i.toUpperCase()+":")
r.unshift(e+":")
if(Nr){Nr.push([].concat(r))
var o=Nr.length-1e3
Nr.splice(0,o>0?o:0)}if(x.console){var u=x.console[i]
u||"debug"!==i||(u=x.console.info||x.console.log)
u&&a&&s.test(i)&&u[Array.isArray(r)?"apply":"call"](x.console,r)}}}(t,r)
r.createLogger=function(i){return e(t+": "+i)}
r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n}
r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level')
n=e}return n};(r.history=function(){return Nr?[].concat(Nr):[]}).filter=function(e){return(Nr||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))}
r.history.clear=function(){Nr&&(Nr.length=0)}
r.history.disable=function(){if(null!==Nr){Nr.length=0
Nr=null}}
r.history.enable=function(){null===Nr&&(Nr=[])}
r.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r]
return i("error",n,t)}
r.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r]
return i("warn",n,t)}
r.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r]
return i("debug",n,t)}
return r}("VIDEOJS"),Br=Ur.createLogger,Fr=Object.prototype.toString,jr=function(e){return qr(e)?Object.keys(e):[]}
function Vr(e,t){jr(e).forEach((function(i){return t(e[i],i)}))}function Hr(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n]
if(Object.assign)return R.apply(void 0,[e].concat(i))
i.forEach((function(t){t&&Vr(t,(function(t,i){e[i]=t}))}))
return e}function qr(e){return!!e&&"object"==typeof e}function Wr(e){return qr(e)&&"[object Object]"===Fr.call(e)&&e.constructor===Object}function Gr(e,t){if(!e||!t)return""
if("function"==typeof x.getComputedStyle){var i
try{i=x.getComputedStyle(e)}catch(e){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}var zr,Kr=x.navigator&&x.navigator.userAgent||"",Xr=/AppleWebKit\/([\d.]+)/i.exec(Kr),Yr=Xr?parseFloat(Xr.pop()):null,Qr=/iPod/i.test(Kr),$r=(zr=Kr.match(/OS (\d+)_/i))&&zr[1]?zr[1]:null,Jr=/Android/i.test(Kr),Zr=function(){var e=Kr.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i)
if(!e)return null
var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2])
return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),ea=Jr&&Zr<5&&Yr<537,ta=/Firefox/i.test(Kr),ia=/Edg/i.test(Kr),na=!ia&&(/Chrome/i.test(Kr)||/CriOS/i.test(Kr)),ra=function(){var e=Kr.match(/(Chrome|CriOS)\/(\d+)/)
return e&&e[2]?parseFloat(e[2]):null}(),aa=function(){var e=/MSIE\s(\d+)\.\d/.exec(Kr),t=e&&parseFloat(e[1])
!t&&/Trident\/7.0/i.test(Kr)&&/rv:11.0/.test(Kr)&&(t=11)
return t}(),sa=/Safari/i.test(Kr)&&!na&&!Jr&&!ia,oa=/Windows/i.test(Kr),ua=Boolean(ga()&&("ontouchstart"in x||x.navigator.maxTouchPoints||x.DocumentTouch&&x.document instanceof x.DocumentTouch)),la=/iPad/i.test(Kr)||sa&&ua&&!/iPhone/i.test(Kr),ca=/iPhone/i.test(Kr)&&!la,da=ca||la||Qr,ha=(sa||da)&&!na,pa=Object.freeze({__proto__:null,IS_IPOD:Qr,IOS_VERSION:$r,IS_ANDROID:Jr,ANDROID_VERSION:Zr,IS_NATIVE_ANDROID:ea,IS_FIREFOX:ta,IS_EDGE:ia,IS_CHROME:na,CHROME_VERSION:ra,IE_VERSION:aa,IS_SAFARI:sa,IS_WINDOWS:oa,TOUCH_ENABLED:ua,IS_IPAD:la,IS_IPHONE:ca,IS_IOS:da,IS_ANY_SAFARI:ha})
function fa(e){return"string"==typeof e&&Boolean(e.trim())}function ma(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function ga(){return L===x.document}function va(e){return qr(e)&&1===e.nodeType}function ya(){try{return x.parent!==x.self}catch(e){return!0}}function _a(e){return function(t,i){if(!fa(t))return L[e](null)
fa(i)&&(i=L.querySelector(i))
var n=va(i)?i:L
return n[e]&&n[e](t)}}function ba(e,t,i,n){void 0===e&&(e="div")
void 0===t&&(t={})
void 0===i&&(i={})
var r=L.createElement(e)
Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e]
if(-1!==e.indexOf("aria-")||"role"===e||"type"===e){Ur.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+i+".")
r.setAttribute(e,i)}else"textContent"===e?Ta(r,i):r[e]===i&&"tabIndex"!==e||(r[e]=i)}))
Object.getOwnPropertyNames(i).forEach((function(e){r.setAttribute(e,i[e])}))
n&&ja(r,n)
return r}function Ta(e,t){void 0===e.textContent?e.innerText=t:e.textContent=t
return e}function ka(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Sa(e,t){ma(t)
return e.classList?e.classList.contains(t):(i=t,new RegExp("(^|\\s)"+i+"($|\\s)")).test(e.className)
var i}function Ea(e,t){e.classList?e.classList.add(t):Sa(e,t)||(e.className=(e.className+" "+t).trim())
return e}function Ca(e,t){if(!e){Ur.warn("removeClass was called with an element that doesn't exist")
return null}if(e.classList)e.classList.remove(t)
else{ma(t)
e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")}return e}function wa(e,t,i){var n=Sa(e,t)
"function"==typeof i&&(i=i(e,t))
"boolean"!=typeof i&&(i=!n)
if(i!==n){i?Ea(e,t):Ca(e,t)
return e}}function Ia(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var n=t[i]
null==n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function Pa(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,"
if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,r=n.length-1;r>=0;r--){var a=n[r].name,s=n[r].value
"boolean"!=typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s)
t[a]=s}return t}function xa(e,t){return e.getAttribute(t)}function Aa(e,t,i){e.setAttribute(t,i)}function Oa(e,t){e.removeAttribute(t)}function La(){L.body.focus()
L.onselectstart=function(){return!1}}function Da(){L.onselectstart=function(){return!0}}function Ra(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(i[e]=t[e])}))
i.height||(i.height=parseFloat(Gr(e,"height")))
i.width||(i.width=parseFloat(Gr(e,"width")))
return i}}function Ma(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0}
for(var t=e.offsetWidth,i=e.offsetHeight,n=0,r=0;e.offsetParent&&e!==L[Or.fullscreenElement];){n+=e.offsetLeft
r+=e.offsetTop
e=e.offsetParent}return{left:n,top:r,width:t,height:i}}function Na(e,t){var i={x:0,y:0}
if(da)for(var n=e;n&&"html"!==n.nodeName.toLowerCase();){var r=Gr(n,"transform")
if(/^matrix/.test(r)){var a=r.slice(7,-1).split(/,\s/).map(Number)
i.x+=a[4]
i.y+=a[5]}else if(/^matrix3d/.test(r)){var s=r.slice(9,-1).split(/,\s/).map(Number)
i.x+=s[12]
i.y+=s[13]}n=n.parentNode}var o={},u=Ma(t.target),l=Ma(e),c=l.width,d=l.height,h=t.offsetY-(l.top-u.top),p=t.offsetX-(l.left-u.left)
if(t.changedTouches){p=t.changedTouches[0].pageX-l.left
h=t.changedTouches[0].pageY+l.top
if(da){p-=i.x
h-=i.y}}o.y=1-Math.max(0,Math.min(1,h/d))
o.x=Math.max(0,Math.min(1,p/c))
return o}function Ua(e){return qr(e)&&3===e.nodeType}function Ba(e){for(;e.firstChild;)e.removeChild(e.firstChild)
return e}function Fa(e){"function"==typeof e&&(e=e())
return(Array.isArray(e)?e:[e]).map((function(e){"function"==typeof e&&(e=e())
return va(e)||Ua(e)?e:"string"==typeof e&&/\S/.test(e)?L.createTextNode(e):void 0})).filter((function(e){return e}))}function ja(e,t){Fa(t).forEach((function(t){return e.appendChild(t)}))
return e}function Va(e,t){return ja(Ba(e),t)}function Ha(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var qa,Wa=_a("querySelector"),Ga=_a("querySelectorAll"),za=Object.freeze({__proto__:null,isReal:ga,isEl:va,isInFrame:ya,createEl:ba,textContent:Ta,prependTo:ka,hasClass:Sa,addClass:Ea,removeClass:Ca,toggleClass:wa,setAttributes:Ia,getAttributes:Pa,getAttribute:xa,setAttribute:Aa,removeAttribute:Oa,blockTextSelection:La,unblockTextSelection:Da,getBoundingClientRect:Ra,findPosition:Ma,getPointerPosition:Na,isTextNode:Ua,emptyEl:Ba,normalizeContent:Fa,appendContent:ja,insertContent:Va,isSingleLeftClick:Ha,$:Wa,$$:Ga}),Ka=!1,Xa=function(){if(!1!==qa.options.autoSetup){var e=Array.prototype.slice.call(L.getElementsByTagName("video")),t=Array.prototype.slice.call(L.getElementsByTagName("audio")),i=Array.prototype.slice.call(L.getElementsByTagName("video-js")),n=e.concat(t,i)
if(n&&n.length>0)for(var r=0,a=n.length;r<a;r++){var s=n[r]
if(!s||!s.getAttribute){Ya(1)
break}if(void 0===s.player){null!==s.getAttribute("data-setup")&&qa(s)}}else Ka||Ya(1)}}
function Ya(e,t){if(ga()){t&&(qa=t)
x.setTimeout(Xa,e)}}function Qa(){Ka=!0
x.removeEventListener("load",Qa)}ga()&&("complete"===L.readyState?Qa():x.addEventListener("load",Qa))
var $a,Ja=function(e){var t=L.createElement("style")
t.className=e
return t},Za=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},es=3
function ts(){return es++}x.WeakMap||($a=function(){function e(){this.vdata="vdata"+Math.floor(x.performance&&x.performance.now()||Date.now())
this.data={}}var t=e.prototype
t.set=function(e,t){var i=e[this.vdata]||ts()
e[this.vdata]||(e[this.vdata]=i)
this.data[i]=t
return this}
t.get=function(e){var t=e[this.vdata]
if(t)return this.data[t]
Ur("We have no data for this element",e)}
t.has=function(e){return e[this.vdata]in this.data}
t.delete=function(e){var t=e[this.vdata]
if(t){delete this.data[t]
delete e[this.vdata]}}
return e}())
var is,ns=x.WeakMap?new WeakMap:new $a
function rs(e,t){if(ns.has(e)){var i=ns.get(e)
if(0===i.handlers[t].length){delete i.handlers[t]
e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)}if(Object.getOwnPropertyNames(i.handlers).length<=0){delete i.handlers
delete i.dispatcher
delete i.disabled}0===Object.getOwnPropertyNam