diff -r 3994db8224ea -r 459a88818bec web/res/js/client.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/res/js/client.js Wed Dec 18 12:52:21 2024 +0100 @@ -0,0 +1,2 @@ +/*! For license information please see client.js.LICENSE.txt */ +(()=>{var e={3490:(e,t,n)=>{"use strict";var r=n(8908);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,i,a){if(n)e(n);else if(i.statusCode>=400&&i.statusCode<=599){var s=a;if(t)if(r.TextDecoder){var o=(void 0===(l=i.headers&&i.headers["content-type"])&&(l=""),l.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),r=n[0],i=n[1];return"charset"===r.trim()?i.trim():e}),"utf-8"));try{s=new TextDecoder(o).decode(a)}catch(e){}}else s=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:s})}else e(null,a);var l}}},9603:(e,t,n)=>{"use strict";var r=n(8908),i=n(434),a=n(7376);l.httpHandler=n(3490);var s=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t};function o(e,t,n){var r=e;return a(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function l(e,t,n){return u(t=o(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=c.response?c.response:c.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(c),y)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,v)}function a(){if(!u){var t;clearTimeout(d),t=e.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var i=v,a=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:f,rawRequest:c},c.getAllResponseHeaders&&(i.headers=s(c.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,i,i.body)}}var o,u,c=e.xhr||null;c||(c=e.cors||e.useXDR?new l.XDomainRequest:new l.XMLHttpRequest);var d,f=c.url=e.uri||e.url,h=c.method=e.method||"GET",p=e.body||e.data,g=c.headers=e.headers||{},m=!!e.sync,y=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:c};if("json"in e&&!1!==e.json&&(y=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),c.onreadystatechange=function(){4===c.readyState&&setTimeout(a,0)},c.onload=a,c.onerror=i,c.onprogress=function(){},c.onabort=function(){u=!0},c.ontimeout=i,c.open(h,f,!m,e.username,e.password),m||(c.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(d=setTimeout((function(){if(!u){u=!0,c.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),c.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&c.setRequestHeader(o,g[o]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(c.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(c),c.send(p||null),c}e.exports=l,e.exports.default=l,l.XMLHttpRequest=r.XMLHttpRequest||function(){},l.XDomainRequest="withCredentials"in new l.XMLHttpRequest?l.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n{"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var r=n({HTML:"text/html",isHTML:function(e){return e===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var r=0;r{var r=n(2167),i=n(1146),a=n(1045),s=n(6925),o=i.DOMImplementation,l=r.NAMESPACE,u=s.ParseError,c=s.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function f(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function p(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function g(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function m(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}f.prototype.parseFromString=function(e,t){var n=this.options,r=new c,i=n.domBuilder||new h,s=n.errorHandler,o=n.locator,u=n.xmlns||{},f=/\/x?html?$/.test(t),p=f?a.HTML_ENTITIES:a.XML_ENTITIES;o&&i.setDocumentLocator(o),r.errorHandler=function(e,t,n){if(!e){if(t instanceof h)return t;e=t}var r={},i=e instanceof Function;function a(t){var a=e[t];!a&&i&&(a=2==e.length?function(n){e(t,n)}:e),r[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+g(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(s,i,o),r.domBuilder=n.domBuilder||i,f&&(u[""]=l.HTML),u.xml=u.xml||l.XML;var m=n.normalizeLineEndings||d;return e&&"string"==typeof e?r.parse(m(e),u,p):r.errorHandler.error("invalid doc source"),i.doc},h.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;y(this,a),this.currentElement=a,this.locator&&p(this.locator,a);for(var o=0;o{var r=n(2167),i=r.find,a=r.NAMESPACE;function s(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function l(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(s):[]}(e);return Object.keys(t.reduce(o,{}))}function u(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,u(n,r=new r),e.prototype=n=r}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var d={},f=d.ELEMENT_NODE=1,h=d.ATTRIBUTE_NODE=2,p=d.TEXT_NODE=3,g=d.CDATA_SECTION_NODE=4,m=d.ENTITY_REFERENCE_NODE=5,y=d.ENTITY_NODE=6,v=d.PROCESSING_INSTRUCTION_NODE=7,_=d.COMMENT_NODE=8,T=d.DOCUMENT_NODE=9,E=d.DOCUMENT_TYPE_NODE=10,b=d.DOCUMENT_FRAGMENT_NODE=11,S=d.NOTATION_NODE=12,A={},w={},I=(A.INDEX_SIZE_ERR=(w[1]="Index size error",1),A.DOMSTRING_SIZE_ERR=(w[2]="DOMString size error",2),A.HIERARCHY_REQUEST_ERR=(w[3]="Hierarchy request error",3)),C=(A.WRONG_DOCUMENT_ERR=(w[4]="Wrong document",4),A.INVALID_CHARACTER_ERR=(w[5]="Invalid character",5),A.NO_DATA_ALLOWED_ERR=(w[6]="No data allowed",6),A.NO_MODIFICATION_ALLOWED_ERR=(w[7]="No modification allowed",7),A.NOT_FOUND_ERR=(w[8]="Not found",8)),R=(A.NOT_SUPPORTED_ERR=(w[9]="Not supported",9),A.INUSE_ATTRIBUTE_ERR=(w[10]="Attribute in use",10));function D(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,w[e]),this.message=w[e],Error.captureStackTrace&&Error.captureStackTrace(this,D);return n.code=e,t&&(this.message=this.message+": "+t),n}function N(){}function O(e,t){this._node=e,this._refresh=t,P(this)}function P(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(ve(e,"length",n.length),!e.$$length||n.length=0))throw new D(C,new Error(e.tagName+"@"+n));for(var i=t.length-1;r"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function j(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(j(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function H(e,t,n,r){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function G(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a,delete r[r.length]}}}function V(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,G(e.ownerDocument,e),t}function Y(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function Z(e){return e&&e.nodeType===U.ELEMENT_NODE}function K(e){return e&&e.nodeType===U.TEXT_NODE}function z(e,t){var n=e.childNodes||[];if(i(n,Z)||Y(t))return!1;var r=i(n,Y);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function W(e,t){var n=e.childNodes||[];if(i(n,(function(e){return Z(e)&&e!==t})))return!1;var r=i(n,Y);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function X(e,t,n){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var s=a.filter(Z);if(s.length>1||i(a,K))throw new D(I,"More than one element or text in fragment");if(1===s.length&&!z(e,n))throw new D(I,"Element in fragment can not be inserted before doctype")}if(Z(t)&&!z(e,n))throw new D(I,"Only one element can be added and only after doctype");if(Y(t)){if(i(r,Y))throw new D(I,"Only one doctype is allowed");var o=i(r,Z);if(n&&r.indexOf(o)1||i(a,K))throw new D(I,"More than one element or text in fragment");if(1===s.length&&!W(e,n))throw new D(I,"Element in fragment can not be inserted before doctype")}if(Z(t)&&!W(e,n))throw new D(I,"Only one element can be added and only after doctype");if(Y(t)){if(i(r,(function(e){return Y(e)&&e!==n})))throw new D(I,"Only one doctype is allowed");var o=i(r,Z);if(n&&r.indexOf(o)=0;S--)if(""===(A=i[S]).prefix&&A.namespace===e.namespaceURI){d=A.namespace;break}if(d!==e.namespaceURI)for(S=i.length-1;S>=0;S--){var A;if((A=i[S]).namespace===e.namespaceURI){A.prefix&&(c=A.prefix+":"+u);break}}}t.push("<",c);for(var w=0;w"),n&&/^script$/i.test(u))for(;l;)l.data?t.push(l.data):ge(l,t,n,r,i.slice()),l=l.nextSibling;else for(;l;)ge(l,t,n,r,i.slice()),l=l.nextSibling;t.push("")}else t.push("/>");return;case T:case b:for(l=e.firstChild;l;)ge(l,t,n,r,i.slice()),l=l.nextSibling;return;case h:return pe(t,e.name,e.value);case p:return t.push(e.data.replace(/[<&>]/g,B));case g:return t.push("");case _:return t.push("\x3c!--",e.data,"--\x3e");case E:var D=e.publicId,N=e.systemId;if(t.push("");else if(N&&"."!=N)t.push(" SYSTEM ",N,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case v:return t.push("");case m:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function me(e,t,n){var r;switch(t.nodeType){case f:(r=t.cloneNode(!1)).ownerDocument=e;case b:break;case h:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(me(e,i,n)),i=i.nextSibling;return r}function ye(e,t,n){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i];"object"!=typeof a&&a!=r[i]&&(r[i]=a)}switch(t.childNodes&&(r.childNodes=new N),r.ownerDocument=e,r.nodeType){case f:var s=t.attributes,o=r.attributes=new M,l=s.length;o._ownerElement=r;for(var u=0;u=0&&e0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e)return r;t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},u(d,U),u(d,U.prototype),q.prototype={nodeName:"#document",nodeType:T,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==b){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return Q(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===f&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),V(this,e)},replaceChild:function(e,t){Q(this,e,t,$),e.ownerDocument=this,t&&this.removeChild(t),Z(e)&&(this.documentElement=e)},importNode:function(e,t){return me(this,e,t)},getElementById:function(e){var t=null;return j(this.documentElement,(function(n){if(n.nodeType==f&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=l(e);return new O(this,(function(n){var r=[];return t.length>0&&j(n.documentElement,(function(i){if(i!==n&&i.nodeType===f){var a=i.getAttribute("class");if(a){var s=e===a;if(!s){var o=l(a);s=t.every((u=o,function(e){return u&&-1!==u.indexOf(e)}))}s&&r.push(i)}}var u})),r}))},createElement:function(e){var t=new J;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new N,(t.attributes=new M)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new N,e},createTextNode:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ce;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new ee;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new J,r=t.split(":"),i=n.attributes=new M;return n.childNodes=new N,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new ee,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},c(q,U),J.prototype={nodeType:f,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 n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===b?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,G(e.ownerDocument,e,t),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 n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new O(this,(function(t){var n=[];return j(t,(function(r){r===t||r.nodeType!=f||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new O(this,(function(n){var r=[];return j(n,(function(i){i===n||i.nodeType!==f||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},q.prototype.getElementsByTagName=J.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=J.prototype.getElementsByTagNameNS,c(J,U),ee.prototype.nodeType=h,c(ee,U),te.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(w[I])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(te,U),ne.prototype={nodeName:"#text",nodeType:p,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},c(ne,te),re.prototype={nodeName:"#comment",nodeType:_},c(re,te),ie.prototype={nodeName:"#cdata-section",nodeType:g},c(ie,te),ae.prototype.nodeType=E,c(ae,U),se.prototype.nodeType=S,c(se,U),oe.prototype.nodeType=y,c(oe,U),le.prototype.nodeType=m,c(le,U),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=b,c(ue,U),ce.prototype.nodeType=v,c(ce,U),de.prototype.serializeToString=function(e,t,n){return fe.call(e,t,n)},U.prototype.toString=fe;try{if(Object.defineProperty){function _e(e){switch(e.nodeType){case f:case b:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(_e(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(O.prototype,"length",{get:function(){return P(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return _e(this)},set:function(e){switch(this.nodeType){case f:case b: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}}}),ve=function(e,t,n){e["$$"+t]=n}}}catch(Te){}t.DocumentType=ae,t.DOMException=D,t.DOMImplementation=F,t.Element=J,t.Node=U,t.NodeList=N,t.XMLSerializer=de},1045:(e,t,n)=>{"use strict";var r=n(2167).freeze;t.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},3969:(e,t,n)=>{var r=n(1146);r.DOMImplementation,r.XMLSerializer,t.DOMParser=n(6129).DOMParser},6925:(e,t,n)=>{var r=n(2167).NAMESPACE,i=/[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]/,a=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+i.source+a.source+"*(?::"+i.source+a.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function u(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function c(e,t,n,i,a,s){function o(e,t,r){n.attributeNames.hasOwnProperty(e)&&s.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var l,u=++t,c=0;;){var d=e.charAt(u);switch(d){case"=":if(1===c)l=e.slice(t,u),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(s.warning('attribute value must after "="'),l=e.slice(t,u)),t=u+1,!((u=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");o(l,f=e.slice(t,u),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');o(l,f=e.slice(t,u),t),s.warning('attribute "'+l+'" missed start quot('+d+")!!"),t=u+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,u)),u;case">":switch(c){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(f=e.slice(t,u)).slice(-1)&&(n.closed=!0,f=f.slice(0,-1));case 2:2===c&&(f=l),4==c?(s.warning('attribute "'+f+'" missed quot(")!'),o(l,f,t)):(r.isHTML(i[""])&&f.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),o(f,f,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":d=" ";default:if(d<=" ")switch(c){case 0:n.setTagName(e.slice(t,u)),c=6;break;case 1:l=e.slice(t,u),c=2;break;case 4:var f=e.slice(t,u);s.warning('attribute "'+f+'" missed quot(")!!'),o(l,f,t);case 5:c=6}else switch(c){case 2:n.tagName,r.isHTML(i[""])&&l.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=u,c=1;break;case 5:s.warning('attribute space is required"'+l+'"!!');case 6:c=1,t=u;break;case 3:c=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function d(e,t,n){for(var i=e.tagName,a=null,s=e.length;s--;){var o=e[s],l=o.qName,u=o.value;if((h=l.indexOf(":"))>0)var c=o.prefix=l.slice(0,h),d=l.slice(h+1),f="xmlns"===c&&d;else d=l,c=null,f="xmlns"===l&&"";o.localName=d,!1!==f&&(null==a&&(a={},p(n,n={})),n[f]=a[f]=u,o.uri=r.XMLNS,t.startPrefixMapping(f,u))}for(s=e.length;s--;)(c=(o=e[s]).prefix)&&("xml"===c&&(o.uri=r.XML),"xmlns"!==c&&(o.uri=n[c||""]));var h;(h=i.indexOf(":"))>0?(c=e.prefix=i.slice(0,h),d=e.localName=i.slice(h+1)):(c=null,d=e.localName=i);var g=e.uri=n[c||""];if(t.startElement(g,d,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(g,d,i),a)for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&t.endPrefixMapping(c)}function f(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),a)}return t+1}function h(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf(""))t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],l=!1,u=!1;s>3&&(/^public$/i.test(a[2][0])?(l=a[3][0],u=s>4&&a[4][0]):/^system$/i.test(a[2][0])&&(u=a[3][0]));var c=a[s-1];return n.startDTD(o,l,u),n.endDTD(),c.index+c[0].length}return-1}function m(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return i?(i[0].length,n.processingInstruction(i[1],i[2]),r+2):-1}return-1}function y(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),p(t,t={}),function(e,t,n,i,a){function s(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function l(t){if(t>A){var n=e.substring(A,t).replace(/&#?\w+;/g,s);E&&p(A),i.characters(n,0,t-A),A=t}}function p(t,n){for(;t>=_&&(n=T.exec(e));)v=n.index,_=v+n[0].length,E.lineNumber++;E.columnNumber=t-v+1}for(var v=0,_=0,T=/.*(?:\r\n?|\n)|.*$/g,E=i.locator,b=[{currentNSMap:t}],S={},A=0;;){try{var w=e.indexOf("<",A);if(w<0){if(!e.substr(A).match(/^\s*$/)){var I=i.doc,C=I.createTextNode(e.substr(A));I.appendChild(C),i.currentElement=C}return}switch(w>A&&l(w),e.charAt(w+1)){case"/":var R=e.indexOf(">",w+3),D=e.substring(w+2,R).replace(/[ \t\n\r]+$/g,""),N=b.pop();R<0?(D=e.substring(w+2).replace(/[\s<].*/,""),a.error("end tag name: "+D+" is not complete:"+N.tagName),R=w+1+D.length):D.match(/\sA?A=R:l(Math.max(w,A)+1)}}(e,t,n,i,this.errorHandler),i.endDocument()}},y.prototype={setTagName:function(e){if(!s.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!s.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},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}},t.XMLReader=l,t.ParseError=o},5176:e=>{self,e.exports=function(){var e={4593:function(e,t){var n,r,i,o,l,u={};n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=function(e){for(var t=0,r=[],i=0|e.length/3;0>18)),r.push(n.charAt(63&a>>12)),r.push(n.charAt(63&a>>6)),r.push(n.charAt(63&a))}return 2==e.length-t?(a=(e[t]<<16)+(e[t+1]<<8),r.push(n.charAt(63&a>>18)),r.push(n.charAt(63&a>>12)),r.push(n.charAt(63&a>>6)),r.push("=")):1==e.length-t&&(a=e[t]<<16,r.push(n.charAt(63&a>>18)),r.push(n.charAt(63&a>>12)),r.push("==")),r.join("")},i=function(){for(var e=[],t=0;t<64;++t)e[n.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),o=function(e){for(var t=0,n=[],r=0|e.length/4;0>16),n.push(255&a>>8),n.push(255&a),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n},l={encode:function(e){for(var t=[],n=0;n>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t}(e);return r(t)},u.decode=function(e){return function(e){for(var t=[],n=0;n=n&&console.log(this.time+" ["+e+"] "+t)}},d=function(e){for(var t=[],n=0;ni&&(c.log("ERROR","Too large cursor position "+this.pos),this.pos=i)},moveCursor:function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n=144&&this.backSpace();var t=n(e);this.pos>=i?c.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},clearFromPos:function(e){var t;for(t=e;t0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},getTextAndFormat:function(){return this.rows}};var m=function(e,t){this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new g,this.nonDisplayedMemory=new g,this.lastOutputScreen=new g,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null};m.prototype={modes:["MODE_ROLL-UP","MODE_POP-ON","MODE_PAINT-ON","MODE_TEXT"],reset:function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.lastCueEndTime=null},getHandler:function(){return this.outputFilter},setHandler:function(e){this.outputFilter=e},setPAC:function(e){this.writeScreen.setPAC(e)},setBkgData:function(e){this.writeScreen.setBkgData(e)},setMode:function(e){e!==this.mode&&(this.mode=e,c.log("INFO","MODE="+e),"MODE_POP-ON"==this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},insertChars:function(e){for(var t=0;t=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}c.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},outputDataUpdate:function(){var e=c.time;null!==e&&this.outputFilter&&(this.outputFilter.updateData&&this.outputFilter.updateData(e,this.displayedMemory),null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},cueSplitAtTime:function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}};var y=function(e,t,n){this.field=e||1,this.outputs=[t,n],this.channels=[new m(1,t),new m(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.bufferedData=[],this.startTime=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}};y.prototype={getHandler:function(e){return this.channels[e].getHandler()},setHandler:function(e,t){this.channels[e].setHandler(t)},addData:function(e,t){var n,r,i,a=!1;this.lastTime=e,c.setTime(e);for(var s=0;s=16&&r<=31&&r===this.lastCmdA&&i===this.lastCmdB?(this.lastCmdA=null,this.lastCmdB=null,c.log("DEBUG","Repeated command ("+d([r,i])+") is dropped")):0!==r||0!==i?(c.log("DATA","["+d([t[s],t[s+1]])+"] -> ("+d([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),n||(a=this.parseChars(r,i))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(a):c.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,c.log("WARNING","Couldn't parse cleaned data "+d([r,i])+" orig: "+d([t[s],t[s+1]])))):this.dataCounters.padding+=2},parseCmd:function(e,t){var n;if(!((20===e||21===e||28===e||29===e)&&32<=t&&t<=47||(23===e||31===e)&&33<=t&&t<=35))return!1;n=20===e||21===e||23===e?1:2;var r=this.channels[n-1];return 20===e||21===e||28===e||29===e?32===t?r.cc_RCL():33===t?r.cc_BS():34===t?r.cc_AOF():35===t?r.cc_AON():36===t?r.cc_DER():37===t?r.cc_RU(2):38===t?r.cc_RU(3):39===t?r.cc_RU(4):40===t?r.cc_FON():41===t?r.cc_RDC():42===t?r.cc_TR():43===t?r.cc_RTD():44===t?r.cc_EDM():45===t?r.cc_CR():46===t?r.cc_ENM():47===t&&r.cc_EOC():r.cc_TO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},parseMidrow:function(e,t){var n=null;if((17===e||25===e)&&32<=t&&t<=47){if((n=17===e?1:2)!==this.currChNr)return c.log("ERROR","Mismatch channel in midrow parsing"),!1;var r=this.channels[n-1];return r.insertChars([32]),r.cc_MIDROW(t),c.log("DEBUG","MIDROW ("+d([e,t])+")"),this.lastCmdA=e,this.lastCmdB=t,!0}return!1},parsePAC:function(e,t){var n,r;if(!((17<=e&&e<=23||25<=e&&e<=31)&&64<=t&&t<=127||(16===e||24===e)&&64<=t&&t<=95))return!1;n=e<=23?1:2,r=64<=t&&t<=95?1===n?a[e]:o[e]:1===n?s[e]:l[e];var i=this.interpretPAC(r,t);return this.channels[n-1].setPAC(i),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},interpretPAC:function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},parseChars:function(e,t){var r,i=null,a=null,s=null;if(e>=25?(i=2,s=e-8):(i=1,s=e),17<=s&&s<=19?(r=17===s?t+80:18===s?t+112:t+144,c.log("INFO","Special char '"+n(r)+"' in channel "+i),a=[r],this.lastCmdA=e,this.lastCmdB=t):32<=e&&e<=127&&(a=0===t?[e]:[e,t],this.lastCmdA=null,this.lastCmdB=null),a){var o=d(a);c.log("DEBUG","Char codes = "+o.join(","))}return a},parseBackgroundAttributes:function(e,t){var n,r,i;return((16===e||24===e)&&32<=t&&t<=47||(23===e||31===e)&&45<=t&&t<=47)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=u[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(n),this.lastCmdA=e,this.lastCmdB=t,!0)},reset:function(){for(var e=0;e0&&(r+=" ");for(var o=arguments.length,l=new Array(o>2?o-2:0),u=2;u=e&&g[e](r),p&&p.get().debug.dispatchEvent&&h.trigger(i.Z.LOG,{message:r,level:e})}return t={getLogger:function(e){return{fatal:y.bind(e),error:v.bind(e),warn:_.bind(e),info:T.bind(e),debug:E.bind(e)}},setLogTimestampVisible:function(e){n=e},setCalleeNameVisible:function(e){a=e}},n=!0,a=!0,d=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(g[s]=m(window.console.error),g[o]=m(window.console.error),g[l]=m(window.console.warn),g[u]=m(window.console.info),g[c]=m(window.console.debug)),t}d.__dashjs_factory_name="Debug";var f=a.Z.getSingletonFactory(d);f.LOG_LEVEL_NONE=0,f.LOG_LEVEL_FATAL=s,f.LOG_LEVEL_ERROR=o,f.LOG_LEVEL_WARNING=l,f.LOG_LEVEL_INFO=u,f.LOG_LEVEL_DEBUG=c,a.Z.updateSingletonFactory(d.__dashjs_factory_name,f),t.Z=f},5595:function(e,t,n){"use strict";var r=n(5448),i=n(8825);function a(){var e={};function t(t,n,r){var i=-1;return e[t]?(e[t].some((function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return i=t,!0})),i):i}var n={on:function(n,r,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("event type cannot be null or undefined");if(!r||"function"!=typeof r)throw new Error("listener must be a function: "+r);var s=a.priority||0;if(!(t(n,r,i)>=0)){e[n]=e[n]||[];var o={callback:r,scope:i,priority:s};i&&i.getStreamId&&(o.streamId=i.getStreamId()),i&&i.getType&&(o.mediaType=i.getType()),a&&a.mode&&(o.mode=a.mode);var l=e[n].some((function(t,r){if(t&&s>t.priority)return e[n].splice(r,0,o),!0}));l||e[n].push(o)}},off:function(n,r,i){if(n&&r&&e[n]){var a=t(n,r,i);a<0||(e[n][a]=null)}},trigger:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){if((n=n||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");n.type=t,r.streamId&&(n.streamId=r.streamId),r.mediaType&&(n.mediaType=r.mediaType),e[t].filter((function(e){return!(!e||r.streamId&&e.streamId&&e.streamId!==r.streamId||r.mediaType&&e.mediaType&&e.mediaType!==r.mediaType||r.mode&&e.mode&&e.mode!==r.mode||!e.mode&&r.mode&&r.mode===i.Z.EVENT_MODE_ON_RECEIVE)})).forEach((function(e){return e&&e.callback.call(e.scope,n)}))}},reset:function(){e={}}};return n}a.__dashjs_factory_name="EventBus";var s=r.Z.getSingletonFactory(a);s.EVENT_PRIORITY_LOW=0,s.EVENT_PRIORITY_HIGH=5e3,r.Z.updateSingletonFactory(a.__dashjs_factory_name,s),t.Z=s},5448:function(e,t){"use strict";var n=function(){var e,t=[],n={},r={};function i(e,n){for(var r in t){var i=t[r];if(i.context===e&&i.name===n)return i.instance}return null}function a(e,t){return t[e]}function s(e,t,n){e in n&&(n[e]=t)}function o(t,n,r){var i,a=t.__dashjs_factory_name,s=n[a];if(s){var o=s.instance;if(!s.override)return o.apply({context:n,factory:e},r);for(var l in i=t.apply({context:n},r),o=o.apply({context:n,factory:e,parent:i},r))i.hasOwnProperty(l)&&(i[l]=o[l])}else i=t.apply({context:n},r);return i.getClassName=function(){return a},i}return e={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:i,setSingletonInstance:function(e,n,r){for(var i in t){var a=t[i];if(a.context===e&&a.name===n)return void(t[i].instance=r)}t.push({name:n,context:e,instance:r})},deleteSingletonInstances:function(e){t=t.filter((function(t){return t.context!==e}))},getSingletonFactory:function(e){var r=a(e.__dashjs_factory_name,n);return r||(r=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=i(n,e.__dashjs_factory_name)),r||(r=o(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return a(e,n)},updateSingletonFactory:function(e,t){s(e,t,n)},getClassFactory:function(e){var t=a(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return o(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return a(e,r)},updateClassFactory:function(e,t){s(e,t,r)}},e}();t.Z=n},1264:function(e,t,n){"use strict";var r=n(5448),i=n(703),a=n(6398),s=n(3393),o=n(7855),l=n(5595),u=n(8512);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(){var e,t,n=this.context,r=(0,l.Z)(n).getInstance(),f={"streaming.delay.liveDelay":u.Z.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":u.Z.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":u.Z.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX},h={debug:{logLevel:a.Z.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,useMediaCapabilitiesApi:!1},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,stableBufferTime:12,longFormContentDurationThreshold:600,stallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeTypeForTrackSwitch:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"}},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},playbackBufferMin:.5,enabled:null,mode:s.Z.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:s.Z.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:s.Z.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:s.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:(e={},d(e,o.w.MPD_TYPE,500),d(e,o.w.XLINK_EXPANSION_TYPE,500),d(e,o.w.MEDIA_SEGMENT_TYPE,1e3),d(e,o.w.INIT_SEGMENT_TYPE,1e3),d(e,o.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),d(e,o.w.INDEX_SEGMENT_TYPE,1e3),d(e,o.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),d(e,o.w.LICENSE,1e3),d(e,o.w.OTHER_TYPE,1e3),d(e,"lowLatencyReductionFactor",10),e),retryAttempts:(t={},d(t,o.w.MPD_TYPE,3),d(t,o.w.XLINK_EXPANSION_TYPE,1),d(t,o.w.MEDIA_SEGMENT_TYPE,3),d(t,o.w.INIT_SEGMENT_TYPE,3),d(t,o.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),d(t,o.w.INDEX_SEGMENT_TYPE,3),d(t,o.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),d(t,o.w.LICENSE,3),d(t,o.w.OTHER_TYPE,3),d(t,"lowLatencyMultiplyFactor",5),t),abr:{movingAverageMethod:s.Z.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:s.Z.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},abrRulesParameters:{abandonRequestsRule:{graceTimeThreshold:500,abandonMultiplier:1.8,minLengthToAverage:5}},bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:s.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:s.Z.CMCD_MODE_QUERY,enabledKeys:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}},errors:{recoverAttempts:{mediaErrorDecode:5}}},p=i.Z.clone(h);function g(e,t,n){for(var a in e)e.hasOwnProperty(a)&&(t.hasOwnProperty(a)?"object"!==c(e[a])||e[a]instanceof Array||null===e[a]?(t[a]=i.Z.clone(e[a]),f[n+a]&&r.trigger(f[n+a])):g(e[a],t[a],n.slice()+a+"."):console.error("Settings parameter "+n+a+" is not supported"))}return{get:function(){return p},update:function(e){"object"===c(e)&&g(e,p,"")},reset:function(){p=i.Z.clone(h)}}}f.__dashjs_factory_name="Settings";var h=r.Z.getSingletonFactory(f);t.Z=h},703:function(e,t,n){"use strict";var r=n(3875),i=n.n(r),a=n(1067);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return t=[{key:"mixin",value:function(t,n,r){var i,a={};if(t)for(var o in n)n.hasOwnProperty(o)&&(i=n[o],o in t&&(t[o]===i||o in a&&a[o]===i)||("object"===s(t[o])&&null!==t[o]?t[o]=e.mixin(t[o],i,r):t[o]=r(i)));return t}},{key:"clone",value:function(t){if(!t||"object"!==s(t))return t;var n;if(t instanceof Array){n=[];for(var r=0,i=t.length;r0&&(t[a.substring(0,s)]=a.substring(s+2))}return t}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;try{var t=null===e&&"undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";return(0,a.UAParser)(t)}catch(e){return{}}}},{key:"stringHasProtocol",value:function(e){return/(http(s?)):\/\//i.test(e)}}],t&&function(e,t){for(var n=0;no.startTime&&u-e>r?e:!isNaN(o.startTime)&&eo.startTime?o.startTime+.001:Math.min(u-r,s)}return s}catch(e){return NaN}},initialize:function(e){u=e,c=!1,m.initialize(e)},isLastSegmentRequested:function(e,t){if(!e||!a)return!1;if(c)return!0;if(!isFinite(e.adaptation.period.duration))return!1;if(a.presentationStartTime+a.duration>t)return!1;if(e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.numberOfSegments)&&!isNaN(a.index)&&a.index>=e.mediaFinishedInformation.numberOfSegments-1){if(!u||e.segmentInfoType===l.Z.SEGMENT_TEMPLATE)return!0;if(u&&e.segmentInfoType===l.Z.SEGMENT_LIST&&e.adaptation.period.nextPeriodId)return!0}return!!(u&&e.adaptation.period.nextPeriodId&&e.segmentInfoType===l.Z.SEGMENT_TIMELINE&&e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&a&&!isNaN(a.mediaStartTime)&&!isNaN(a.duration)&&a.mediaStartTime+a.duration>=e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(e,t){return t&&t.segmentInfoType?A(e,t,a?a.index:0):null},reset:function(){T(),d.off(s.Z.DYNAMIC_TO_STATIC,w,t)}},n=f.getLogger(t),T(),d.on(s.Z.DYNAMIC_TO_STATIC,w,t),t}u.__dashjs_factory_name="DashHandler",t.Z=a.Z.getClassFactory(u)},1553:function(e,t){"use strict";var n=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t;return(t=[{key:"init",value:function(){this.BASE_URL="BaseURL",this.SEGMENT_BASE="SegmentBase",this.SEGMENT_TEMPLATE="SegmentTemplate",this.SEGMENT_LIST="SegmentList",this.SEGMENT_URL="SegmentURL",this.SEGMENT_TIMELINE="SegmentTimeline",this.SEGMENT_PROFILES="segmentProfiles",this.ADAPTATION_SET="AdaptationSet",this.REPRESENTATION="Representation",this.REPRESENTATION_INDEX="RepresentationIndex",this.SUB_REPRESENTATION="SubRepresentation",this.INITIALIZATION="Initialization",this.INITIALIZATION_MINUS="initialization",this.MPD="MPD",this.PERIOD="Period",this.ASSET_IDENTIFIER="AssetIdentifier",this.EVENT_STREAM="EventStream",this.ID="id",this.PROFILES="profiles",this.SERVICE_LOCATION="serviceLocation",this.RANGE="range",this.INDEX="index",this.MEDIA="media",this.BYTE_RANGE="byteRange",this.INDEX_RANGE="indexRange",this.MEDIA_RANGE="mediaRange",this.VALUE="value",this.CONTENT_TYPE="contentType",this.MIME_TYPE="mimeType",this.BITSTREAM_SWITCHING="BitstreamSwitching",this.BITSTREAM_SWITCHING_MINUS="bitstreamSwitching",this.CODECS="codecs",this.DEPENDENCY_ID="dependencyId",this.MEDIA_STREAM_STRUCTURE_ID="mediaStreamStructureId",this.METRICS="Metrics",this.METRICS_MINUS="metrics",this.REPORTING="Reporting",this.WIDTH="width",this.HEIGHT="height",this.SAR="sar",this.FRAMERATE="frameRate",this.AUDIO_SAMPLING_RATE="audioSamplingRate",this.MAXIMUM_SAP_PERIOD="maximumSAPPeriod",this.START_WITH_SAP="startWithSAP",this.MAX_PLAYOUT_RATE="maxPlayoutRate",this.CODING_DEPENDENCY="codingDependency",this.SCAN_TYPE="scanType",this.FRAME_PACKING="FramePacking",this.AUDIO_CHANNEL_CONFIGURATION="AudioChannelConfiguration",this.CONTENT_PROTECTION="ContentProtection",this.ESSENTIAL_PROPERTY="EssentialProperty",this.ESSENTIAL_PROPERTY_ASARRAY="EssentialProperty_asArray",this.SUPPLEMENTAL_PROPERTY="SupplementalProperty",this.SUPPLEMENTAL_PROPERTY_ASARRAY="SupplementalProperty_asArray",this.INBAND_EVENT_STREAM="InbandEventStream",this.PRODUCER_REFERENCE_TIME="ProducerReferenceTime",this.INBAND="inband",this.TYPE="type",this.ACCESSIBILITY="Accessibility",this.ROLE="Role",this.RATING="Rating",this.CONTENT_COMPONENT="ContentComponent",this.SUBSET="Subset",this.LANG="lang",this.VIEWPOINT="Viewpoint",this.VIEWPOINT_ASARRAY="Viewpoint_asArray",this.ROLE_ASARRAY="Role_asArray",this.REPRESENTATION_ASARRAY="Representation_asArray",this.PRODUCERREFERENCETIME_ASARRAY="ProducerReferenceTime_asArray",this.ACCESSIBILITY_ASARRAY="Accessibility_asArray",this.AUDIOCHANNELCONFIGURATION_ASARRAY="AudioChannelConfiguration_asArray",this.CONTENTPROTECTION_ASARRAY="ContentProtection_asArray",this.MAIN="main",this.DYNAMIC="dynamic",this.STATIC="static",this.MEDIA_PRESENTATION_DURATION="mediaPresentationDuration",this.MINIMUM_UPDATE_PERIOD="minimumUpdatePeriod",this.CODEC_PRIVATE_DATA="codecPrivateData",this.BANDWITH="bandwidth",this.SOURCE_URL="sourceURL",this.TIMESCALE="timescale",this.DURATION="duration",this.START_NUMBER="startNumber",this.PRESENTATION_TIME_OFFSET="presentationTimeOffset",this.AVAILABILITY_START_TIME="availabilityStartTime",this.AVAILABILITY_END_TIME="availabilityEndTime",this.TIMESHIFT_BUFFER_DEPTH="timeShiftBufferDepth",this.MAX_SEGMENT_DURATION="maxSegmentDuration",this.PRESENTATION_TIME="presentationTime",this.MIN_BUFFER_TIME="minBufferTime",this.MAX_SUBSEGMENT_DURATION="maxSubsegmentDuration",this.START="start",this.AVAILABILITY_TIME_OFFSET="availabilityTimeOffset",this.AVAILABILITY_TIME_COMPLETE="availabilityTimeComplete",this.CENC_DEFAULT_KID="cenc:default_KID",this.DVB_PRIORITY="dvb:priority",this.DVB_WEIGHT="dvb:weight",this.DVB_URL="dvb:url",this.DVB_MIMETYPE="dvb:mimeType",this.DVB_FONTFAMILY="dvb:fontFamily",this.SUGGESTED_PRESENTATION_DELAY="suggestedPresentationDelay",this.SERVICE_DESCRIPTION="ServiceDescription",this.SERVICE_DESCRIPTION_SCOPE="Scope",this.SERVICE_DESCRIPTION_LATENCY="Latency",this.SERVICE_DESCRIPTION_PLAYBACK_RATE="PlaybackRate",this.SERVICE_DESCRIPTION_OPERATING_QUALITY="OperatingQuality",this.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH="OperatingBandwidth",this.PATCH_LOCATION="PatchLocation",this.PATCH_LOCATION_AS_ARRAY="PatchLocation_asArray",this.LOCATION="Location",this.LOCATION_AS_ARRAY="Location_asArray",this.PUBLISH_TIME="publishTime",this.ORIGINAL_PUBLISH_TIME="originalPublishTime",this.ORIGINAL_MPD_ID="mpdId",this.WALL_CLOCK_TIME="wallClockTime",this.PRESENTATION_TIME="presentationTime",this.LABEL="Label",this.GROUP_LABEL="GroupLabel",this.CONTENT_STEERING="ContentSteering",this.CONTENT_STEERING_AS_ARRAY="ContentSteering_asArray",this.DEFAULT_SERVICE_LOCATION="defaultServiceLocation",this.QUERY_BEFORE_START="queryBeforeStart",this.CLIENT_REQUIREMENT="clientRequirement",this.TTL="ttl",this.CONTENT_STEERING_RESPONSE={VERSION:"VERSION",TTL:"TTL",RELOAD_URI:"RELOAD-URI",PATHWAY_PRIORITY:"PATHWAY-PRIORITY",PATHWAY_CLONES:"PATHWAY-CLONES",BASE_ID:"BASE-ID",ID:"ID",URI_REPLACEMENT:"URI-REPLACEMENT",HOST:"HOST",PARAMS:"PARAMS"},this.PRODUCER_REFERENCE_TIME_TYPE={ENCODER:"encoder",CAPTURED:"captured",APPLICATION:"application"},this.SEGMENT_ALIGNMENT="segmentAlignment",this.SUB_SEGMENT_ALIGNMENT="subsegmentAlignment"}}])&&function(e,t){for(var n=0;n0)for(s=0;s=i&&t-nr&&s=a)}return!0}function c(e,t,n,r){var i,a,s;i=n.segmentDuration,isNaN(i)&&(i=n.adaptation.period.duration),a=parseFloat((n.adaptation.period.start+r*i).toFixed(5)),s=parseFloat((a+i).toFixed(5));var o=l(n,i,a,e.calcMediaTimeFromPresentationTime(a,n),e,s,t,r);return u(e,n,o,t)?o:null}function d(e,t,n,r,i,a,s,c,d,f){var h,p,g=r/a,m=i/a;return h=e.calcPresentationTimeFromMediaTime(g,n),u(e,n,p=l(n,m,h,g,e,h+m,t,d),t)?(p.replacementTime=f||r,s=o(s,"Number",p.replacementNumber),s=o(s,"Time",p.replacementTime),p.media=s,p.mediaRange=c,p):null}},3636:function(e,t,n){"use strict";var r=n(5448),i=n(3393),a=n(7387);function s(e,t){var n=(e=e||{}).timelineConverter;function r(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(i.Z.MISSING_CONFIG_ERROR)}function s(e,i){if(r(),!e)return null;var s=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate;i=Math.max(i,0);var o=(0,a.NF)(n,t,e,i);if(o){o.replacementTime=Math.round((i-1)*e.segmentDuration*e.timescale,10);var l=s.media;l=(0,a.vi)(l,"Number",o.replacementNumber),l=(0,a.vi)(l,"Time",o.replacementTime),o.media=l}return o}return{getSegmentByIndex:s,getSegmentByTime:function(e,t){if(r(),!e)return null;var i=e.segmentDuration;if(isNaN(i))return null;var a=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return s(e,Math.floor(a/i))},getMediaFinishedInformation:function(e){var t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!e)return t;var n=e.segmentDuration;return isNaN(n)?t.numberOfSegments=1:t.numberOfSegments=Math.ceil(e.adaptation.period.duration/n),t}}}s.__dashjs_factory_name="TemplateSegmentsGetter";var o=r.Z.getClassFactory(s);t.Z=o},1724:function(e,t,n){"use strict";var r=n(5448),i=n(3393),a=n(7387);function s(e,t){var n=(e=e||{}).timelineConverter,r=e.dashMetrics;function s(){if(!n)throw new Error(i.Z.MISSING_CONFIG_ERROR)}function o(e,t){var n,r,i,a,s,o,u,c=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList,d=c.SegmentTimeline,f=c.SegmentURL_asArray,h=0,p=-1;u=e.timescale;var g=!1;for(i=0,a=(n=d.S_asArray).length;i=i*d-.5*c.d&&(u=!0),!1})),l},getSegmentByTime:function(e,r){if(s(),!e)return null;void 0===r&&(r=null);var i=null,l=n.calcMediaTimeFromPresentationTime(r,e);return o(e,(function(r,s,o,u,c,d,f){var h=parseFloat((l*c).toPrecision(15));if(h=r){var p=s.media,g=u.mediaRange;return o&&(p=o[f].media||"",g=o[f].mediaRange),i=(0,a.TJ)(n,t,e,r,u.d,c,p,g,d,u.tManifest),!0}return!1})),i},getMediaFinishedInformation:function(e){if(!e)return 0;var t,n,r,i,a,s,o,u=(e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index].Representation_asArray[e.index].SegmentList).SegmentTimeline,c=0,d=0,f=0;for(o=e.timescale,i=(t=u.S_asArray).length,r=0;r0&&void 0!==arguments[0]?arguments[0]:null)-q()).toFixed(5))}function L(e){var t=e||y;return t.start+t.duration}function k(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];y&&c&&c.getElement()?(e&&v&&j(q()),c.play()):_=!0}function F(){y&&c&&c.pause()}function U(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];y&&c&&c.getElement()&&e!==(isNaN(w)?c.getTime():w)&&((I=!0===r)||(w=e),t.info("Requesting seek to time: "+e+(I?" (internal)":"")),v&&i&&j(e),c.setCurrentTime(e,n))}function B(){if(y&&c&&v){var e=n&&n.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,t=i.getCurrentDVRInfo(e);return t&&t.range?t.range.end:0}}function j(e){var t=new Date(h.getClientReferenceTime()),n=s.getRegularPeriods()[0],r=h.calcPresentationTimeFromWallTime(t,n);g=r-e}function q(){return y&&c?c.getTime():null}function H(){return y&&c?c.isPaused():null}function G(){return y&&c?c.isSeeking():null}function V(){return y&&c?c.isStalled():null}function Y(){return y&&c?c.getPlaybackRate():null}function Z(){return y&&c?c.getEnded():null}function K(){return v}function z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!H()&&v&&0!==c.getReadyState()&&!G()&&!R){e||(e=n.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO);var r=q(),i=W(r,e);!isNaN(i)&&i!==r&&!G()&&(V()||C||1===c.getReadyState())&&(t.debug("UpdateCurrentTime: Seek to actual time: ".concat(i," from currentTime: ").concat(r)),U(i,!1,!1))}}function W(e,t){var n=i.getCurrentDVRInfo(t),r=n?n.range:null;return r?e>r.end?Math.max(r.end-g,r.start):e>0&&e+.25E+N.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(n.addDVRMetric(),H()?function(){var e=Date.now();(!T||e>T+500)&&(T=e,le())}():z(),E=e)}}()}),N.get().streaming.wallclockTimeUpdateInterval))}function $(){clearInterval(p),p=null}function Q(e){var t=s.convertRepresentationToRepresentationInfo(e.currentRepresentation),n=t?t.mediaInfo.streamInfo:null;null!==n&&y.id===n.id&&(y=n)}function J(){P.trigger(u.Z.CAN_PLAY)}function ee(){P.trigger(u.Z.CAN_PLAY_THROUGH)}function te(e){e.streamId===n.getActiveStreamInfo().id&&(C=e.state===o.Z.BUFFER_EMPTY,N.get().streaming.buffer.setStallState&&c.setStallState(e.mediaType,e.state===o.Z.BUFFER_EMPTY))}function ne(){t.info("Native video element event: play"),z(),X(),P.trigger(u.Z.PLAYBACK_STARTED,{startTime:q()})}function re(){t.info("Native video element event: waiting"),P.trigger(u.Z.PLAYBACK_WAITING,{playingTime:q()})}function ie(){t.info("Native video element event: playing"),I=!1,P.trigger(u.Z.PLAYBACK_PLAYING,{playingTime:q()})}function ae(){t.info("Native video element event: pause"),P.trigger(u.Z.PLAYBACK_PAUSED,{ended:Z()})}function se(){if(!I){var e=q();isNaN(w)||w===e||(e=w),w=NaN,t.info("Seeking to: "+e),X(),P.trigger(u.Z.PLAYBACK_SEEKING,{seekTime:e,streamId:y.id})}}function oe(){t.info("Native video element event: seeked"),I=!1,P.trigger(u.Z.PLAYBACK_SEEKED)}function le(){y&&P.trigger(u.Z.PLAYBACK_TIME_UPDATED,{timeToEnd:x(),time:q(),streamId:y.id})}function ue(){P.trigger(u.Z.PLAYBACK_PROGRESS,{streamId:y.id})}function ce(){var e=Y();t.info("Native video element event: ratechange: ",e),P.trigger(u.Z.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function de(){t.info("Native video element event: loadedmetadata"),P.trigger(u.Z.PLAYBACK_METADATA_LOADED),X()}function fe(){t.info("Native video element event: loadeddata"),P.trigger(u.Z.PLAYBACK_LOADED_DATA)}function he(){t.info("Native video element event: ended"),F(),$();var e=n?n.getActiveStreamInfo():null;e&&P.trigger(u.Z.PLAYBACK_ENDED,{isLast:e.isLast})}function pe(){P.trigger(u.Z.PLAYBACK_VOLUME_CHANGED)}function ge(e){if(p&&e.isLast){t.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");var n=e.seekTime?e.seekTime:L();c.setCurrentTime(n),F(),$()}}function me(e){var t=e.target||e.srcElement;P.trigger(u.Z.PLAYBACK_ERROR,{error:t.error})}function ye(){v=!1}function ve(e){if(!1===e.stream&&A&&!isNaN(e.request.duration)){var n=1.2*e.request.duration;n>g&&(t.warn("Browser does not support fetch API with StreamReader. Increasing live delay to be 20% higher than segment duration:",n.toFixed(2)),g=n,m=n)}}function _e(e){P.trigger(u.Z.PLAYBACK_STALLED,{e})}function Te(e){var n;(n=e.mediaInfo)&&n.supplementalProperties&&n.supplementalProperties[a.Z.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME]&&"true"===n.supplementalProperties[a.Z.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME].value&&(t.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),A=!0)}function Ee(e){var t=n.getActiveStreamInfo();e&&t&&e.currentRepresentation&&e.streamId&&e.streamId===t.id&&e.mediaType&&(e.mediaType===a.Z.VIDEO||e.mediaType===a.Z.AUDIO)&&(S=e.currentRepresentation.availabilityTimeComplete,(A=!S)&&!D&&(D=!0))}function be(){R=!0}function Se(){R=!1}return e={initialize:function(t,n){y=t,!0!==n&&(c.addEventListener("canplay",J),c.addEventListener("canplaythrough",ee),c.addEventListener("play",ne),c.addEventListener("waiting",re),c.addEventListener("playing",ie),c.addEventListener("pause",ae),c.addEventListener("error",me),c.addEventListener("seeking",se),c.addEventListener("seeked",oe),c.addEventListener("timeupdate",le),c.addEventListener("progress",ue),c.addEventListener("ratechange",ce),c.addEventListener("loadedmetadata",de),c.addEventListener("loadeddata",fe),c.addEventListener("stalled",_e),c.addEventListener("ended",he),c.addEventListener("volumechange",pe),v=y.manifestInfo.isDynamic,C=!1,I=!1,P.on(u.Z.DATA_UPDATE_COMPLETED,Q,e),P.on(u.Z.LOADING_PROGRESS,ve,e),P.on(u.Z.MANIFEST_UPDATED,be,e),P.on(u.Z.STREAMS_COMPOSED,Se,e),P.on(f.Z.PLAYBACK_ENDED,ge,e,{priority:l.Z.EVENT_PRIORITY_HIGH}),P.on(f.Z.STREAM_INITIALIZING,Te,e),P.on(f.Z.REPRESENTATION_SWITCH,Ee,e),P.on(f.Z.BUFFER_LEVEL_STATE_CHANGED,te,e),P.on(f.Z.DYNAMIC_TO_STATIC,ye,e),_&&(_=!1,k()))},setConfig:function(e){e&&(e.streamController&&(n=e.streamController),e.serviceDescriptionController&&(r=e.serviceDescriptionController),e.dashMetrics&&(i=e.dashMetrics),e.adapter&&(s=e.adapter),e.videoModel&&(c=e.videoModel),e.timelineConverter&&(h=e.timelineConverter),e.settings&&(N=e.settings))},getTimeToStreamEnd:x,getBufferLevel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null;return n.getActiveStreamProcessors().forEach((function(n){if(!e||0===e.length||-1===e.indexOf(n.getType())){var r=n.getBufferLevel();t=null===t?r:Math.min(t,r)}})),t},getPlaybackStalled:function(){return C},getTime:q,getLowLatencyModeEnabled:function(){return A},getInitialCatchupModeActivated:function(){return D},getIsManifestUpdateInProgress:function(){return R},getPlaybackRate:Y,getPlayedRanges:function(){return y&&c?c.getPlayedRanges():null},getEnded:Z,getIsDynamic:K,getStreamController:function(){return n},computeAndSetLiveDelay:function(e,t){var n,i,a,o=!isNaN(e)&&isFinite(e)?e:NaN,l=s.getSuggestedPresentationDelay(),u=r.getServiceDescriptionSettings();return n=isNaN(N.get().streaming.delay.liveDelay)?null===N.get().streaming.delay.liveDelayFragmentCount||isNaN(N.get().streaming.delay.liveDelayFragmentCount)||isNaN(o)?u&&!isNaN(u.liveDelay)&&u.liveDelay>0?u.liveDelay:!0===N.get().streaming.delay.useSuggestedPresentationDelay&&null!==l&&!isNaN(l)&&l>0?l:isNaN(o)?t&&!isNaN(t.minBufferTime)?4*t.minBufferTime:4*y.manifestInfo.minBufferTime:4*o:o*N.get().streaming.delay.liveDelayFragmentCount:N.get().streaming.delay.liveDelay,null!==(a=s.getAvailabilityStartTime())&&(b=a),i=t&&t.dvrWindowSize>0?Math.min(n,t.dvrWindowSize):n,g=i,m=i,i},getLiveDelay:function(){return g},getOriginalLiveDelay:function(){return m},getCurrentLiveLatency:function(){if(!v||isNaN(b))return NaN;var e=q();if(isNaN(e)||0===e)return 0;var t=(new Date).getTime()+1e3*h.getClientTimeOffset();return Math.max(((t-b-1e3*e)/1e3).toFixed(3),0)},play:k,isPaused:H,isStalled:V,pause:F,isSeeking:G,getStreamEndTime:L,seek:U,seekToOriginalLive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=B();0!==r&&U(r-(g=m),e,t,n)},seekToCurrentLive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=B();0!==r&&U(r-g,e,t,n)},reset:M,updateCurrentTime:z,getAvailabilityStartTime:function(){return b}},t=(0,d.Z)(O).getInstance().getLogger(e),M(),e}h.__dashjs_factory_name="PlaybackController";var p=c.Z.getSingletonFactory(h),g=n(3186),m="loading",y="executed",v="failed";function _(e){var t,n,r,i,a=(e=e||{}).eventBus,s=e.events,o=e.dashMetrics,l=e.fragmentLoader,u=e.debug,c=e.streamInfo,d=e.type;function f(e){var t;return!!e&&(t=!1,r.some((function(n){if(r=e,i=n,!isNaN(r.index)&&r.startTime===i.startTime&&r.adaptationIndex===i.adaptationIndex&&r.type===i.type||function(e,t){return isNaN(e.index)&&isNaN(t.index)&&e.quality===t.quality}(e,n)||function(e,t){return e.action===g.Z.ACTION_COMPLETE&&e.action===t.action}(e,n))return t=!0;var r,i})),t)}function h(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function p(e){r=r.filter((function(t){var n=h(t);return isNaN(t.startTime)||void 0!==e&&t.startTime>=e-n}))}function _(e,t){t<=e+.5||(r=r.filter((function(n){var r=h(n);return isNaN(n.startTime)||n.startTime>=t-r||isNaN(n.duration)||n.startTime+n.duration<=e+r})))}function T(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r],a=i.startTime,s=a+i.duration;if(n=isNaN(n)?h(i):n,!isNaN(a)&&!isNaN(s)&&t+n>=a&&t-n0&&_(n,t)}else p()},abortRequests:function(){n.debug("abort requests"),l.abort(),i=[]},executeRequest:function(e){e.action===g.Z.ACTION_DOWNLOAD?(E(e,m),i.push(e),function(e){a.trigger(s.FRAGMENT_LOADING_STARTED,{request:e},{streamId:c.id,mediaType:d}),l.load(e)}(e)):n.warn("Unknown request action.")},reset:function(){a.off(s.LOADING_COMPLETED,b,this),a.off(s.LOADING_DATA_PROGRESS,S,this),a.off(s.LOADING_ABANDONED,A,this),l&&l.reset(),w()},resetInitialSettings:w,addExecutedRequest:function(e){r.push(e)}},n=u.getLogger(t),w(),a.on(s.LOADING_COMPLETED,b,t),a.on(s.LOADING_DATA_PROGRESS,S,t),a.on(s.LOADING_ABANDONED,A,t),t}_.__dashjs_factory_name="FragmentModel";var T=c.Z.getClassFactory(_);T.FRAGMENT_MODEL_LOADING=m,T.FRAGMENT_MODEL_EXECUTED=y,T.FRAGMENT_MODEL_CANCELED="canceled",T.FRAGMENT_MODEL_FAILED=v,c.Z.updateClassFactory(_.__dashjs_factory_name,T);var E=T,b=n(5459);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function A(e,t){return A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},A(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var I=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=w(t);if(n){var i=w(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=r.call(this)).MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,e.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,e.SEGMENT_BASE_LOADER_ERROR_CODE=15,e.TIME_SYNC_FAILED_ERROR_CODE=16,e.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,e.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,e.APPEND_ERROR_CODE=20,e.REMOVE_ERROR_CODE=21,e.DATA_UPDATE_FAILED_ERROR_CODE=22,e.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,e.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,e.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,e.DOWNLOAD_ERROR_ID_SIDX_CODE=26,e.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,e.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,e.DOWNLOAD_ERROR_ID_XLINK_CODE=29,e.MANIFEST_ERROR_ID_PARSE_CODE=31,e.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,e.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,e.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,e.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,e.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",e.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",e.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",e.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",e.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",e.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",e.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",e.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",e.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",e.APPEND_ERROR_MESSAGE="chunk is not defined",e.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",e.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",e.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",e.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",e.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",e.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",e}return i}(n(2230).Z)),C=n(1264),R=n(7855);function D(e){var t,n,r,i,s,o,l=this.context,c=(0,C.Z)(l).getInstance(),f=e.textController,h=e.eventBus,p=[],g=[],m=!1,y=e.mediaSource,v=null;function _(e){return new Promise((function(t){P((function(){i.changeType&&i.changeType(e),t()}))}))}function T(e){return i=f.getTextSourceBuffer(e),Promise.resolve()}function E(){if("function"==typeof i.addEventListener)try{i.addEventListener("updateend",N,!1),i.addEventListener("error",O,!1),i.addEventListener("abort",O,!1)}catch(e){o=setInterval(N,50)}else o=setInterval(N,50)}function S(e){return new Promise((function(t){i&&c.get().streaming.buffer.useAppendWindow?P((function(){try{if(!i)return void t();var n=y.duration,a=0;e&&!isNaN(e.start)&&!isNaN(e.duration)&&isFinite(e.duration)&&(n=e.start+e.duration),e&&!isNaN(e.start)&&(a=e.start),i.appendWindowEnd===n&&i.appendWindowStart===a||(i.appendWindowStart=0,i.appendWindowEnd=n+.01,i.appendWindowStart=Math.max(a-.1,0),r.debug("Updated append window for ".concat(s.type,". Set start to ").concat(i.appendWindowStart," and end to ").concat(i.appendWindowEnd))),t()}catch(e){r.warn("Failed to set append window"),t()}})):t()}))}function A(e){return new Promise((function(t){i?P((function(){try{i.timestampOffset===e||isNaN(e)||(i.timestampOffset=e,r.debug("Set MSE timestamp offset to ".concat(e))),t()}catch(e){t()}})):t()}))}function w(){if(!m&&g.length>0){m=!0;var e=g[0];g.splice(0,1);var t=function(){m=!1,g.length>0&&w.call(this),e&&e.data&&e.data.segmentType&&e.data.segmentType!==R.w.INIT_SEGMENT_TYPE&&delete e.data.bytes,e.promise.resolve({chunk:e.data})};try{v=e.request,0===e.data.bytes.byteLength?t.call(this):(i.appendBuffer?i.appendBuffer(e.data.bytes):i.append(e.data.bytes,e.data),P(t.bind(this)))}catch(t){r.fatal('SourceBuffer append failed "'+t+'"'),g.length>0?w():m=!1,delete e.data.bytes,e.promise.reject({chunk:e.data,error:new b.Z(t.code,t.message)})}}}function D(){p.length>0&&(i.updating||(p.shift()(),D()))}function N(){i.updating||D()}function O(e){var t,r,i=e.target||{};t=u.Z.SOURCE_BUFFER_ERROR,r={error:i,lastRequestAppended:v}||{},h.trigger(t,r,{streamId:s.streamInfo.id,mediaType:n})}function P(e){p.push(e),i.updating||D()}return t={getType:function(){return n},getAllBufferRanges:function(){try{return i.buffered}catch(e){return r.error("getAllBufferRanges exception: "+e.message),null}},getBuffer:function(){return i},append:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(r,i){e?(g.push({data:e,promise:{resolve:r,reject:i},request:n}),P(w.bind(t))):i({chunk:e,error:new b.Z(I.APPEND_ERROR_CODE,I.APPEND_ERROR_MESSAGE)})}))},remove:function(e){return new Promise((function(t,n){var r=e.start,a=e.end;r>=0&&a>r?P((function(){try{i.remove(r,a),P((function(){t({from:r,to:a,unintended:!1}),e.resolve&&e.resolve()}))}catch(t){n({from:r,to:a,unintended:!1,error:new b.Z(I.REMOVE_ERROR_CODE,I.REMOVE_ERROR_MESSAGE)}),e.reject&&e.reject(t)}})):t()}))},abort:function(){return new Promise((function(e){try{g=[],"open"===y.readyState?P((function(){try{i&&i.abort(),e()}catch(t){e()}})):i&&i.setTextTrack&&"ended"===y.readyState?(i.abort(),e()):e()}catch(t){e()}}))},reset:function(){if(i){try{p=[],function(){try{"function"==typeof i.removeEventListener&&(i.removeEventListener("updateend",N,!1),i.removeEventListener("error",O,!1),i.removeEventListener("abort",O,!1)),clearInterval(o)}catch(e){r.error(e)}}(),m=!1,g=[],i.getClassName&&"TextSourceBuffer"===i.getClassName()||(r.debug("Removing sourcebuffer from media source"),y.removeSourceBuffer(i))}catch(e){}i=null}v=null},updateTimestampOffset:A,initializeForStreamSwitch:function(e,t,r){n=(s=e).type;var a=s.codec;!function(e){i=e.getBuffer()}(r),E();var o=[];return o.push(new Promise((function(e){P((function(){var t=i.appendWindowStart,n=i.appendWindowEnd;i&&(i.abort(),i.appendWindowStart=t,i.appendWindowEnd=n),e()}))}))),o.push(S(s.streamInfo)),c.get().streaming.buffer.useChangeTypeForTrackSwitch&&o.push(_(a)),t&&void 0!==t.MSETimeOffset&&o.push(A(t.MSETimeOffset)),Promise.all(o)},initializeForFirstUse:function(e,t,r){n=(s=t).type;var o=s.codec;try{if(o.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return T(e);i=y.addSourceBuffer(o),E();var l=[];return l.push(S(s.streamInfo)),r&&void 0!==r.MSETimeOffset&&l.push(A(r.MSETimeOffset)),Promise.all(l)}catch(t){return s.type==a.Z.TEXT&&!s.isFragmented||-1!==o.indexOf('codecs="stpp')||-1!==o.indexOf('codecs="vtt')||-1!==o.indexOf("text/vtt")?T(e):Promise.reject(t)}},updateAppendWindow:S,changeType:_},r=(0,d.Z)(l).getInstance().getLogger(t),t}D.__dashjs_factory_name="SourceBufferSink";var N=c.Z.getClassFactory(D);function O(e){var t,n,r,i=this.context,a=[],s=e;function o(e,t){return a=a.filter((function(n){return!((isNaN(t)||n.starte))})),Promise.resolve()}return t={getAllBufferRanges:function(){for(var e=[],t=0;te[e.length-1].end?e.push({start:n.start,end:n.end}):e[e.length-1].end=n.end}var r={start:function(t){return e[t].start},end:function(t){return e[t].end}};return Object.defineProperty(r,"length",{get:function(){return e.length}}),r},append:function(e){return"InitializationSegment"!==e.segmentType?(a.push(e),a.sort((function(e,t){return e.start-t.start})),r=null):r=e,n.debug("PreBufferSink appended chunk s: "+e.start+"; e: "+e.end),s&&s({chunk:e}),Promise.resolve()},remove:o,abort:function(){return Promise.resolve()},discharge:function(e,t){var n=function(e,t){return a.filter((function(n){return(isNaN(t)||n.starte)}))}(e,t);return r&&(n.push(r),r=null),o(e,t),n},reset:function(){a=[],r=null,s=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(e){e()},getBuffer:function(){return this}},n=(0,d.Z)(i).getInstance().getLogger(t),t}O.__dashjs_factory_name="PreBufferSink";var P=c.Z.getClassFactory(O);function M(){var e={};return{save:function(t){var n=t.streamId,r=t.representationId;e[n]=e[n]||{},e[n][r]=t},extract:function(t,n){return e&&e[t]&&e[t][n]?e[t][n]:null},reset:function(){e={}}}}M.__dashjs_factory_name="InitCache";var x=c.Z.getSingletonFactory(M),L=.01,k="BufferController";function F(e){e=e||{};var t,n,r,i,s,c,h,p,g,m,y,v,_,T,S,A,w,C,D,O,M,F=this.context,U=(0,l.Z)(F).getInstance(),B=e.errHandler,j=e.fragmentModel,q=e.representationController,H=e.adapter,G=e.textController,V=e.abrController,Y=e.playbackController,Z=e.streamInfo,K=e.type,z=e.settings;function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return new Promise((function(n,r){c=e,g&&t&&"function"==typeof g.discharge?(m=g,$(t).then((function(){n()})).catch((function(e){r(e)}))):n()}))}function X(e){return H.convertRepresentationToRepresentationInfo(q.getRepresentationForQuality(e))}function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new Promise((function(n,r){C&&e?c?(y=!1,Q(e,t).then((function(e){n(e)})).catch((function(e){r(e)}))):(y=!0,function(){var e=this;return new Promise((function(t,n){var r=V.getQualityFor(K,Z.id);g=P(F).create(re.bind(e)),_e(X(r)).then((function(){t(g)})).catch((function(){n()}))}))}().then((function(e){n(e)})).catch((function(e){r(e)}))):n(null)}))}function Q(e,t){return new Promise((function(r,i){var s=V.getQualityFor(K,Z.id);g=N(F).create({mediaSource:c,textController:G,eventBus:U}),function(e,t,n){var r=X(n);return t&&t[K]&&(K===a.Z.VIDEO||K===a.Z.AUDIO)?g.initializeForStreamSwitch(e,r,t[K]):g.initializeForFirstUse(Z,e,r)}(e,t,s).then((function(){return _e(X(s))})).then((function(){r(g)})).catch((function(e){n.fatal("Caught error on create SourceBuffer: "+e),B.error(new b.Z(I.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,I.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+K)),i(e)}))}))}function J(e){z.get().streaming.cacheInitSegments&&(n.info("Init fragment finished loading saving to",K+"'s init cache"),C.save(e.chunk)),n.debug("Append Init fragment",K," with representationId:",e.chunk.representationId," and quality:",e.chunk.quality,", data size:",e.chunk.bytes.byteLength),te(e.chunk)}function ee(e){te(e.chunk,e.request)}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;g&&(g.append(e,t).then((function(e){re(e)})).catch((function(e){re(e)})),e.mediaInfo.type===a.Z.VIDEO&&Ce(u.Z.VIDEO_CHUNK_RECEIVED,{chunk:e}))}function ne(e){if(e&&e.length>0)for(var t=0,r=e.length;t0){var e=Math.max(.2*s,1),t=s-e,r=Math.min(z.get().streaming.buffer.bufferTimeAtTopQuality,.9*t),i=Math.min(z.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*t),a={streaming:{buffer:{bufferToKeep:parseFloat(e.toFixed(5)),bufferTimeAtTopQuality:parseFloat(r.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(i.toFixed(5))}}};z.update(a)}}(),void(22!==e.error.code&&Ie()||(n.warn("Clearing playback buffer to overcome quota exceed situation"),Ce(u.Z.QUOTA_EXCEEDED,{criticalBufferLevel:s,quotaExceededTime:e.chunk.start}),me(ge())));if(g&&(ce(),w=!1,(T=e.chunk)&&T.endFragment)){T&&!isNaN(T.index)&&(h=Math.max(T.index,h),de());var t=g.getAllBufferRanges();T.segmentType===R.w.MEDIA_SEGMENT_TYPE&&(ne(t),se(),function(){if(!isNaN(M)&&!y)if(K===a.Z.AUDIO||K===a.Z.VIDEO){var e=Y.getTime(),t=ue(e,0),n=ue(M,0);if(t&&n&&t.start===n.start)M=NaN;else{var r=q.getCurrentRepresentation().segmentDuration,i=ue(M,r);i&&(z.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(e-M)>r?M<=i.end&&Y.seek(Math.max(M,i.start),!1,!0):e0&&(r=!0),v=null),T&&!r&&Ce(u.Z.BYTES_APPENDED_END_FRAGMENT,{quality:T.quality,startTime:T.start,index:T.index,bufferedRanges:t,segmentType:T.segmentType,mediaType:K})}}function ie(){return new Promise((function(e,t){var n=ae();if(!n||0===n.length)return se(),void e();me(n).then((function(){e()})).catch((function(e){t(e)}))}))}function ae(e){var t=[],r=g.getAllBufferRanges();if(!r||0===r.length)return t;if(!e&&0!==e||isNaN(e))t.push({start:r.start(0),end:r.end(r.length-1)+.5});else{var i=function(e,t){var n=z.get().streaming.buffer.bufferToKeep,r=t.start(0);if(e-r>n){var i=Math.max(0,e-n),a=j.getRequests({state:E.FRAGMENT_MODEL_EXECUTED,time:e,threshold:L})[0];if(a&&(i=Math.min(a.startTime,i)),i>0)return{start:r,end:i}}return null}(e,r),a=function(e,t){var r=t.end(t.length-1)+.5,i=we(e),a=Z.manifestInfo.duration>=z.get().streaming.buffer.longFormContentDurationThreshold?z.get().streaming.buffer.bufferTimeAtTopQualityLongForm:z.get().streaming.buffer.bufferTimeAtTopQuality,s=isNaN(i)?e:Math.min(i,e+a);if(s>=t.end(t.length-1))return null;var o=j.getRequests({state:E.FRAGMENT_MODEL_EXECUTED,time:e,threshold:L})[0];if(o&&(s=Math.max(o.startTime+o.duration,s)),z.get().streaming.buffer.avoidCurrentTimeRangePruning)for(var l=0;l=a&&e=p-1,t=Y.getTimeToStreamEnd(Z)-i<1e-5;!e&&!t||r||(Se(!0),n.debug("checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ".concat(Z.id," and type ").concat(K)))}function fe(){K!==a.Z.AUDIO&&K!==a.Z.VIDEO||((!Y.getLowLatencyModeEnabled()&&i=z.get().streaming.buffer.stallThreshold||Y.getLowLatencyModeEnabled()&&i>0)&&he(o.Z.BUFFER_LOADED))}function he(e){_===e||e===o.Z.BUFFER_EMPTY&&0===Y.getTime()||K===a.Z.TEXT&&!G.isTextEnabled()||(_=e,Ce(u.Z.BUFFER_LEVEL_STATE_CHANGED,{state:e}),Ce(e===o.Z.BUFFER_LOADED?u.Z.BUFFER_LOADED:u.Z.BUFFER_EMPTY),n.debug(e===o.Z.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function pe(){g&&K!==a.Z.TEXT&&(r||me(ge()))}function ge(){var e=[],t=g.getAllBufferRanges();if(!t||0===t.length)return e;var n=Y.getTime(),r=Math.max(0,n-z.get().streaming.buffer.bufferToKeep),i=j.getRequests({state:E.FRAGMENT_MODEL_EXECUTED,time:n,threshold:L})[0];if(i)r=Math.min(i.startTime,r);else if(0===n&&Y.getIsDynamic())return[];if(t.start(0)<=r){for(var a={start:0,end:r},s=0;s=z.get().streaming.buffer.bufferPruningInterval&&(S=0,pe())}function be(){fe()}function Se(e){(r=e)?Ce(u.Z.BUFFERING_COMPLETED):p=Number.POSITIVE_INFINITY}function Ae(){try{var e,t,n=g.getAllBufferRanges(),r=0;if(!n)return r;for(t=0,e=n.length;t=i&&t<=a&&(t=a),r+=1}return t===e?NaN:t}catch(e){}}function Ie(){var e=Ae();return isNaN(e)||e0){for(var t="Beginning "+K+"PreBuffer discharge, adding buffer for:",r=0;r=i&&e<=a)return!0;r+=1}return!1}catch(e){return n.error(e),!1}},pruneBuffer:pe,setMediaSource:W,getMediaSource:function(){return c},appendInitSegmentFromCache:function(e){var t=C.extract(Z.id,e);return!!t&&(n.info("Append Init fragment",K," with representationId:",t.representationId," and quality:",t.quality,", data size:",t.bytes.byteLength),te(t),!0)},getIsBufferingCompleted:function(){return r},setIsBufferingCompleted:Se,getIsPruningInProgress:function(){return A},reset:function(e,t){U.off(u.Z.INIT_FRAGMENT_LOADED,J,this),U.off(u.Z.MEDIA_FRAGMENT_LOADED,ee,this),U.off(u.Z.WALLCLOCK_TIME_UPDATED,Ee,this),U.off(f.Z.PLAYBACK_PLAYING,le,this),U.off(f.Z.PLAYBACK_PROGRESS,se,this),U.off(f.Z.PLAYBACK_TIME_UPDATED,se,this),U.off(f.Z.PLAYBACK_RATE_CHANGED,be,this),U.off(f.Z.PLAYBACK_STALLED,oe,this),Re(e,t)},prepareForPlaybackSeek:function(){return r&&Se(!1),g.abort()},prepareForReplacementTrackSwitch:function(e){return new Promise((function(t,n){g.abort().then((function(){return Te()})).then((function(){return z.get().streaming.buffer.useChangeTypeForTrackSwitch?g.changeType(e):Promise.resolve()})).then((function(){return ie()})).then((function(){Se(!1),t()})).catch((function(e){n(e)}))}))},prepareForNonReplacementTrackSwitch:function(e){return new Promise((function(t,n){Te().then((function(){return z.get().streaming.buffer.useChangeTypeForTrackSwitch?g.changeType(e):Promise.resolve()})).then((function(){t()})).catch((function(e){n(e)}))}))},prepareForForceReplacementQualitySwitch:function(e){return new Promise((function(t,n){g.abort().then((function(){return Te()})).then((function(){return ie()})).then((function(){return _e(e)})).then((function(){Se(!1),t()})).catch((function(e){n(e)}))}))},updateAppendWindow:Te,getAllRangesWithSafetyFactor:ae,getContinuousBufferTimeForTargetTime:we,clearBuffers:me,pruneAllSafely:ie,updateBufferTimestampOffset:_e,setSeekTarget:function(e){M=e},segmentRequestingCompleted:function(e){isNaN(e)||(p=e,de())}},n=(0,d.Z)(F).getInstance().getLogger(t),C=x(F).getInstance(),Re(),t}F.__dashjs_factory_name=k;var U=c.Z.getClassFactory(F),B="NotFragmentedTextBufferController";function j(e){e=e||{};var t,n,r,i,a,s,o=this.context,c=(0,l.Z)(o).getInstance(),d=e.textController,f=e.errHandler,h=e.streamInfo,p=e.type;function g(e){i=e}function m(e){var t,r;n!==e&&(n=e)&&(t=u.Z.BUFFERING_COMPLETED,r={},c.trigger(t,r,{streamId:h.id,mediaType:p}))}function y(e){e.chunk.bytes&&!n&&(s.save(e.chunk),a.append(e.chunk),m(!0))}return t={initialize:function(e){g(e)},getStreamId:function(){return h.id},getType:function(){return p},getBufferControllerType:function(){return B},createBufferSink:function(e){return new Promise((function(t,n){try{(a=N(o).create({mediaSource:i,textController:d,eventBus:c})).initializeForFirstUse(h,e),r||(a.getBuffer()&&"function"==typeof a.getBuffer().initialize&&a.getBuffer().initialize(),r=!0),t(a)}catch(e){f.error(new b.Z(I.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,I.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+p)),n(e)}}))},dischargePreBuffer:function(){},getBuffer:function(){return a},getBufferLevel:function(){return 0},getRangeAt:function(){return null},pruneBuffer:function(){},hasBufferAtTime:function(){return!0},getAllRangesWithSafetyFactor:function(){return[]},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},setMediaSource:g,getMediaSource:function(){return i},appendInitSegmentFromCache:function(e){return null!==s.extract(h.id,e)},getIsBufferingCompleted:function(){return n},setIsBufferingCompleted:m,getIsPruningInProgress:function(){return!1},reset:function(e){c.off(u.Z.INIT_FRAGMENT_LOADED,y,t),!e&&a&&(a.abort(),a.reset(),a=null)},clearBuffers:function(){return Promise.resolve()},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return n=!1,Promise.resolve()},setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()},segmentRequestingCompleted:function(){}},r=!1,i=null,n=!1,s=x(o).getInstance(),c.on(u.Z.INIT_FRAGMENT_LOADED,y,t),t}j.__dashjs_factory_name=B;var q=c.Z.getClassFactory(j);function H(e){e=e||{};var t,n,r,i,s,c,h,p,g,m,y,v,_,T=this.context,b=(0,l.Z)(T).getInstance(),S=e.dashMetrics,A=e.mediaPlayerModel,w=e.fragmentModel,I=e.abrController,C=e.playbackController,R=e.textController,D=e.type,N=e.bufferController,O=e.representationController,P=e.settings;function M(){v=!0}function x(){v=!1}function L(e){if(!N.getIsBufferingCompleted()){k();var t=isNaN(e)?0:e;s=setTimeout(F,t)}}function k(){s&&(clearTimeout(s),s=null)}function F(){try{if(function(){try{return D===a.Z.TEXT&&!R.isTextEnabled()||C.isPaused()&&(!C.getStreamController().getInitialPlayback()||!C.getStreamController().getAutoPlay())&&!P.get().streaming.scheduling.scheduleWhilePaused}catch(e){return!1}}())return void k();if(function(){try{return!!v&&O.getCurrentRepresentationInfo()&&(isNaN(g)||m||(e=n.id,t=I.getMaxAllowedIndexFor(D,e),!(!isNaN(p)&&p==t||(r.info("Top quality "+D+" index has changed from "+p+" to "+t),p=t,0)))||function(){var e=O.getCurrentRepresentationInfo();return!D||!e||S.getCurrentBufferLevel(D)=P.get().streaming.buffer.longFormContentDurationThreshold?P.get().streaming.buffer.bufferTimeAtTopQualityLongForm:P.get().streaming.buffer.bufferTimeAtTopQuality:A.getStableBufferTime()}catch(e){return A.getStableBufferTime()}}(),e):e}function B(){j(!0)}function j(e){if(C&&w){var t=w.getRequests({state:E.FRAGMENT_MODEL_EXECUTED,time:C.getTime(),threshold:0})[0];t&&C.getTime()>=t.startTime&&((!h.mediaInfo||t.mediaInfo.type===h.mediaInfo.type&&t.mediaInfo.index!==h.mediaInfo.index)&&e&&b.trigger(u.Z.TRACK_CHANGE_RENDERED,{mediaType:D,oldMediaInfo:h.mediaInfo,newMediaInfo:t.mediaInfo,streamId:n.id}),t.quality===h.quality&&t.adaptationIndex===h.adaptationIndex||!e||(r.debug("Quality change rendered for streamId ".concat(n.id," and type ").concat(D)),b.trigger(u.Z.QUALITY_CHANGE_RENDERED,{mediaType:D,oldQuality:h.quality,newQuality:t.quality,streamId:n.id})),h={mediaInfo:t.mediaInfo,quality:t.quality,adaptationIndex:t.adaptationIndex})}}function q(){w.abortRequests(),k()}function H(){P.get().streaming.scheduling.scheduleWhilePaused||L()}function G(e){S.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}function V(){_=!0,i=0,g=NaN,h={mediaInfo:void 0,quality:NaN,adaptationIndex:NaN},p=NaN,m=!1,y=!1,v=!0}return t={initialize:function(e){c=e,b.on(u.Z.URL_RESOLUTION_FAILED,q,t),b.on(f.Z.PLAYBACK_STARTED,H,t),b.on(f.Z.PLAYBACK_RATE_CHANGED,G,t),b.on(f.Z.PLAYBACK_TIME_UPDATED,B,t),b.on(f.Z.MANAGED_MEDIA_SOURCE_START_STREAMING,M,t),b.on(f.Z.MANAGED_MEDIA_SOURCE_END_STREAMING,x,t)},getType:function(){return D},getStreamId:function(){return n.id},setTimeToLoadDelay:function(e){i=e},getTimeToLoadDelay:function(){return i},setSwitchTrack:function(e){m=e},getSwitchTrack:function(){return m},startScheduleTimer:L,clearScheduleTimer:k,reset:function(){b.off(u.Z.URL_RESOLUTION_FAILED,q,t),b.off(f.Z.PLAYBACK_STARTED,H,t),b.off(f.Z.PLAYBACK_RATE_CHANGED,G,t),b.off(f.Z.PLAYBACK_TIME_UPDATED,B,t),b.off(f.Z.MANAGED_MEDIA_SOURCE_START_STREAMING,M,t),b.off(f.Z.MANAGED_MEDIA_SOURCE_END_STREAMING,x,t),k(),j(!1),V(),n=null},getBufferTarget:U,getPlaybackController:function(){return C},setCheckPlaybackQuality:function(e){_=e},setInitSegmentRequired:function(e){y=e},setLastInitializedQuality:function(e){g=e}},r=(0,d.Z)(T).getInstance().getLogger(t),V(),n=e.streamInfo,t}H.__dashjs_factory_name="ScheduleController";var G=c.Z.getClassFactory(H),V=n(7387);function Y(e){var t,n,r,i,s,o,l=(e=e||{}).eventBus,u=e.events,c=e.abrController,d=e.dashMetrics,h=e.playbackController,p=e.timelineConverter,g=e.type,m=e.streamInfo,y=e.dashConstants,v=e.segmentsController,_=e.isDynamic,T=e.adapter;function E(){return g}function b(){return r}function S(){return o}function A(){n=null,r=!0,i=[],s=null}function w(e){return new Promise((function(t,n){var r=e.hasInitialization(),a=e.hasSegments(),s=[];s.push(v.updateInitData(e,r)),s.push(v.updateSegmentData(e,a)),Promise.all(s).then((function(n){var r;n[0]&&!n[0].error&&(e=function(e,t){return t&&!t.error&&t.representation?t.representation:e}(e,n[0])),n[1]&&!n[1].error&&(e=function(e,t){if(t&&!t.error){var n,r,i,a,s=t.segments,o=[],l=0;for(n=0,r=s?s.length:0;n0&&(e.segments=o),e}}(e,n[1])),(r=e).mediaFinishedInformation=v.getMediaFinishedInformation(r),function(e){if(b()){var t,n,r=d.getCurrentManifestUpdate(),a=!1;if(r){for(var s=0;s=i.length?null:i[e]}function R(e){r=!1,l.trigger(u.DATA_UPDATE_COMPLETED,{data:n,currentRepresentation:o,error:e},{streamId:m.id,mediaType:g})}function D(e){o=e,s=T.convertRepresentationToRepresentationInfo(o)}function N(e){if(e.newDuration){var t=S();t&&t.adaptation.period&&(t.adaptation.period.duration=e.newDuration)}}return t={getStreamId:function(){return m.id},getType:E,getData:function(){return n},isUpdating:b,updateData:function(e,t,s,o,l){return new Promise((function(u,c){if(r=!0,i=t,n=e,D(C(l)),s!==a.Z.VIDEO&&s!==a.Z.AUDIO&&(s!==a.Z.TEXT||!o))return R(),void u();for(var d=[],f=0,h=i.length;f=D.start+D.duration}function le(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.sender)if(j.getIsManifestUpdateInProgress())fe();else if((!ae()||V.isTextEnabled())&&h&&e.representationId&&!h.appendInitSegmentFromCache(e.representationId)){var n=g.getCurrentRepresentation();if(0===n.range)return void ue();var r=_?_.getInitRequest(i,n):null;r?F.executeRequest(r):t&&(p.setInitSegmentRequired(!0),fe())}}function ue(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(j.getIsManifestUpdateInProgress()||h.getIsPruningInProgress())fe();else{var n=function(){var e,t=Ce();if(isNaN(S)||ie()===a.Z.TEXT&&!V.isTextEnabled())return null;if(_){var n=g&&t?g.getRepresentationForQuality(t.quality):null;e=m?_.getSegmentRequestForTime(i,n,S):y?_.repeatSegmentRequest(i,n):_.getNextSegmentRequest(i,n)}return e}();n?(m=!1,y=!1,ce(n)):de(t)}}function ce(e){isNaN(e.startTime+e.duration)||(S=e.startTime+e.duration),e.delayLoadingTime=(new Date).getTime()+p.getTimeToLoadDelay(),p.setTimeToLoadDelay(0),function(e){var t=e.url;return e.range&&(t=t.concat("_",e.range)),te.contains(t)}(e)?(n.warn("Fragment request url ".concat(e.url," for stream id ").concat(D.id," and media type ").concat(N," is on the ignore list and will be skipped")),fe()):(n.debug("Next fragment request url for stream id ".concat(D.id," and media type ").concat(N," is ").concat(e.url)),F.executeRequest(e))}function de(e){var t,a=g.getCurrentRepresentation();if(!$.get().streaming.gaps.enableSeekFix||!m&&0!==j.getTime()||(r?r&&a.segmentInfoType===s.Z.SEGMENT_TIMELINE&&(t=_.getValidTimeAheadOfTargetTime(S,i,a,$.get().streaming.gaps.threshold)):t=_.getValidTimeAheadOfTargetTime(S,i,a,$.get().streaming.gaps.threshold),isNaN(t)||t===S)){if(_.isLastSegmentRequested(a,S)){var o=_.getCurrentIndex();return n.debug("Segment requesting for stream ".concat(D.id," has finished")),C.trigger(u.Z.STREAM_REQUESTING_COMPLETED,{segmentIndex:o},{streamId:D.id,mediaType:N}),h.segmentRequestingCompleted(o),void p.clearScheduleTimer()}e&&fe()}else j.isSeeking()||0===j.getTime()?(n.warn("Adjusting playback time ".concat(t," because of gap in the manifest. Seeking by ").concat(t-S)),j.seek(t,!1,!1)):(n.warn("Adjusting buffering time ".concat(t," because of gap in the manifest. Adjusting time by ").concat(t-S)),xe(t),e&&fe())}function fe(){p.startScheduleTimer(j.getLowLatencyModeEnabled()?$.get().streaming.scheduling.lowLatencyTimeout:$.get().streaming.scheduling.defaultTimeout)}function he(e){e.error||h.getIsBufferingCompleted()||h.updateBufferTimestampOffset(e.currentRepresentation)}function pe(e){Y.addBufferState(N,e.state,p.getBufferTarget()),e.state!==o.Z.BUFFER_EMPTY||j.isSeeking()||(n.info("Buffer is empty! Stalling!"),Y.pushPlayListTraceMetrics(new Date,J.REBUFFERING_REASON))}function ge(e){F.syncExecutedRequestsWithBufferedRange(h.getBuffer().getAllBufferRanges(),D.duration),e.quotaExceeded&&e.from>j.getTime()&&xe(e.from),e.hasEnoughSpaceToAppend&&e.quotaExceeded&&p.startScheduleTimer()}function me(e){if(e&&e.lastRequestAppended&&e.lastRequestAppended.url){var t=e.lastRequestAppended.url;e.lastRequestAppended.range&&(t=t.concat("_",e.lastRequestAppended.range)),n.warn("Blacklisting segment with url ".concat(t)),te.add(t)}}function ye(e){if(n.debug("Appended bytes for ".concat(e.mediaType," and stream id ").concat(e.streamId)),e.segmentType===R.w.INIT_SEGMENT_TYPE){var t=e.quality;p.setLastInitializedQuality(t),n.info("["+N+"] lastInitializedRepresentationInfo changed to "+e.quality)}A?ve(A):p.startScheduleTimer(0)}function ve(e){var t=F.getRequests({state:E.FRAGMENT_MODEL_LOADING});if(t&&t.length>0)return n.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),void(A=e);h.updateBufferTimestampOffset(e).then((function(){p.setCheckPlaybackQuality(!1),i.segmentAlignment||i.subSegmentAlignment?p.startScheduleTimer():Pe(),A=null,v=!1})).catch((function(){A=null,v=!1}))}function _e(e){n.info("onFragmentLoadingAbandoned request: "+e.request.url+" has been aborted"),j.isSeeking()||p.getSwitchTrack()||v||(n.info("onFragmentLoadingAbandoned request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),e.request&&e.request.isInitializationRequest()?p.setInitSegmentRequired(!0):xe(e.request.startTime+e.request.duration/2),p.startScheduleTimer(0))}function Te(e){n.info("OnFragmentLoadingCompleted for stream id "+D.id+" and media type "+N+" - Url:",e.request?e.request.url:"undefined",e.request.range?", Range:"+e.request.range:""),ae()&&p.startScheduleTimer(0),e.error&&e.request.serviceLocation&&function(e){n.info("Fragment loading completed with an error"),e&&e.request&&e.request.type&&(e.request.type===R.w.INIT_SEGMENT_TYPE?le({representationId:e.request.representationId,sender:{}},!1):e.request.type===R.w.MEDIA_SEGMENT_TYPE&&(xe(e.request.startTime+e.request.duration/2),ue({},!1)))}(e)}function Ee(){xe(j.getTime()),Ie().startScheduleTimer()}function be(e){var t=e.currentTrackInfo;if(t){var n=c.find((function(e){return e.index===t.index&&e.lang===t.lang}));n&&we(n).then((function(){h.setIsBufferingCompleted(!1),xe(j.getTime()),p.setInitSegmentRequired(!0),p.startScheduleTimer()}))}}function Se(e){xe(e.quotaExceededTime),p.clearScheduleTimer()}function Ae(){return h?h.getBuffer():null}function we(e){e===i||e&&i&&e.type!==i.type||(i=e);var t=x.getRealAdaptation(D,i),n=x.getVoRepresentations(i);if(g){var s,o=g.getData(),l=B.getMaxAllowedIndexFor(N,D.id),u=B.getMinAllowedIndexFor(N,D.id),c=null;return null!==o&&o.id===t.id||N===a.Z.TEXT?s=B.getQualityFor(N,D.id):(c=B.getThroughputHistory().getAverageThroughput(N,r)||B.getInitialBitrateFor(N,D.id),s=B.getQualityForBitrate(i,c,D.id)),void 0!==u&&sl&&(s=l),g.updateData(t,n,N,i.isFragmented,s)}return Promise.resolve()}function Ie(){return p}function Ce(e){var t;return void 0!==e?((0,K.SE)(e),t=g?g.getRepresentationForQuality(e):null):t=g?g.getCurrentRepresentation():null,x.convertRepresentationToRepresentationInfo(t)}function Re(){return!!h&&h.getIsBufferingCompleted()}function De(e){if($.get().streaming.enableManifestTimescaleMismatchFix){var t=e.chunk,n=t.bytes,r=Ce(t.quality),i=g&&r?g.getRepresentationForQuality(r.quality):null;r&&i&&(i.timescale=Q.getMediaTimescaleFromMoov(n))}}function Ne(e){var t=e.chunk,n=t.bytes,r=t.quality,i=Ce(r),a=g&&i?g.getRepresentationForQuality(i.quality):null;if(i&&a){var o;if($.get().streaming.parseInbandPrft&&e.request.type===R.w.MEDIA_SEGMENT_TYPE){var l=function(e,t){var n=e.getBoxes("prft"),r=[];return n.forEach((function(e){r.push(function(e,t){var n="unknown";switch(e.flags){case 0:n=s.Z.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:n=s.Z.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:n=s.Z.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}var r=1e3*e.ntp_timestamp_sec+e.ntp_timestamp_frac/Math.pow(2,32)*1e3;return{type:n,ntpTimestamp:r=ne(w).getInstance().ntpToUTC(r),mediaTime:e.media_time/t}}(e,t))})),r}(o=o||Q.parse(n),a.timescale);l&&l.length&&C.trigger(f.Z.INBAND_PRFT,{data:l},{streamId:D.id,mediaType:N})}var c=x.getEventsFor(i.mediaInfo,null,D),d=x.getEventsFor(i,a,D);if(c&&c.length>0||d&&d.length>0){var h=F.getRequests({state:E.FRAGMENT_MODEL_EXECUTED,quality:r,index:t.index})[0],p=function(e,t,n,r){try{for(var i={},a=[],s=n.concat(r),o=0,l=s.length;o$.get().streaming.buffer.stallThreshold;if(h.getIsBufferingCompleted()&&!t)return h.prepareForNonReplacementTrackSwitch(i.codec).then((function(){C.trigger(u.Z.BUFFERING_COMPLETED,{},{streamId:D.id,mediaType:N})})).catch((function(){C.trigger(u.Z.BUFFERING_COMPLETED,{},{streamId:D.id,mediaType:N})})),void e();p.clearScheduleTimer(),p.setSwitchTrack(!0),t?(C.trigger(u.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:N,streamId:D.id},{mediaType:N,streamId:D.id}),F.abortRequests(),h.prepareForReplacementTrackSwitch(i.codec).then((function(){var e=Ce();return h.updateBufferTimestampOffset(e)})).then((function(){Oe(),e()})).catch((function(){Oe(),e()}))):h.prepareForNonReplacementTrackSwitch(i.codec).then((function(){Pe(),e()})).catch((function(){Pe(),e()}))}))},prepareQualityChange:function(e){A&&n.warn("Canceling queued representation switch to ".concat(A.quality," for ").concat(N)),n.debug("Preparing quality switch for type ".concat(N));var t=e.newQuality;v=!0,p.clearScheduleTimer(),g.prepareQualityChange(t);var r=Ce(t);e.reason&&e.reason.forceReplace?function(e){F.abortRequests(),C.trigger(u.Z.BUFFER_REPLACEMENT_STARTED,{mediaType:N,streamId:D.id},{mediaType:N,streamId:D.id}),p.setCheckPlaybackQuality(!1),h.prepareForForceReplacementQualitySwitch(e).then((function(){Oe(),A=null,v=!1})).catch((function(){Oe(),A=null,v=!1}))}(r):e&&e.reason&&e.reason.forceAbandon?function(e){h.updateBufferTimestampOffset(e).then((function(){F.abortRequests(),y=!0,p.setCheckPlaybackQuality(!1),p.startScheduleTimer(),v=!1,A=null})).catch((function(){A=null,v=!1}))}(r):$.get().streaming.buffer.fastSwitchEnabled?function(e){var t=j.getTime(),n=1.5*(isNaN(e.fragmentDuration)?1:e.fragmentDuration),r=F.getRequests({state:E.FRAGMENT_MODEL_EXECUTED,time:t+n,threshold:0})[0];if(r&&!ae()){var i=h.getBufferLevel(),a=B.getAbandonmentStateFor(D.id,N);r.quality=n&&a!==o.Z.ABANDON_LOAD?h.updateBufferTimestampOffset(e).then((function(){F.abortRequests(),xe(t+n),p.setCheckPlaybackQuality(!1),p.startScheduleTimer(),v=!1})).catch((function(){v=!1})):ve(e)}else ve(e)}(r):ve(r),Y.pushPlayListTraceMetrics(new Date,J.REPRESENTATION_SWITCH_STOP_REASON),Y.createPlaylistTraceMetrics(r.id,1e3*j.getTime(),j.getPlaybackRate())},getMediaInfo:function(){return i},getMediaSource:function(){return h.getMediaSource()},setMediaSource:function(e){return h.setMediaSource(e,i)},getBuffer:Ae,setExplicitBufferingTime:xe,finalisePlayList:function(e,t){Y.pushPlayListTraceMetrics(e,t)},probeNextRequest:function(){var e=Ce(),t=g&&e?g.getRepresentationForQuality(e.quality):null;return _.getNextSegmentRequestIdempotent(i,t)},prepareInnerPeriodPlaybackSeeking:function(e){return new Promise((function(t){if(h.hasBufferAtTime(e.seekTime))return h.pruneBuffer(),oe(h.getContinuousBufferTimeForTargetTime(e.seekTime))&&h.setIsBufferingCompleted(!0),void t();p.clearScheduleTimer(),F.abortRequests(),h.prepareForPlaybackSeek().then((function(){var t=h.getAllRangesWithSafetyFactor(e.seekTime);return h.clearBuffers(t)})).then((function(){var n=h.getContinuousBufferTimeForTargetTime(e.seekTime);if(oe(n))h.setIsBufferingCompleted(!0),t();else{var r=isNaN(n)?e.seekTime:n;xe(r),h.setSeekTarget(r);var i=[];i.push(h.updateAppendWindow());var a=Ce();i.push(h.updateBufferTimestampOffset(a)),Promise.all(i).then((function(){p.setInitSegmentRequired(!0),p.setCheckPlaybackQuality(!1),p.startScheduleTimer(),t()}))}})).catch((function(e){n.error(e)}))}))},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((function(e,t){try{p.clearScheduleTimer(),F.abortRequests(),h.prepareForPlaybackSeek().then((function(){return h.pruneAllSafely()})).then((function(){e()}))}catch(e){t(e)}}))},reset:function(e,n){_&&_.reset(),h&&(h.reset(e,n),h=null),p&&(p.reset(),p=null),g&&(g.reset(),g=null),T&&(T=null),B&&B.unRegisterStreamType(re(),N),C.off(u.Z.DATA_UPDATE_COMPLETED,he,t),C.off(u.Z.INIT_FRAGMENT_NEEDED,le,t),C.off(u.Z.MEDIA_FRAGMENT_NEEDED,ue,t),C.off(u.Z.INIT_FRAGMENT_LOADED,De,t),C.off(u.Z.MEDIA_FRAGMENT_LOADED,Ne,t),C.off(u.Z.BUFFER_LEVEL_STATE_CHANGED,pe,t),C.off(u.Z.BUFFER_CLEARED,ge,t),C.off(u.Z.SEEK_TARGET,Me,t),C.off(u.Z.FRAGMENT_LOADING_ABANDONED,_e,t),C.off(u.Z.FRAGMENT_LOADING_COMPLETED,Te,t),C.off(u.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Ee,t),C.off(u.Z.SET_NON_FRAGMENTED_TEXT,be,t),C.off(u.Z.QUOTA_EXCEEDED,Se,t),C.off(u.Z.SOURCE_BUFFER_ERROR,me,t),C.off(u.Z.BYTES_APPENDED_END_FRAGMENT,ye,t),se(),N=null,D=null}},n=(0,d.Z)(w).getInstance().getLogger(t),se(),C.on(u.Z.DATA_UPDATE_COMPLETED,he,t,{priority:l.Z.EVENT_PRIORITY_HIGH}),C.on(u.Z.INIT_FRAGMENT_NEEDED,le,t),C.on(u.Z.MEDIA_FRAGMENT_NEEDED,ue,t),C.on(u.Z.INIT_FRAGMENT_LOADED,De,t),C.on(u.Z.MEDIA_FRAGMENT_LOADED,Ne,t),C.on(u.Z.BUFFER_LEVEL_STATE_CHANGED,pe,t),C.on(u.Z.BUFFER_CLEARED,ge,t),C.on(u.Z.SEEK_TARGET,Me,t),C.on(u.Z.FRAGMENT_LOADING_ABANDONED,_e,t),C.on(u.Z.FRAGMENT_LOADING_COMPLETED,Te,t),C.on(u.Z.QUOTA_EXCEEDED,Se,t),C.on(u.Z.SET_FRAGMENTED_TEXT_AFTER_DISABLED,Ee,t),C.on(u.Z.SET_NON_FRAGMENTED_TEXT,be,t),C.on(u.Z.SOURCE_BUFFER_ERROR,me,t),C.on(u.Z.BYTES_APPENDED_END_FRAGMENT,ye,t),t}re.__dashjs_factory_name="StreamProcessor";var ie=c.Z.getClassFactory(re),ae=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamId=null,this.mediaInfo=null,this.segmentType=null,this.quality=NaN,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representationId=null,this.endFragment=null},se=n(9032);function oe(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}(r.headers.keys());try{for(f.s();!(i=f.n()).done;){var h=i.value;l+=h+": "+r.headers.get(h)+"\r\n"}}catch(e){f.e(e)}finally{f.f()}if(e.response.responseHeaders=l,!r.body)return r.arrayBuffer().then((function(t){e.response.response=t;var n={loaded:t.byteLength,total:t.byteLength,stream:!1};e.progress(n),e.onload(),e.onend()}));var p,g,_,T=parseInt(r.headers.get("Content-Length"),10),E=0,b=!1,S=new Uint8Array,A=0;if(m===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST&&s){var w=t,I=0,C=(2,function(e){if(Array.isArray(e))return e}(_=r.body.tee())||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),2!==n.length);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(i)throw a}}return n}}(_)||oe(_,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),R=C[0],D=C[1];p=R.getReader(),g=[],p.read().then((function r(i){var a=i.value,o=i.done;if(I=Date.now(),a&&a.length){var c=I-w,d=a.length;g.push({chunkDownloadTimeRelativeMS:I-t,chunkDownloadDurationMS:c,chunkBytes:d,kbps:Math.round(8*d/(c/1e3)),bufferLevel:n.getCurrentBufferLevel(u.mediaType)})}if(o){var f=I-t,h=g.reduce((function(e,t){return e+t.chunkBytes}),0);return s.addMeasurement(u,f,g,y,v,l),void e.progress({loaded:h,total:h,lengthComputable:!0,time:s.getEstimatedDownloadDurationMS(u),stream:!0})}return w=Date.now(),p.read().then(r)})),e.reader=D.getReader()}else e.reader=r.body.getReader();var N=[],O=[],P=[],M=!0;c(e,(function t(n){var r=n.value;if(n.done){if(S){if(m!==a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_AAST){var i=null,s=null;m===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING?(i=function(e,t){try{var n,r;n=e.filter((function(t,n){return n1){for(var a=0,s=0,o=0;o1)i.push(8*r[o].bytes/l),s=0;else{0===s&&(s=n[o].ts,a=0);var u=r[o].ts-s;u>1?(a+=r[o].bytes,i.push(8*a/u),s=0):a+=r[o].bytes}}if(i.length>0)return i.reduce((function(e,t){return e+t}),0)/i.length}return null}catch(e){return null}}(O,P),i&&(s=8*E/i)):m===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA&&(s=d(N,E)),e.progress({loaded:E,total:isNaN(T)?E:T,lengthComputable:!0,time:s,stream:!0})}e.response.response=S.buffer}return e.onload(),void e.onend()}if(r&&r.length>0){S=function(e,t){if(0===e.length)return t;var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(S,r),E+=r.length,N.push({ts:Date.now(),bytes:r.length}),m===a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING&&M&&o.findLastTopIsoBoxCompleted(["moof"],S,A).found&&(M=!1,O.push({ts:performance.now(),bytes:r.length}));var l=o.findLastTopIsoBoxCompleted(["moov","mdat"],S,A);if(l.found){var u,f=l.lastCompletedOffset+l.size;m!==a.Z.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING||M||(M=!0,P.push({ts:performance.now(),bytes:S.length})),f===S.length?(u=S,S=new Uint8Array):(u=new Uint8Array(S.subarray(0,f)),S=S.subarray(f)),e.progress({data:u.buffer,lengthComputable:!1,noTrace:!0}),A=0}else A=l.lastCompletedOffset,b||(e.progress({lengthComputable:!1,noTrace:!0}),b=!0)}c(e,t)}))})).catch((function(t){e.onerror&&e.onerror(t)}))}))}function c(e,t){e.reader.read().then(t).catch((function(t){e.onerror&&200===e.response.status&&e.onerror(t)}))}function d(e,t){try{if((e=e.filter((function(n){return n.bytes>t/4/e.length}))).length>1){var n=0,r=(e[e.length-1].ts-e[0].ts)/e.length;return e.forEach((function(t,i){var a=e[i+1];if(a){var s=a.ts-t.ts;n+=s=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function ke(e,t){if(e){if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fe(e,t):void 0}}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&De.Y.indexOf(n[0].schemeIdUri)>=0)return t===a.Z.IMAGE}if(e.ContentComponent_asArray&&e.ContentComponent_asArray.length>0){if(e.ContentComponent_asArray.length>1)return t===a.Z.MUXED;if(e.ContentComponent_asArray[0].contentType===t)return!0}var r=t===a.Z.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(t);if(e.Representation_asArray&&e.Representation_asArray.length){var i=e.Representation_asArray[0].codecs;if(r.test(i))return!0}if(e.hasOwnProperty(s.Z.MIME_TYPE))return r.test(e.mimeType);if(e.Representation_asArray)for(var o,l=0;l0){var t=e.Representation_asArray[0];if(t.hasOwnProperty(s.Z.SEGMENT_TEMPLATE)||t.hasOwnProperty(s.Z.SEGMENT_TIMELINE)||t.hasOwnProperty(s.Z.SEGMENT_LIST)||t.hasOwnProperty(s.Z.SEGMENT_BASE))return!0}return!1}function f(e){return u(e,a.Z.VIDEO)}function h(e){return u(e,a.Z.TEXT)}function p(e){return u(e,a.Z.IMAGE)}function g(e){return e&&Array.isArray(e.Representation_asArray)&&e.Representation_asArray.sort((function(e,t){return e.bandwidth-t.bandwidth})),e}function m(e,t){return e&&e.Period_asArray&&l(t)&&e.Period_asArray[t]?e.Period_asArray[t].AdaptationSet_asArray:[]}function y(e){return e&&e.Period_asArray?e.Period_asArray:[]}function v(e){var t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===s.Z.DYNAMIC),t}function _(e){return e&&e.EssentialProperty_asArray&&e.EssentialProperty_asArray.length?e.EssentialProperty_asArray.map((function(e){return{schemeIdUri:e.schemeIdUri,value:e.value}})):null}function T(e){if(!e||!e.S_asArray)return NaN;var t=e.S_asArray[0],n=e.S_asArray[1];return t.hasOwnProperty("d")?t.d:n.t-t.t}function E(e,t){if(!e)throw new Error("Period cannot be null or undefined");var n=ge.DEFAULT_ID+"_"+t;return e.hasOwnProperty(s.Z.ID)&&e.id.length>0&&"__proto__"!==e.id&&(n=e.id),n}function S(e,t,n){var r,i=[];if(!e)return i;for(r=0;r0&&l(e)?r[e]:null},getIndexForAdaptation:function(e,t,n){if(!e)return-1;for(var r=m(t,n),a=0;a0&&l(e)?n[e]:null},getCodec:function(e,t,n){var r=null;if(e&&e.Representation_asArray&&e.Representation_asArray.length>0){var i=l(t)&&t>=0&&t0?e.Representation_asArray[0].mimeType:null},getKID:function(e){return e&&e.hasOwnProperty(s.Z.CENC_DEFAULT_KID)?e[s.Z.CENC_DEFAULT_KID]:null},getLabelsForAdaptation:function(e){if(!e||!Array.isArray(e.Label_asArray))return[];for(var t=[],n=0;n0&&(n=-1!==e.profiles.indexOf(t)),n},getDuration:function(e){return e&&e.hasOwnProperty(s.Z.MEDIA_PRESENTATION_DURATION)?e.mediaPresentationDuration:e&&"dynamic"==e.type?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE},getBandwidth:function(e){return e&&e.bandwidth?e.bandwidth:NaN},getManifestUpdatePeriod:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=NaN;return e&&e.hasOwnProperty(s.Z.MINIMUM_UPDATE_PERIOD)&&(n=e.minimumUpdatePeriod),isNaN(n)?n:Math.max(n-t,1)},getPublishTime:function(e){return e&&e.hasOwnProperty(s.Z.PUBLISH_TIME)?new Date(e[s.Z.PUBLISH_TIME]):null},getRepresentationCount:function(e){return e&&Array.isArray(e.Representation_asArray)?e.Representation_asArray.length:0},getBitrateListForAdaptation:function(e){var t=g(e);return(t&&Array.isArray(t.Representation_asArray)?t.Representation_asArray:[]).map((function(e){return{bandwidth:e.bandwidth,width:e.width||0,height:e.height||0,scanType:e.scanType||null,id:e.id||null}}))},getRepresentationFor:function(e,t){return t&&t.Representation_asArray&&t.Representation_asArray.length>0&&l(e)?t.Representation_asArray[e]:null},getRepresentationsForAdaptation:function(e){var t,n,r,i,a=[],o=function(e){if(e&&e.period&&l(e.period.index)){var t=e.period.mpd.manifest.Period_asArray[e.period.index];if(t&&t.AdaptationSet_asArray&&l(e.index))return g(t.AdaptationSet_asArray[e.index])}}(e);if(o&&o.Representation_asArray){if(e&&e.period&&l(e.period.index)){var u=A(e.period.mpd.manifest);u&&(n=u[0])}for(var d=0,f=o.Representation_asArray.length;d=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return r[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!==Ye(e[e.length-1])&&e.push(s(e,a)),t.apply(this,e)}))}return r[Symbol.replace].call(this,e,t)},Ze.apply(this,arguments)}function Ke(e){var t="function"==typeof Map?new Map:void 0;return Ke=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return ze(e,arguments,Xe(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),We(r,e)},Ke(e)}function ze(e,t,n){return ze=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&We(i,n.prototype),i},ze.apply(null,arguments)}function We(e,t){return We=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},We(e,t)}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}var $e="static",Qe="dynamic",Je="cmsd-",et=Je+$e,tt=Je+Qe,nt="stream",rt=["mb","st","sf","v"],it={video:"v",audio:"a",text:"tt",stream:nt},at=/^[-0-9]/;function st(){var e,t,n,r,i=this.context,a=(0,l.Z)(i).getInstance();function s(){n={},r={}}function o(e){e&&Object.keys(e).forEach((function(t){rt.includes(t)||delete e[t]}))}function c(e){return!e||"false"!==e.toLowerCase()&&(at.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}function f(e){try{for(var n={},r=e.split(","),i=0;i=0;c--){var d=l[c].match(Ze(/^((?:(?!:)[\s\S])*):[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(.*)$/,{key:1,value:2}));if(d&&d.groups){var g=d.groups.key.toLowerCase(),m=d.groups.value;switch(g){case et:i=f(m),a.trigger(u.Z.CMSD_STATIC_HEADER,i);break;case tt:s||(s=h(m))}}}var y=nt;return i&&i.ot?y=i.ot:t&&(y=p(t)),o(n[y]),o(r[y]),i&&(n[y]=Object.assign(n[y]||{},i)),s&&(r[y]=Object.assign(r[y]||{},s)),{static:i,dynamic:s}},getMaxBitrate:function(e){var t=p(e);return g(Qe,t,"mb")||-1},getEstimatedThroughput:function(e){var t=p(e);return g(Qe,t,"etp")||null},getResponseDelay:function(e){var t=p(e);return g(Qe,t,"rd")||null},getRoundTripTime:function(e){var t=p(e);return g(Qe,t,"rtt")||null}},t=(0,d.Z)(i).getInstance().getLogger(e),s(),e}st.__dashjs_factory_name="CmsdModel";var ot=c.Z.getSingletonFactory(st);function lt(){var e,t,n=this.context,r={};function i(){t=(0,d.Z)(n).getInstance().getLogger(e)}function a(e){for(var t={},n=0,r=0,i=0,a=0,s=e.length,o=0;oe.bitrate&&(n=!1):t=e.bitrate})),n}return e={setup:i,addMeasurement:function(e,t,n,i,s){e&&e.mediaType&&!r[e.mediaType]&&(r[e.mediaType]=[]);var o=e.mediaInfo.bitrateList.find((function(t){return t.id===e.representationId}));r[e.mediaType].push({index:e.index,repId:e.representationId,mediaType:e.mediaType,requestTimeMS:i,adjustedAvailabilityStartTimeMS:e.availabilityStartTime.getTime(),segDurationMS:1e3*e.duration,chunksDurationMS:n.reduce((function(e,t){return e+t.chunkDownloadDurationMS}),0),segmentBytes:n.reduce((function(e,t){return e+t.chunkBytes}),0),bitrate:o&&o.bandwidth,bitrateList:e.mediaInfo.bitrateList,chunkMeasurements:n,fetchDownloadDurationMS:t,throughputCapacityDelayMS:s,getEstimatedBufferLevel:a(n.slice(1))}),r[e.mediaType].length>10&&r[e.mediaType].shift()},getThroughputCapacityDelayMS:function(e,t){var n=r[e.mediaType]&&r[e.mediaType].slice(-3);return!n||n.length<3?0:s(n)?t/4>250?250:t/4:0},getEstimatedDownloadDurationMS:function(e){var n=r[e.mediaType].slice(-1).pop(),i=r[e.mediaType].slice(-3),a=n.chunkMeasurements.slice(-1).pop().chunkDownloadTimeRelativeMS;n.bufferLevelAtSegmentStart=n.getEstimatedBufferLevel(a/2),n.bufferLevelAtSegmentEnd=n.getEstimatedBufferLevel(a);var o=s(i),l=o?.6:.8;if(n.isBufferStable&&1.05*n.segDurationMS.2*n.chunkMeasurements.length){var g=c/d,m=n.segmentBytes/g;return n.fetchDownloadDurationMSn.bitrate)return y=e.bandwidth,!0})),y===n.bitrate?n.fetchDownloadDurationMS*l:l*n.segmentBytes*8*1e3/y}},i(),e}lt.__dashjs_factory_name="LowLatencyThroughputModel";var ut=c.Z.getSingletonFactory(lt),ct=n(5717);function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(e){e=e||{};var t,n,r,i,s,o,c,f,h,p,g,m=this.context,y=e.errHandler,v=e.dashMetrics,_=e.mediaPlayerModel,T=e.requestModifier,E=e.boxParser,S=e.errors,A=e.requestTimeout||0,w=(0,l.Z)(m).getInstance(),I=(0,C.Z)(m).getInstance();function D(e,t){var l,d=e.request,g=[],S=!0,C=!0,N=new Date,O=N,P=0,M=null,x=null;if(!T||!v||!y)throw new Error("config object is not correct or missing");var L,k=function(e){d.requestStartDate=N,d.requestEndDate=new Date,d.firstByteDate=d.firstByteDate||N,d.fileLoaderType=x;var t=l.response?l.response.responseURL:null,n=l.response?l.response.status:null,r=l.response&&l.response.getAllResponseHeaders?l.response.getAllResponseHeaders():l.response?l.response.responseHeaders:null,i=r&&I.get().streaming.cmsd&&I.get().streaming.cmsd.enabled?c.parseResponseHeaders(r,d.mediaType):null;v.addHttpRequest(d,t,n,r,e?g:null,i)},F=function(e){C=!1,k(e),d.type===R.w.MPD_TYPE&&(v.addManifestUpdate(d),w.trigger(u.Z.MANIFEST_LOADING_FINISHED,{request:d}))},U=function(){if(M&&(clearTimeout(M),M=null),-1!==n.indexOf(l)&&(n.splice(n.indexOf(l),1),C))if(F(!1),t>0){try{I.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&d.type===R.w.MEDIA_SEGMENT_TYPE&&_.getRetryAttemptsForType(R.w.MEDIA_SEGMENT_TYPE)===t&&w.trigger(u.Z.ATTEMPT_BACKGROUND_SYNC)}catch(e){}t--;var r={config:e};i.push(r),r.timeout=setTimeout((function(){-1!==i.indexOf(r)&&(i.splice(i.indexOf(r),1),D(e,t))}),_.getRetryIntervalsForType(d.type))}else{if(d.type===R.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;y.error(new b.Z(s[d.type],d.url+" is not available",{request:d,response:l.response})),e.error&&e.error(d,"error",l.response.statusText,l.response),e.complete&&e.complete(d,l.response.statusText)}};d.hasOwnProperty("availabilityTimeComplete")&&!1===d.availabilityTimeComplete&&window.fetch&&"arraybuffer"===d.responseType&&d.type===R.w.MEDIA_SEGMENT_TYPE?((L=ce(m).create({requestModifier:T,lowLatencyThroughputModel:h,boxParser:E})).setup({dashMetrics:v}),x=a.Z.FILE_LOADER_TYPES.FETCH):(L=(0,se.Z)(m).create({requestModifier:T}),x=a.Z.FILE_LOADER_TYPES.XHR);var B=null,j=T.modifyRequestURL?T.modifyRequestURL(d.url):d.url;if(I.get().streaming.cmcd&&I.get().streaming.cmcd.enabled){var q=I.get().streaming.cmcd.mode;if(q===a.Z.CMCD_MODE_QUERY){var H=function(e){try{var t=[],n=o.getQueryParameter(e);return n&&t.push(n),t}catch(e){return[]}}(d);j=je.Z.addAditionalQueryParameterToUrl(j,H)}else q===a.Z.CMCD_MODE_HEADER&&(B=o.getHeaderParameters(d))}var G=f.getXHRWithCredentialsForType(d.type);if(d.queryParams){var V=Object.keys(d.queryParams).map((function(e){return{key:e,value:d.queryParams[e]}}));j=je.Z.addAditionalQueryParameterToUrl(j,V)}d.url=j,l={url:j,method:R.w.GET,withCredentials:G,request:d,onload:function(){l.response.status>=200&&l.response.status<=299&&(F(!0),e.success&&e.success(l.response.response,l.response.statusText,l.response.responseURL),e.complete&&e.complete(d,l.response.statusText))},onend:U,onerror:U,progress:function(t){var n=new Date;S&&(S=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(d.firstByteDate=n)),t.lengthComputable&&(d.bytesLoaded=t.loaded,d.bytesTotal=t.total),t.noTrace||(g.push({s:O,d:t.time?t.time:n.getTime()-O.getTime(),b:[t.loaded?t.loaded-P:0]}),O=n,P=t.loaded),M&&(clearTimeout(M),M=null),I.get().streaming.fragmentRequestProgressTimeout>0&&(M=setTimeout((function(){p.warn("Abort request "+l.url+" due to progress timeout"),l.response.onabort=null,l.loader.abort(l),U()}),I.get().streaming.fragmentRequestProgressTimeout)),e.progress&&t&&e.progress(t)},onabort:function(){k(!0),M&&(clearTimeout(M),M=null),e.abort&&e.abort(d)},ontimeout:function(e){var t;if(e.lengthComputable){var n=e.loaded/e.total*100;t="Request timeout: loaded: "+e.loaded+", out of: "+e.total+" : "+n.toFixed(3)+"% Completed"}else t="Request timeout: non-computable download size";p.warn(t)},loader:L,timeout:A,headers:B};var Y=(new Date).getTime();if(isNaN(d.delayLoadingTime)||Y>=d.delayLoadingTime)n.push(l),L.load(l);else{var Z={httpRequest:l};r.push(Z),Z.delayTimeout=setTimeout((function(){if(-1!==r.indexOf(Z)){r.splice(r.indexOf(Z),1);try{N=new Date,O=N,n.push(Z.httpRequest),L.load(Z.httpRequest)}catch(e){Z.httpRequest.onerror()}}}),d.delayLoadingTime-Y)}}return t={load:function(e){e.request?D(e,_.getRetryAttemptsForType(e.request.type)):e.error&&e.error(e.request,"error")},abort:function(){i.forEach((function(e){clearTimeout(e.timeout),e.config.request&&e.config.abort&&e.config.abort(e.config.request)})),i=[],r.forEach((function(e){return clearTimeout(e.delayTimeout)})),r=[],n.forEach((function(e){e.request.type!==R.w.MSS_FRAGMENT_INFO_SEGMENT_TYPE&&(e.onloadend=e.onerror=e.onprogress=void 0,e.loader.abort(e))})),n=[]}},p=(0,d.Z)(m).getInstance().getLogger(t),n=[],r=[],i=[],o=Ve(m).getInstance(),c=ot(m).getInstance(),h=ut(m).getInstance(),f=(0,ct.Z)(m).getInstance(),dt(g={},R.w.MPD_TYPE,S.DOWNLOAD_ERROR_ID_MANIFEST_CODE),dt(g,R.w.XLINK_EXPANSION_TYPE,S.DOWNLOAD_ERROR_ID_XLINK_CODE),dt(g,R.w.INIT_SEGMENT_TYPE,S.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE),dt(g,R.w.MEDIA_SEGMENT_TYPE,S.DOWNLOAD_ERROR_ID_CONTENT_CODE),dt(g,R.w.INDEX_SEGMENT_TYPE,S.DOWNLOAD_ERROR_ID_CONTENT_CODE),dt(g,R.w.BITSTREAM_SWITCHING_SEGMENT_TYPE,S.DOWNLOAD_ERROR_ID_CONTENT_CODE),dt(g,R.w.OTHER_TYPE,S.DOWNLOAD_ERROR_ID_CONTENT_CODE),s=g,t}ft.__dashjs_factory_name="HTTPLoader";var ht=c.Z.getClassFactory(ft);function pt(){var e;function t(){e={}}function n(){t()}return n(),{getLoader:function(t){for(var n in e)if(e.hasOwnProperty(n)&&t.startsWith(n))return e[n];return ht},registerLoader:function(t,n){e[t]=n},unregisterLoader:function(t){e[t]&&delete e[t]},unregisterAllLoader:t,reset:n}}pt.__dashjs_factory_name="SchemeLoaderFactory";var gt=c.Z.getSingletonFactory(pt);function mt(e){e=e||{};var t,n,r=this.context;return t=gt(r).getInstance(),{load:function(i){if(!n){var a=t.getLoader(i&&i.request?i.request.url:null);n=a(r).create({errHandler:e.errHandler,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,dashMetrics:e.dashMetrics,boxParser:e.boxParser?e.boxParser:null,constants:e.constants?e.constants:null,dashConstants:e.dashConstants?e.dashConstants:null,urlUtils:e.urlUtils?e.urlUtils:null,requestTimeout:isNaN(e.requestTimeout)?0:e.requestTimeout,errors:e.errors})}n.load(i)},abort:function(){n&&n.abort()}}}mt.__dashjs_factory_name="URLLoader";var yt=c.Z.getClassFactory(mt);function vt(e){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vt(e)}function _t(e,t){return _t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_t(e,t)}function Tt(e){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tt(e)}var Et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_t(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Tt(t);if(n){var i=Tt(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!==vt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=r.call(this,e)).checkForExistenceOnly=!0,t}return i}(g.Z);function bt(e){e=e||{};var t,n,r=this.context,i=e.eventBus,s=e.events,o=e.urlUtils,l=e.errors,u=e.streamId;return t={checkForExistence:function(e){var t=function(t){i.trigger(s.CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){var r=new Et(e.url);n.load({request:r,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)},load:function(e){var r=function(n,r){i.trigger(s.LOADING_COMPLETED,{request:e,response:n||null,error:r||null,sender:t})};e?n.load({request:e,progress:function(n){i.trigger(s.LOADING_PROGRESS,{request:e,stream:n.stream,streamId:u}),n.data&&i.trigger(s.LOADING_DATA_PROGRESS,{request:e,response:n.data||null,error:null,sender:t})},success:function(e){r(e)},error:function(e,t,n){r(void 0,new b.Z(l.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,n,t))},abort:function(e){e&&i.trigger(s.LOADING_ABANDONED,{mediaType:e.mediaType,request:e,sender:t})}}):r(void 0,new b.Z(l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,l.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},abort:function(){n&&n.abort()},reset:function(){n&&(n.abort(),n=null)}},n=yt(r).create({errHandler:e.errHandler,errors:l,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,urlUtils:o,constants:a.Z,boxParser:e.boxParser,dashConstants:e.dashConstants,requestTimeout:e.settings.get().streaming.fragmentRequestTimeout}),t}bt.__dashjs_factory_name="FragmentLoader";var St=c.Z.getClassFactory(bt);function At(){return{modifyResponseAsync:function(e){return Promise.resolve(e)}}}At.__dashjs_factory_name="SegmentResponseModifier";var wt=c.Z.getSingletonFactory(At);function It(e){e=e||{};var t,n,r,i=this.context,s=(0,l.Z)(i).getInstance(),o=e.errHandler,c=e.mediaPlayerModel,h=e.dashMetrics,p=(0,d.Z)(i).getInstance(),g=wt(i).getInstance(),m=e.streamInfo;function y(){return m.id}function v(){for(var e in r)r[e].reset();r={}}function _(e){if(e.sender){var t=e.request,r=e.response,i=t.isInitializationRequest(),o=t.mediaInfo.streamInfo;if(e.error&&(t.mediaType===a.Z.AUDIO||t.mediaType===a.Z.VIDEO||t.mediaType===a.Z.TEXT&&t.mediaInfo.isFragmented)&&s.trigger(u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:e.request.serviceLocation}),r&&o){var l=function(e,t,n,r){var i=new ae;return i.streamId=n,i.mediaInfo=t.mediaInfo,i.segmentType=t.type,i.start=t.startTime,i.duration=t.duration,i.end=i.start+i.duration,i.bytes=e,i.index=t.index,i.quality=t.quality,i.representationId=t.representationId,i.endFragment=r,i}(r,t,m.id,e.type!==u.Z.FRAGMENT_LOADING_PROGRESS);g.modifyResponseAsync(l).then((function(e){s.trigger(i?u.Z.INIT_FRAGMENT_LOADED:u.Z.MEDIA_FRAGMENT_LOADED,{chunk:e,request:t},{streamId:o.id,mediaType:t.mediaType})})).catch((function(e){n.error(e),s.trigger(i?u.Z.INIT_FRAGMENT_LOADED:u.Z.MEDIA_FRAGMENT_LOADED,{chunk:l,request:t},{streamId:o.id,mediaType:t.mediaType})}))}else n.warn("No "+t.mediaType+" bytes to push or stream is inactive.")}}return t={getStreamId:y,getModel:function(t){var n=r[t];return n||(n=E(i).create({streamInfo:m,type:t,dashMetrics:h,fragmentLoader:St(i).create({dashMetrics:h,mediaPlayerModel:c,errHandler:o,requestModifier:(0,W.Z)(i).getInstance(),settings:e.settings,boxParser:e.boxParser,eventBus:s,events:u.Z,errors:I,dashConstants:e.dashConstants,urlUtils:e.urlUtils,streamId:y()}),debug:p,eventBus:s,events:u.Z}),r[t]=n),n},reset:function(){s.off(f.Z.FRAGMENT_LOADING_COMPLETED,_,this),s.off(f.Z.FRAGMENT_LOADING_PROGRESS,_,this),v()}},n=p.getLogger(t),v(),s.on(f.Z.FRAGMENT_LOADING_COMPLETED,_,t),s.on(f.Z.FRAGMENT_LOADING_PROGRESS,_,t),t}It.__dashjs_factory_name="FragmentController";var Ct=c.Z.getClassFactory(It),Rt=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=null,this.width=null,this.height=null,this.x=null,this.y=null},Dt=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mediaType=null,this.bitrate=null,this.width=null,this.height=null,this.scanType=null,this.qualityIndex=NaN};function Nt(e){var t,n,r=this.context,i=e.streamInfo;function s(e){n.setTrackByIndex(e)}function o(){n&&n.reset()}return t={getStreamId:function(){return i.id},initialize:function(){n.addTracks();var e=n.getTracks();e&&e.length>0&&s(0)},provide:function(e,t){if("function"==typeof t){var r,i,a=n.getCurrentTrack();if(!a||a.segmentDuration<=0||null==e)t(null);else{(i=n.getThumbnailRequestForTime(e))&&(a.segmentDuration=i.duration),r=e%a.segmentDuration;var s=Math.floor(r*a.tilesHor*a.tilesVert/a.segmentDuration),o=new Rt;if(o.width=Math.floor(a.widthPerTile),o.height=Math.floor(a.heightPerTile),o.x=Math.floor(s%a.tilesHor)*a.widthPerTile,o.y=Math.floor(s/a.tilesHor)*a.heightPerTile,"readThumbnail"in a)return a.readThumbnail(e,(function(e){o.url=e,t(o)}));if(i)o.url=i.url,a.segmentDuration=NaN;else{var l=Math.floor(e/a.segmentDuration);o.url=function(e,t){var n=t+e.startNumber,r=(0,V.vi)(e.templateUrl,"Number",n);return r=(0,V.vi)(r,"Time",(n-1)*e.segmentDuration*e.timescale),r=(0,V.vi)(r,"Bandwidth",e.bandwidth),(0,V.eR)(r)}(a,l)}t(o)}}},setTrackByIndex:s,getCurrentTrackIndex:function(){return n.getCurrentTrackIndex()},getBitrateList:function(){var e=n.getTracks(),t=0;return e.map((function(e){var n=new Dt;return n.mediaType=a.Z.IMAGE,n.qualityIndex=t++,n.bitrate=e.bitrate,n.width=e.width,n.height=e.height,n}))},reset:o},o(),n=(0,De.Z)(r).create({streamInfo:i,adapter:e.adapter,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:e.debug,eventBus:e.eventBus,events:e.events,dashConstants:e.dashConstants,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController}),t}Nt.__dashjs_factory_name="ThumbnailController";var Ot=c.Z.getClassFactory(Nt),Pt=n(7417);function Mt(e){var t;e=e||{};var n=[],r=(0,l.Z)(this.context).getInstance(),i=e.updateEventName,a=e.addBlacklistEventName;function s(e){-1===n.indexOf(e)&&(n.push(e),r.trigger(i,{entry:e}))}return t={add:s,contains:function(e){return!!(n.length&&e&&e.length)&&-1!==n.indexOf(e)},reset:function(){n=[]}},a&&r.on(a,(function(e){s(e.entry)}),t),t}Mt.__dashjs_factory_name="BlackListController";var xt=c.Z.getClassFactory(Mt),Lt=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT,a.Z.MUXED,a.Z.IMAGE];function kt(e){e=e||{};var t,n,r,i,o,c,f,h,p,g,m,y,v,_,T,E,S,A,w=this.context,C=(0,l.Z)(w).getInstance(),R=(0,X.Z)(w).getInstance(),D=e.manifestModel,N=e.mediaPlayerModel,O=e.dashMetrics,P=e.manifestUpdater,M=e.adapter,x=e.timelineConverter,L=e.capabilities,k=e.errHandler,F=e.abrController,U=e.playbackController,B=e.eventController,j=e.mediaController,q=e.protectionController,H=e.textController,G=e.videoModel,V=e.streamInfo,Y=e.settings;function Z(e,t){return new Promise((function(i,s){ne(),g=!0,ae();var o=G.getElement(),l=[];Lt.forEach((function(t){(t!==a.Z.TEXT||e)&&(t!==a.Z.VIDEO||!o||o&&/^VIDEO$/i.test(o.nodeName))&&l.push(K(t,e))})),Promise.all(l).then((function(){return e=t,new Promise((function(t){var n={},i=r.map((function(t){return t.createBufferSinks(e)}));Promise.all(i).then((function(e){e.forEach((function(e){e&&(n[e.getType()]=e)})),t(n)})).catch((function(){t(n)}))}));var e})).then((function(t){if(g=!1,0===r.length){var a="No streams to play.";k.error(new b.Z(I.MANIFEST_ERROR_ID_NOSTREAMS_CODE,a,D.getValue())),n.fatal(a)}else se();e&&H.createTracks(V),i(t)})).catch((function(e){s(e)}))}))}function K(t,i){var o,l=M.getAllMediaInfoForType(V,t),c=[],d=null;if(!l||0===l.length)return n.info("No "+t+" data."),Promise.resolve();t===a.Z.VIDEO&&(f=!0),t===a.Z.AUDIO&&(h=!0);for(var p=0,g=l.length;p0&&(j.setInitialMediaSettingsForType(t,V),H.addMediaInfosToBuffer(V,t,c)),l=l.filter((function(e){return!e.isEmbedded})),0===l.length)return Promise.resolve();if(t===a.Z.IMAGE)return(y=Ot(w).create({streamInfo:V,adapter:M,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:E,eventBus:C,events:u.Z,dashConstants:s.Z,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController})).initialize(),Promise.resolve();C.trigger(u.Z.STREAM_INITIALIZING,{streamInfo:V,mediaInfo:d}),j.setInitialMediaSettingsForType(t,V);var _=function(t,n){var i=t&&t.length>0?t[0]:null,s=m.getModel(i?i.type:null),o=i?i.type:null,l=i?i.mimeType:null,u=i?i.isFragmented:null,c=ie(w).create({streamInfo:V,type:o,mimeType:l,timelineConverter:x,adapter:M,manifestModel:D,mediaPlayerModel:N,fragmentModel:s,dashMetrics:e.dashMetrics,baseURLController:e.baseURLController,segmentBaseController:e.segmentBaseController,abrController:F,playbackController:U,mediaController:j,textController:H,errHandler:k,settings:Y,boxParser:T,segmentBlacklistController:v});c.initialize(n,f,u),r.push(c);for(var d=0;d0&&B.addInlineEvents(e,V.id)}}function se(){for(var e=r.length,t=p.audio||p.video?new b.Z(I.DATA_UPDATE_FAILED_ERROR_CODE,I.DATA_UPDATE_FAILED_ERROR_MESSAGE):null,n=0;n0&&e.Representation_asArray[0].ContentProtection)}function ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e||!e.hasOwnProperty("getStreamInfo"))return!1;var r=e.getStreamInfo(),i=n?n.getStreamInfo():te();if(!r||!i)return!1;var a=M.getAdaptationForType(r.index,t,r),s=M.getAdaptationForType(i.index,t,i);if(!a||!s)return!a&&!s;var o=a&&s&&a.mimeType===s.mimeType,l=s.Representation_asArray.map((function(e){return e.codecs})),u=a.Representation_asArray.map((function(e){return e.codecs})),c=u.some((function(e){return l.indexOf(e)>-1})),d=u.some((function(e){return l.some((function(t){return L.codecRootCompatibleWithCodec(t,e)}))}));return c||d&&o}function me(e){_=e}function ye(){return _}return t={initialize:function(){C.on(u.Z.BUFFERING_COMPLETED,oe,t),C.on(u.Z.DATA_UPDATE_COMPLETED,le,t),C.on(u.Z.INBAND_EVENTS,ue,t),q&&(C.on(u.Z.KEY_ERROR,re,t),C.on(u.Z.SERVER_CERTIFICATE_UPDATED,re,t),C.on(u.Z.LICENSE_REQUEST_COMPLETE,re,t),C.on(u.Z.KEY_SYSTEM_SELECTED,re,t),C.on(u.Z.KEY_SESSION_CREATED,re,t),C.on(u.Z.KEY_STATUSES_CHANGED,re,t)),H.initializeForStream(V),C.trigger(u.Z.STREAM_UPDATED,{streamInfo:V})},getStreamId:function(){return V?V.id:null},activate:function(e,t){return new Promise((function(n,r){if(!o)return ye()?(o=!0,C.trigger(u.Z.STREAM_ACTIVATED,{streamInfo:V}),void n(t)):void function(e,t){return Z(e,t)}(e,t).then((function(e){o=!0,C.trigger(u.Z.STREAM_ACTIVATED,{streamInfo:V}),n(e)})).catch((function(e){r(e)}));n(t)}))},deactivate:W,getIsActive:function(){return o},getDuration:function(){return V?V.duration:NaN},getStartTime:J,getId:ee,getStreamInfo:te,getHasAudioTrack:function(){return h},getHasVideoTrack:function(){return f},startPreloading:function(e,t){return new Promise((function(i,a){ye()?a():(n.info("[startPreloading] Preloading next stream with id ".concat(ee())),me(!0),Z(e,t).then((function(){for(var e=0;e0;){var e=A.pop(),t=e.newMediaInfo,r=ce(e.oldMediaInfo);if(!r)return;n.push(r.prepareTrackSwitch()),n.push(r.selectMediaInfo(t))}return Promise.all(n)})).then((function(){g=!1,se(),C.trigger(u.Z.STREAM_UPDATED,{streamInfo:V}),t()}))}))},reset:function(e){m&&(m.reset(),m=null),F&&V&&F.clearDataForStream(V.id),v&&(v.reset(),v=null),$(e),V=null,C.off(u.Z.DATA_UPDATE_COMPLETED,le,t),C.off(u.Z.BUFFERING_COMPLETED,oe,t),C.off(u.Z.INBAND_EVENTS,ue,t),q&&(C.off(u.Z.KEY_ERROR,re,t),C.off(u.Z.SERVER_CERTIFICATE_UPDATED,re,t),C.off(u.Z.LICENSE_REQUEST_COMPLETE,re,t),C.off(u.Z.KEY_SYSTEM_SELECTED,re,t),C.off(u.Z.KEY_SESSION_CREATED,re,t),C.off(u.Z.KEY_STATUSES_CHANGED,re,t))},getProcessors:fe,setMediaSource:function(e){return new Promise((function(t,i){for(var a=[],s=0;s1&&void 0!==arguments[1]?arguments[1]:null;return ge(e,a.Z.VIDEO,t)&&ge(e,a.Z.AUDIO,t)},isProtectionCompatible:function(e){return!e||he(a.Z.VIDEO,e)&&he(a.Z.AUDIO,e)},getPreloaded:ye,getIsEndedEventSignaled:function(){return S},setIsEndedEventSignaled:Q,getAdapter:function(){return M},getHasFinishedBuffering:function(){return c},setPreloaded:me,startScheduleControllers:function(){for(var e=r.length,t=0;t4&&i[e].shift()}function w(e,t){if(e&&e.request&&e.request.serviceLocation){var n=e.request.serviceLocation;-1===r[t].all.indexOf(n)&&r[t].all.push(n),r[t].current=n}}function C(){var e=h.getValue(),t=y.getContentSteering(e);return t||(t=g.getServiceDescriptionSettings().contentSteering),t}function R(){return new Promise((function(e){try{var a=C();if(!a||!a.serverUrl)return void e();var l=function(e){var t=e.serverUrl;n&&n.reloadUri&&(t=_.isRelative(n.reloadUri)?_.resolve(n.reloadUri,e.serverUrl):n.reloadUri);var a=[],s=r.baseUrl.all.concat(r.location.all);if(s.length>0){var o=s.map((function(e){var t=function(e){if(!e||!i[e]||0===i[e].length)return-1;var t=i[e].reduce((function(e,t){return e+t}))/i[e].length;return parseInt(t)}(e);return{serviceLocation:e,throughput:t}}));o.sort((function(e,t){return t.throughput-e.throughput}));var l="",u="";o.forEach((function(e,t){0!==t&&(l="".concat(l,","),e.throughput>-1&&(u="".concat(u,","))),l="".concat(l).concat(e.serviceLocation),e.throughput>-1&&(u="".concat(u).concat(e.throughput))})),a.push({key:"_DASH_pathway",value:'"'.concat(l,'"')}),a.push({key:"_DASH_throughput",value:u})}return je.Z.addAditionalQueryParameterToUrl(t,a)}(a),u=new Ut(l);o.load({request:u,success:function(t){!function(e){e&&e[s.Z.CONTENT_STEERING_RESPONSE.VERSION]&&1===parseInt(e[s.Z.CONTENT_STEERING_RESPONSE.VERSION])&&((n=new Bt).version=e[s.Z.CONTENT_STEERING_RESPONSE.VERSION],e[s.Z.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(e[s.Z.CONTENT_STEERING_RESPONSE.TTL])&&(n.ttl=e[s.Z.CONTENT_STEERING_RESPONSE.TTL]),e[s.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(n.reloadUri=e[s.Z.CONTENT_STEERING_RESPONSE.RELOAD_URI]),e[s.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(n.pathwayPriority=e[s.Z.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),e[s.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(n.pathwayClones=e[s.Z.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],n.pathwayClones=n.pathwayClones.filter((function(e){return function(e){return e[s.Z.CONTENT_STEERING_RESPONSE.BASE_ID]&&e[s.Z.CONTENT_STEERING_RESPONSE.ID]&&e[s.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&e[s.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][s.Z.CONTENT_STEERING_RESPONSE.HOST]}(e)}))),O())}(t),m.trigger(f.Z.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:n,url:l}),e()},error:function(r,i,a,s){!function(e,r){try{switch(t.warn("Error fetching data from content steering server",e),r.status){case 410:break;case 429:var i=r&&r.getResponseHeader?r.getResponseHeader("retry-after"):null;null!==i&&(n||(n={}),n.ttl=parseInt(i)),O();break;default:O()}}catch(e){t.error(e)}}(r,s),e(r)},complete:function(){r.baseUrl.all=D(r.baseUrl),r.location.all=D(r.location)}})}catch(t){e(t)}}))}function D(e){return e.all&&0!==e.all.length&&e.current?e.all.filter((function(t){return t===e.current})):[]}function N(e){try{var r=[];return e&&0!==e.length&&n&&n.pathwayClones&&0!==n.pathwayClones.length?(n.pathwayClones.forEach((function(t){var n=e.filter((function(e){return t[s.Z.CONTENT_STEERING_RESPONSE.BASE_ID]===e.serviceLocation})),i=null;if(n&&n.length>0&&(i=n[0]),i){var a=new URL(i.url),o=t[s.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][s.Z.CONTENT_STEERING_RESPONSE.HOST];o=je.Z.stringHasProtocol(o)?o:"".concat(a.protocol,"//").concat(o);var l={synthesizedUrl:"".concat(o).concat(a.pathname),serviceLocation:t[s.Z.CONTENT_STEERING_RESPONSE.ID],queryParams:t[s.Z.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][s.Z.CONTENT_STEERING_RESPONSE.PARAMS],reference:i};r.push(l)}})),r):r}catch(e){return t.error(e),[]}}function O(){n&&n.ttl&&!isNaN(n.ttl)&&(a&&clearTimeout(a),a=setTimeout((function(){R()}),1e3*n.ttl))}function P(){a&&clearTimeout(a),a=null}function M(){n=null,i={},r={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},P()}return e={reset:function(){M(),m.off(f.Z.FRAGMENT_LOADING_STARTED,T,e),m.off(f.Z.MANIFEST_LOADING_STARTED,E,e),m.off(f.Z.MANIFEST_LOADING_FINISHED,b,e),m.off(f.Z.THROUGHPUT_MEASUREMENT_STORED,S,e)},setConfig:function(e){e&&(e.adapter&&(y=e.adapter),e.errHandler&&(l=e.errHandler),e.dashMetrics&&(u=e.dashMetrics),e.mediaPlayerModel&&(c=e.mediaPlayerModel),e.requestModifier&&(p=e.requestModifier),e.manifestModel&&(h=e.manifestModel),e.serviceDescriptionController&&(g=e.serviceDescriptionController),e.eventBus&&(m=e.eventBus))},loadSteeringData:R,getCurrentSteeringResponseData:function(){return n},shouldQueryBeforeStart:function(){var e=C();return!!e&&e.queryBeforeStart},getSteeringDataFromManifest:C,stopSteeringRequestTimer:P,getSynthesizedBaseUrlElements:function(e){try{return N(e).map((function(e){var t=new Te(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t.dvbPriority=e.reference.dvbPriority,t.dvbWeight=e.reference.dvbWeight,t.availabilityTimeOffset=e.reference.availabilityTimeOffset,t.availabilityTimeComplete=e.reference.availabilityTimeComplete,t}))}catch(e){return t.error(e),[]}},getSynthesizedLocationElements:function(e){try{return N(e).map((function(e){var t=new Ne(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t}))}catch(e){return t.error(e),[]}},initialize:function(){o=yt(v).create({errHandler:l,dashMetrics:u,mediaPlayerModel:c,requestModifier:p,errors:I}),m.on(f.Z.FRAGMENT_LOADING_STARTED,T,e),m.on(f.Z.MANIFEST_LOADING_STARTED,E,e),m.on(f.Z.MANIFEST_LOADING_FINISHED,b,e),m.on(f.Z.THROUGHPUT_MEASUREMENT_STORED,S,e)}},t=(0,d.Z)(v).getInstance().getLogger(e),M(),e}jt.__dashjs_factory_name="ContentSteeringController";var qt=c.Z.getSingletonFactory(jt);function Ht(){var e,t,n,r=this.context,i=(0,C.Z)(r).getInstance();return e={select:function(e){if(!e||0===e.length)return null;var r=null;return i.get().streaming.applyContentSteering&&(r=function(e){var r=n.getCurrentSteeringResponseData();return r&&r.pathwayPriority&&r.pathwayPriority.length>0?function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,i=null,a=function(){var a=e[r],s=n.findIndex((function(e){return e.serviceLocation&&e.serviceLocation===a}));if(-1!==s&&!t.contains(n[s].serviceLocation))return i=n[s],"break";r+=1};r0&&void 0!==arguments[0]&&arguments[0];o=!0;var t=h.getValue(),n=t.url,r=null,i=g.getPatchLocation(t),a=p.select(i),s=null;if(a&&!e)n=a.url,r=a.serviceLocation,s=a.queryParams;else{var l=function(e){var t=g.getLocation(e),n=y.getSynthesizedLocationElements(t);return t.concat(n)}(t),u=p.select(l);u&&(n=u.url,r=u.serviceLocation,s=u.queryParams)}E.isRelative(n)&&(n=E.resolve(n,t.url)),c.load(n,r,s)}function C(e){if(e){if(g.getIsPatch(e)){var r=e;e=h.getValue();var l=g.isPatchValid(e,r),c=l;if(l){var d=g.getPublishTime(e);c=g.applyPatchToManifest(e,r);var f=g.getPublishTime(e);c=d.getTime()!=f.getTime()}if(!c)return t.debug("Patch provided is invalid, performing full manifest refresh"),void w(!0);e.loadedTime=new Date}}else(e=h.getValue()).loadedTime=new Date;if(h.getValue()&&h.getValue().type===s.Z.DYNAMIC&&e.type===s.Z.STATIC)return T.trigger(u.Z.DYNAMIC_TO_STATIC),o=!1,void(a=!0);h.setValue(e);var p=new Date,m=(p.getTime()-e.loadedTime.getTime())/1e3;1e3*(n=g.getManifestUpdatePeriod(e,m))>2147483647&&(n=2147483.647),T.trigger(u.Z.MANIFEST_UPDATED,{manifest:e}),t.info("Manifest has been refreshed at "+p+"["+p.getTime()/1e3+"] "),i||A()}function R(){i||(o?A(v.get().streaming.manifestUpdateRetryInterval):w())}function D(e){e.error?e.error.code===I.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&m.error(e.error):C(e.manifest)}function N(){i=!1,A()}function O(){(i=!v.get().streaming.scheduling.scheduleWhilePaused)&&S()}function P(){o=!1}return e={initialize:function(){b(),T.on(u.Z.STREAMS_COMPOSED,P,this),T.on(f.Z.PLAYBACK_STARTED,N,this),T.on(f.Z.PLAYBACK_PAUSED,O,this),T.on(u.Z.INTERNAL_MANIFEST_LOADED,D,this)},setManifest:function(e){C(e)},refreshManifest:w,getIsUpdating:function(){return o},setConfig:function(e){e&&(e.manifestModel&&(h=e.manifestModel),e.adapter&&(g=e.adapter),e.manifestLoader&&(c=e.manifestLoader),e.errHandler&&(m=e.errHandler),e.locationSelector&&(p=e.locationSelector),e.settings&&(v=e.settings),e.contentSteeringController&&(y=e.contentSteeringController))},reset:function(){T.off(f.Z.PLAYBACK_STARTED,N,this),T.off(f.Z.PLAYBACK_PAUSED,O,this),T.off(u.Z.STREAMS_COMPOSED,P,this),T.off(u.Z.INTERNAL_MANIFEST_LOADED,D,this),b()}},t=(0,d.Z)(_).getInstance().getLogger(e),p=Gt(_).create(),e}Vt.__dashjs_factory_name="ManifestUpdater";var Yt=c.Z.getClassFactory(Vt);function Zt(){var e,t,n,r,i,a,s,o,c,f,h,p,g,m,y,v,_=this.context,T=(0,l.Z)(_).getInstance(),E=(0,X.Z)(_).getInstance();function S(){o=[],c=[],f=null,h=null,g=null,p=NaN,n=!1,r=!1,m=i.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function A(){i.get().streaming.utcSynchronization.enabled&&!n&&!r&&g&&g.value&&g.schemeIdUri&&!isNaN(p)&&!isNaN(i.get().streaming.utcSynchronization.backgroundAttempts)&&(h&&(Date.now()-h)/1e3<30||(o=[],r=!0,w(isNaN(i.get().streaming.utcSynchronization.backgroundAttempts)?2:i.get().streaming.utcSynchronization.backgroundAttempts)))}function w(e){try{if(e<=0)return void B();var t=Date.now();a[g.schemeIdUri](g.value,(function(n){var r=Date.now(),i=D(t,r,n);o.push(i),w(e-1)}),(function(){B()}))}catch(e){B()}}function C(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||0;if(!c||0===c.length||e>=c.length)N();else{var t=c[e];if(t)if(a.hasOwnProperty(t.schemeIdUri)){var n=(new Date).getTime();a[t.schemeIdUri](t.value,(function(e){var r=(new Date).getTime(),i=D(n,r,e);g=t,N(i)}),(function(){C(e+1)}))}else C(e+1);else N()}}function D(e,t,n){return n-(t-(t-e)/2)}function N(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN,t=isNaN(e);t&&i.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?function(){var e=s.getLatestMPDRequestHeaderValueByID("Date"),t=null!==e?new Date(e).getTime():Number.NaN;isNaN(t)?U(!0):U(!1,t-Date.now())}():U(t,e)}function O(e){var t=Date.parse(e);return isNaN(t)&&(t=function(e){var t,n,r=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(e);return t=Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10),r[6]&&(parseInt(r[6],10)||0),r[7]&&1e3*parseFloat(r[7])||0),r[9]&&r[10]&&(n=60*parseInt(r[9],10)+parseInt(r[10],10),t+=("+"===r[8]?-1:1)*n*60*1e3),new Date(t).getTime()}(e)),t}function P(e){return Date.parse(e)}function M(e){return Date.parse(e)}function x(e,t,n){n()}function L(e,t,n){var r=O(e);isNaN(r)?n():t(r)}function k(e,t,n,r,i){var a,s,o=!1,l=new XMLHttpRequest,u=i?R.w.HEAD:R.w.GET,c=t.match(/\S+/g);if(t=c.shift(),a=function(){o||(o=!0,c.length?k(e,c.join(" "),n,r,i):r())},s=function(){var t,r;200===l.status&&(t=i?l.getResponseHeader("Date"):l.response,r=e(t),isNaN(r)||(n(r),o=!0))},E.isRelative(t)){var d=v.resolve();d&&(t=E.resolve(t,d.url))}l.open(u,t),l.timeout=5e3,l.onload=s,l.onloadend=a,l.send()}function F(e,t,n){k(M,e,t,n,!0)}function U(e,r){if(isNaN(p)||isNaN(r)||e||function(e){try{var n,r=j(e),a=isNaN(m)?30:m,s=isNaN(i.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:i.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,o=isNaN(i.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:i.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,l=isNaN(i.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:i.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;r?(n=Math.min(a*s,o),t.debug("Increasing timeBetweenSyncAttempts to ".concat(n))):(n=Math.max(a/s,l),t.debug("Decreasing timeBetweenSyncAttempts to ".concat(n))),m=n}catch(e){}}(r),!e&&!isNaN(r)){f=Date.now(),n=!1;var a=isNaN(p);p=r,a&&A(),t.debug("Completed UTC sync. Setting client - server offset to ".concat(r))}e&&(g=null,n=!1,y.error(new b.Z(I.TIME_SYNC_FAILED_ERROR_CODE,I.TIME_SYNC_FAILED_ERROR_MESSAGE))),T.trigger(u.Z.UPDATE_TIME_SYNC_OFFSET,{offset:r}),T.trigger(u.Z.TIME_SYNCHRONIZATION_COMPLETED)}function B(){if(o&&0!==o.length){var e=o.reduce((function(e,t){return e+t}),0)/o.length;j(e)?t.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(t.debug("Completed background UTC sync. Setting client - server offset to ".concat(e)),p=e,T.trigger(u.Z.UPDATE_TIME_SYNC_OFFSET,{offset:p})),r=!1,h=Date.now()}}function j(e){try{if(isNaN(p))return!0;var t=i.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(i.get().streaming.utcSynchronization.maximumAllowedDrift)?i.get().streaming.utcSynchronization.maximumAllowedDrift:100;return e>=p-t&&e<=p+t}catch(e){return!0}}return e={initialize:function(){S(),a={"urn:mpeg:dash:utc:http-head:2014":F,"urn:mpeg:dash:utc:http-xsdate:2014":k.bind(null,O),"urn:mpeg:dash:utc:http-iso:2014":k.bind(null,P),"urn:mpeg:dash:utc:direct:2014":L,"urn:mpeg:dash:utc:http-head:2012":F,"urn:mpeg:dash:utc:http-xsdate:2012":k.bind(null,O),"urn:mpeg:dash:utc:http-iso:2012":k.bind(null,P),"urn:mpeg:dash:utc:direct:2012":L,"urn:mpeg:dash:utc:http-ntp:2014":x,"urn:mpeg:dash:utc:ntp:2014":x,"urn:mpeg:dash:utc:sntp:2014":x}},attemptSync:function(e,t){c=e,n||(function(e){try{if(!e||!i.get().streaming.utcSynchronization.enabled)return!1;var t=isNaN(m)?30:m;return!(f&&t&&!isNaN(t))||(Date.now()-f)/1e3>=t}catch(e){return!0}}(t)?(n=!0,C()):T.trigger(u.Z.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(e){e&&(e.dashMetrics&&(s=e.dashMetrics),e.baseURLController&&(v=e.baseURLController),e.errHandler&&(y=e.errHandler),e.settings&&(i=e.settings))},reset:function(){S(),T.off(u.Z.ATTEMPT_BACKGROUND_SYNC,A,e)}},t=(0,d.Z)(_).getInstance().getLogger(e),T.on(u.Z.ATTEMPT_BACKGROUND_SYNC,A,e),e}Zt.__dashjs_factory_name="TimeSyncController";var Kt=c.Z.getSingletonFactory(Zt);Kt.HTTP_TIMEOUT_MS=5e3,c.Z.updateSingletonFactory(Zt.__dashjs_factory_name,Kt);var zt=Kt;function Wt(){var e,t,n,r,i,a=this.context,s=(0,l.Z)(a).getInstance();return e={attachMediaSource:function(e){var n=window.URL.createObjectURL(t);return e.setSource(n),"managedMediaSource"===r&&(e.setDisableRemotePlayback(!0),t.addEventListener("startstreaming",(function(){s.trigger(f.Z.MANAGED_MEDIA_SOURCE_START_STREAMING)})),t.addEventListener("endstreaming",(function(){s.trigger(f.Z.MANAGED_MEDIA_SOURCE_END_STREAMING)}))),n},createMediaSource:function(){var e="WebKitMediaSource"in window,n="MediaSource"in window;return"ManagedMediaSource"in window?(t=new ManagedMediaSource,r="managedMediaSource",i.info("Created ManagedMediaSource")):n?(t=new MediaSource,r="mediaSource",i.info("Created MediaSource")):e&&(t=new WebKitMediaSource,i.info("Created WebkitMediaSource")),t},detachMediaSource:function(e){e.setSource(null)},setConfig:function(e){e&&e.settings&&(n=e.settings)},setDuration:function e(r){t&&"open"===t.readyState&&(null===r&&isNaN(r)||t.duration!==r&&(r!==1/0||n.get().streaming.buffer.mediaSourceDurationInfinity||(r=Math.pow(2,32)),function(e){for(var t=e.sourceBuffers,n=0;n=0&&e0?Math.max(0,i):0,b(r,i,e),b(n,i,e),S(r),S(n),a=e,c=!1}}catch(e){c=!1,t.error(e)}}function b(e,n,r){try{C(e,(function(i){if(void 0!==i){var a=isNaN(i.duration)?0:i.duration;i.calculatedPresentationTime<=r&&i.calculatedPresentationTime+n+a>=r?D(i,f.Z.EVENT_MODE_ON_START):(R(r,a+n,i.calculatedPresentationTime)||function(e){try{var n=e.eventStream.period.start+e.eventStream.period.duration;return e.calculatedPresentationTime>n}catch(e){return t.error(e),!1}}(i))&&(t.debug("Removing event ".concat(i.id," from period ").concat(i.eventStream.period.id," as it is expired or invalid")),function(e,n){try{var r=n.eventStream.schemeIdUri,i=n.eventStream.period.id,a=n.eventStream.value,s=n.id;e[i][r]=e[i][r].filter((function(e){return a&&e.eventStream.value&&e.eventStream.value!==a||e.id!==s})),0===e[i][r].length&&delete e[i][r]}catch(e){t.error(e)}}(e,i))}}))}catch(e){t.error(e)}}function S(e){try{for(var n in e)e.hasOwnProperty(n)&&0===Object.keys(e[n]).length&&delete e[n]}catch(e){t.error(e)}}function A(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.eventStream.schemeIdUri,i=e.eventStream.value,a=e.id,s="discarded";t[r]||(t[r]=[]);var o=t[r].findIndex((function(e){return(!i||e.eventStream.value&&e.eventStream.value===i)&&e.id===a}));if(-1===o)t[r].push(e),e.triggeredReceivedEvent=!1,e.triggeredStartEvent=!1,s=m;else if(n){var l=t[r][o];e.triggeredReceivedEvent=l.triggeredReceivedEvent,e.triggeredStartEvent=l.triggeredStartEvent,t[r][o]=e,s=g}return s}function w(e){try{if(1==e.eventStream.value){var n,r=e.calculatedPresentationTime;n=4294967295==e.calculatedPresentationTime?NaN:e.calculatedPresentationTime+e.duration,v.trigger(f.Z.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:r,newDuration:n,newManifestValidAfter:NaN},{mode:f.Z.EVENT_MODE_ON_START})}}catch(e){t.error(e)}}function I(e){try{var n=o.getTime();C(e,(function(e){var t=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.duration)?e.eventStream.period.duration:NaN,r=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.start)?e.eventStream.period.start:NaN;if(!isNaN(t)&&!isNaN(r)){var i=e.calculatedPresentationTime;Math.abs(i-n)<300&&D(e,f.Z.EVENT_MODE_ON_START)}}))}catch(e){t.error(e)}}function C(e,n){try{if(e)for(var r=Object.keys(e),i=0;ir}catch(e){return t.error(e),!1}}function D(e,n){try{var r=o.getTime(),i=e.id;if(n===f.Z.EVENT_MODE_ON_RECEIVE&&!e.triggeredReceivedEvent)return t.debug("Received event ".concat(i)),e.triggeredReceivedEvent=!0,void v.trigger(e.eventStream.schemeIdUri,{event:e},{mode:n});e.triggeredStartEvent||(e.eventStream.schemeIdUri===p&&1==e.eventStream.value?0===e.duration&&0===e.presentationTimeDelta||(t.debug("Starting manifest refresh event ".concat(i," at ").concat(r)),function(){try{_(),s.refreshManifest()}catch(e){t.error(e)}}()):"urn:mpeg:dash:event:callback:2015"===e.eventStream.schemeIdUri&&1==e.eventStream.value?(t.debug("Starting callback event ".concat(i," at ").concat(r)),function(e){try{(0,se.Z)(y).create({}).load({method:"get",url:e,request:{responseType:"arraybuffer"}})}catch(e){t.error(e)}}(e.messageData)):(t.debug("Starting event ".concat(i," from period ").concat(e.eventStream.period.id," at ").concat(r)),v.trigger(e.eventStream.schemeIdUri,{event:e},{mode:n})),e.triggeredStartEvent=!0)}catch(e){t.error(e)}}return e={addInlineEvents:function(e,r){try{if(_(),n[r]||(n[r]={}),e)for(var i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&p.updateManifestUpdateInfo({currentTime:q.getTime(),buffered:j.getBufferRange(),presentationStartTime:e[0].start,clientTimeOffset:R.getClientTimeOffset()}),D.length>0&&function(e){0!==e.length?D=D.filter((function(n){var r=e.filter((function(e){return e.id===n.getId()})).length>0||n.getId()===N.getId();return r||(t.debug("Removing stream ".concat(n.getId())),n.reset(!0)),r})):t.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")}(e);for(var n=[],r=0,i=e.length;r2&&void 0!==arguments[2]&&arguments[2];function a(){if(B&&"open"===B.readyState){t.debug("MediaSource is open!"),window.URL.revokeObjectURL(r),B.removeEventListener("sourceopen",a),B.removeEventListener("webkitsourceopen",a),Le();var s=p.getCurrentDVRInfo();g.setSeekable(s.range.start,s.range.end),i?(isNaN(e)||q.seek(e,!0,!0),N.setMediaSource(B).then((function(){N.initializeForTextWithMediaSource(B)}))):ge(e,n)}}function s(){B.addEventListener("sourceopen",a,!1),B.addEventListener("webkitsourceopen",a,!1),r=g.attachMediaSource(j),t.debug("MediaSource attached to element. Waiting on open...")}B?n?ge(e,n):(g.detachMediaSource(j),s()):(B=g.createMediaSource(),s())}function ge(e,t){N.activate(B,t?W:void 0,e).then((function(t){if(t){var n=Object.keys(t);n.length>0&&t[n[0]].getBuffer().changeType&&($=!0),W=t}isNaN(e)||(se.trigger(u.Z.SEEK_TARGET,{time:e},{streamId:N.getId()}),q.seek(e,!1,!0),N.startScheduleControllers()),k=!1,se.trigger(u.Z.PERIOD_SWITCH_COMPLETED,{toStreamInfo:Ze()})}))}function me(e){var t=be(e.seekTime);t&&t!==N?t&&t!==N&&(ye(),function(e,t){var n=e&&!isNaN(e.seekTime)?e.seekTime:NaN,r=N.getProcessors().map((function(t){return t.prepareOuterPeriodPlaybackSeeking(e)}));Promise.all(r).then((function(){he(t,N,n)})).catch((function(e){C.error(e)}))}(e,t)):(ye(),function(e){N.getProcessors().forEach((function(t){return t.prepareInnerPeriodPlaybackSeeking(e)})),Ge(J.USER_REQUEST_STOP_REASON)}(e)),Ve(Q.SEEK_START_REASON)}function ye(){ve()}function ve(){X&&X.length>0&&(X.forEach((function(e){e.deactivate(!0)})),X=[])}function _e(e){if(e.newMediaInfo.streamInfo.id===N.getId()){if(ve(),ee.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&e.oldMediaInfo&&e.oldMediaInfo.codec!==e.newMediaInfo.codec){var t=q.getTime();return N.deactivate(!1),void pe(t,!1,!1)}N.prepareTrackChange(e)}}function Te(e,t){try{return ee.get().streaming.buffer.reuseExistingSourceBuffers&&(t.isProtectionCompatible(e)||te)&&($&&ee.get().streaming.buffer.useChangeTypeForTrackSwitch||t.isMediaCodecCompatible(e,t))}catch(e){return!1}}function Ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;B&&!e.getPreloaded()&&Te(e,t)&&e.startPreloading(B,W).then((function(){X.push(e)}))}function be(e){if(isNaN(e))return null;for(var t=D.length,n=0;nq.getLiveDelay())&&(Z=!1,Ve(Q.INITIAL_PLAYOUT_START_REASON),q.play())}e&&e.mediaType&&p.addBufferLevel(e.mediaType,new Date,1e3*e.bufferLevel)}function we(e){e.streamInfo.id===N.getId()&&e.reason&&e.reason.forceReplace&&ve(),Ke(e.streamInfo.id).prepareQualityChange(e)}function Ie(){if(h.getIsDynamic()&&0!==q.getOriginalLiveDelay()&&N){var e=h.getStreamsInfo();if(e.length>0){var t=e[0].manifestInfo,n=Be(e,t);q.computeAndSetLiveDelay(n,t)}}}function Ce(){if(qe()){var e=j.getPlaybackQuality();e&&p.addDroppedFrames(e)}}function Re(){t.debug("[onPlaybackStarted]"),!Z&&Y&&Ve(Q.RESUME_FROM_PAUSE_START_REASON),Z&&(Z=!1),K&&(K=!1,ee.get().streaming.applyContentSteering&&!y.shouldQueryBeforeStart()&&y.loadSteeringData()),Y=!1}function De(e){t.debug("[onPlaybackPaused]"),e.ended||(Y=!0,Ge(J.USER_REQUEST_STOP_REASON))}function Ne(e){t.debug("Stream with id ".concat(e.streamInfo.id," finished buffering"));var n=e.streamInfo.isLast;B&&n?(t.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),g.signalEndOfStream(B)):Oe()}function Oe(){if(N&&N.getHasFinishedBuffering())for(var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=e||N||null;if(t){var n=t.getStreamInfo();return D.filter((function(e){var t=e.getStreamInfo();return t.start>n.start&&n.id!==t.id}))}}catch(e){return[]}}(N),t=0;t0&&void 0!==arguments[0]?arguments[0]:null)||N||null;if(!e)return null;for(var t=e.getStreamInfo(),n=t.start,r=0,i=-1,a=NaN;r0&&(isNaN(a)||o=0?D[i]:null}();n?(t.debug("StreamController onEnded, found next stream with id ".concat(n.getStreamInfo().id,". Switching from ").concat(N.getStreamInfo().id," to ").concat(n.getStreamInfo().id)),he(n,N,NaN)):(t.debug("StreamController no next stream found"),N.setIsEndedEventSignaled(!1)),Ge(n?J.END_OF_PERIOD_STOP_REASON:J.END_OF_CONTENT_STOP_REASON)}e&&e.isLast&&(Pe(),y.stopSteeringRequestTimer())}function Le(e){var t=e||Ze().manifestInfo.duration;g.setDuration(t)}function ke(e){var t=T.getURIFragmentData();if(!t||!t.t)return NaN;var n=Qe()[0].getStreamInfo().start;return t.t=t.t.split(",")[0],Ue(e,t.t,n)}function Fe(e,t){var n=0;return e||(n=Qe()[0].getStreamInfo().start),Ue(e,t,n)}function Ue(e,t,n){var r=h.getRegularPeriods()[0],i=t.toString(),a=-1!==i.indexOf("posix:")?"now"===i.substring(6)?Date.now()/1e3:parseFloat(i.substring(6)):NaN;return e&&!isNaN(a)?R.calcPresentationTimeFromWallTime(new Date(1e3*a),r):parseFloat(i)+n}function Be(e,t){try{var n=NaN;if(t&&!isNaN(t.maxFragmentDuration)&&isFinite(t.maxFragmentDuration))return t.maxFragmentDuration;if(e&&1===e.length){var r=e[0],i=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT].reduce((function(e,t){var n=h.getMediaInfoForType(r,t);return n&&!1!==n.isFragmented&&e.push(n),e}),[]).reduce((function(e,t){var n=h.getVoRepresentations(t);return n&&n.length>0&&n.forEach((function(t){t&&e.push(t)})),e}),[]).reduce((function(e,t){var n=h.convertRepresentationToRepresentationInfo(t);return n&&n.fragmentDuration&&!isNaN(n.fragmentDuration)&&e.push(n.fragmentDuration),e}),[]);n=Math.max.apply(Math,function(e){if(Array.isArray(e))return en(e)}(s=i)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?en(e,t):void 0}}(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}return isFinite(n)?n:NaN}catch(e){return NaN}var s}function je(e){if(e.error)U=!0,Xe();else{t.info("Manifest updated... updating data system wide.");var n=e.manifest;h.updatePeriods(n);var i=h.getUTCTimingSources();!h.getIsDynamic()||i&&0!==i.length||se.trigger(f.Z.CONFORMANCE_VIOLATION,{level:Jt.LEVELS.WARNING,event:Jt.EVENTS.NO_UTC_TIMING_ELEMENT});var a=h.getIsDynamic()?i.concat(V.getUTCTimingSources()):i;r.filterUnsupportedFeatures(n).then((function(){v.initialize(n),m.attemptSync(a,h.getIsDynamic())}))}}function qe(){return!!N&&N.getHasVideoTrack()}function He(){return!!N&&N.getHasAudioTrack()}function Ge(e,t){t=t||new Date,Me().forEach((function(n){n.finalisePlayList(t,e)})),p.addPlayList()}function Ve(e){p.createPlaylistMetrics(1e3*q.getTime(),e)}function Ye(e){if(e.error){var n="";switch(e.error.code){case 1:n="MEDIA_ERR_ABORTED";break;case 2:n="MEDIA_ERR_NETWORK";break;case 3:n="MEDIA_ERR_DECODE",ie.counts.mediaErrorDecode+=1;break;case 4:n="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:n="MEDIA_ERR_ENCRYPTED";break;default:n="UNKNOWN"}"MEDIA_ERR_DECODE"===n&&ee.get().errors.recoverAttempts.mediaErrorDecode>=ie.counts.mediaErrorDecode?function(){t.warn("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");var e=q.getTime();N.deactivate(!1),t.warn("MediaSource has been resetted. Resuming playback from time ".concat(e)),pe(e,!1,!1)}():(F=!0,e.error.message&&(n+=" ("+e.error.message+")"),e.error.msExtendedCode&&(n+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),t.fatal("Video Element Error: "+n),e.error&&t.fatal(e.error),C.error(new b.Z(e.error.code,n)),Xe())}}function Ze(){return N?N.getStreamInfo():null}function Ke(e){for(var t=0,n=D.length;t1&&void 0!==arguments[1]?arguments[1]:NaN;oe(),re=t,s.load(e)},loadWithManifest:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;(function(){if(!i||!i.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")})(),re=t,i.setManifest(e)},getActiveStreamProcessors:Me,setConfig:function(e){e&&(e.capabilities&&(n=e.capabilities),e.capabilitiesFilter&&(r=e.capabilitiesFilter),e.manifestLoader&&(s=e.manifestLoader),e.manifestModel&&(c=e.manifestModel),e.mediaPlayerModel&&(G=e.mediaPlayerModel),e.customParametersModel&&(V=e.customParametersModel),e.protectionController&&(O=e.protectionController),e.adapter&&(h=e.adapter),e.dashMetrics&&(p=e.dashMetrics),e.errHandler&&(C=e.errHandler),e.timelineConverter&&(R=e.timelineConverter),e.videoModel&&(j=e.videoModel),e.playbackController&&(q=e.playbackController),e.serviceDescriptionController&&(H=e.serviceDescriptionController),e.contentSteeringController&&(y=e.contentSteeringController),e.textController&&(P=e.textController),e.abrController&&(E=e.abrController),e.mediaController&&(S=e.mediaController),e.settings&&(ee=e.settings),e.baseURLController&&(v=e.baseURLController),e.uriFragmentModel&&(T=e.uriFragmentModel),e.segmentBaseController&&(_=e.segmentBaseController),e.manifestUpdater&&(i=e.manifestUpdater))},setProtectionData:function(e){M=e,O&&O.setProtectionData(M)},getIsStreamSwitchInProgress:function(){return k},switchToVideoElement:function(e){N&&(q.initialize(Ze()),pe(e,!1,!0))},getHasMediaOrInitialisationError:function(){return F||U},getStreams:Qe,getActiveStream:function(){return N},getInitialPlayback:function(){return Z},getAutoPlay:function(){return L},refreshManifest:function(){i.getIsUpdating()||i.refreshManifest()},reset:Xe},t=(0,d.Z)(ae).getInstance().getLogger(e),m=zt(ae).getInstance(),g=Xt(ae).getInstance(),w=x(ae).getInstance(),We(),e}tn.__dashjs_factory_name="StreamController";var nn=c.Z.getSingletonFactory(tn);function rn(){var e,t,n,r,i,s,o,c,f,h,p,g,m=this.context,y=(0,l.Z)(m).getInstance();function v(){g.debug("Stopping the gap controller"),i&&(clearInterval(i),i=null),function(){y.off(u.Z.WALLCLOCK_TIME_UPDATED,S,this),y.off(u.Z.INITIAL_STREAM_SWITCH,b,this),y.off(u.Z.PLAYBACK_SEEKING,_,this),y.off(u.Z.BUFFER_REPLACEMENT_STARTED,T,e),y.off(u.Z.TRACK_CHANGE_RENDERED,E,e)}(),i=null,s=NaN,r=0,h=null,p={}}function _(){h&&(clearTimeout(h),h=null)}function T(e){try{if(e.streamId!==c.getActiveStreamInfo().id||e.mediaType!==a.Z.VIDEO&&e.mediaType!==a.Z.AUDIO)return;e.streamId===c.getActiveStreamInfo().id&&(p[e.mediaType]=!0)}catch(e){g.error(e)}}function E(e){e&&e.mediaType&&(p[e.mediaType]=!1)}function b(){i||function(){try{i||(g.debug("Starting the gap controller"),i=setInterval((function(){A()&&w(o.getTime())}),100))}catch(e){}}()}function S(){if(A(n.get().streaming.gaps.enableSeekFix)&&++r>=10){var e=o.getTime();t===e?w(e,!0):(t=e,s=NaN),r=0}}function A(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!c.getActiveStream())return!1;var t=Object.keys(p).some((function(e){return p[e]})),r=!!e&&function(){var e=c.getActiveStream(),t=parseFloat((e.getStartTime()+e.getDuration()).toFixed(5));return o.getTime()+n.get().streaming.gaps.threshold>=t}();return!t&&n.get().streaming.gaps.jumpGaps&&c.getActiveStreamProcessors().length>0&&(!o.isSeeking()||r)&&!o.isPaused()&&!c.getIsStreamSwitchInProgress()&&!c.getHasMediaOrInitialisationError()}function w(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n.get().streaming.gaps.enableStallFix,a=n.get().streaming.gaps.stallSeek,l=n.get().streaming.gaps.smallGapLimit,u=n.get().streaming.gaps.jumpLargeGaps,d=f.getBufferRange(),p=NaN,m=!1;if(t=function(e,t){try{if(!e||e.length<=1&&t>0)return NaN;for(var r=NaN,i=0;isNaN(r)&&i0?e.end(i-1):0;t0&&(v<=l||u)&&(p=y)}var _=o.getTimeToStreamEnd();if(isNaN(p)&&r&&isFinite(_)&&!isNaN(_)&&_=e.start(n)&&t<=e.end(n))return!0;return!1}(d,e)&&(0===a?(g.warn("Toggle play pause to break stall"),f.pause(),f.play()):(g.warn("Jumping ".concat(a,"s to break stall")),p=e+a)),p>0&&s!==p&&p>e&&!h){var T=p-e;if(m){var E=c.getStreamForTime(p),b=E&&!!E.getPreloaded();g.warn("Jumping to end of stream because of gap from ".concat(e," to ").concat(p,". Gap duration: ").concat(T)),o.seek(p,!0,b)}else{var S=o.getIsDynamic(),A=t>0?d.end(t-1):e,w=S?1e3*Math.max(0,T-.1):0;h=window.setTimeout((function(){o.seek(p,!0,!0),g.warn("Jumping gap occuring in period ".concat(c.getActiveStream().getStreamId()," starting at ").concat(A," and ending at ").concat(p,". Jumping by: ").concat(p-A)),h=null}),w)}s=p}}return e={reset:v,setConfig:function(e){e&&(e.settings&&(n=e.settings),e.playbackController&&(o=e.playbackController),e.streamController&&(c=e.streamController),e.videoModel&&(f=e.videoModel))},initialize:function(){!function(){y.on(u.Z.WALLCLOCK_TIME_UPDATED,S,this),y.on(u.Z.INITIAL_STREAM_SWITCH,b,this),y.on(u.Z.PLAYBACK_SEEKING,_,this),y.on(u.Z.BUFFER_REPLACEMENT_STARTED,T,e),y.on(u.Z.TRACK_CHANGE_RENDERED,E,e)}()}},g=(0,d.Z)(m).getInstance().getLogger(e),v(),e}rn.__dashjs_factory_name="GapController";var an=c.Z.getSingletonFactory(rn);function sn(){var e,t,n,r,i,s,c,h,p,g,m=this.context,y=(0,l.Z)(m).getInstance();function v(){t=!1;var e=je.Z.parseUserAgent();n=e&&e.browser&&e.browser.name&&"safari"===e.browser.name.toLowerCase()}function _(){t=!1}function T(e){if(e.streamId===s.getActiveStreamInfo().id&&p){var t=c.getLiveDelay();c.getBufferLevel()>t/2&&(p=!1)}}function E(e){e.streamId===s.getActiveStreamInfo().id&&(p=e.state===o.Z.BUFFER_EMPTY)}function b(){h.getCatchupModeEnabled()||r.setPlaybackRate(1)}function S(){c.getIsDynamic()&&h.getCatchupModeEnabled()&&(h.getCatchupPlaybackRates().max>0||h.getCatchupPlaybackRates().min<0)&&!c.isPaused()&&!c.isSeeking()&&function(){try{return!(!c.getTime()>0||t)&&(w()===a.Z.LIVE_CATCHUP_MODE_LOLP?function(e,t){try{return Math.abs(A())>0||e0}catch(e){return!1}}())}catch(e){return!1}}()&&function(){if(!t&&r){var e,s=r.getPlaybackRate(),o=h.getCatchupPlaybackRates(),l=c.getBufferLevel(),u=A(),d=h.getCatchupMaxDrift();if(!isNaN(d)&&d>0&&u>d)g.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),t=!0,c.seekToCurrentLive(!0,!1);else{var f=c.getCurrentLiveLatency(),m=c.getLiveDelay();e=w()===a.Z.LIVE_CATCHUP_MODE_LOLP?function(e,t,n,r,i){var a;if(i0&&(o=1),o}(o,f,m,l);var y=n?.25:.02/(.5/o.max);e&&Math.abs(s-e)>=y&&(g.debug("[CatchupController]: Setting playback rate to ".concat(e)),r.setPlaybackRate(e))}}}()}function A(){return c.getCurrentLiveLatency()-c.getLiveDelay()}function w(){var e=i.get().streaming.liveCatchup.playbackBufferMin;return i.get().streaming.liveCatchup.mode!==a.Z.LIVE_CATCHUP_MODE_LOLP||null===e||isNaN(e)?a.Z.LIVE_CATCHUP_MODE_DEFAULT:a.Z.LIVE_CATCHUP_MODE_LOLP}function I(){h.getCatchupPlaybackRates(!0)}return e={reset:function(){y.off(f.Z.BUFFER_LEVEL_UPDATED,T,e),y.off(f.Z.BUFFER_LEVEL_STATE_CHANGED,E,e),y.off(f.Z.PLAYBACK_PROGRESS,S,e),y.off(f.Z.PLAYBACK_TIME_UPDATED,S,e),y.off(f.Z.PLAYBACK_SEEKED,_,e),y.off(u.Z.SETTING_UPDATED_CATCHUP_ENABLED,b,e),y.off(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,I,e),y.off(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,I,e),y.off(f.Z.STREAM_INITIALIZED,I,e),v(),r.setPlaybackRate(1,!0)},setConfig:function(e){e&&(e.settings&&(i=e.settings),e.videoModel&&(r=e.videoModel),e.streamController&&(s=e.streamController),e.playbackController&&(c=e.playbackController),e.mediaPlayerModel&&(h=e.mediaPlayerModel))},initialize:function(){y.on(f.Z.BUFFER_LEVEL_UPDATED,T,e),y.on(f.Z.BUFFER_LEVEL_STATE_CHANGED,E,e),y.on(f.Z.PLAYBACK_PROGRESS,S,e),y.on(f.Z.PLAYBACK_TIME_UPDATED,S,e),y.on(f.Z.PLAYBACK_SEEKED,_,e),y.on(u.Z.SETTING_UPDATED_CATCHUP_ENABLED,b,e),y.on(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MIN,I,e),y.on(u.Z.SETTING_UPDATED_PLAYBACK_RATE_MAX,I,e),y.on(f.Z.STREAM_INITIALIZED,I,e),I()}},g=(0,d.Z)(m).getInstance().getLogger(e),v(),e}sn.__dashjs_factory_name="CatchupController";var on=c.Z.getSingletonFactory(sn),ln=[a.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME],un="video",cn="audio";function dn(){var e,t,n,r,i,o=this.context;function l(){t={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null},n=[]}function u(e,n,i){try{t[e][n]=i/1e3}catch(e){r.error(e)}}return e={getServiceDescriptionSettings:function(){return t},getProducerReferenceTimeOffsets:function(){return n},calculateProducerReferenceTimeOffsets:function(e){try{var t=[];if(e&&e.length>0){var o=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT],l=i.getAvailabilityStartTime()/1e3;e.forEach((function(e){var n=o.reduce((function(t,n){return t.concat(i.getAllMediaInfoForType(e,n))}),[]).reduce((function(t,n){return i.getProducerReferenceTimes(e,n).forEach((function(r){var a=i.getVoRepresentations(n);if(a&&a.length>0&&a[0].adaptation&&a[0].segmentInfoType===s.Z.SEGMENT_TEMPLATE){var o=a[0],u=new Date(r[s.Z.WALL_CLOCK_TIME]).getTime()/1e3-(r[s.Z.PRESENTATION_TIME]/o[s.Z.TIMESCALE]-o[s.Z.PRESENTATION_TIME_OFFSET]+e.start),c=l-u;t.push({id:r[s.Z.ID],to:c})}})),t}),[]);t=t.concat(n)}))}n=t}catch(e){r.error(e),n=[]}},applyServiceDescription:function(e){if(e&&e.serviceDescriptions){var i=e.serviceDescriptions.filter((function(e){return ln.includes(e.schemeIdUri)})),s=e.serviceDescriptions.filter((function(e){return null==e.schemeIdUri})),o=i.length>0?i[i.length-1]:s[s.length-1];o&&(o.latency&&o.latency.target>0&&function(e){var i;if(e.schemeIdUri,a.Z.SERVICE_DESCRIPTION_DVB_LL_SCHEME,i=function(e){return{liveDelay:e.latency.target/1e3,maxDrift:!isNaN(e.latency.max)&&e.latency.max>e.latency.target?(e.latency.max-e.latency.target+500)/1e3:NaN,referenceId:e.latency.referenceId||NaN}}(e),n.length>0){var s=function(e){var t,r=0,i=n.filter((function(t){return t.id===e.referenceId}));return 0===i.length?(r=n.length>0?n[0].to:0,t=n[0].id||NaN):(r=i[0].to||0,t=i[0].id||NaN),{to:r,id:t}}(i),o=s.to,l=s.id;t.liveDelay=i.liveDelay-o,t.liveCatchup.maxDrift=i.maxDrift,r.debug("\n Found latency properties coming from service description. Applied time offset of ".concat(o," from ProducerReferenceTime element with id ").concat(l,".\n Live Delay: ").concat(i.liveDelay-o,", Live catchup max drift: ").concat(i.maxDrift,"\n "))}else t.liveDelay=i.liveDelay,t.liveCatchup.maxDrift=i.maxDrift,r.debug("Found latency properties coming from service description: Live Delay: ".concat(i.liveDelay,", Live catchup max drift: ").concat(i.maxDrift))}(o),o.playbackRate&&function(e){var n=e.playbackRate.min?Math.round(1e3*(e.playbackRate.min-1))/1e3:NaN,i=e.playbackRate.max?Math.round(1e3*(e.playbackRate.max-1))/1e3:NaN;t.liveCatchup.playbackRate.min=n,t.liveCatchup.playbackRate.max=i,r.debug("Found latency properties coming from service description: Live catchup min playback rate: ".concat(n)),r.debug("Found latency properties coming from service description: Live catchup max playback rate: ".concat(i))}(o),o.operatingQuality,o.operatingBandwidth&&function(e){if(e&&e.operatingBandwidth&&e.operatingBandwidth.mediaType&&"all"!==e.operatingBandwidth.mediaType){var t={};t.minBandwidth=e.operatingBandwidth.min,t.maxBandwidth=e.operatingBandwidth.max,t.targetBandwidth=e.operatingBandwidth.target;var n=[];e.operatingBandwidth.mediaType===un||e.operatingBandwidth.mediaType===cn?n.push(e.operatingBandwidth.mediaType):"any"===e.operatingBandwidth.mediaType&&(n.push(cn),n.push(un)),n.forEach((function(e){isNaN(t.minBandwidth)||u("minBitrate",e,t.minBandwidth),isNaN(t.maxBandwidth)||u("maxBitrate",e,t.maxBandwidth),isNaN(t.targetBandwidth)||u("initialBitrate",e,t.targetBandwidth)}))}}(o),o.contentSteering&&function(e){t.contentSteering=e.contentSteering}(o))}},reset:function(){l()},setConfig:function(e){e&&e.adapter&&(i=e.adapter)}},r=(0,d.Z)(o).getInstance().getLogger(e),l(),e}dn.__dashjs_factory_name="ServiceDescriptionController";var fn=c.Z.getSingletonFactory(dn),hn=n(3973),pn=n.n(hn),gn=n(3039);function mn(){var e,t,n,r,i,s,o,c,f=this.context,h=(0,l.Z)(f).getInstance();function p(e,t){return e&&n[t]&&n[t][e]?n[t][e].list:[]}function g(e,t){return e&&n[t]&&n[t][e]?n[t][e].current:null}function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&e.streamInfo){var i=e.type,o=e.streamInfo.id,l=g(i,o);if(n[o]&&n[o][i]&&(n[o][i].current=e,n[o][i].current&&(i!==a.Z.TEXT&&!_(e,l)||i===a.Z.TEXT&&e.isFragmented)&&h.trigger(u.Z.CURRENT_TRACK_CHANGED,{oldMediaInfo:l,newMediaInfo:e,switchMode:r.get().streaming.trackSwitchMode[i]},{streamId:o}),!t)){var d=function(e){var t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration,codec:e.codec};return t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0?t:null}(e);if(!d||!n[o][i].storeLastSettings)return;d.roles&&(d.role=d.roles[0],delete d.roles),d.accessibility&&(d.accessibility=d.accessibility[0]),d.audioChannelConfiguration&&(d.audioChannelConfiguration=d.audioChannelConfiguration[0]),s[i]=d,c.setSavedMediaSettings(i,d)}}}function y(e,t){e&&t&&(i[e]=t)}function v(e){return e?i[e]:null}function _(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.id===t.id,r=e.viewpoint===t.viewpoint,i=JSON.stringify(e.viewpointsWithSchemeIdUri)===JSON.stringify(t.viewpointsWithSchemeIdUri),a=e.lang===t.lang,s=e.codec===t.codec,o=e.roles.toString()===t.roles.toString(),l=JSON.stringify(e.rolesWithSchemeIdUri)===JSON.stringify(t.rolesWithSchemeIdUri),u=e.accessibility.toString()===t.accessibility.toString(),c=JSON.stringify(e.accessibilitiesWithSchemeIdUri)===JSON.stringify(t.accessibilitiesWithSchemeIdUri),d=e.audioChannelConfiguration.toString()===t.audioChannelConfiguration.toString(),f=JSON.stringify(e.audioChannelConfigurationsWithSchemeIdUri)===JSON.stringify(t.audioChannelConfigurationsWithSchemeIdUri);return n&&s&&r&&i&&a&&o&&l&&u&&c&&d&&f}function T(){n={},s={},i={audio:null,video:null,text:null}}function E(e,t,n){var r=[];return e.forEach((function(e){t(n,e)&&r.push(e)})),0!==r.length?r:e}function b(e,t){try{return!e.lang||e.lang instanceof RegExp?t.lang.match(e.lang):""!==t.lang&&(0,gn.extendedFilter)(t.lang,pn()(e.lang)).length>0}catch(e){return!1}}function S(e,t){return void 0===e.index||null===e.index||t.index===e.index}function A(e,t){return!e.viewpoint||e.viewpoint===t.viewpoint}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!e.role||!!t.roles.filter((function(t){return t===e.role}))[0]||t.type===a.Z.AUDIO&&n}function I(e,t){return e.accessibility?!!t.accessibility.filter((function(t){return t===e.accessibility}))[0]:!t.accessibility.length}function C(e,t){return!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter((function(t){return t===e.audioChannelConfiguration}))[0]}function R(e,t){return!e.codec||e.codec===t.codec}function D(e){var t,n=0,r=[];return e.forEach((function(e){(t=Math.max.apply(Math,e.bitrateList.map((function(e){return e.bandwidth}))))>n?(n=t,r=[e]):t===n&&r.push(e)})),r}function N(e){var t,n=1/0,r=[];return e.forEach((function(e){var i=e.bitrateList.reduce((function(e,t){var n=Math.max(1,t.width*t.height);return e+t.bandwidth/n}),0);(t=i/e.bitrateList.length)n?(n=t,r=[e]):t===n&&r.push(e)})),r}function P(e,n){if(e===a.Z.TEXT)return n[0];var i,s=r.get().streaming.selectionModeForInitialTrack,l=o.getCustomInitialTrackSelectionFunction();if(l&&"function"==typeof l)i=l(n);else switch(s){case a.Z.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:i=function(e){var t,n,r=(t=0,n=[],e.forEach((function(e){isNaN(e.selectionPriority)||(e.selectionPriority>t?(t=e.selectionPriority,n=[e]):e.selectionPriority===t&&n.push(e))})),n);return r.length>1&&(r=D(r)),r.length>1&&(r=O(r)),r}(n);break;case a.Z.TRACK_SELECTION_MODE_HIGHEST_BITRATE:i=function(e){var t=D(e);return t.length>1&&(t=O(t)),t}(n);break;case a.Z.TRACK_SELECTION_MODE_FIRST_TRACK:i=M(n);break;case a.Z.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:i=function(e){var t=N(e);return t.length>1&&(t=D(t)),t}(n);break;case a.Z.TRACK_SELECTION_MODE_WIDEST_RANGE:i=function(e){var t=O(e);return t.length>1&&(t=D(e)),t}(n);break;default:t.warn("Track selection mode ".concat(s," is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK")),i=M(n)}return i.length>0?i[0]:n[0]}function M(e){return e[0]}return e={setInitialMediaSettingsForType:function(e,t){var n=s[e]||v(e),r=p(e,t.id),i=[];n||((n=c.getSavedMediaSettings(e))&&delete n.codec,y(e,n)),r&&0!==r.length&&(n&&(i=E(i=Array.from(r),b,n),i=E(i,S,n),i=E(i,A,n),e===a.Z.AUDIO&&s[e]||(i=E(i,w,n)),i=E(i,I,n),i=E(i,C,n),i=E(i,R,n)),0===i.length?m(P(e,r),!0):i.length>1?m(P(e,i)):m(i[0]))},addTrack:function(e){if(e){var t=e.type;if((i=t)===a.Z.AUDIO||i===a.Z.VIDEO||i===a.Z.TEXT||i===a.Z.IMAGE){var i,s,o=e.streamInfo.id;n[o]||(n[o]={audio:{list:[],storeLastSettings:s=r.get().streaming.saveLastMediaSettingsForCurrentStreamingSession,current:null},video:{list:[],storeLastSettings:s,current:null},text:{list:[],storeLastSettings:s,current:null},image:{list:[],storeLastSettings:s,current:null}});for(var l=n[o][t].list,u=0,c=l.length;u2&&void 0!==arguments[2]&&arguments[2];try{var r=!1;if(e.lang){if(e.lang instanceof RegExp)r=t.lang.match(e.lang);else if(""!==t.lang){var i=pn()(e.lang);i&&(r=(0,gn.extendedFilter)(t.lang,i).length>0)}}else r=!0;var s=void 0===e.index||null===e.index||t.index===e.index,o=!e.viewpoint||e.viewpoint===t.viewpoint,l=!e.role||!!t.roles.filter((function(t){return t===e.role}))[0],u=!e.accessibility||!!t.accessibility.filter((function(t){return t===e.accessibility}))[0],c=!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter((function(t){return t===e.audioChannelConfiguration}))[0];return r&&s&&o&&(l||t.type===a.Z.AUDIO&&n)&&u&&c}catch(e){return!1}},matchSettingsLang:b,matchSettingsIndex:S,matchSettingsViewPoint:A,matchSettingsRole:w,matchSettingsAccessibility:I,matchSettingsAudioChannelConfig:C,saveTextSettingsDisabled:function(){c.setSavedMediaSettings(a.Z.TEXT,null)},setConfig:function(e){e&&(e.domStorage&&(c=e.domStorage),e.settings&&(r=e.settings),e.customParametersModel&&(o=e.customParametersModel))},reset:T},t=(0,d.Z)(f).getInstance().getLogger(e),T(),e}mn.__dashjs_factory_name="MediaController";var yn=c.Z.getSingletonFactory(mn);c.Z.updateSingletonFactory(mn.__dashjs_factory_name,yn);var vn=yn,_n=NaN,Tn=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={baseUrls:t||null,selectedIdx:n||_n},this.children=[]};function En(){var e,t,n,r,i=this.context,a=Re(i).getInstance();function s(e,t,n){var r=o(n);e[t]?a.areEqual(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=_n):e[t]=new Tn(r)}function o(e){var t=n.getBaseURLsFromElement(e),i=r.getSynthesizedBaseUrlElements(t);return i&&i.length>0&&(t=t.concat(i)),t}function l(e,n){var r=n||t;e(r.data),r.children&&r.children.forEach((function(t){return l(e,t)}))}function u(){t=new Tn}return e={reset:u,update:function(e){!function(e){!function(){if(!n||!n.hasOwnProperty("getBaseURLsFromElement")||!n.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();var r=o(e);a.areEqual(r,t.data.baseUrls)||(t.data.baseUrls=r,t.data.selectedIdx=_n),e&&e.Period_asArray&&e.Period_asArray.forEach((function(e,r){s(t.children,r,e),e.AdaptationSet_asArray&&e.AdaptationSet_asArray.forEach((function(e,i){s(t.children[r].children,i,e),e.Representation_asArray&&e.Representation_asArray.sort(n.getRepresentationSortFunction()).forEach((function(e,n){s(t.children[r].children[i].children,n,e)}))}))}))}(e)},getForPath:function(e){var n=t,r=[n.data];return e&&e.forEach((function(e){(n=n.children[e])&&r.push(n.data)})),r.filter((function(e){return e.baseUrls.length}))},invalidateSelectedIndexes:function(e){l((function(t){isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=_n)}))},setConfig:function(e){e.adapter&&(n=e.adapter),e.contentSteeringController&&(r=e.contentSteeringController)},getBaseUrls:function(e){return o(e)}},u(),e}En.__dashjs_factory_name="BaseURLTreeModel";var bn=c.Z.getClassFactory(En);function Sn(e){var t=(e=e||{}).blacklistController;return{select:function(e){return e&&function(e){var t,n,r=0,i=[],a=0;if((n=e.sort((function(e,t){var n=e.dvbPriority-t.dvbPriority;return isNaN(n)?0:n})).filter((function(e,t,n){return!t||n[0].dvbPriority&&e.dvbPriority&&n[0].dvbPriority===e.dvbPriority}))).length)return n.length>1&&(n.forEach((function(e){r+=e.dvbWeight,i.push(r)})),t=Math.floor(Math.random()*(r-1)),i.every((function(e,n){return a=n,!(t0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,i=NaN,a=function(){var a=e[r],s=t.findIndex((function(e){return e.serviceLocation&&e.serviceLocation===a}));if(-1!==s&&!n.contains(t[s].serviceLocation))return i=s,"break";r+=1};r0&&(n=i(r.defaultServiceLocationArray,e.baseUrls))}var a=t.getCurrentSteeringResponseData();return e.baseUrls&&e.baseUrls.length&&a&&a.pathwayPriority&&a.pathwayPriority.length&&(n=i(a.pathwayPriority,e.baseUrls)),n},setConfig:function(e){e.blacklistController&&(n=e.blacklistController),e.contentSteeringController&&(t=e.contentSteeringController)}},t=qt(r).getInstance(),e}Cn.__dashjs_factory_name="ContentSteeringSelector";var Rn=c.Z.getClassFactory(Cn);function Dn(){var e,t,n,r,i,a,s=this.context,o=(0,l.Z)(s).getInstance(),c=(0,C.Z)(s).getInstance();function d(){t.reset()}return e={chooseSelector:function(e){(0,K.PS)(e,"boolean"),a=e?r:n},select:function(e){if(e){if(c.get().streaming.applyContentSteering){var t=i.selectBaseUrlIndex(e);isNaN(t)||-1===t||(e.selectedIdx=t)}if(!isNaN(e.selectedIdx))return e.baseUrls[e.selectedIdx];var r=a.select(e.baseUrls);return r?(e.selectedIdx=e.baseUrls.indexOf(r),r):(o.trigger(u.Z.URL_RESOLUTION_FAILED,{error:new b.Z(I.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,I.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(a===n&&d()))}},reset:d,setConfig:function(e){e.selector&&(a=e.selector),e.contentSteeringSelector&&(i=e.contentSteeringSelector)}},t=xt(s).create({updateEventName:u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),n=In(s).create({blacklistController:t}),r=An(s).create({blacklistController:t}),(i=Rn(s).create()).setConfig({blacklistController:t}),a=n,e}Dn.__dashjs_factory_name="BaseURLSelector";var Nn=c.Z.getClassFactory(Dn);function On(){var e,t,n,r,i,a=this.context,s=(0,l.Z)(a).getInstance(),o=(0,X.Z)(a).getInstance();function c(e){n.update(e),r.chooseSelector(t.getIsDVB(e)),s.trigger(f.Z.BASE_URLS_UPDATED,{baseUrls:d(e)})}function d(e){return n.getBaseUrls(e)}return e={reset:function(){n.reset(),r.reset()},initialize:function(e){n.setConfig({adapter:t,contentSteeringController:i}),c(e)},resolve:function(e){var t=n.getForPath(e).reduce((function(e,t){var n=r.select(t);return n?(o.isRelative(n.url)?e.url=o.resolve(n.url,e.url):(e.url=n.url,e.serviceLocation=n.serviceLocation),e.availabilityTimeOffset=n.availabilityTimeOffset,e.availabilityTimeComplete=n.availabilityTimeComplete,e.queryParams=n.queryParams,e):new Te}),new Te);if(!o.isRelative(t.url))return t},setConfig:function(e){e.baseURLTreeModel&&(n=e.baseURLTreeModel),e.baseURLSelector&&(r=e.baseURLSelector),e.adapter&&(t=e.adapter),e.contentSteeringController&&(i=e.contentSteeringController)},getBaseUrls:d,update:c},n=bn(a).create(),r=Nn(a).create(),s.on(u.Z.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,(function(e){n.invalidateSelectedIndexes(e.entry)}),e),e}On.__dashjs_factory_name="BaseURLController";var Pn=c.Z.getClassFactory(On);function Mn(e){return Mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mn(e)}function xn(e,t){return xn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xn(e,t)}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(e)}var kn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xn(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Ln(t);if(n){var i=Ln(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!==Mn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this)).url=e||null,n.type=t||null,n.mediaType=a.Z.STREAM,n.responseType="",n}return i}(g.Z);function Fn(e){e=e||{};var t=this.context,n=(0,l.Z)(t).getInstance(),r=yt(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,errors:I});return{load:function(e,t,i){var a=function(r,a){t.resolved=!0,t.resolvedContent=r||null,n.trigger(u.Z.XLINK_ELEMENT_LOADED,{element:t,resolveObject:i,error:r||a?null:new b.Z(I.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,I.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+e)})};if("urn:mpeg:dash:resolve-to-zero:2013"===e)a(null,!0);else{var s=new kn(e,R.w.XLINK_EXPANSION_TYPE);r.load({request:s,success:function(e){a(e)},error:function(){a(null)}})}},reset:function(){r&&(r.abort(),r=null)}}}Fn.__dashjs_factory_name="XlinkLoader";var Un=c.Z.getClassFactory(Fn),Bn=function(e){function t(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function n(e){return"string"==typeof e?e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):e}function r(e,t,n,r){for(var i=0;i0&&r(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function a(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),r=t[5].split(".");if(n.setHours(t[3],t[4],r[0]),r.length>1&&n.setMilliseconds(r[1]),t[6]&&t[7]){var i=60*t[6]+Number(t[7]);i=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*i:i),n.setMinutes(n.getMinutes()-i-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function s(t,n,i,a){return!(1==n&&e.xmlElementsFilter.length>0)||r(e.xmlElementsFilter,t,i,a)}function o(n,l){if(9==n.nodeType){for(var u=new Object,c=n.childNodes,d=0;d0){var s=i.split(".#")[0];return r(e.datetimeAccessFormPaths,t,n,s)?a(t):t}return t}(u.__text,p,l+"."+p)),null!=u["#cdata-section"]&&(u.__cdata=u["#cdata-section"],delete u["#cdata-section"],"property"==e.arrayAccessForm&&delete u["#cdata-section_asArray"]),0==u.__cnt&&"text"==e.emptyNodeForm?u="":1==u.__cnt&&null!=u.__text?u=u.__text:1!=u.__cnt||null==u.__cdata||e.keepCData?u.__cnt>1&&null!=u.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==u.__text||""==u.__text.trim())&&delete u.__text:u=u.__cdata,delete u.__cnt,!e.enableToStringFunc||null==u.__text&&null==u.__cdata||(u.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),u}if(3==n.nodeType||4==n.nodeType)return n.nodeValue}function l(t,r,i,a){var s="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+r;if(null!=i)for(var o=0;o":">")}function u(e,t){return""}function c(t,n){return"property"==e.arrayAccessForm&&(i="_asArray",-1!==(r=n.toString()).indexOf(i,r.length-8))||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function;var r,i}function d(e){var t=0;if(e instanceof Object)for(var n in e)c(e,n)||t++;return t}function f(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||r(e.jsonPropertiesFilter,t,n,i)}function h(t){var n=[];if(t instanceof Object)for(var r in t)-1==r.toString().indexOf("__")&&0==r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function p(t){var r="";return t instanceof Object?r+=function(t){var r="";return null!=t.__cdata&&(r+=""),null!=t.__text&&(e.escapeMode?r+=n(t.__text):r+=t.__text),r}(t):null!=t&&(e.escapeMode?r+=n(t):r+=t),r}function g(e,t){return""===e?t:e+"."+t}function m(e,t,n,r){var i="";if(0==e.length)i+=l(e,t,n,!0);else for(var a=0;a0)for(var r in e)if(!c(e,r)&&(""==t||f(e,r,g(t,r)))){var i=e[r],a=h(i);null==i||null==i?n+=l(i,r,a,!0):i instanceof Object?i instanceof Array?n+=m(i,r,a,t):i instanceof Date?(n+=l(i,r,a,!1),n+=i.toISOString(),n+=u(i,r)):d(i)>0||null!=i.__text||null!=i.__cdata?(n+=l(i,r,a,!1),n+=y(i,g(t,r)),n+=u(i,r)):n+=l(i,r,a,!0):(n+=l(i,r,a,!1),n+=p(i),n+=u(i,r))}return n+p(e)}void 0===(e=e||{}).escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1),e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1),void 0===e.ignoreRoot&&(e.ignoreRoot=!1),this.parseXmlString=function(e){var t;if(window.ActiveXObject||window,void 0===e)return null;if(window.DOMParser){var n=new window.DOMParser;try{(t=n.parseFromString(e,"text/xml")).getElementsByTagNameNS("*","parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("")+2)),(t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?a(e):e},this.xml2json=function(e){return o(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return y(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}},jn="onLoad";function qn(e){e=e||{};var t,n,r,i,a,o,c=this.context,d=(0,l.Z)(c).getInstance(),f=(0,X.Z)(c).getInstance();function h(e,t,n){var r,i,a={};a.elements=e,a.type=t,a.resolveType=n,0===a.elements.length&&g(a);for(var s=0;s")+2),r=t.resolvedContent.substr(0,i)+""+t.resolvedContent.substr(i)+"",t.resolvedContent=a.xml_str2json(r)}(function(e){var t;for(t=0;t=0;s--){if(n=(t=e.elements[s]).type+"_asArray",t.resolvedContent){if(t.resolvedContent)for(o=0;o0&&r.run(i)}(e),"onActuate"===e.resolveType&&d.trigger(u.Z.XLINK_READY,{manifest:i}),e.resolveType===jn)switch(e.type){case s.Z.PERIOD:for(t=0;t=0;a--)(i=e[a]).hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===i["xlink:href"]&&e.splice(a,1);for(a=0;a=0}return!1}),(function(e){return String(e)}))}return i}(Zn);function Qn(e){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(e)}function Jn(e,t){return Jn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Jn(e,t)}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},er(e)}var tr=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/,nr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jn(e,t)}(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=er(t);if(n){var i=er(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!==Qn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,(function(e){for(var t=[s.Z.MIN_BUFFER_TIME,s.Z.MEDIA_PRESENTATION_DURATION,s.Z.MINIMUM_UPDATE_PERIOD,s.Z.TIMESHIFT_BUFFER_DEPTH,s.Z.MAX_SEGMENT_DURATION,s.Z.MAX_SUBSEGMENT_DURATION,s.Z.SUGGESTED_PRESENTATION_DELAY,s.Z.START,a.Z.START_TIME,s.Z.DURATION],n=t.length,r=0;r=0}return!1}),(function(e){return pn()(e)||String(e)}))}return i}(Zn);var vr=function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t,this._merge=(n=t)&&n.length&&n.charAt(0)===n.charAt(0).toUpperCase()}var t;return(t=[{key:"name",get:function(){return this._name}},{key:"merge",get:function(){return this._merge}}])&&function(e,t){for(var n=0;n-1?(g&&(t=g.createMssParser(),g.createMssFragmentProcessor(),g.registerEvents()),t):e.indexOf("MPD")>-1||e.indexOf("Patch")>-1?Dr(c).create({debug:d}):t}return t={load:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=new Date,l=new kn(e,R.w.MPD_TYPE);t&&(l.serviceLocation=t),a&&(l.queryParams=a),l.requestStartDate||(l.requestStartDate=s),h.trigger(u.Z.MANIFEST_LOADING_STARTED,{request:l}),r.load({request:l,success:function(t,r,a){var s,l,c;if(i)if(a&&a!==e?(l=p.parseBaseUrl(a),s=a):(p.isRelative(e)&&(e=p.resolve(e,window.location.href)),l=p.parseBaseUrl(e)),"No Content"!=r)if(null===o&&(o=v(t)),null!==o){i.setMatchers(o.getMatchers()),i.setIron(o.getIron());try{c=o.parse(t)}catch(t){return void h.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new b.Z(I.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,I.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))})}if(c){if(c.url=s||e,c.originalUrl||(c.originalUrl=c.url),f&&f.get().streaming.enableManifestDurationMismatchFix&&c.mediaPresentationDuration&&c.Period_asArray.length>1){var d=c.Period_asArray.reduce((function(e,t){return e+t.duration}),0);!isNaN(d)&&c.mediaPresentationDuration>d&&(n.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),c.mediaPresentationDuration=d)}c.baseUri=l,c.loadedTime=new Date,i.resolveManifestOnLoad(c),h.trigger(u.Z.ORIGINAL_MANIFEST_LOADED,{originalManifest:t})}else h.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new b.Z(I.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,I.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))})}else h.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new b.Z(I.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,I.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+"".concat(e))});else h.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(t,n,r){h.trigger(u.Z.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new b.Z(I.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,I.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+"".concat(e,", ").concat(r))})}})},reset:function(){h.off(u.Z.XLINK_READY,y,t),g&&g.reset(),i&&(i.reset(),i=null),r&&(r.abort(),r=null)}},n=d.getLogger(t),h.on(u.Z.XLINK_READY,y,t),r=yt(c).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,urlUtils:p,constants:a.Z,dashConstants:s.Z,errors:I,requestTimeout:e.settings.get().streaming.manifestRequestTimeout}),i=Hn(c).create({errHandler:m,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,requestModifier:e.requestModifier,settings:e.settings}),o=null,t}Nr.__dashjs_factory_name="ManifestLoader";var Or=c.Z.getClassFactory(Nr);function Pr(){var e=this.context,t=(0,l.Z)(e).getInstance();return{error:function(e){t.trigger(u.Z.ERROR,{error:e})}}}Pr.__dashjs_factory_name="ErrorHandler";var Mr=c.Z.getSingletonFactory(Pr),xr=n(1715);function Lr(){var e,t,n,r,i,s,o=this.context,c=(0,l.Z)(o).getInstance();function f(e,r){if(!r||!r.Period_asArray||0===r.Period_asArray.length)return Promise.resolve();var i=[];return r.Period_asArray.forEach((function(r){i.push(function(e,r){return new Promise((function(i){if(e&&e.AdaptationSet_asArray&&0!==e.AdaptationSet_asArray.length){var o=[];e.AdaptationSet_asArray.forEach((function(e){t.getIsTypeOf(e,r)&&o.push(function(e,r){return new Promise((function(i){if(e.Representation_asArray&&0!==e.Representation_asArray.length){var o=[],l=[];e.Representation_asArray.forEach((function(i,s){var u=t.getCodec(e,s,!1),c=function(e,t,n){switch(e){case a.Z.VIDEO:return function(e,t){return{codec:t,width:e.width||null,height:e.height||null,framerate:e.frameRate||null,bitrate:e.bandwidth||null}}(t,n);case a.Z.AUDIO:return function(e,t){var n=e.audioSamplingRate||null;return{codec:t,bitrate:e.bandwidth||null,samplerate:n}}(t,n);default:return null}}(r,i,u);l.push(c),o.push(n.supportsCodec(c,r))})),Promise.all(o).then((function(t){e.Representation_asArray=e.Representation_asArray.filter((function(e,n){return t[n]||s.debug("[Stream] Codec ".concat(l[n].codec," not supported ")),t[n]})),i()})).catch((function(){i()}))}else i()}))}(e,r))})),Promise.all(o).then((function(){e.AdaptationSet_asArray=e.AdaptationSet_asArray.filter((function(e){var t=e.Representation_asArray&&e.Representation_asArray.length>0;return t||(c.trigger(u.Z.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:e}),s.warn("AdaptationSet has been removed because of no supported Representation")),t})),i()})).catch((function(){i()}))}else i()}))}(r,e))})),Promise.all(i)}return e={setConfig:function(e){e&&(e.adapter&&(t=e.adapter),e.capabilities&&(n=e.capabilities),e.settings&&(r=e.settings),e.customParametersModel&&(i=e.customParametersModel))},filterUnsupportedFeatures:function(e){return new Promise((function(o){var l=[];l.push(f(a.Z.VIDEO,e)),l.push(f(a.Z.AUDIO,e)),Promise.all(l).then((function(){r.get().streaming.capabilities.filterUnsupportedEssentialProperties&&function(e){e&&e.Period_asArray&&0!==e.Period_asArray.length&&e.Period_asArray.forEach((function(e){e.AdaptationSet_asArray=e.AdaptationSet_asArray.filter((function(e){return!e.Representation_asArray||0===e.Representation_asArray.length||(e.Representation_asArray=e.Representation_asArray.filter((function(e){var r=t.getEssentialPropertiesForRepresentation(e);if(r&&r.length>0)for(var i=0;i0)}))}))}(e),function(e){var t=i.getCustomCapabilitiesFilters();t&&0!==t.length&&e&&e.Period_asArray&&0!==e.Period_asArray.length&&e.Period_asArray.forEach((function(e){e.AdaptationSet_asArray=e.AdaptationSet_asArray.filter((function(e){return!e.Representation_asArray||0===e.Representation_asArray.length||(e.Representation_asArray=e.Representation_asArray.filter((function(e){return!t.some((function(t){return!t(e)}))})),e.Representation_asArray&&e.Representation_asArray.length>0)}))}))}(e),o()})).catch((function(){o()}))}))}},s=(0,d.Z)(o).getInstance().getLogger(e),e}Lr.__dashjs_factory_name="CapabilitiesFilter";var kr=c.Z.getSingletonFactory(Lr),Fr=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null};function Ur(){var e;return{initialize:function(t){if(e=new Fr,!t)return null;var n=t.indexOf("#");if(-1!==n)for(var r=t.substr(n+1).split("&"),i=0,a=r.length;i0?(n&&t.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):e1?(n&&t.warn("Supplied maximum playback rate is out of range and will be limited to ".concat(1,": ").concat(200,"% playback speed.")),1):e}function l(){var e=a.get().streaming.buffer.stableBufferTime>0?a.get().streaming.buffer.stableBufferTime:a.get().streaming.buffer.fastSwitchEnabled?20:12,t=n.getLiveDelay();return!isNaN(t)&&t>0?Math.min(e,t):e}return e={getCatchupMaxDrift:function(){if(!isNaN(a.get().streaming.liveCatchup.maxDrift)&&a.get().streaming.liveCatchup.maxDrift>0)return a.get().streaming.liveCatchup.maxDrift;var e=r.getServiceDescriptionSettings();return e&&e.liveCatchup&&!isNaN(e.liveCatchup.maxDrift)&&e.liveCatchup.maxDrift>0?e.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return null!==a.get().streaming.liveCatchup.enabled?a.get().streaming.liveCatchup.enabled:n.getInitialCatchupModeActivated()},getStableBufferTime:l,getInitialBufferLevel:function(){var e=a.get().streaming.buffer.initialBufferLevel;return isNaN(e)||e<0?0:Math.min(l(),e)},getRetryAttemptsForType:function(e){var t=isNaN(a.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:a.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryAttempts[e]*t:a.get().streaming.retryAttempts[e]},getRetryIntervalsForType:function(e){var t=isNaN(a.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:a.get().streaming.retryIntervals.lowLatencyReductionFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryIntervals[e]/t:a.get().streaming.retryIntervals[e]},getCatchupPlaybackRates:function(e){var t=a.get().streaming.liveCatchup.playbackRate;if(!isNaN(t.min)||!isNaN(t.max))return{min:s(t.min,e),max:o(t.max,e)};var n=r.getServiceDescriptionSettings();if(n&&n.liveCatchup&&(!isNaN(n.liveCatchup.playbackRate.min)||!isNaN(n.liveCatchup.playbackRate.max))){var i=n.liveCatchup.playbackRate;return{min:s(i.min,e),max:o(i.max,e)}}return{min:-.5,max:.5}},getAbrBitrateParameter:function(e,t){try{var n=a.get().streaming.abr[e][t];if(!isNaN(n)&&-1!==n)return n;var i=r.getServiceDescriptionSettings();return i&&i[e]&&!isNaN(i[e][t])?i[e][t]:-1}catch(e){return-1}},setConfig:function(e){e.playbackController&&(n=e.playbackController),e.serviceDescriptionController&&(r=e.serviceDescriptionController)},reset:function(){}},t=(0,d.Z)(i).getInstance().getLogger(e),e}Gr.__dashjs_factory_name="MediaPlayerModel";var Vr=c.Z.getSingletonFactory(Gr),Yr=n(1767);function Zr(e){var t=(e=e||{}).abrController,n=e.switchHistory,r=e.droppedFramesHistory,i=e.currentRequest,a=e.useBufferOccupancyABR,s=e.useL2AABR,o=e.useLoLPABR,l=e.streamProcessor?e.streamProcessor.getScheduleController():null,u=e.streamProcessor?e.streamProcessor.getRepresentationInfo():null,c=e.videoModel?e.videoModel:null;function d(){return u?u.mediaInfo:null}return{getMediaType:function(){var e=d();return e?e.type:null},getMediaInfo:d,getDroppedFramesHistory:function(){return r},getCurrentRequest:function(){return i},getSwitchHistory:function(){return n},getStreamInfo:function(){var e=d();return e?e.streamInfo:null},getScheduleController:function(){return l},getAbrController:function(){return t},getRepresentationInfo:function(){return u},useBufferOccupancyABR:function(){return a},useL2AABR:function(){return s},useLoLPABR:function(){return o},getVideoModel:function(){return c}}}Zr.__dashjs_factory_name="RulesContext";var Kr=c.Z.getClassFactory(Zr),zr=n(2068);function Wr(){var e=[],t=[];return{push:function(n){n.newValue===zr.Z.NO_CHANGE&&(n.newValue=n.oldValue),e[n.oldValue]||(e[n.oldValue]={noDrops:0,drops:0,dropSize:0});var r=n.newValue-n.oldValue,i=r<0?1:0,a=i?-r:0,s=i?0:1;if(e[n.oldValue].drops+=i,e[n.oldValue].dropSize+=a,e[n.oldValue].noDrops+=s,t.push({idx:n.oldValue,noDrop:s,drop:i,dropSize:a}),t.length>8){var o=t.shift();e[o.idx].drops-=o.drop,e[o.idx].dropSize-=o.dropSize,e[o.idx].noDrops-=o.noDrop}},getSwitchRequests:function(){return e},reset:function(){e=[],t=[]}}}Wr.__dashjs_factory_name="SwitchRequestHistory";var Xr=c.Z.getClassFactory(Wr);function $r(){var e={},t={},n={};return{push:function(r,i,a){if(i){e[r]||(e[r]=[],t[r]=0,n[r]=0);var s=a&&a.droppedVideoFrames?a.droppedVideoFrames:0,o=a&&a.totalVideoFrames?a.totalVideoFrames:0,l=s-t[r];t[r]=s;var u=o-n[r];n[r]=o;var c=e[r];isNaN(i)||(c[i]?(c[i].droppedVideoFrames+=l,c[i].totalVideoFrames+=u):c[i]={droppedVideoFrames:l,totalVideoFrames:u})}},getFrameHistory:function(t){return e[t]},clearForStream:function(r){try{delete e[r],delete t[r],delete n[r]}catch(e){}},reset:function(){e={},t={},n={}}}}$r.__dashjs_factory_name="DroppedFramesHistory";var Qr=c.Z.getClassFactory($r);function Jr(e){var t,n,r,i,s,o=this.context,u=(e=e||{}).settings,c=(0,l.Z)(o).getInstance();function d(e,t,n,r){var i=Math.pow(.5,n/r.fast);e.fastEstimate=(1-i)*t+i*e.fastEstimate;var a=Math.pow(.5,n/r.slow);e.slowEstimate=(1-a)*t+a*e.slowEstimate,e.totalWeight+=n}function h(e,o,l){return u.get().streaming.abr.movingAverageMethod!==a.Z.MOVING_AVERAGE_SLIDING_WINDOW?function(e,t){var n=e?s.throughputHalfLife:s.latencyHalfLife,a=e?r[t]:i[t];if(!a||a.totalWeight<=0)return NaN;var o=a.fastEstimate/(1-Math.pow(.5,a.totalWeight/n.fast)),l=a.slowEstimate/(1-Math.pow(.5,a.totalWeight/n.slow));return e?Math.min(o,l):Math.max(o,l)}(e,o):function(e,r,i){var a=function(e,r,i){var a,s;if(e?(a=t[r],s=i?3:4):(a=n[r],s=4),a){if(s>=a.length)s=a.length;else if(e)for(var o=1;o=1.3||l<=1/1.3)&&(s+=1)===a.length)break}}else s=0;return s}(e,r,i),s=(e?t:n)[r];return 0!==a&&s&&0!==s.length?(s=s.slice(-a)).reduce((function(e,t){return e+t}))/s.length:NaN}(e,o,l)}function p(e,t){return h(!0,e,t)}function g(e){t[e]=t[e]||[],n[e]=n[e]||[],r[e]=r[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0},i[e]=i[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}function m(){t={},n={},r={},i={}}var y={push:function(e,o,l){if(o.trace&&o.trace.length){var h,p=o.tresponse.getTime()-o.trequest.getTime()||1,m=o._tfinish.getTime()-o.tresponse.getTime()||1,y=o.trace.reduce((function(e,t){return e+t.b[0]}),0),v=0;if(0!==(h=o._fileLoaderType&&o._fileLoaderType===a.Z.FILE_LOADER_TYPES.FETCH?o.trace.reduce((function(e,t){return e+t.d}),0):l?m:p+m)&&(v=Math.round(8*y/h)),o.cmsd){var _=o.cmsd.dynamic&&o.cmsd.dynamic.etp?o.cmsd.dynamic.etp:null;if(_){var T=u.get().streaming.cmsd.abr.etpWeightRatio;T>0&&T<=1&&(v=v*(1-T)+_*T)}}if(g(e),function(e,t,n){return e===a.Z.VIDEO?n0&&!t[e].hasCachedEntries)return;t[e].hasCachedEntries=!0}else t[e]&&t[e].hasCachedEntries&&function(e){delete t[e],delete n[e],delete r[e],delete i[e],g(e)}(e);t[e].push(v),c.trigger(f.Z.THROUGHPUT_MEASUREMENT_STORED,{throughput:v,mediaType:e,httpRequest:o}),t[e].length>20&&t[e].shift(),n[e].push(p),n[e].length>20&&n[e].shift(),d(r[e],v,.001*m,s.throughputHalfLife),d(i[e],p,1,s.latencyHalfLife)}},getAverageThroughput:p,getSafeAverageThroughput:function(e,t){var n=p(e,t);return isNaN(n)||(n*=u.get().streaming.abr.bandwidthSafetyFactor),n},getAverageLatency:function(e){return h(!1,e)},reset:m};return s={throughputHalfLife:{fast:3,slow:8},latencyHalfLife:{fast:1,slow:2}},m(),y}Jr.__dashjs_factory_name="ThroughputHistory";var ei=c.Z.getClassFactory(Jr);function ti(){var e,t,n,r,i,s,c,h,p,g,m,y,v,_,T,b,S,A,w,I,C,D,N,O,P,M,x,L=this.context,k=(0,d.Z)(L).getInstance(),F=(0,l.Z)(L).getInstance();function U(){i={},s={},h={},c={},I={},N={},O={},P={},void 0===g&&(g=!1),C&&C.reset(),w=void 0,C=void 0,D=void 0,clearTimeout(p),p=null}function B(t){var i=t.request.mediaType,a=t.streamId;if(i&&a&&c[a]&&x.get().streaming.abr.autoSwitchBitrate[i]){var s=c[a][i];if(s){var l=Kr(L).create({abrController:e,streamProcessor:s,currentRequest:t.request,useBufferOccupancyABR:N[i],useL2AABR:O[i],useLoLPABR:P[i],videoModel:_}),u=n.shouldAbandonFragment(l,a);u.quality>zr.Z.NO_CHANGE&&s.getFragmentModel().getRequests({state:E.FRAGMENT_MODEL_LOADING,index:t.request.index})[0]&&(h[a][i].state=o.Z.ABANDON_LOAD,I[a][i].reset(),I[a][i].push({oldValue:V(i,a),newValue:u.quality,confidence:1,reason:u.reason}),Y(i,r.getActiveStreamInfo(),u.quality,u.reason),clearTimeout(p),p=setTimeout((function(){h[a][i].state=o.Z.ALLOW_LOAD,p=null}),x.get().streaming.abandonLoadTimeout))}}}function j(e){e.mediaType===a.Z.VIDEO&&(void 0!==w&&C.push(e.streamId,w,_.getPlaybackQuality()),w=e.newQuality)}function q(e){var n,r;e.metric!==o.Z.HTTP_REQUEST||!e.value||e.value.type!==R.w.MEDIA_SEGMENT_TYPE||e.mediaType!==a.Z.AUDIO&&e.mediaType!==a.Z.VIDEO||D.push(e.mediaType,e.value,x.get().streaming.abr.useDeadTimeLatency),e.metric!==o.Z.BUFFER_LEVEL||e.mediaType!==a.Z.AUDIO&&e.mediaType!==a.Z.VIDEO||(n=e.mediaType,r=.001*e.value.level,x.get().streaming.abr.ABRStrategy===a.Z.ABR_STRATEGY_DYNAMIC&&function(e,n){try{var r=T.getStableBufferTime(),i=r,a=.5*r,s=N[e],o=n>(s?a:i);N[e]=o,o!==s&&(o?t.info("["+e+"] switching from throughput to buffer occupancy ABR rule (buffer: "+n.toFixed(3)+")."):t.info("["+e+"] switching from buffer occupancy to throughput ABR rule (buffer: "+n.toFixed(3)+")."))}catch(e){t.error(e)}}(n,r))}function H(e,n){try{var r;return i[n]=i[n]||{},i[n].hasOwnProperty(e)||(i[n][e]=0),r=function(e,t){var n=i[t][e],r=n;if(!c[t]||!c[t][e])return r;var a=G(e,t);void 0!==a&&(r=Math.max(n,a));var s=function(e,t){try{var n=T.getAbrBitrateParameter("maxBitrate",e);return n>-1?W(c[t][e].getMediaInfo(),n,t):void 0}catch(e){return}}(e,t);return void 0!==s&&(r=Math.min(r,s)),r}(e,n),r=function(e,t,n){var r=i[n][t],a=x.get().streaming.abr.maxRepresentationRatio[t];return isNaN(a)||a>=1||a<0?e:Math.min(e,Math.round(r*a))}(r,e,n),r=function(e,t,n){if(t!==a.Z.VIDEO||!x.get().streaming.abr.limitBitrateByPortal||!c[n]||!c[n][t])return e;g||$();var r=c[n][t].getStreamInfo(),i=v.getAdaptationForType(r.index,t,r).Representation_asArray,s=e;if(m>0&&y>0){for(;s>0&&i[s]&&m-1){var r=c[t][e].getMediaInfo(),i=X(r),a=W(r,n,t);return i[a]&&a1&&void 0!==arguments[1]?arguments[1]:null;try{return t||(t=r.getActiveStreamInfo().id),e&&c[t]&&c[t][e]&&t?(s[t]=s[t]||{},s[t].hasOwnProperty(e)||(s[t][e]=0),s[t][e]):0}catch(e){return 0}}function Y(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(t&&t.id&&e){var i=t.id,a=V(e,i);(0,K.SE)(n);var s=H(e,i);n!==a&&n>=0&&n<=s&&Z(e,a,n,s,r,i)}}function Z(e,n,r,i,a,o){if(e&&c[o]&&c[o][e]){var l=c[o][e].getStreamInfo(),d=l&&l.manifestInfo&&l.manifestInfo.isDynamic,f=M.getCurrentBufferLevel(e);t.info("Stream ID: "+o+" ["+e+"] switch from "+n+" to "+r+"/"+i+" (buffer: "+f+") "+(a?JSON.stringify(a):".")),s[o]=s[o]||{},s[o][e]=r;var h=z(o,e,r);F.trigger(u.Z.QUALITY_CHANGE_REQUESTED,{oldQuality:n,newQuality:r,reason:a,streamInfo:l,bitrateInfo:h,maxIdx:i,mediaType:e},{streamId:l.id,mediaType:e});var p=D.getAverageThroughput(e,d);isNaN(p)||A.setSavedBitrateSettings(e,p)}}function z(e,t,n){if(t&&c&&c[e]&&c[e][t]){var r=X(c[e][t].getMediaInfo());return r[n]?r[n]:null}return null}function W(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=e&&e.type?c[n][e.type].getRepresentationInfo():null;if(x.get().streaming.abr.useDeadTimeLatency&&r&&i&&i.fragmentDuration){r/=1e3;var a=i.fragmentDuration;if(r>a)return 0;t*=1-r/a}for(var s=X(e),o=s.length-1;o>=0;o--)if(1e3*t>=s[o].bitrate)return o;return 0}function X(e){var t=[];if(!e||!e.bitrateList)return t;for(var n,r=e.bitrateList,i=e.type,a=0,s=r.length;a1&&void 0!==arguments[1]?arguments[1]:null;if(t||(t=r.getActiveStreamInfo().id),e&&c&&c[t]&&c[t][e]){var n=H(e,t),i=X(c[t][e].getMediaInfo());return i[n]?i[n]:null}return null},getMinAllowedIndexFor:G,getMaxAllowedIndexFor:H,getInitialBitrateFor:function(e,t){if(function(){if(!A||!A.hasOwnProperty("getSavedBitrateSettings"))throw new Error(a.Z.MISSING_CONFIG_ERROR)}(),e===a.Z.TEXT)return NaN;var n=A.getSavedBitrateSettings(e),r=T.getAbrBitrateParameter("initialBitrate",e),i=x.get().streaming.abr.initialRepresentationRatio[e];if(-1===r)if(i>-1){var s=c[t][e].getStreamInfo(),o=v.getAdaptationForType(s.index,e,s).Representation_asArray;r=Array.isArray(o)?o[Math.max(Math.round(o.length*i)-1,0)].bandwidth/1e3:0}else r=isNaN(n)?e===a.Z.VIDEO?1e3:100:n;return r},getQualityFor:V,getAbandonmentStateFor:function(e,t){return h[e]&&h[e][t]?h[e][t].state:null},setPlaybackQuality:Y,checkPlaybackQuality:function(t,r){try{if(!(t&&c&&c[r]&&c[r][t]))return!1;if(C){var i=_.getPlaybackQuality();i&&C.push(r,w,i)}if(!x.get().streaming.abr.autoSwitchBitrate[t])return!1;var a=V(t,r),s=Kr(L).create({abrController:e,switchHistory:I[r][t],droppedFramesHistory:C,streamProcessor:c[r][t],currentValue:a,useBufferOccupancyABR:N[t],useL2AABR:O[t],useLoLPABR:P[t],videoModel:_}),l=G(t,r),u=H(t,r),d=n.getMaxQuality(s),f=d.quality;return void 0!==l&&(f>zr.Z.NO_CHANGE?f:a)u&&(f=u),I[r][t].push({oldValue:a,newValue:f}),f>zr.Z.NO_CHANGE&&f!==a&&(h[r][t].state===o.Z.ALLOW_LOAD||f0}function y(){if(n&&m()&&0===n.playbackRate){var e=document.createEvent("Event");e.initEvent("waiting",!0,!1),n.dispatchEvent(e)}}function v(e,t){n&&n.addEventListener(e,t)}function _(e,t){n&&n.removeEventListener(e,t)}function T(){return n?n.readyState:NaN}function E(){return n?n.buffered:null}function b(e,t,r,i,a){if(n)for(var s=0;s=e?(t(),null):function(e,t){var n=function n(){_(e,n),t(e)};return v(e,n),{func:n,event:e}}(ii.get(e),t)}return e={addEventListener:v,addTextTrack:function(e,t,r,i,a){if(!n)return null;var s=b(e,t,r,i,a);return s||((s=n.addTextTrack(e,t,r)).isEmbedded=a,s.isTTML=i),s},appendChild:function(e){n&&(n.appendChild(e),void 0!==e.isTTML&&(n.textTracks[n.textTracks.length-1].isTTML=e.isTTML,n.textTracks[n.textTracks.length-1].isEmbedded=e.isEmbedded))},getBufferRange:E,getClientHeight:function(){return n?n.clientHeight:NaN},getClientWidth:function(){return n?n.clientWidth:NaN},getElement:function(){return n},getEnded:function(){return n?n.ended:null},getPlaybackQuality:function(){if(!n)return null;var e="webkitDroppedFrameCount"in n&&"webkitDecodedFrameCount"in n,t=null;return"getVideoPlaybackQuality"in n?t=n.getVideoPlaybackQuality():e&&(t={droppedVideoFrames:n.webkitDroppedFrameCount,totalVideoFrames:n.webkitDroppedFrameCount+n.webkitDecodedFrameCount,creationTime:new Date}),t},getPlaybackRate:function(){return n?n.playbackRate:null},getPlayedRanges:function(){return n?n.played:null},getReadyState:T,getSource:function(){return n?n.src:null},getTTMLRenderingDiv:function(){return s},getTextTrack:b,getTextTracks:function(){return n?n.textTracks:[]},getTime:function(){return n?isNaN(r)?n.currentTime:r:null},getVideoHeight:function(){return n?n.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(n){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().left-e.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(n){var e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().top-e.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return n?n.videoWidth:NaN},getVttRenderingDiv:function(){return o},initialize:function(){h.on(u.Z.PLAYBACK_PLAYING,y,this)},isPaused:function(){return n?n.paused:null},isSeeking:function(){return n?n.seeking||!isNaN(r):null},isStalled:m,pause:function(){n&&(n.pause(),n.autoplay=!1)},play:function(){if(n){n.autoplay=!0;var e=n.play();e&&e.catch&&"undefined"!=typeof Promise&&e.catch((function(e){"NotAllowedError"===e.name&&h.trigger(u.Z.PLAYBACK_NOT_ALLOWED),t.warn("Caught pending play exception - continuing (".concat(e,")"))}))}},removeChild:function(e){n&&n.removeChild(e)},removeEventListener:_,reset:function(){clearTimeout(c),h.off(u.Z.PLAYBACK_PLAYING,y,this)},setCurrentTime:function(e,t){n&&(i&&i.func&&i.event&&_(i.event,i.func),r=e,i=S(a.Z.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,(function(){if(n)if(n.currentTime!==r)try{r=t?function(e){var t=E(),n=e,r=9999999999;if(t)for(var i=0;i=a&&e<=s)return e;o1&&void 0!==arguments[1]&&arguments[1])&&n.readyState<=2&&e>0?n.addEventListener("canplay",g):n.playbackRate=e)},setSource:function(e){n&&(e?n.src=e:(n.removeAttribute("src"),n.load()))},setStallState:function(e,t){!function(e,t){t?function(e){null!==e&&n&&!n.seeking&&-1===p.indexOf(e)&&p.push(e)}(e):function(e){var t=p.indexOf(e);null!==e&&-1!==t&&p.splice(t,1)}(e)}(e,t)},setTTMLRenderingDiv:function(e){(s=e).style.position="absolute",s.style.display="flex",s.style.overflow="hidden",s.style.pointerEvents="none",s.style.top=0,s.style.left=0},setVttRenderingDiv:function(e){o=e},waitForReadyState:S,setDisableRemotePlayback:function(e){n&&(n.disableRemotePlayback=e)}},t=(0,d.Z)(f).getInstance().getLogger(e),r=NaN,e}ai.__dashjs_factory_name="VideoModel";var si=c.Z.getSingletonFactory(ai),oi=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],li="dashjs_?_bitrate",ui="dashjs_?_settings",ci="localStorage",di="lastBitrate",fi="lastMediaSettings";function hi(e){e=e||{};var t,n,r,i=this.context,s=e.settings;function o(e){if(void 0!==r)return r;var t;r=!1;try{"undefined"!=typeof window&&(t=window[e])}catch(e){return n.warn("DOMStorage access denied: "+e.message),r}if(!t||e!==ci&&"sessionStorage"!==e)return r;try{t.setItem("1","1"),t.removeItem("1"),r=!0}catch(e){n.warn("DOMStorage is supported, but cannot be used: "+e.message)}return r}function l(){var e=6e5;return Math.round((new Date).getTime()/e)*e}function u(e,t){return o(e)&&s.get().streaming[t+"CachingInfo"].enabled}function c(){if(!s)throw new Error(a.Z.MISSING_CONFIG_ERROR)}return t={getSavedBitrateSettings:function(e){if(c(),!s.get().streaming.lastBitrateCachingInfo.enabled)return NaN;var t=NaN;if(u(ci,di)){var r=li.replace(/\?/,e);try{var i=JSON.parse(localStorage.getItem(r))||{},a=(new Date).getTime()-parseInt(i.timestamp,10)>=s.get().streaming.lastBitrateCachingInfo.ttl||!1,o=parseFloat(i.bitrate);isNaN(o)||a?a&&localStorage.removeItem(r):(t=o,n.debug("Last saved bitrate for "+e+" was "+o))}catch(e){return null}}return t},setSavedBitrateSettings:function(e,t){if(u(ci,di)&&t){var r=li.replace(/\?/,e);try{localStorage.setItem(r,JSON.stringify({bitrate:t.toFixed(3),timestamp:l()}))}catch(e){n.error(e.message)}}},getSavedMediaSettings:function(e){if(c(),!s.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;var t=null;if(u(ci,fi)){var n=ui.replace(/\?/,e);try{var r=JSON.parse(localStorage.getItem(n))||{},i=(new Date).getTime()-parseInt(r.timestamp,10)>=s.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;t=r.settings,i&&(localStorage.removeItem(n),t=null)}catch(e){return null}}return t},setSavedMediaSettings:function(e,t){if(u(ci,fi)){var r=ui.replace(/\?/,e);try{localStorage.setItem(r,JSON.stringify({settings:t,timestamp:l()}))}catch(e){n.error(e.message)}}}},n=(0,d.Z)(i).getInstance().getLogger(t),o(ci)&&oi.forEach((function(e){var t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(e){n.error(e.message)}}})),t}hi.__dashjs_factory_name="DOMStorage";var pi=c.Z.getSingletonFactory(hi),gi=n(2032),mi=n(2011);function yi(){var e,t,n,r,i,a,s,o,l,u,c,d,f,h=this.context;function p(e,n,i,a){var s=null,l=e?f.resolve(e.path):null,u=a||{init:!0,url:l?l.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:n};t.debug("Start searching for initialization.");var c=v(u);o.load({request:c,success:function(t){if(u.bytesLoaded=u.range.end,!(s=r.findInitRange(t)))return u.range.end=u.bytesLoaded+u.bytesToLoad,p(e,n,i,u);e.range=s,i(e)},error:function(){i(e)}}),t.debug("Perform init search: "+u.url)}function m(e,n,i,a,s,l){if(i&&(void 0===i.start||void 0===i.end)){var u=i?i.toString().split("-"):null;i=u?{start:parseFloat(u[0]),end:parseFloat(u[1])}:null}s=s||y;var c=null,d=null,h=!!i,p=e?f.resolve(e.path):null,g={init:!1,url:p?p.url:void 0,range:h?i:{start:0,end:1500},searching:!h,bytesLoaded:l?l.bytesLoaded:0,bytesToLoad:1500,mediaType:n},_=v(g);o.load({request:_,success:function(i){var o=g.bytesToLoad,l=i.byteLength;if(g.bytesLoaded=g.range.end-g.range.start,c=r.parse(i),(d=c.getBox("sidx"))&&d.isComplete){var u,f,h=d.references;if(null!=h&&h.length>0&&(u=1===h[0].reference_type),u){var p,y,v,_;t.debug("Initiate multiple SIDX load."),g.range.end=g.range.start+d.size;var T=[],E=0,b=(d.offset||g.range.start)+d.size,S=function(t){t?(T=T.concat(t),++E>=y&&(T.sort((function(e,t){return e.startTime-t.startTime<0?-1:0})),s(T,e,a))):s(null,e,a)};for(p=0,y=h.length;p16777215?(n.getUint32(r)!==e.tag&&(i=!1),a=4):e.tag>65535?(256*n.getUint16(r)+n.getUint8(r+2)!==e.tag&&(i=!1),a=3):e.tag>255?(n.getUint16(r)!==e.tag&&(i=!1),a=2):(n.getUint8(r)!==e.tag&&(i=!1),a=1),!i&&e.required&&!t)throw new Error("required tag not found");return i&&(r+=a),i}function a(e){var t=1,i=128,a=-1,s=0,o=n.getUint8(r),l=0;for(l=0;l<8;l+=1){if((o&i)===i){s=void 0===e?o&~i:o,a=l;break}i>>=1}for(l=0;l4)return function(e){for(var t=Math.floor(Number.MAX_SAFE_INTEGER/256),i=0,a=0;at)throw new Error("Value exceeds safe integer limit");i*=256;var s=n.getUint8(r+a);if(i>Number.MAX_SAFE_INTEGER-s)throw new Error("Value exceeds safe integer limit");i+=s}return r+=e,i}(e);for(var t=0,i=0;i>>0},moreData:function(){return r1&&a){var u=f(a,n);if(i[a.id]&&i[a.id][n])for(var d=0,h=l.length;d0))return l;o=r[0].mpd.manifest}var u=v(e,s),c=t.getAdaptationsForType(o,e?e.index:null,n);return l=d(o,u,e,c,n),n===a.TEXT&&(c=t.getAdaptationsForType(o,e?e.index:null,a.VIDEO),l=l.concat(d(o,u,e,c,n,!0))),l}function h(e){var n=p(e);return t.getRegularPeriods(n)}function p(e){var n=m(e);return t.getMpd(n)}function g(){r=[],i={}}function m(e){return e||(r.length>0?r[0].mpd.manifest:null)}function y(e){try{var n=v(e.streamInfo,r),i=t.getAdaptationsForPeriod(n);return e&&e.streamInfo&&void 0!==e.streamInfo.id&&i?i[e.index]:null}catch(e){return null}}function v(e,t){for(var n=t.length,r=0;r=0&&void 0!==o&&(n=t?"cea-608:"+t:"cea-608",l.embeddedCaptions=!0),n})),l.accessibilitiesWithSchemeIdUri=s,r=t.getAudioChannelConfigurationForAdaptation(u),l.audioChannelConfiguration=r.map((function(e){return e.value})),l.audioChannelConfigurationsWithSchemeIdUri=r,0===l.audioChannelConfiguration.length&&Array.isArray(u.Representation_asArray)&&u.Representation_asArray.length>0&&(i=t.getAudioChannelConfigurationForRepresentation(u.Representation_asArray[0]),l.audioChannelConfiguration=i.map((function(e){return e.value})),l.audioChannelConfigurationsWithSchemeIdUri=i),a=t.getRolesForAdaptation(u),l.roles=a.map((function(e){return e.value})),l.rolesWithSchemeIdUri=a,l.codec=t.getCodec(u),l.mimeType=t.getMimeType(u),l.contentProtection=t.getContentProtectionData(u),l.bitrateList=t.getBitrateListForAdaptation(u),l.selectionPriority=t.getSelectionPriority(u),l.contentProtection){var c=l.contentProtection.map((function(e){return t.getKID(e)})).filter((function(e){return null!==e}));if(c.length){var d=c[0];l.contentProtection.forEach((function(e){e.keyId=d}))}}if(l.isText=t.getIsText(u),l.supplementalProperties=t.getSupplementalPropertiesForAdaptation(u),(!l.supplementalProperties||0===Object.keys(l.supplementalProperties).length)&&Array.isArray(u.Representation_asArray)&&u.Representation_asArray.length>0){var f=u.Representation_asArray.map((function(e){return t.getSupplementalPropertiesForRepresentation(e)}));f.every((function(e){return JSON.stringify(e)===JSON.stringify(f[0])}))&&(l.supplementalProperties=f[0])}if(l.supplementalPropertiesAsArray=t.getSupplementalPropertiesAsArrayForAdaptation(u),(!l.supplementalPropertiesAsArray||0===l.supplementalPropertiesAsArray.length)&&Array.isArray(u.Representation_asArray)&&u.Representation_asArray.length>0){var h=u.Representation_asArray.map((function(e){return t.getSupplementalPropertiesAsArrayForRepresentation(e)}));h.every((function(e){return JSON.stringify(e)===JSON.stringify(h[0])}))&&(l.supplementalPropertiesAsArray=h[0])}return l.essentialProperties=t.getEssentialPropertiesForAdaptation(u),l.essentialPropertiesAsArray=t.getEssentialPropertiesAsArrayForAdaptation(u),l.isFragmented=t.getIsFragmented(u),l.isEmbedded=!1,l}function T(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type=a.TEXT,e.codec="cea-608-in-SEI",e.isEmbedded=!0,e.isFragmented=!1;var r=pn()(n);e.lang=r||n,e.roles=["caption"],e.rolesWithSchemeIdUri=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function E(e){var n,r,i=new Ci;return i.id=e.id,i.index=e.index,i.start=e.start,i.duration=e.duration,i.manifestInfo=(n=e.mpd,(r=new Ri).dvrWindowSize=n.timeShiftBufferDepth,r.loadedTime=n.manifest.loadedTime,r.availableFrom=n.availabilityStartTime,r.minBufferTime=n.manifest.minBufferTime,r.maxFragmentDuration=n.maxSegmentDuration,r.duration=t.getDuration(n.manifest),r.isDynamic=t.getIsDynamic(n.manifest),r.serviceDescriptions=t.getServiceDescriptions(n.manifest),r.protocol=n.manifest.protocol,r),i.isLast=1===e.mpd.manifest.Period_asArray.length||Math.abs(i.start+i.duration-i.manifestInfo.duration)<1,i}function b(){if(!a)throw new Error("setConfig function has to be called previously")}function S(e){return r.length>0?r[0].mpd.manifest.Period_asArray[e]:null}function A(e,t,n){var r,i,a,s,o;if(e)for(r=e.AdaptationSet_asArray,s=0;s0?e.segments[0].duration:NaN),n.MSETimeOffset=e.MSETimeOffset,n.mediaInfo=_(e.adaptation),n}return null},getStreamsInfo:function(e,t){var n=[],i=r;if(e&&(b(),i=h(e)),i.length>0){(!t||t>i.length)&&(t=i.length);for(var a=0;a0&&s&&(a=i?t.getAdaptationForId(i,r[0].mpd.manifest,s.index):t.getAdaptationForIndex(n?n.index:null,r[0].mpd.manifest,s.index)),a},getProducerReferenceTimes:function(e,n){var i,a,s=v(e,r);return i=n?n.id:null,r.length>0&&s&&(a=i?t.getAdaptationForId(i,r[0].mpd.manifest,s.index):t.getAdaptationForIndex(n?n.index:null,r[0].mpd.manifest,s.index)),a?t.getProducerReferenceTimesForAdaptation(a):[]},getRealPeriodByIndex:function(e){return t.getRealPeriodForIndex(e,r[0].mpd.manifest)},getEssentialPropertiesForRepresentation:function(e){try{return t.getEssentialPropertiesForRepresentation(e)}catch(e){return[]}},getVoRepresentations:function(e){var n=y(e);return t.getRepresentationsForAdaptation(n)},getEventsFor:function(e,n,i){var a=[];if(r.length>0){var s=r[0].mpd.manifest;if(e instanceof Ci){var o=v(e,r);a=t.getEventsForPeriod(o)}else if(e instanceof Ii){var l=v(i,r);a=t.getEventStreamForAdaptationSet(s,y(e),l)}else if(e instanceof wi){var u=v(i,r);a=t.getEventStreamForRepresentation(s,n,u)}}return a},getEvent:function(e,t,n,r){try{if(!e||!t||isNaN(n)||!r)return null;var i=e.scheme_id_uri,a=e.value;if(!t[i+"/"+a])return null;var s,o=new ve,l=e.timescale||1,u=r.adaptation.period.start,c=t[i+"/"+a],d=isNaN(r.presentationTimeOffset)?isNaN(c.presentationTimeOffset)?0:c.presentationTimeOffset:r.presentationTimeOffset,f=e.presentation_time_delta/l;s=0===e.version?u+n-d+f:u-d+f;var h=e.event_duration/l,p=e.id,g=e.message_data;return o.eventStream=c,o.eventStream.value=a,o.eventStream.timescale=l,o.duration=h,o.id=p,o.calculatedPresentationTime=s,o.messageData=g,o.presentationTimeDelta=f,o}catch(e){return null}},getMpd:p,setConfig:function(e){e&&(e.constants&&(a=e.constants),e.cea608parser&&(o=e.cea608parser),e.errHandler&&t.setConfig({errHandler:e.errHandler}),e.BASE64&&t.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;b(),r=h(e)},getIsTextTrack:function(e){return t.getIsText(e)},getUTCTimingSources:function(){var e=m();return t.getUTCTimingSources(e)},getSuggestedPresentationDelay:function(){var e=r.length>0?r[0].mpd:null;return t.getSuggestedPresentationDelay(e)},getAvailabilityStartTime:function(e){var n=p(e);return t.getAvailabilityStartTime(n)},getIsTypeOf:function(e,n){return t.getIsTypeOf(e,n)},getIsDynamic:function(e){var n=m(e);return t.getIsDynamic(n)},getDuration:function(e){var n=m(e);return t.getDuration(n)},getRegularPeriods:h,getContentSteering:function(e){return t.getContentSteering(e)},getLocation:function(e){return t.getLocation(e)},getPatchLocation:function(e){var n=t.getPatchLocation(e),r=t.getPublishTime(e);return n&&0!==n.length&&r?n.filter((function(e){return isNaN(e.ttl)||r.getTime()+e.ttl>(new Date).getTime()})):[]},getManifestUpdatePeriod:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.getManifestUpdatePeriod(e,n)},getPublishTime:function(e){return t.getPublishTime(e)},getIsDVB:function(e){return t.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getIsPatch:function(e){return n.getIsPatch(e)},getBaseURLsFromElement:function(e){return t.getBaseURLsFromElement(e)},getRepresentationSortFunction:function(){return t.getRepresentationSortFunction()},getCodec:function(e,n,r){return t.getCodec(e,n,r)},getPeriodById:function(e){if(!e||0===r.length)return null;var t=r.filter((function(t){return t.id===e}));return t&&t.length>0?t[0]:null},setCurrentMediaInfo:function(e,t,n){i[e]=i[e]||{},i[e][t]=i[e][t]||{},i[e][t]=n},isPatchValid:function(e,r){var i=t.getId(e),a=n.getMpdId(r),s=t.getPublishTime(e),o=n.getPublishTime(r),l=n.getOriginalPublishTime(r);return!!(i&&a&&i==a&&s&&l&&s.getTime()==l.getTime()&&o&&s.getTime()1?i[r]=l:1==l.length?i[r]=l[0]:delete i[r+"_asArray"]}"add"!==t.action&&"replace"!==t.action||Object.keys(t.value).forEach((function(e){var n=t.value[e],a=i[e+"_asArray"]||[];if(0===a.length&&i[e]&&a.push(i[e]),0===a.length)a=n;else{var l=a.length;l=e==r&&-1!=s?s+(o?0:1)+("replace"==t.action?-1:0):o?0:a.length,a.splice.apply(a,[l,0].concat(n))}i[e+"_asArray"]=a,i[e]=1==a.length?a[0]:a}))}}}))},areMediaInfosEqual:c,reset:g},t=Be(l).getInstance(),n=Pi(l).getInstance(),g(),e}Mi.__dashjs_factory_name="DashAdapter";var xi=c.Z.getSingletonFactory(Mi);var Li=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t;return t=[{key:"round10",value:function(e,t){return function(e,t,n){return void 0===n||0==+n?Math[e](t):(n=+n,null===(t=+t)||isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))}("round",e,t)}}],t&&function(e,t){for(var n=0;nr.get().streaming.metrics.maxListDepth&&i[t].shift())}function m(e,t,n){g(e,t,n),h(e,t,n)}return t={clearCurrentMetricsForType:function(e){delete n[e],d(e)},clearAllCurrentMetrics:function(){n={},c()},getMetricsFor:p,addHttpRequest:function e(t,n,r,i,a,s,l,u,c,d,f,h,p,g,y,v,_){var T=new R.w;null!=s&&s!==i&&(e(t,null,r,i,a,null,null,u,c,null,null,null,p,null,null,v,_),T.actualurl=s),T.tcpid=n,T.type=r,T.url=i,T.range=u,T.trequest=c,T.tresponse=d,T.responsecode=h,T.cmsd=_,T._tfinish=f,T._stream=t,T._mediaduration=p,T._quality=a,T._responseHeaders=g,T._serviceLocation=l,T._fileLoaderType=v,y?y.forEach((function(e){!function(e,t,n,r){var i=new R.O;i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n}(T,e.s,e.d,e.b)})):(delete T.interval,delete T.trace),m(t,o.Z.HTTP_REQUEST,T)},addRepresentationSwitch:function(e,t,n,r,i){var a=new Fi;a.t=t,a.mt=n,a.to=r,i?a.lto=i:delete a.lto,m(e,o.Z.TRACK_SWITCH,a)},addBufferLevel:function(e,t,n){var r=new Ui;r.t=t,r.level=n,m(e,o.Z.BUFFER_LEVEL,r)},addBufferState:function(e,t,n){var r=new Bi;r.target=n,r.state=t,m(e,o.Z.BUFFER_STATE,r)},addDVRInfo:function(e,t,n,r){var i=new ji;i.time=t,i.range=r,i.manifestInfo=n,m(e,o.Z.DVR_INFO,i)},addDroppedFrames:function(e,t){var n=new qi,r=p(e).DroppedFrames;t&&(n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n||m(e,o.Z.DROPPED_FRAMES,n))},addSchedulingInfo:function(e,t,n,r,i,a,s,l,u){var c=new Zi;c.mediaType=e,c.t=t,c.type=n,c.startTime=r,c.availabilityStartTime=i,c.duration=a,c.quality=s,c.range=l,c.state=u,m(e,o.Z.SCHEDULING_INFO,c)},addRequestsQueue:function(e,t,n){var r=new Ki;r.loadingRequests=t,r.executedRequests=n,p(e).RequestsQueue=r,h(e,o.Z.REQUESTS_QUEUE,r)},addManifestUpdate:function(e,t,n,r,i,s,l,u,c,d){var f=new Gi;f.mediaType=e,f.type=t,f.requestTime=n,f.fetchTime=r,f.availabilityStartTime=i,f.presentationStartTime=s,f.clientTimeOffset=l,f.currentTime=u,f.buffered=c,f.latency=d,g(a.Z.STREAM,o.Z.MANIFEST_UPDATE,f),h(e,o.Z.MANIFEST_UPDATE,f)},updateManifestUpdateInfo:function(e,t){if(e){for(var n in t)e[n]=t[n];f(e.mediaType,o.Z.MANIFEST_UPDATE,e)}},addManifestUpdateStreamInfo:function(e,t,n,r,i){if(e){var a=new Vi;a.id=t,a.index=n,a.start=r,a.duration=i,e.streamInfo.push(a),f(e.mediaType,o.Z.MANIFEST_UPDATE_STREAM_INFO,e)}},addManifestUpdateRepresentationInfo:function(e,t,n,r,i,a,s,l){if(e&&e.representationInfo){var u=new Yi;u.id=t,u.index=n,u.streamIndex=r,u.mediaType=i,u.startNumber=s,u.fragmentInfoType=l,u.presentationTimeOffset=a,e.representationInfo.push(u),f(e.mediaType,o.Z.MANIFEST_UPDATE_TRACK_INFO,e)}},addPlayList:function(e){e.trace&&Array.isArray(e.trace)?e.trace.forEach((function(e){e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel})):delete e.trace,m(a.Z.STREAM,o.Z.PLAY_LIST,e)},addDVBErrors:function(e){m(a.Z.STREAM,o.Z.DVB_ERRORS,e)}},n={},t}zi.__dashjs_factory_name="MetricsModel";var Wi=c.Z.getSingletonFactory(zi);function Xi(e){e=e||{};var t,n,r,i,s=this.context,l=e.metricsModel;function u(e){var t=l.getMetricsFor(e,!0);if(!t)return null;var n,r=t.HttpList,i=null;if(!r||r.length<=0)return null;for(n=r.length-1;n>=0;){if(r[n].responsecode){i=r[n];break}n--}return i}function c(e){var t=l.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function d(e,t){if(!e)return null;var n=e[t];return n&&0!==n.length?n[n.length-1]:null}return t={getCurrentRepresentationSwitch:function(e){return d(l.getMetricsFor(e,!0),o.Z.TRACK_SWITCH)},getCurrentBufferState:function(e){return d(l.getMetricsFor(e,!0),o.Z.BUFFER_STATE)},getCurrentBufferLevel:function(e){var t=d(l.getMetricsFor(e,!0),o.Z.BUFFER_LEVEL);return t?Li.round10(t.level/1e3,-3):0},getCurrentHttpRequest:u,getHttpRequests:c,getCurrentDroppedFrames:function(){return d(l.getMetricsFor(a.Z.VIDEO,!0),o.Z.DROPPED_FRAMES)},getCurrentSchedulingInfo:function(e){return d(l.getMetricsFor(e,!0),o.Z.SCHEDULING_INFO)},getCurrentDVRInfo:function(e){return d(e?l.getMetricsFor(e,!0):l.getMetricsFor(a.Z.VIDEO,!0)||l.getMetricsFor(a.Z.AUDIO,!0),o.Z.DVR_INFO)},getCurrentManifestUpdate:function(){return d(l.getMetricsFor(a.Z.STREAM),o.Z.MANIFEST_UPDATE)},getLatestFragmentRequestHeaderValueByID:function(e,t){if(!t)return null;var n={},r=u(e);r&&(n=je.Z.parseHttpHeaders(r._responseHeaders));var i=n[t.toLowerCase()];return void 0===i?null:i},getLatestMPDRequestHeaderValueByID:function(e){if(!e)return null;var t,n,r,i={};for(r=(t=c(a.Z.STREAM)).length-1;r>=0;r--)if((n=t[r]).type===R.w.MPD_TYPE){i=je.Z.parseHttpHeaders(n._responseHeaders);break}var s=i[e.toLowerCase()];return void 0===s?null:s},addRepresentationSwitch:function(e,t,n,r,i){l.addRepresentationSwitch(e,t,n,r,i)},addDVRInfo:function(e,t,n,r){l.addDVRInfo(e,t,n,r)},updateManifestUpdateInfo:function(e){var t=this.getCurrentManifestUpdate();l.updateManifestUpdateInfo(t,e)},addManifestUpdateStreamInfo:function(e){if(e){var t=this.getCurrentManifestUpdate();l.addManifestUpdateStreamInfo(t,e.id,e.index,e.start,e.duration)}},addManifestUpdateRepresentationInfo:function(e,t){if(e){var n=this.getCurrentManifestUpdate();l.addManifestUpdateRepresentationInfo(n,e.id,e.index,e.streamIndex,t,e.presentationTimeOffset,e.startNumber,e.fragmentInfoType)}},addManifestUpdate:function(e){l.addManifestUpdate(a.Z.STREAM,e.type,e.requestStartDate,e.requestEndDate)},addHttpRequest:function(e,t,n,r,i,a){l.addHttpRequest(e.mediaType,null,e.type,e.url,e.quality,t,e.serviceLocation||null,e.range||null,e.requestStartDate,e.firstByteDate,e.requestEndDate,n,e.duration,r,i,e.fileLoaderType,a)},addSchedulingInfo:function(e,t){l.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.quality,e.range,t)},addRequestsQueue:function(e,t,n){l.addRequestsQueue(e,t,n)},addBufferLevel:function(e,t,n){l.addBufferLevel(e,t,n)},addBufferState:function(e,t,n){l.addBufferState(e,t,n)},addDroppedFrames:function(e){l.addDroppedFrames(a.Z.VIDEO,e)},addPlayList:function(){i&&(l.addPlayList(i),i=null)},addDVBErrors:function(e){l.addDVBErrors(e)},createPlaylistMetrics:function(e,t){(i=new Q).start=new Date,i.mstart=e,i.starttype=t},createPlaylistTraceMetrics:function(e,t,i){!0===n&&(n=!1,(r=new J).representationid=e,r.start=new Date,r.mstart=t,r.playbackspeed=null!==i?i.toString():null)},updatePlayListTraceMetrics:function(e){if(r)for(var t in r)r[t]=e[t]},pushPlayListTraceMetrics:function(e,t){if(!1===n&&i&&r&&r.start){var a=r.start,s=e.getTime()-a.getTime();r.duration=s,r.stopreason=t,i.trace.push(r),n=!0}},clearAllCurrentMetrics:function(){l.clearAllCurrentMetrics()}},l=l||Wi(s).getInstance({settings:e.settings}),n=!0,r=null,i=null,t}Xi.__dashjs_factory_name="DashMetrics";var $i=c.Z.getSingletonFactory(Xi);function Qi(){var e,t,n,r,i=this.context,o=(0,l.Z)(i).getInstance(),c=(0,C.Z)(i).getInstance();function d(e){r=e}function h(e,t,n,r){var i,a=t.adaptation.period.mpd,s=a.availabilityStartTime;if(r)i=n&&a.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(s.getTime()+1e3*(e+a.timeShiftBufferDepth)):a.availabilityEndTime;else if(n){var o=t.availabilityTimeOffset;i=new Date(s.getTime()+1e3*(e-o))}else i=s;return i}function p(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*r)/1e3}function g(e,t){return e+(t.adaptation.period.start-t.presentationTimeOffset)}function m(e){var n={start:NaN,end:NaN},r=e[0].getAdapter().getRegularPeriods()[0],i=p(new Date,r);if(!e||0===e.length)return{range:n,now:i};e.forEach((function(e){var r=e.getAdapter(),o=r.getMediaInfoForType(e.getStreamInfo(),a.Z.VIDEO)||r.getMediaInfoForType(e.getStreamInfo(),a.Z.AUDIO),l=r.getVoRepresentations(o)[0],u={start:NaN,end:NaN};if(l)if(l.segmentInfoType===s.Z.SEGMENT_TIMELINE)u=function(e){var n,r,i,a,s=e.adaptation.period.mpd.manifest.Period_asArray[e.adaptation.period.index].AdaptationSet_asArray[e.adaptation.index],o=t.getRepresentationFor(e.index,s),l=o.SegmentTemplate||o.SegmentList,u=l.SegmentTimeline,c=l.timescale,d=u.S_asArray,f={start:0,end:0},h=d[0].t,p=!isNaN(h),m=p?h:0,y=0;for(p&&(f.start=g(m/c,e)),i=0,a=d.length;iu.start)&&(n.start=u.start),!isNaN(u.end)&&(isNaN(n.end)||n.end2&&void 0!==arguments[2]&&arguments[2];try{for(var r=0,i=!1,a=NaN;!i&&r=t)?(a=t,i=!0):!n&&s.start>t&&(isNaN(a)||s.starta)&&(a=s.start+s.duration),r+=1}return a}catch(e){return t}}function _(e){void 0===e.offset||isNaN(e.offset)||d(e.offset/1e3)}function T(){r=0,n=0}function E(){o.off(u.Z.UPDATE_TIME_SYNC_OFFSET,_,this),T()}return e={initialize:function(){T(),o.on(u.Z.UPDATE_TIME_SYNC_OFFSET,_,this)},getClientTimeOffset:function(){return r},setClientTimeOffset:d,getClientReferenceTime:function(){return Date.now()-1e3*n+1e3*r},calcAvailabilityStartTimeFromPresentationTime:function(e,t,n){return h(e,t,n)},calcAvailabilityEndTimeFromPresentationTime:function(e,t,n){return h(e,t,n,!0)},calcPresentationTimeFromWallTime:p,calcPresentationTimeFromMediaTime:g,calcPeriodRelativeTimeFromMpdRelativeTime:function(e,t){return t-e.adaptation.period.start},calcMediaTimeFromPresentationTime:function(e,t){return e-t.adaptation.period.start+t.presentationTimeOffset},calcWallTimeForSegment:function(e,t){var n,r,i;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i},calcTimeShiftBufferWindow:function(e,t){if(!t)return function(e){var t={start:NaN,end:NaN},n=0,r=NaN;return e.forEach((function(e){var t=e.getStreamInfo();n+=t.duration,(isNaN(r)||t.start0&&(g.spans.push({name:m,line:E,row:c}),E="");var C="style_cea608_"+I.foreground+"_"+I.background;I.underline&&(C+="_underline"),I.italics&&(C+="_italics"),v.hasOwnProperty(C)||(v[C]=JSON.parse(JSON.stringify(I))),b=I,m=C}E+=w.uchar}E.trim().length>0&&g.spans.push({name:m,line:E,row:c}),h=!0,p=S}else h=!1,p=-1,f&&(f.p.push(g),g={start:o,end:l,spans:[]},f.y2=c,f.name="region_"+f.x+"_"+f.y1+"_"+f.y2,!1===y.hasOwnProperty(f.name)?(_.push(f),y[f.name]=f):y[f.name].p.contat(f.p),f=null)}f&&(f.p.push(g),f.y2=c+1,f.name="region_"+f.x+"_"+f.y1+"_"+f.y2,!1===y.hasOwnProperty(f.name)?(_.push(f),y[f.name]=f):y[f.name].p.contat(f.p),f=null);var R=[];for(c=0;c<_.length;++c){var D=_[c],N="sub_cea608_"+e++,O=document.createElement("div");O.id=N;var P=n(D);O.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+P;var M=document.createElement("div");M.className="paragraph bodyStyle",M.style.cssText=i(r);var x=document.createElement("div");x.className="cueUniWrapper",x.style.cssText="unicode-bidi: normal; direction: ltr;";for(var L=0;L0){if(0!==d&&F!=U.row){var B=document.createElement("br");B.className="lineBreak",x.appendChild(B)}var j=!1;F===U.row&&(j=!0),F=U.row;var q=v[U.name],H=document.createElement("span");H.className="spanPadding "+U.name+" customSpanColor",H.style.cssText=i(r,q),0!==d&&j?d===k.spans.length-1?H.textContent=s(U.line):H.textContent=U.line:k.spans.length>1&&d1&&e.isEmbedded?t=e.id&&e.id===a.Z.CC1:1===y.length?e.id&&"string"==typeof e.id&&"CC"===e.id.substring(0,2)&&(t=!0):0===y.length&&(t=e.index===o[0].index),t}(e),t.isFragmented=e.isFragmented,t.isEmbedded=!!e.isEmbedded,t.isTTML=function(e){return e.codec&&e.codec.search(a.Z.STPP)>=0||e.mimeType&&e.mimeType.search(a.Z.TTML)>=0}(e),t.kind=function(e,t){var n=e.roles&&e.roles.length>0?t[e.roles[0]]:t.caption;return n===t.caption||n===t.subtitle?n:t.caption}(e,{subtitle:"subtitles",caption:"captions"}),N.addTextTrack(t)}function q(e){var t=e.chunk;t.mediaInfo.embeddedCaptions&&G(t.bytes,t)}function H(e){m=e}function G(e,o){var l=o.mediaInfo,u=l.type,d=l.mimeType,p=l.codec||d;p?-1!==l.codec.indexOf("application/mp4")?function(e,i,o){var l;if("InitializationSegment"===i.segmentType)f=!0,h=r.getMediaTimescaleFromMoov(e);else{if(!f)return;(l=r.getSamplesInfo(e).sampleList).length>0&&(g=l[0].cts-i.start*h),o.search(a.Z.STPP)>=0?function(e,r,i){var o,l;for(s=null!==s?s:Z(i),o=0;o0&&N.addCaptions(m,0,o)}(e,l)}}(e,o,p):u===a.Z.VIDEO?function(e,t){var a,s;if(t.segmentType===R.w.INIT_SEGMENT_TYPE)0===v&&(v=r.getMediaTimescaleFromMoov(e));else if(t.segmentType===R.w.MEDIA_SEGMENT_TYPE){if(0===v)return void n.warn("CEA-608: No timescale for embeddedTextTrack yet");var o=(s=r.getSamplesInfo(e)).lastSequenceNumber,l=Math.trunc(t.start),u=Math.trunc(t.end);if(E[0]||E[1]||function(){for(var e,t=0;t0){s.cts!==l?u=0:u+=1;var h=Y();n.fields[f].push([s.cts+h*v,d[f],u]),l=s.cts}return n.fields.forEach((function(e){e.sort((function(e,t){return e[0]===t[0]?e[2]-t[2]:e[0]-t[0]}))})),n}(e,s.sampleList),d=0;d=0?t=L.get().streaming.text.webvtt.customRenderingEnabled&&P?P:O:(e.search(a.Z.TTML)>=0||e.search(a.Z.STPP)>=0)&&(t=M),t}function K(e){y.forEach((function(t){var n=N.getTrackIdxForId(t.id);n>=0&&N.deleteCuesFromTrackIdx(n,e.from,e.to)}))}return t={initialize:function(){U||(y=[],m=null,v=0,E=[],_=null,T=null,U=!0,S=la(k).getInstance(),F.on(u.Z.VIDEO_CHUNK_RECEIVED,q,t),F.on(u.Z.BUFFER_CLEARED,K,t))},addMediaInfos:function(e,n,r){if(o=o.concat(n),e===a.Z.TEXT&&n[0].isFragmented&&!n[0].isEmbedded){c=r,t.buffered=(0,sa.Z)(k).create(),p=C.getTracksFor(a.Z.TEXT,x.id).filter((function(e){return e.isFragmented}));for(var i=C.getCurrentTrackFor(a.Z.TEXT,x.id),s=0;se.length)&&(t=e.length);for(var n=0,r=new Array(t);nn/r?s=(o=t)/r*n:o=(s=e)/n*r;var l,u,c=0,d=0;return s/o>i?(d=o,c=o*i):(c=s,d=s/i),l=(e-c)/2,u=(t-d)/2,a?{x:l+.1*c,y:u+.1*d,w:.8*c,h:.8*d}:{x:l,y:u,w:c,h:d}}function P(e,t){var n=R.getClientWidth(),r=R.getClientHeight(),i=R.getVideoWidth(),a=R.getVideoHeight(),s=R.getVideoRelativeOffsetTop(),o=R.getVideoRelativeOffsetLeft();if(0!==i&&0!==a){var l=i/a,u=!1;e.isFromCEA608&&(l=3.5/3,u=!0);var d=O.call(this,n,r,i,a,l,u),y=d.w,v=d.h,E=d.x,S=d.y;if(y!=p||v!=g||E!=c||S!=h||t){if(c=E+o,h=S+s,p=y,g=v,m){var A=m.style;A&&(A.left=c+"px",A.top=h+"px",A.width=p+"px",A.height=g+"px",A.zIndex=_&&document[_]||T?b:null,C.trigger(f.Z.CAPTION_CONTAINER_RESIZE))}var w=e.activeCues;if(w)for(var I=w.length,D=0;D=e.startTime}function F(e,t){return!!N.get().streaming.text.extendSegmentedCues&&!!function(e,t,n){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}(R.getTextTracks());try{for(n.s();!(e=n.n()).done;){var r=e.value;r.manualMode===a.Z.TEXT_SHOWING&&t.push(r)}}catch(e){n.e(e)}finally{n.f()}return t}function W(e){return e>=0&&i[e]?R.getTextTrack(i[e].kind,i[e].id,i[e].lang,i[e].isTTML,i[e].isEmbedded):null}function X(e){var t=this;if(e!==o){var n=W(o=e);$.call(this,n),v&&(clearInterval(v),v=null),n&&"html"===n.renderingType&&(P.call(this,n,!0),window.ResizeObserver?(S=new window.ResizeObserver((function(){P.call(t,n,!0)}))).observe(R.getElement()):v=setInterval(P.bind(this,n),500))}}function $(e){ie.call(this),e&&"html"===e.renderingType?ne.call(this):re.call(this)}function Q(e,t){if(!e.cues)return!1;for(var n=0;n3&&void 0!==arguments[3])||arguments[3];return!!e&&(isNaN(t)||(r?e.startTime:e.endTime)>=t)&&(isNaN(n)||(r?e.endTime:e.startTime)<=n)}function ee(e,t,n){var r,i;if(!(n0?"native":"custom",s="native"===a?e.cues:e.manualCueList;if(!s||0===s.length)return;for(var o=s.length-1;o>=0;o--)!J(s[o],t,n,!0)||(r=s[o],i=R.getTime(),r.startTime>=i&&r.endTime<=i)||("native"===a?e.removeCue(s[o]):(K(s[o]),delete e.manualCueList[o]))}}function te(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e&&(e.cues||e.manualCueList)){var i=e.cues&&e.cues.length>0?"native":"custom",a="native"===i?e.cues:e.manualCueList;if(!a||0===a.length)return;for(var s=a.length-1;s>=0;s--)J(a[s],t,n,r)&&("native"===i?(a[s].onexit&&a[s].onexit(),e.removeCue(a[s])):(K(a[s]),delete e.manualCueList[s]))}}function ne(){var e=document.getElementById("native-cue-style");if(!e){(e=document.createElement("style")).id="native-cue-style",document.head.appendChild(e);var t=e.sheet,r=R.getElement();try{r&&(r.id?t.insertRule("#"+r.id+"::cue {background: transparent}",0):0!==r.classList.length?t.insertRule("."+r.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0))}catch(e){n.info(""+e.message)}}}function re(){var e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function ie(){if(m)for(;m.firstChild;)m.removeChild(m.firstChild)}return t={initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(r=window.VTTCue||window.TextTrackCue,i=[],s=[],o=-1,c=0,h=0,p=0,g=0,m=null,y=null,v=null,T=!1,b=2147483647,E=null,A="requestAnimationFrame"in window,void 0!==document.fullscreenElement?_="fullscreenElement":void 0!==document.webkitIsFullScreen?_="webkitIsFullScreen":document.msFullscreenElement?_="msFullscreenElement":document.mozFullScreen&&(_="mozFullScreen"))},getStreamId:function(){return D.id},addTextTrack:function(e){i.push(e)},addCaptions:B,createTracks:function(){var e=N.get().streaming.text.dispatchForManualRendering;i.sort((function(e,t){return e.index-t.index})),m=R.getTTMLRenderingDiv(),y=R.getVttRenderingDiv();for(var t,n,r,l,c,d,h=-1,p=0;p=0){C.on(f.Z.PLAYBACK_METADATA_LOADED,(function e(){var t=W(h);t&&"html"===t.renderingType&&P.call(this,t,!0),C.off(f.Z.PLAYBACK_METADATA_LOADED,e,this)}),this);for(var _=0;_0){var n=t[0].manualCueList;n&&n.length>0&&n.forEach((function(t){t.startTime<=e&&t.endTime>=e&&!t.isActive?(t.isActive=!0,N.get().streaming.text.dispatchForManualRendering?q(t):WebVTT.processCues(window,[t],y,t.cueID)):t.isActive&&(t.startTime>e||t.endTime0){var t=e[0].manualCueList;t&&t.length>0&&t.forEach((function(e){if(e.isActive)if(e.isActive=!1,N.get().streaming.text.dispatchForManualRendering)H(e);else if(y)for(var t=y.childNodes,n=0;n1){var n=e.split(/:/)[1],r=!1;n&&-1!=n.search(/%/)&&(r=!0,n=parseInt(n.replace(/%/,""),10)),(e.match(/align/)||e.match(/A/))&&(t.align=n),(e.match(/line/)||e.match(/L/))&&(t.line="auto"===n?n:parseInt(n,10),r&&(t.snapToLines=!1)),(e.match(/position/)||e.match(/P/))&&(t.position=n),(e.match(/size/)||e.match(/S/))&&(t.size=n)}})),t}function c(e,t){for(var n,i=t,a="",s="";""!==e[i]&&i1)for(var o=0;o0&&"WEBVTT"!==f&&f.match(r)){var h=l(f),p=h.cuePoints,g=h.styles,m=c(e,d+1),y=o(p[0].replace(i,"")),v=o(p[1].replace(i,""));!isNaN(y)&&!isNaN(v)&&y>=s&&v>y?""!==m?(s=y,u.push({start:y,end:v,data:m,styles:g})):t.error("Skipping cue due to empty/malformed cue text"):t.error("Skipping cue due to incorrect cue timing")}}return u},getCaptionStyles:u},t=(0,d.Z)(s).getInstance().getLogger(e),n=/(?:\r\n|\r|\n)/gm,r=/-->/,i=/(^[\s]+|[\s]+$)/g,a=/\s\b/g,e}ma.__dashjs_factory_name="VTTParser";var ya=c.Z.getSingletonFactory(ma);function va(){var e,t;return e={parse:function(e){var n=[];return t.oncue=function(e){e.start=e.startTime,e.end=e.endTime,e.data=e.text,e.styles={align:e.align,line:e.line,position:e.position,size:e.size},n.push(e)},t.parse(e),n}},function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(t=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch(e){}}(),e}va.__dashjs_factory_name="VttCustomRenderingParser";var _a=c.Z.getSingletonFactory(va);function Ta(){var e,t,n=this.context,r=(0,l.Z)(n).getInstance(),i=0;return e={parse:function(e,n,a,s,o){var l,c,d,h="",p=[],g={},m={},y="",v="",_={onOpenTag:function(e,n,i){if(i[" imagetype"]&&!i[" imageType"]&&(r.trigger(f.Z.CONFORMANCE_VIOLATION,{level:Jt.LEVELS.ERROR,event:Jt.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),i[" imageType"]=i[" imagetype"]),"image"===n&&("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===e||"http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"===e)){if(!i[" imageType"]||"PNG"!==i[" imageType"].value)return void t.warn("smpte-tt imageType != PNG. Discarded");y=i["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){y&&(m[y]=v.trim()),v="",y=""},onText:function(e){y&&(v+=e)}};if(!e)throw h="no ttml data to parse",new Error(h);g.data=e,r.trigger(u.Z.TTML_TO_PARSE,g);var T=(0,da.fromXML)(g.data,(function(e){h=e}),_);r.trigger(u.Z.TTML_PARSED,{ttmlString:g.data,ttmlDoc:T});var E,b=T.getMediaTimeEvents();for(d=0;de.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(n=c.resolve(l[0].path).url)}var d=e.essentialPropertiesAsArray.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===a.Z.FONT_DOWNLOAD_DVB_SCHEME})),f=e.supplementalPropertiesAsArray.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===a.Z.FONT_DOWNLOAD_DVB_SCHEME}));d.length>0?(s=!0,i=d):i=f,i.forEach((function(i){if(function(e){return!(!(e.value&&"1"===e.value&&e.dvbUrl&&e.dvbUrl.length>0&&e.dvbFontFamily&&e.dvbFontFamily.length>0&&e.dvbMimeType)||e.dvbMimeType!==a.Z.OFF_MIMETYPE&&e.dvbMimeType!==a.Z.WOFF_MIMETYPE)}(i)){var l=(u=i.dvbUrl,c=n,o.isPathAbsolute(u)?u:o.isRelative(u)?c?o.resolve(u,c):o.resolve(u):u);r.push({fontFamily:i.dvbFontFamily,url:l,mimeType:i.dvbMimeType,trackId:e.id,streamId:t,isEssential:s,status:"unloaded",fontFace:new FontFace(i.dvbFontFamily,"url(".concat(l,")"),{display:"swap"})})}var u,c}))}function p(e,t){var n=r[e];r[e]=Sa(Sa({},n),{},{status:t})}function g(){r=[]}return t={addFontsFromTracks:function(e,t){if(e&&Array.isArray(e)&&t)for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}(r);try{for(t.s();!(e=t.n()).done;){var i=e.value,a=document.fonts.delete(i.fontFace);n.debug("Removal of fontFamily: ".concat(i.fontFamily," was ").concat(a?"successful":"unsuccessful"))}}catch(e){t.e(e)}finally{t.f()}}(),g()}},n=(0,d.Z)(i).getInstance().getLogger(t),g(),t}Ia.__dashjs_factory_name="DVBFonts";var Ca=c.Z.getClassFactory(Ia);function Ra(e){var t,n,r,i,s,o,c,h,p,g,m,y,v,_,T=this.context,E=e.adapter,b=e.errHandler,S=e.manifestModel,A=e.mediaController,w=e.baseURLController,I=e.videoModel,C=e.settings;function R(e){if(_.error("Could not download ".concat(e.isEssential?"an essential":"a"," font - fontFamily: ").concat(e.fontFamily,", url: ").concat(e.url)),e.isEssential){var t=i[e.streamId].getTrackIdxForId(e.trackId);i[e.streamId].setModeForTrackIdx(t,a.Z.TEXT_DISABLED)}}function D(e){if(_.debug("Successfully downloaded ".concat(e.isEssential?"an essential":"a"," font - fontFamily: ").concat(e.fontFamily,", url: ").concat(e.url)),e.isEssential){var t=i[e.streamId].getTrackIdxForId(e.trackId);t===i[e.streamId].getCurrentTrackIdx()?i[e.streamId].setModeForTrackIdx(t,a.Z.TEXT_SHOWING):i[e.streamId].setModeForTrackIdx(t,a.Z.TEXT_HIDDEN)}}function N(e){var t=e.tracks,r=e.index,s=e.streamId;if(!1===C.get().streaming.text.defaultEnabled&&!M()||y)x(s,-1);else{var o=A.getCurrentTrackFor(a.Z.TEXT,s);if(o){var l={lang:o.lang,role:o.roles[0],index:o.index,codec:o.codec,accessibility:o.accessibility[0]};t.some((function(e,t){if(A.matchSettings(l,e))return x(s,t),r=t,!0}))}p=!1}n[s].lastEnabledIndex=r,h.trigger(f.Z.TEXT_TRACKS_ADDED,{enabled:M(),index:r,tracks:t,streamId:s}),m=!0,v.addFontsFromTracks(t,s),v.getFonts().forEach((function(e){if(e.isEssential){var t=i[e.streamId].getTrackIdxForId(e.trackId);i[e.streamId].setModeForTrackIdx(t,a.Z.TEXT_DISABLED)}})),v.downloadFonts()}function O(e){try{var t=e.streamId;if(!i[t]||isNaN(e.time))return;i[t].manualCueProcessing(e.time)}catch(e){}}function P(e){try{var t=e.streamId;if(!i[t])return;i[t].disableManualTracks()}catch(e){}}function M(){var e=!0;return p&&!g&&(e=!1),e}function x(e,t){(p=-1===t)&&A&&A.saveTextSettingsDisabled();var n=L(e);if(n!==t&&i[e]){i[e].disableManualTracks();var s=i[e].getCurrentTrackInfo(),o=s?I.getTextTrack(s.kind,s.id,s.lang,s.isTTML,s.isEmbedded):null;o&&o.mode!==a.Z.TEXT_DISABLED&&i[e].setModeForTrackIdx(n,a.Z.TEXT_HIDDEN),i[e].setCurrentTrackIdx(t),s=i[e].getCurrentTrackInfo();var l=C.get().streaming.text.dispatchForManualRendering;s&&!l&&s.mode!==a.Z.TEXT_DISABLED&&i[e].setModeForTrackIdx(t,a.Z.TEXT_SHOWING),s&&s.isFragmented&&!s.isEmbedded?function(e,t,n){if(r[e])for(var s=r[e].getConfig().fragmentedTracks,o=0;o3&&void 0!==arguments[3]?arguments[3]:null,a=e.id;r[a]&&r[a].addMediaInfos(t,n,i)},reset:function(){v.reset(),k(),h.off(u.Z.TEXT_TRACKS_QUEUE_INITIALIZED,N,t),h.off(u.Z.DVB_FONT_DOWNLOAD_FAILED,R,t),h.off(u.Z.DVB_FONT_DOWNLOAD_COMPLETE,D,t),C.get().streaming.text.webvtt.customRenderingEnabled&&(h.off(u.Z.PLAYBACK_TIME_UPDATED,O,t),h.off(u.Z.PLAYBACK_SEEKING,P,t)),Object.keys(r).forEach((function(e){r[e].resetEmbedded(),r[e].reset()}))}},g=!1,m=!1,y=!1,s=ya(T).getInstance(),o=_a(T).getInstance(),c=Ea(T).getInstance(),h=(0,l.Z)(T).getInstance(),_=(0,d.Z)(T).getInstance().getLogger(t),k(),t}Ra.__dashjs_factory_name="TextController";var Da=c.Z.getClassFactory(Ra);function Na(){var e,t,n,r,h,g,m,y,v,_,T,E,S,A,w,D,N,O,P,M,x,L,k,F,U,B,j,q,H,G,V,Y,Z,z,$,Q,J,ee,te,ne="You must first call initialize() and set a source before calling this method",re="You must first call initialize() and set a valid source and view before calling this method",ie="You must first call attachView() to set the video element before calling this method",ae="You must first call attachSource() with a valid source before calling this method",se="MediaPlayer not initialized!",oe=this.context,le=(0,l.Z)(oe).getInstance(),ue=(0,C.Z)(oe).getInstance(),ce=(0,d.Z)(oe).getInstance({settings:ue});function de(){we(null),Se(null),r=null,A&&(A.reset(),A=null),w&&(w.reset(),w=null),M&&M.reset(),ue.reset(),N&&(N.reset(),N=null)}function fe(){return!!n&&!!Q.getElement()}function he(){return(0,gi.e)()}function pe(){if(!m)throw re;return q.isPaused()}function ge(){if(!m)throw re;return q.getIsDynamic()}function me(e){var t=U&&U.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,n=Y.getCurrentDVRInfo(t);if(!n)return 0;var r=q.getOriginalLiveDelay(),i=n.range.start+e;return i>n.range.end-r&&(i=n.range.end-r),i}function ye(e){if(!m)throw re;var t=be().currentTime;if(void 0!==e)t=U.getTimeRelativeToStreamId(t,e);else if(q.getIsDynamic()){var n=U&&U.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,r=Y.getCurrentDVRInfo(n);t=null===r||0===t?0:Math.max(0,t-r.range.start)}return t}function ve(){if(!m)throw re;var e=be().duration;if(q.getIsDynamic()){var t=U&&U.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,n=Y.getCurrentDVRInfo(t);e=n?n.range.end-n.range.start:0}return e}function _e(e){(0,K.PS)(e,"boolean"),y=e}function Te(){M.restoreDefaultUTCTimingSources()}function Ee(){return Y}function be(){if(!Q.getElement())throw ie;return Q.getElement()}function Se(e){if(!h)throw se;Q.setElement(e),e&&(De(),function(){if(!w){var e=dashjs.MetricsReporting;if("function"==typeof e){var t=e(oe).create();w=t.createMetricsReporting({debug:ce,eventBus:le,mediaElement:be(),adapter:O,dashMetrics:Y,mediaPlayerModel:P,events:u.Z,constants:a.Z,metricsConstants:o.Z})}}}(),function(){if(!D){var e=dashjs.MssHandler;"function"==typeof e&&(I.extend(e.errors),D=e(oe).create({eventBus:le,mediaPlayerModel:P,dashMetrics:Y,manifestModel:Z,playbackController:q,streamController:U,protectionController:A,baseURLController:L,errHandler:x,events:u.Z,constants:a.Z,debug:ce,initSegmentType:R.w.INIT_SEGMENT_TYPE,BASE64:ea,ISOBoxer:ta,settings:ue}))}}(),U&&U.switchToVideoElement(v)),m&&Ce(),Pe(v)}function Ae(e){if(!g)throw ne;var t=U.getActiveStreamInfo();return t?S.getTracksFor(e,t.id):[]}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN;if(!h)throw se;"string"==typeof e&&J.initialize(e),null==t&&(t=NaN),isNaN(t)||(t=Math.max(0,t)),v=t,n=e,(g||m)&&Ce(),fe()&&Pe(v)}function Ie(){if(!g)throw ne;var e=U.getActiveStreamInfo();return e?U.getStreamById(e.id):null}function Ce(){m=!1,g=!1,O.reset(),U.reset(),j.reset(),V.reset(),q.reset(),H.reset(),G.reset(),_.reset(),S.reset(),te.reset(),A&&(ue.get().streaming.protection.keepProtectionMediaKeys?A.stop():(A.reset(),A=null,De())),B.reset(),z.reset(),$.reset()}function Re(){return Or(oe).create({debug:ce,errHandler:x,dashMetrics:Y,mediaPlayerModel:P,requestModifier:(0,W.Z)(oe).getInstance(),mssHandler:D,settings:ue})}function De(){if(A)return A;var e=dashjs.Protection;if("function"==typeof e){var t=e(oe).create();return u.Z.extend(e.events),f.Z.extend(e.events,{publicOnly:!0}),I.extend(e.errors),k||(k=(0,xr.Z)(oe).getInstance()),A=t.createProtectionSystem({debug:ce,errHandler:x,videoModel:Q,customParametersModel:M,capabilities:k,eventBus:le,events:u.Z,BASE64:ea,constants:a.Z,cmcdModel:z,settings:ue})}return null}function Ne(){if(!h)throw se;if(N)return N;var e=dashjs.OfflineController;if("function"==typeof e){u.Z.extend(e.events),f.Z.extend(e.events,{publicOnly:!0}),I.extend(e.errors);var t=Re(),n=Yt(oe).create();return n.setConfig({manifestModel:Z,adapter:O,manifestLoader:t,errHandler:x,contentSteeringController:G}),N=e(oe).create({debug:ce,manifestUpdater:n,baseURLController:L,manifestLoader:t,manifestModel:Z,mediaPlayerModel:P,abrController:_,playbackController:q,adapter:O,errHandler:x,dashMetrics:Y,timelineConverter:E,segmentBaseController:te,schemeLoaderFactory:T,eventBus:le,events:u.Z,errors:I,constants:a.Z,settings:ue,dashConstants:s.Z,urlUtils:(0,X.Z)(oe).getInstance()})}return null}function Oe(e){var t=U&&U.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,n=Y.getCurrentDVRInfo(t);return n?e+(n.manifestInfo.availableFrom.getTime()/1e3+n.range.start):0}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:NaN;N&&N.resetRecords(),!g&&n&&(g=!0,t.info("Streaming Initialized"),function(){var e=Re();U||(U=nn(oe).getInstance()),B||(B=Da(oe).create({errHandler:x,manifestModel:Z,adapter:O,mediaController:S,baseURLController:L,videoModel:Q,settings:ue})),F.setConfig({capabilities:k,customParametersModel:M,adapter:O,settings:ue,manifestModel:Z,errHandler:x}),U.setConfig({capabilities:k,capabilitiesFilter:F,manifestLoader:e,manifestModel:Z,mediaPlayerModel:P,customParametersModel:M,protectionController:A,textController:B,adapter:O,dashMetrics:Y,errHandler:x,timelineConverter:E,videoModel:Q,playbackController:q,serviceDescriptionController:H,contentSteeringController:G,abrController:_,mediaController:S,settings:ue,baseURLController:L,uriFragmentModel:J,segmentBaseController:te}),j.setConfig({settings:ue,playbackController:q,streamController:U,videoModel:Q,timelineConverter:E,adapter:O}),q.setConfig({streamController:U,serviceDescriptionController:H,dashMetrics:Y,adapter:O,videoModel:Q,timelineConverter:E,settings:ue}),V.setConfig({streamController:U,playbackController:q,mediaPlayerModel:P,videoModel:Q,settings:ue}),_.setConfig({streamController:U,domStorage:ee,mediaPlayerModel:P,customParametersModel:M,cmsdModel:$,dashMetrics:Y,adapter:O,videoModel:Q,settings:ue}),z.setConfig({abrController:_,dashMetrics:Y,playbackController:q}),$.setConfig({}),_.initialize(),U.initialize(y,r),B.initialize(),j.initialize(),V.initialize(),z.initialize(),$.initialize(),G.initialize(),te.initialize()}(),"string"==typeof n?U.load(n,e):U.loadWithManifest(n,e)),!m&&fe()&&(m=!0,t.info("Playback Initialized"))}return e={initialize:function(e,n,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN;k||(k=(0,xr.Z)(oe).getInstance()).setConfig({settings:ue}),x||(x=Mr(oe).getInstance()),k.supportsMediaSource()?(h||(h=!0,E=Ji(oe).getInstance(),_||(_=ri(oe).getInstance()).setConfig({settings:ue}),T||(T=gt(oe).getInstance()),q||(q=p(oe).getInstance()),S||(S=vn(oe).getInstance()),U||(U=nn(oe).getInstance()),j||(j=an(oe).getInstance()),V||(V=on(oe).getInstance()),H||(H=fn(oe).getInstance()),G||(G=qt(oe).getInstance()),F||(F=kr(oe).getInstance()),O=xi(oe).getInstance(),Z=qr(oe).getInstance(),z=Ve(oe).getInstance(),$=ot(oe).getInstance(),Y=$i(oe).getInstance({settings:ue}),ee=pi(oe).getInstance({settings:ue}),O.setConfig({constants:a.Z,cea608parser:i(),errHandler:x,BASE64:ea}),L||(L=Pn(oe).create()),L.setConfig({adapter:O,contentSteeringController:G}),H.setConfig({adapter:O}),te||(te=Ai(oe).getInstance({dashMetrics:Y,mediaPlayerModel:P,errHandler:x,baseURLController:L,events:u.Z,eventBus:le,debug:ce,boxParser:(0,Pt.Z)(oe).getInstance(),requestModifier:(0,W.Z)(oe).getInstance(),errors:I})),S.setConfig({domStorage:ee,settings:ue,customParametersModel:M}),P.setConfig({playbackController:q,serviceDescriptionController:H}),G.setConfig({adapter:O,errHandler:x,dashMetrics:Y,mediaPlayerModel:P,manifestModel:Z,serviceDescriptionController:H,eventBus:le,requestModifier:(0,W.Z)(oe).getInstance()}),Te(),_e(void 0===r||r),Ne()),e&&Se(e),n&&we(n,s),t.info("[dash.js "+he()+"] MediaPlayer has been initialized")):x.error(new b.Z(I.CAPABILITY_MEDIASOURCE_ERROR_CODE,I.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},setConfig:function(e){e&&(e.capabilities&&(k=e.capabilities),e.capabilitiesFilter&&(F=e.capabilitiesFilter),e.streamController&&(U=e.streamController),e.textController&&(B=e.textController),e.gapController&&(j=e.gapController),e.playbackController&&(q=e.playbackController),e.serviceDescriptionController&&(H=e.serviceDescriptionController),e.contentSteeringController&&(G=e.contentSteeringController),e.catchupController&&(V=e.catchupController),e.mediaPlayerModel&&(P=e.mediaPlayerModel),e.customParametersModel&&(M=e.customParametersModel),e.abrController&&(_=e.abrController),e.schemeLoaderFactory&&(T=e.schemeLoaderFactory),e.mediaController&&(S=e.mediaController),e.settings&&(ue=e.settings))},on:function(e,t,n,r){le.on(e,t,n,r)},off:function(e,t,n){le.off(e,t,n)},extend:function(e,t,n){c.Z.extend(e,t,n,oe)},attachView:Se,attachSource:we,refreshManifest:function(e){if(!h)throw se;if(!fe())return e(null,ae);var t=this;"function"==typeof e&&le.on(u.Z.INTERNAL_MANIFEST_LOADED,(function n(r){le.off(u.Z.INTERNAL_MANIFEST_LOADED,n,t),r.error?e(null,r.error):e(r.manifest)}),t),U.refreshManifest()},isReady:fe,preload:function(){if(!Q.getElement()&&!g){if(!n)throw ae;Pe(v)}},play:function(){if(!m)throw re;(!y||pe()&&m)&&q.play(!0)},isPaused:pe,pause:function(){if(!m)throw re;q.pause()},isSeeking:function(){if(!m)throw re;return q.isSeeking()},isDynamic:ge,getLowLatencyModeEnabled:function(){if(!m)throw re;return q.getLowLatencyModeEnabled()},seek:function(e){if(!m)throw re;if((0,K.PS)(e,"number"),isNaN(e))throw a.Z.BAD_ARGUMENT_ERROR;e<0&&(e=0);var t=q.getIsDynamic()?me(e):e,n=be();!q.getIsDynamic()&&n.duration&&(t=Math.min(n.duration,t)),q.seek(t,!1,!1,!0)},seekToOriginalLive:function(){m&&ge()&&q.seekToOriginalLive()},setPlaybackRate:function(e){be().playbackRate=e},getPlaybackRate:function(){return be().playbackRate},setMute:function(e){(0,K.PS)(e,"boolean"),be().muted=e},isMuted:function(){return be().muted},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw a.Z.BAD_ARGUMENT_ERROR;be().volume=e},getVolume:function(){return be().volume},time:ye,duration:ve,timeAsUTC:function(){if(!m)throw re;return ye()<0?NaN:Oe(ye())},durationAsUTC:function(){if(!m)throw re;return Oe(ve())},getActiveStream:Ie,getDVRWindowSize:function(){var e=U&&U.hasVideoTrack()?a.Z.VIDEO:a.Z.AUDIO,t=Y.getCurrentDVRInfo(e);return t?t.manifestInfo.dvrWindowSize:0},getDVRSeekOffset:me,getAvailableBaseUrls:function(){var e=Z.getValue();return e?L.getBaseUrls(e):[]},getAvailableLocations:function(){var e=Z.getValue();if(!e)return[];var t=O.getLocation(e),n=G.getSynthesizedLocationElements(t);return t.concat(n)},getTargetLiveDelay:function(){if(!m)throw re;return q.getOriginalLiveDelay()},convertToTimeCode:function(e){e=Math.max(e,0);var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())},formatUTC:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=new Date(1e3*e),a=i.toLocaleDateString(t),s=i.toLocaleTimeString(t,{hour12:n});return r?s+" "+a:s},getVersion:he,getDebug:function(){return ce},getBufferLength:function(e){var n=[a.Z.VIDEO,a.Z.AUDIO,a.Z.TEXT];if(e)return-1!==n.indexOf(e)?Ee().getCurrentBufferLevel(e)||NaN:(t.warn("getBufferLength requested for invalid type"),NaN);var r=n.map((function(e){return Ae(e).length>0?Ee().getCurrentBufferLevel(e):Number.MAX_VALUE})).reduce((function(e,t){return Math.min(e,t)}));return r===Number.MAX_VALUE?NaN:r},getTTMLRenderingDiv:function(){return Q?Q.getTTMLRenderingDiv():null},getVideoElement:be,getSource:function(){if(!n)throw ae;return n},updateSource:function(e){n=e,U.load(n)},getCurrentLiveLatency:function(){if(!h)throw se;return m?q.getCurrentLiveLatency():NaN},getTopBitrateInfoFor:function(e){if(!g)throw ne;return _.getTopBitrateInfoFor(e)},setAutoPlay:_e,getAutoPlay:function(){return y},getDashMetrics:Ee,getQualityFor:function(e){if(!g)throw ne;if(e===a.Z.IMAGE){var t=Ie();if(!t)return-1;var n=t.getThumbnailController();return n?n.getCurrentTrackIndex():-1}return _.getQualityFor(e)},setQualityFor:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!g)throw ne;if(e===a.Z.IMAGE){var r=Ie();if(!r)return;var i=r.getThumbnailController();i&&i.setTrackByIndex(t)}_.setPlaybackQuality(e,U.getActiveStreamInfo(),t,{forceReplace:n})},updatePortalSize:function(){_.setElementSize(),_.setWindowResizeEventCalled(!0)},enableText:function(e){var t=U.getActiveStreamInfo();return!(!t||!B)&&B.enableText(t.id,e)},enableForcedTextStreaming:function(e){return!(!U.getActiveStreamInfo()||!B)&&B.enableForcedTextStreaming(e)},isTextEnabled:function(){var e=U.getActiveStreamInfo();return!(!e||!B)&&B.isTextEnabled(e)},setTextTrack:function(e){if(!m)throw re;var t=U.getActiveStreamInfo();t&&B&&B.setTextTrack(t.id,e)},getBitrateInfoListFor:function(e){if(!g)throw ne;var t=Ie();return t?t.getBitrateListFor(e):[]},getStreamsFromManifest:function(e){if(!g)throw ne;return O.getStreamsInfo(e)},getTracksFor:Ae,getTracksForTypeFromManifest:function(e,t,n){if(!g)throw ne;return(n=n||O.getStreamsInfo(t,1)[0])?O.getAllMediaInfoForType(n,e,t):[]},getCurrentTrackFor:function(e){if(!g)throw ne;var t=U.getActiveStreamInfo();return S.getCurrentTrackFor(e,t.id)},setInitialMediaSettingsFor:function(e,t){if(!h)throw se;S.setInitialSettings(e,t)},getInitialMediaSettingsFor:function(e){if(!h)throw se;return S.getInitialSettings(e)},setCurrentTrack:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!g)throw ne;S.setTrack(e,t)},addABRCustomRule:function(e,t,n){M.addAbrCustomRule(e,t,n)},removeABRCustomRule:function(e){M.removeAbrCustomRule(e)},removeAllABRCustomRule:function(){M.removeAllAbrCustomRule()},getABRCustomRules:function(){return M.getAbrCustomRules()},getAverageThroughput:function(e){var t=_.getThroughputHistory(),n=q.getIsDynamic();return t?t.getAverageThroughput(e,n):0},retrieveManifest:function(e,t){var n=Re(),r=this;le.on(u.Z.INTERNAL_MANIFEST_LOADED,(function e(i){i.error?t(null,i.error):t(i.manifest),le.off(u.Z.INTERNAL_MANIFEST_LOADED,e,r),n.reset()}),r),J.initialize(e),n.load(e)},addUTCTimingSource:function(e,t){M.addUTCTimingSource(e,t)},removeUTCTimingSource:function(e,t){M.removeUTCTimingSource(e,t)},clearDefaultUTCTimingSources:function(){M.clearDefaultUTCTimingSources()},restoreDefaultUTCTimingSources:Te,setXHRWithCredentialsForType:function(e,t){M.setXHRWithCredentialsForType(e,t)},getXHRWithCredentialsForType:function(e){return M.getXHRWithCredentialsForType(e)},getProtectionController:function(){return De()},attachProtectionController:function(e){A=e},setProtectionData:function(e){r=e,U&&U.setProtectionData(r)},registerLicenseRequestFilter:function(e){M.registerLicenseRequestFilter(e)},registerLicenseResponseFilter:function(e){M.registerLicenseResponseFilter(e)},unregisterLicenseRequestFilter:function(e){M.unregisterLicenseRequestFilter(e)},unregisterLicenseResponseFilter:function(e){M.unregisterLicenseResponseFilter(e)},registerCustomCapabilitiesFilter:function(e){M.registerCustomCapabilitiesFilter(e)},unregisterCustomCapabilitiesFilter:function(e){M.unregisterCustomCapabilitiesFilter(e)},setCustomInitialTrackSelectionFunction:function(e){M.setCustomInitialTrackSelectionFunction(e)},resetCustomInitialTrackSelectionFunction:function(){M.resetCustomInitialTrackSelectionFunction(null)},attachTTMLRenderingDiv:function(e){if(!Q.getElement())throw ie;Q.setTTMLRenderingDiv(e)},attachVttRenderingDiv:function(e){if(!Q.getElement())throw ie;Q.setVttRenderingDiv(e)},getCurrentTextTrackIndex:function(){var e=U.getActiveStreamInfo();if(e&&B)return B.getCurrentTrackIdx(e.id)},provideThumbnail:function(e,t){if("function"==typeof t)if(e<0)t(null);else{var n=q.getIsDynamic()?me(e):e,r=U.getStreamForTime(n);if(null!==r){var i=r.getThumbnailController();if(i)return i.provide(n,t);t(null)}else t(null)}},getDashAdapter:function(){return O},getOfflineController:function(){return Ne()},triggerSteeringRequest:function(){if(G)return G.loadSteeringData()},getCurrentSteeringResponseData:function(){if(G)return G.getCurrentSteeringResponseData()},getSettings:function(){return ue.get()},updateSettings:function(e){ue.update(e)},resetSettings:function(){ue.reset()},reset:de,destroy:function(){de(),c.Z.deleteSingletonInstances(oe)}},t=ce.getLogger(e),h=!1,m=!1,g=!1,y=!0,v=NaN,A=null,N=null,r=null,O=null,te=null,u.Z.extend(f.Z),P=Vr(oe).getInstance(),M=(0,ct.Z)(oe).getInstance(),Q=si(oe).getInstance(),J=Br(oe).getInstance(),e}Na.__dashjs_factory_name="MediaPlayer";var Oa=c.Z.getClassFactory(Na);Oa.events=f.Z,Oa.errors=I,c.Z.updateClassFactory(Na.__dashjs_factory_name,Oa);var Pa=Oa},8825:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var o=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=s(t);if(n){var i=s(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return a(this,e)});function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this)).AST_IN_FUTURE="astInFuture",e.BASE_URLS_UPDATED="baseUrlsUpdated",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",e.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",e.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",e.DYNAMIC_TO_STATIC="dynamicToStatic",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADING_STARTED="manifestLoadingStarted",e.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_UPDATED="streamUpdated",e.STREAM_ACTIVATED="streamActivated",e.STREAM_DEACTIVATED="streamDeactivated",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.CUE_ENTER="cueEnter",e.CUE_EXIT="cueExit",e.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.CAN_PLAY_THROUGH="canPlayThrough",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_LOADED_DATA="playbackLoadedData",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e.EVENT_MODE_ON_START="eventModeOnStart",e.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",e.CONFORMANCE_VIOLATION="conformanceViolation",e.REPRESENTATION_SWITCH="representationSwitch",e.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",e.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",e.INBAND_PRFT="inbandPrft",e.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",e.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming",e}return o}(n(8342).Z));t.Z=o},3393:function(e,t){"use strict";var n=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t;return(t=[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.CONTENT_STEERING="contentSteering",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST="abrFetchThroughputCalculationAAST",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY="highestSelectionPriority",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.TEXT_DISABLED="disabled",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.FONT_DOWNLOAD_DVB_SCHEME="urn:dvb:dash:fontdownload:2014",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability",this.OFF_MIMETYPE="application/font-sfnt",this.WOFF_MIMETYPE="application/font-woff",this.VIDEO_ELEMENT_READY_STATES={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},this.FILE_LOADER_TYPES={FETCH:"fetch_loader",XHR:"xhr_loader"}}}])&&function(e,t){for(var n=0;n=400||t.responsecode<100||t.responsecode>=600)&&u({errorcode:t.responsecode||i.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation})}function p(e){var t;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=i.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=i.CORRUPT_MEDIA_OTHER;break;default:return}u({errorcode:t})}return t={initialize:function(){r.on(l.MANIFEST_UPDATED,c,t),r.on(l.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,d,t),r.on(l.METRIC_ADDED,h,t),r.on(l.METRIC_UPDATED,h,t),r.on(l.PLAYBACK_ERROR,p,t),r.on(a.Z.BECAME_REPORTING_PLAYER,f,t)},reset:function(){r.off(l.MANIFEST_UPDATED,c,t),r.off(l.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,d,t),r.off(l.METRIC_ADDED,h,t),r.off(l.METRIC_UPDATED,h,t),r.off(l.PLAYBACK_ERROR,p,t),r.off(a.Z.BECAME_REPORTING_PLAYER,f,t)}}}s.__dashjs_factory_name="DVBErrorsTranslator";var o=dashjs.FactoryMaker.getSingletonFactory(s),l=n(2295);function u(e){e=e||{};var t,n,r=!1,i=this.context,a=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach((function(e){var t=e.starttime,r=t+e.duration;n.add(t,r)})),r=!!e[0]._useWallClockTime)},reset:function(){n.clear()},isEnabled:function(){var e,t=n.length;if(!t)return!0;e=r?(new Date).getTime()/1e3:a.currentTime;for(var i=0;i=200&&i.status<300)&&n&&n())};c.push(i);try{i.open("GET",e),i.onloadend=a,i.onerror=a,i.send()}catch(e){i.onerror()}}(i="".concat(o,"?").concat(i),0,(function(){s=!1}))}))},initialize:function(e,t){var n;if(l=t,!(o=e.dvbReportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");a||((n=e.dvbProbability)&&(1e3===n||n/1e3>=i.random())&&(s=!0),a=!0)},reset:function(){h()}},n=f(u).getInstance(),i=p(u).getInstance(),r=(0,g.Z)(u).getInstance(),h(),t}m.__dashjs_factory_name="DVBReporting";var y=dashjs.FactoryMaker.getClassFactory(m);function v(e){e=e||{};var t={"urn:dvb:dash:reporting:2014":y},n=this.context,r=e.debug?e.debug.getLogger(undefined):{},i=e.metricsConstants,a=e.mediaPlayerModel||{};return{create:function(e,s){var o;try{(o=t[e.schemeIdUri](n).create({metricsConstants:i,mediaPlayerModel:a})).initialize(e,s)}catch(s){o=null,r.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(e.schemeIdUri," (").concat(s.message,")"))}return o},register:function(e,n){t[e]=n},unregister:function(e){delete t[e]}}}v.__dashjs_factory_name="ReportingFactory";var _=dashjs.FactoryMaker.getSingletonFactory(v);function T(e){var t=[],n=_(this.context).getInstance(e);return{initialize:function(e,r){e.some((function(e){var i=n.create(e,r);if(i)return t.push(i),!0}))},reset:function(){t.forEach((function(e){return e.reset()})),t=[]},report:function(e,n){t.forEach((function(t){return t.report(e,n)}))}}}T.__dashjs_factory_name="ReportingController";var E=dashjs.FactoryMaker.getClassFactory(T);function b(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}b.__dashjs_factory_name="HandlerHelpers";var S=dashjs.FactoryMaker.getSingletonFactory(b);function A(e){var t,n,r,i,a;e=e||{};var s=this.context,o=S(s).getInstance(),l=[],u=e.metricsConstants;function c(){var e=function(){try{return Object.keys(l).map((function(e){return l[e]})).reduce((function(e,t){return e.level0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return t&&r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e,t){return"pssh"in e?(e.pssh.__text=e.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),t.decodeArray(e.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(e){if(null==e)return[];for(var t=new DataView(e.buffer||e),n={},r=0;;){var i,a,s=void 0,o=r;if(r>=t.buffer.byteLength)break;if(i=r+t.getUint32(r),r+=4,1886614376===t.getUint32(r))if(r+=4,0===(a=t.getUint8(r))||1===a){r++,r+=3,s="";var l=void 0,u=void 0;for(l=0;l<4;l++)s+=1===(u=t.getUint8(r+l).toString(16)).length?"0"+u:u;for(r+=4,s+="-",l=0;l<2;l++)s+=1===(u=t.getUint8(r+l).toString(16)).length?"0"+u:u;for(r+=2,s+="-",l=0;l<2;l++)s+=1===(u=t.getUint8(r+l).toString(16)).length?"0"+u:u;for(r+=2,s+="-",l=0;l<2;l++)s+=1===(u=t.getUint8(r+l).toString(16)).length?"0"+u:u;for(r+=2,s+="-",l=0;l<6;l++)s+=1===(u=t.getUint8(r+l).toString(16)).length?"0"+u:u;r+=6,r+=4,n[s=s.toLowerCase()]=t.buffer.slice(o,i),r=i}else r=i;else r=i}return n}},{key:"getLicenseServerUrlFromMediaInfo",value:function(e,t){try{if(!e||0===e.length)return null;for(var n=0,i=null;n0){var s=a.contentProtection.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===t}));if(s&&s.length>0)for(var o=0;o=0?l[t.ks.systemString].priority:e.length)-(l&&l[n.ks.systemString]&&l[n.ks.systemString].priority>=0?l[n.ks.systemString].priority:e.length)}));for(var a=0;a0&&A.setServerCertificate(R.decodeArray(t.serverCertificate).buffer),k()}})).catch((function(e){_=null,T=!1,t||w.trigger(I.KEY_SYSTEM_SELECTED,{data:null,error:new d.Z(c.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,c.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+e.error)})}))}}(e,t)}function k(){for(var e,t=0;t0?t.audioRobustness:y,l=t&&t.videoRobustness&&t.videoRobustness.length>0?t.videoRobustness:y,u=e.sessionType,c=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",d=t&&t.persistentState?t.persistentState:"temporary"===u?"optional":"required";return o.forEach((function(e){e.type===D.AUDIO?n.push(new a(e.codec,i)):e.type===D.VIDEO&&r.push(new a(e.codec,l))})),new s(n,r,c,d,[u])}function V(e){e.error?w.trigger(I.KEY_STATUSES_CHANGED,{data:null,error:e.error}):n.debug("DRM: key status = "+e.status)}function Y(e){n.debug("DRM: onKeyMessage");var t=e.data;w.trigger(I.KEY_MESSAGE,{data:t});var r=t.messageType?t.messageType:"license-request",a=t.message,s=t.sessionToken,l=j(_),u=S.getLicenseServerModelInstance(_,l,r),m={sessionToken:s,messageType:r};if(a&&0!==a.byteLength){if(!u)return n.debug("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+s.getSessionId()),void Z(m);if(S.isClearKey(_)){var y=S.processClearKeyLicenseRequest(_,l,a);if(y&&y.keyPairs&&y.keyPairs.length>0)return n.debug("DRM: ClearKey license request handled by application!"),Z(m),void A.updateKeySession(s,y)}!function(e,t,n){var r=e.sessionToken,a=e.messageType?e.messageType:"license-request",s={sessionToken:r,messageType:a},l=_?_.systemString:null,u=function(e,t,n,r,a){var s=null,l=r.message;if(e&&e.serverURL){var u=e.serverURL;"string"==typeof u&&""!==u?s=u:"object"===v(u)&&u.hasOwnProperty(t)&&(s=u[t])}else if(e&&e.laURL&&""!==e.laURL)s=e.laURL;else if(!(s=i.getLicenseServerUrlFromMediaInfo(o,_.schemeIdURI))&&!S.isClearKey(_)){var c=i.getPSSHData(n.initData);(s=_.getLicenseServerURLFromInitData(c))||(s=r.laURL)}return a.getServerURLFromMessage(s,l,t)}(n,a,r,e,t);if(u){var m={},y=!1;n&&W(m,n.httpRequestHeaders);var T=e.message;W(m,_.getRequestHeadersFromMessage(T)),Object.keys(m).forEach((function(e){"authorization"===e.toLowerCase()&&(y=!0)})),n&&"boolean"==typeof n.withCredentials&&(y=n.withCredentials);var E=function(e){if(A)if(e.status>=200&&e.status<=299){var n=g.Z.parseHttpHeaders(e.getAllResponseHeaders?e.getAllResponseHeaders():null),i=new h(e.responseURL,n,e.response);$(M.getLicenseResponseFilters(),i).then((function(){var n=t.getLicenseMessage(i.data,l,a);null!==n?(Z(s),A.updateKeySession(r,n)):X(e,s,l,a,t)}))}else X(e,s,l,a,t)},b=function(e){Z(s,new d.Z(c.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,c.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+l+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},w=function(e){Z(s,new d.Z(c.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,c.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+l+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},I=_.getLicenseRequestFromMessage(T),C=t.getHTTPMethod(a),R=t.getResponseType(l,a),D=n&&!isNaN(n.httpTimeout)?n.httpTimeout:8e3,N=r.getSessionId()||null,O=new f(u,C,R,m,y,a,N,I),x=isNaN(P.get().streaming.retryAttempts[p.w.LICENSE])?3:P.get().streaming.retryAttempts[p.w.LICENSE];$(M.getLicenseRequestFilters(),O).then((function(){K(O,x,D,E,b,w)}))}else Z(s,new d.Z(c.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,c.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE))}(t,u,l)}else Z(m,new d.Z(c.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,c.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function Z(e,t){w.trigger(I.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function K(e,t,r,i,a,s){var o=new XMLHttpRequest;if(P.get().streaming.cmcd&&P.get().streaming.cmcd.enabled&&P.get().streaming.cmcd.mode===m.Z.CMCD_MODE_QUERY){var l=O.getQueryParameter({url:e.url,type:p.w.LICENSE});l&&(e.url=g.Z.addAditionalQueryParameterToUrl(e.url,[l]))}for(var u in o.open(e.method,e.url,!0),o.responseType=e.responseType,o.withCredentials=e.withCredentials,r>0&&(o.timeout=r),e.headers)o.setRequestHeader(u,e.headers[u]);if(P.get().streaming.cmcd&&P.get().streaming.cmcd.enabled&&P.get().streaming.cmcd.mode===m.Z.CMCD_MODE_HEADER){var c=O.getHeaderParameters({url:e.url,type:p.w.LICENSE});if(c)for(var d in c){var f=c[d];f&&o.setRequestHeader(d,f)}}var h=function(){t--;var n=isNaN(P.get().streaming.retryIntervals[p.w.LICENSE])?1e3:P.get().streaming.retryIntervals[p.w.LICENSE];b=setTimeout((function(){K(e,t,r,i,a,s)}),n)};o.onload=function(){E=null,this.status>=200&&this.status<=299||t<=0?i(this):(n.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+t),h())},o.ontimeout=o.onerror=function(){E=null,t<=0?s(this):(n.warn("License request network request failed . Retrying it... Pending retries: "+t),h())},o.onabort=function(){a(this)},w.trigger(I.LICENSE_REQUEST_SENDING,{url:e.url,headers:e.headers,payload:e.data,sessionId:e.sessionId}),E=o,o.send(e.data)}function z(){E&&(E.onloadend=E.onerror=E.onprogress=void 0,E.abort(),E=null),b&&(clearTimeout(b),b=null)}function W(e,t){if(t)for(var n in t)e[n]=t[n]}function X(e,t,n,r,i){var a="NONE",s=null;e.response&&(a=i.getErrorResponse(e.response,n,r),s={serverResponse:e.response||null,responseCode:e.status||null,responseText:e.statusText||null}),Z(t,new d.Z(c.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,c.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+a,s))}function $(e,t){return e?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function Q(e,t){if(!P.get().streaming.protection.ignoreEmeEncryptedEvent){if(n.debug("DRM: onNeedKey"),"cenc"!==e.key.initDataType)return void n.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType);if(0===o.length&&(n.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(t=void 0===t?1:t+1)<5))return void N.push(setTimeout((function(){Q(e,t)}),500));var a=e.key.initData;if(ArrayBuffer.isView(a)&&(a=a.buffer),_){var s=i.getPSSHForKeySystem(_,a);if(s&&q(s))return}n.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(a)));var c=S.getSupportedKeySystemsFromSegmentPssh(a,l,u);if(0===c.length)return void n.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");!function(e){r.push(e),L(e,!1)}(c)}}return t={initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");x(),o.push(e)},clearMediaInfoArray:function(){o=[]},handleKeySystemFromManifest:function(){if(o&&0!==o.length){var e=[];o.forEach((function(t){var n=S.getSupportedKeySystemsFromContentProtection(t.contentProtection,l,u);n.length>0&&(0===e.length&&(e=n),r.push(n))})),e&&e.length>0&&L(e,!0)}},createKeySession:B,loadKeySession:U,removeKeySession:function(e){x(),A.removeKeySession(e)},closeKeySession:function(e){x(),A.closeKeySession(e)},setServerCertificate:function(e){x(),A.setServerCertificate(e)},setMediaElement:H,setSessionType:function(e){u=e},setRobustnessLevel:function(e){y=e},setProtectionData:function(e){l=e,S.setProtectionData(e)},getSupportedKeySystemsFromContentProtection:function(e){return x(),S.getSupportedKeySystemsFromContentProtection(e,l,u)},getKeySystems:function(){return S?S.getKeySystems():[]},setKeySystems:function(e){S&&S.setKeySystems(e)},stop:function(){z(),A&&A.stop()},reset:function(){w.off(I.INTERNAL_KEY_MESSAGE,Y,t),w.off(I.INTERNAL_KEY_STATUS_CHANGED,V,t),x(),z(),H(null),_=null,T=!1,A&&(A.reset(),A=null),N.forEach((function(e){return clearTimeout(e)})),N=[],o=[],r=[]}},n=C.getLogger(t),r=[],o=[],u="temporary",y="",E=null,b=null,w.on(I.INTERNAL_KEY_MESSAGE,Y,t),w.on(I.INTERNAL_KEY_STATUS_CHANGED,V,t),t}_.__dashjs_factory_name="ProtectionController";var T=y.Z.getClassFactory(_),E=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keyID=t,this.key=n};var b=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n&&"persistent"!==n&&"temporary"!==n)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=n}var t;return(t=[{key:"toJWK",value:function(){var e,t=this.keyPairs.length,n={keys:[]};for(e=0;e%CUSTOMDATA%'.replace("%CUSTOMDATA%",t),i=[],s=0;s0&&(e[0]&&("string"==typeof e[0]?t=e[0]:n=e[0]),e[1]&&("string"==typeof e[1]?t=e[1]:n=e[1])),{status:t,keyId:n}}function T(e,t){var r={session:e,keyId:t.keyId,initData:t.initData,sessionId:t.sessionId,sessionType:t.sessionType,handleEvent:function(e){switch(e.type){case"keystatuseschange":f.trigger(h.KEY_STATUSES_CHANGED,{data:this}),e.target.keyStatuses.forEach((function(){var e=_(arguments);"expired"===e.status?f.trigger(h.INTERNAL_KEY_STATUS_CHANGED,{error:new d.Z(c.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,c.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)}):f.trigger(h.INTERNAL_KEY_STATUS_CHANGED,e)}));break;case"message":var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;f.trigger(h.INTERNAL_KEY_MESSAGE,{data:new ae(this,t,void 0,e.messageType)})}},getKeyId:function(){return this.keyId},getSessionId:function(){return e.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getUsable:function(){var t=!1;return e.keyStatuses.forEach((function(){"usable"===_(arguments).status&&(t=!0)})),t}};return e.addEventListener("keystatuseschange",r),e.addEventListener("message",r),e.closed.then((function(){v(r),n.debug("DRM: Session closed. SessionID = "+r.getSessionId()),f.trigger(h.KEY_SESSION_CLOSED,{data:r.getSessionId()})})),s.push(r),r}return t={getAllInitData:function(){for(var e=[],t=0;t=1?t():(e=t.bind(this),r.addEventListener("loadedmetadata",e))}return t={getAllInitData:function(){for(var e=[],t=0;t0&&(t=o.ksConfiguration.videoCapabilities[0]),null===t&&o.ksConfiguration.audioCapabilities&&o.ksConfiguration.audioCapabilities.length>0&&(t=o.ksConfiguration.audioCapabilities[0]),null===t)throw new Error("Can not create sessions for unknown content types.");var r=t.contentType,s=a.createSession(r,new Uint8Array(e.initData),e.cdmData?new Uint8Array(e.cdmData):null),u=function(e,t){return{session:e,keyId:t.keyId,initData:t.initData,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},handleEvent:function(e){switch(e.type){case y.error:p.trigger(g.KEY_ERROR,{error:new d.Z(c.MEDIA_KEYERR_CODE,"KeyError",this)});break;case y.message:var t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;p.trigger(g.INTERNAL_KEY_MESSAGE,{data:new ae(this,t,e.destinationURL)});break;case y.ready:n.debug("DRM: Key added."),p.trigger(g.KEY_ADDED);break;case y.close:n.debug("DRM: Session closed. SessionID = "+this.getSessionId()),p.trigger(g.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}}(s,e);s.addEventListener(y.error,u),s.addEventListener(y.message,u),s.addEventListener(y.ready,u),s.addEventListener(y.close,u),l.push(u),n.debug("DRM: Session created. SessionID = "+u.getSessionId()),p.trigger(g.KEY_SESSION_CREATED,{data:u})},updateKeySession:function(e,t){var n=e.session;f.isClearKey(i)?n.update(new Uint8Array(t.toJWK())):n.update(new Uint8Array(t)),p.trigger(g.KEY_SESSION_UPDATED)},closeKeySession:_,setServerCertificate:function(){},loadKeySession:function(){},removeKeySession:function(){},stop:v,reset:v},n=m.getLogger(t),r=null,i=null,a=null,o=null,l=[],f=J(h).getInstance(),u={handleEvent:function(e){if(e.type===y.needkey&&e.initData){var t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;p.trigger(g.NEED_KEY,{key:new ie(t,"cenc")})}}},t}ce.__dashjs_factory_name="ProtectionModel_3Feb2014";var de=dashjs.FactoryMaker.getClassFactory(ce);function fe(e){e=e||{};var t,n,r,i,a,o,l,u,f,h=this.context,p=e.eventBus,g=e.events,m=e.debug,y=e.api,v=e.errHandler;function _(){r&&b();for(var e=0;e0&&(t=o.shift(),l.push(t),t.sessionId=e.sessionId,p.trigger(g.KEY_SESSION_CREATED,{data:t})):o.length>0&&(t=o.shift(),l.push(t),0!==o.length&&v.error(new d.Z(c.MEDIA_KEY_MESSAGE_ERROR_CODE,c.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),t){var s=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=s,p.trigger(g.INTERNAL_KEY_MESSAGE,{data:new ae(t,s,e.defaultURL)})}else n.warn("No session token found for key message")}}},t}fe.__dashjs_factory_name="ProtectionModel_01b";var he=dashjs.FactoryMaker.getClassFactory(fe),pe=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],ge=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keyadded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function me(){var e,t=this.context;function n(e,t){for(var n=0;nf.Z.NO_CHANGE}))}function E(e){var t,n,r,i,a,s={},o=null;if(0!==e.length){for(s[f.Z.PRIORITY.STRONG]={quality:f.Z.NO_CHANGE,reason:null},s[f.Z.PRIORITY.WEAK]={quality:f.Z.NO_CHANGE,reason:null},s[f.Z.PRIORITY.DEFAULT]={quality:f.Z.NO_CHANGE,reason:null},t=0,n=e.length;tr.quality)&&(s[r.priority].quality=r.quality,s[r.priority].reason=r.reason||null);return s[f.Z.PRIORITY.WEAK].quality!==f.Z.NO_CHANGE&&(o=s[f.Z.PRIORITY.WEAK]),s[f.Z.PRIORITY.DEFAULT].quality!==f.Z.NO_CHANGE&&(o=s[f.Z.PRIORITY.DEFAULT]),s[f.Z.PRIORITY.STRONG].quality!==f.Z.NO_CHANGE&&(o=s[f.Z.PRIORITY.STRONG]),o&&(i=o.quality,a=o.reason),(0,f.Z)(d).create(i,a)}}return{initialize:function(){t=[],n=[],_.get().streaming.abr.useDefaultABRRules&&(_.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_L2A?t.push((0,u.Z)(d).create({dashMetrics:v,settings:_})):_.get().streaming.abr.ABRStrategy===h.Z.ABR_STRATEGY_LoLP?t.push((0,c.Z)(d).create({dashMetrics:v})):(t.push((0,l.Z)(d).create({dashMetrics:v,mediaPlayerModel:m,settings:_})),t.push((0,r.Z)(d).create({dashMetrics:v})),_.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&t.push((0,i.Z)(d).create({dashMetrics:v,settings:_})),_.get().streaming.abr.additionalAbrRules.switchHistoryRule&&t.push((0,o.Z)(d).create()),_.get().streaming.abr.additionalAbrRules.droppedFramesRule&&t.push((0,s.Z)(d).create()),_.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&n.push((0,a.Z)(d).create({dashMetrics:v,mediaPlayerModel:m,settings:_})))),y.getAbrCustomRules().forEach((function(e){e.type===p&&t.push(e.rule(d).create()),e.type===g&&n.push(e.rule(d).create())}))},reset:function(){[t,n].forEach((function(e){e&&e.length&&e.forEach((function(e){return e.reset&&e.reset()}))})),t=[],n=[]},getMaxQuality:function(e){return E(T(t.map((function(t){return t.getMaxIndex(e)}))))||(0,f.Z)(d).create()},getMinSwitchRequest:E,shouldAbandonFragment:function(e,t){var r=E(T(n.map((function(n){return n.shouldAbandon(e,t)}))));return r&&(r.reason.forceAbandon=!0),r||(0,f.Z)(d).create()},getQualitySwitchRules:function(){return t}}}m.__dashjs_factory_name="ABRRulesCollection";var y=d.Z.getClassFactory(m);y.QUALITY_SWITCH_RULES=p,y.ABANDON_FRAGMENT_RULES=g,d.Z.updateSingletonFactory(m.__dashjs_factory_name,y),t.Z=y},7423:function(e,t,n){"use strict";var r=n(2068),i=n(5448),a=n(6398);function s(e){e=e||{};var t,n,i,o,l,u=this.context,c=e.mediaPlayerModel,d=e.dashMetrics,f=e.settings;function h(){i={},o={},l=[]}return t={shouldAbandon:function(e){var t=(0,r.Z)(u).create(r.Z.NO_CHANGE,{name:s.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return t;var a,h,p=e.getMediaInfo(),g=e.getMediaType(),m=e.getStreamInfo(),y=m?m.id:null,v=e.getCurrentRequest();if(!isNaN(v.index)){a=g,h=v.index,i[a]=i[a]||{},i[a][h]=i[a][h]||{};var _=c.getStableBufferTime();if(d.getCurrentBufferLevel(g)>_)return t;var T=i[g][v.index];if(null===T||null===v.firstByteDate||o.hasOwnProperty(T.id))return t;if(void 0===T.firstByteTime&&(l[g]=[],T.firstByteTime=v.firstByteDate.getTime(),T.segmentDuration=v.duration,T.bytesTotal=v.bytesTotal,T.id=v.index),T.bytesLoaded=v.bytesLoaded,T.elapsedTime=(new Date).getTime()-T.firstByteTime,T.bytesLoaded>0&&T.elapsedTime>0&&function(e,t){l[e]=l[e]||[],l[e].push(t)}(g,Math.round(8*T.bytesLoaded/T.elapsedTime)),l[g].length>=f.get().streaming.abr.abrRulesParameters.abandonRequestsRule.minLengthToAverage&&T.elapsedTime>f.get().streaming.abr.abrRulesParameters.abandonRequestsRule.graceTimeThreshold&&T.bytesLoadedT.bytesTotal*A[C].bitrate/A[b.getQualityFor(g,y)].bitrate&&(t.quality=C,t.reason.throughput=T.measuredBandwidthInKbps,t.reason.fragmentID=T.id,t.reason.rule=this.getClassName(),o[T.id]=T,n.debug("["+g+"] frag id",T.id," is asking to abandon and switch to quality to ",C," measured bandwidth was",T.measuredBandwidthInKbps),delete i[g][T.id])}}else T.bytesLoaded===T.bytesTotal&&delete i[g][T.id]}return t},reset:h},n=(0,a.Z)(u).getInstance().getLogger(t),h(),t}s.__dashjs_factory_name="AbandonRequestsRule",t.Z=i.Z.getClassFactory(s)},3112:function(e,t,n){"use strict";var r=n(3860),i=n(2068),a=n(5448),s=n(7855),o=n(5595),l=n(8512),u=n(6398),c=n(8825),d=n(3393),f=10;function h(e){e=e||{};var t,n,a,h=this.context,p=e.dashMetrics,g=e.mediaPlayerModel,m=(0,o.Z)(h).getInstance();function y(e,t,n){var r=n.reduce((function(e,t,r){return t>n[e]?r:e}),0);if(0===r)return null;var i=Math.max(e,f+2*t.length),a=(n[r]-1)/(i/f-1);return{gp:a,Vp:f/a}}function v(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function _(e,t){var n=g.getStableBufferTime();if(e.stableBufferTime!==n){var r=y(n,e.bitrates,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var i=p.getCurrentBufferLevel(t),a=i+e.placeholderBuffer;a-=f,a*=r.Vp/e.Vp,a+=f,e.stableBufferTime=n,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,a-i)}}}function T(e,t){return e.Vp*(e.utilities[t]+e.gp)}function E(e,t){for(var n=e.bitrates[t],r=e.utilities[t],i=0,a=t-1;a>=0;--a)if(e.utilities[a]t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,I(t,e.chunk.mediaInfo.type)}}}function w(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===s.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=a[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),I(t,e.mediaType))}}function I(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var n=p.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=T(e,e.lastQuality),i=Math.max(0,r-n);e.placeholderBuffer=Math.min(i,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function C(e){if(e){var t=a[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function R(e){if(e){var t=a[e.mediaType];if(t&&0!==t.state){var n,r=p.getCurrentBufferLevel(e.mediaType);n=t.abrQuality>0?E(t,t.abrQuality):f;var i=Math.max(0,n-r);t.placeholderBuffer=Math.min(t.placeholderBuffer,i)}}}function D(){a={}}return t={getMaxIndex:function(e){var t=(0,i.Z)(h).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return t;var r=e.getMediaInfo(),s=e.getMediaType(),o=e.getScheduleController(),l=e.getStreamInfo(),u=e.getAbrController(),c=u.getThroughputHistory(),d=l?l.id:null,f=l&&l.manifestInfo&&l.manifestInfo.isDynamic,m=e.useBufferOccupancyABR();if(t.reason=t.reason||{},!m)return t;o.setTimeToLoadDelay(0);var b=function(e){var t=e.getMediaType(),n=a[t];return n?0!==n.state&&_(n,t):(n=function(e){var t={},n=e.getMediaInfo().bitrateList.map((function(e){return e.bandwidth})),r=function(e){return e.map((function(e){return Math.log(e)}))}(n);r=r.map((function(e){return e-r[0]+1}));var i=g.getStableBufferTime(),a=y(i,n,r);return a?(t.state=1,t.bitrates=n,t.utilities=r,t.stableBufferTime=i,t.Vp=a.Vp,t.gp=a.gp,t.lastQuality=0,v(t)):t.state=0,t}(e),a[t]=n),n}(e);if(0===b.state)return t;var S,A=p.getCurrentBufferLevel(s),w=c.getAverageThroughput(s,f),I=c.getSafeAverageThroughput(s,f),C=c.getAverageLatency(s);if(t.reason.state=b.state,t.reason.throughput=w,t.reason.latency=C,isNaN(w))return t;switch(b.state){case 1:S=u.getQualityForBitrate(r,I,d,C),t.quality=S,t.reason.throughput=I,b.placeholderBuffer=Math.max(0,E(b,S)-A),b.lastQuality=S,!isNaN(b.lastSegmentDurationS)&&A>=b.lastSegmentDurationS&&(b.state=2);break;case 2:!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var i=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,i)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,_(e,t)}(b,s),S=function(e,t){for(var n=e.bitrates.length,r=NaN,i=NaN,a=0;a=i)&&(i=s,r=a)}return r}(b,A+b.placeholderBuffer);var R=u.getQualityForBitrate(r,I,d,C);S>b.lastQuality&&S>R&&(S=Math.max(R,b.lastQuality));var D=Math.max(0,A+b.placeholderBuffer-T(b,S));D<=b.placeholderBuffer?(b.placeholderBuffer-=D,D=0):(D-=b.placeholderBuffer,b.placeholderBuffer=0,S375&&l/u>.15)){c=d-1,t.debug("index: "+c+" Dropped Frames: "+l+" Total Frames: "+u);break}return(0,i.Z)(n).create(c,{droppedFrames:l})}return r}},t=(0,a.Z)(n).getInstance().getLogger(e),e}s.__dashjs_factory_name="DroppedFramesRule",t.Z=r.Z.getClassFactory(s)},6535:function(e,t,n){"use strict";var r=n(5595),i=n(8512),a=n(5448),s=n(6398),o=n(2068),l=n(3393),u=n(3860),c=n(8825);function d(e){e=e||{};var t,n,a,d=this.context,f=(0,r.Z)(d).getInstance(),h=e.dashMetrics;function p(){(a={})[l.Z.VIDEO]={ignoreCount:2},a[l.Z.AUDIO]={ignoreCount:2}}function g(){p()}function m(e){isNaN(e.startTime)||e.mediaType!==l.Z.AUDIO&&e.mediaType!==l.Z.VIDEO||a[e.mediaType].ignoreCount>0&&a[e.mediaType].ignoreCount--}return t={getMaxIndex:function(e){var t=(0,o.Z)(d).create();if(!e||!e.hasOwnProperty("getMediaType"))return t;!function(){if(!h||!h.hasOwnProperty("getCurrentBufferLevel")||!h.hasOwnProperty("getCurrentBufferState"))throw new Error(l.Z.MISSING_CONFIG_ERROR)}();var r=e.getMediaType(),i=h.getCurrentBufferState(r),s=e.getRepresentationInfo().fragmentDuration,c=e.getStreamInfo(),f=c?c.id:null,p=e.getScheduleController(),g=c&&c.manifestInfo&&c.manifestInfo.isDynamic;if(function(e,t){return!e&&a[t].ignoreCount>0}(p.getPlaybackController().getLowLatencyModeEnabled(),r)||!s)return t;if(i&&i.state===u.Z.BUFFER_EMPTY)n.debug("["+r+"] Switch to index 0; buffer is empty."),t.quality=0,t.reason="InsufficientBufferRule: Buffer is empty";else{var m=e.getMediaInfo(),y=e.getAbrController(),v=y.getThroughputHistory(),_=h.getCurrentBufferLevel(r),T=v.getAverageThroughput(r,g),E=v.getAverageLatency(r),b=T*(_/s)*.5;t.quality=y.getQualityForBitrate(m,b,f,E),t.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return t},reset:function(){p(),f.off(c.Z.PLAYBACK_SEEKING,g,t),f.off(i.Z.BYTES_APPENDED_END_FRAGMENT,m,t)}},n=(0,s.Z)(d).getInstance().getLogger(t),p(),f.on(c.Z.PLAYBACK_SEEKING,g,t),f.on(i.Z.BYTES_APPENDED_END_FRAGMENT,m,t),t}d.__dashjs_factory_name="InsufficientBufferRule",t.Z=a.Z.getClassFactory(d)},1914:function(e,t,n){"use strict";var r=n(3860),i=n(2068),a=n(5448),s=n(7855),o=n(5595),l=n(8512),u=n(6398),c=n(3393);function d(e){e=e||{};var t,n,a,d,f=this.context,h=e.dashMetrics,p=(0,o.Z)(f).getInstance();function g(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,e.lastSegmentUrl=""}function m(){for(var e in n)if(n.hasOwnProperty(e)){var t=n[e];0!==t.state&&(t.state=1,g(t))}}function y(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=n[e.chunk.mediaInfo.type],r=a[e.chunk.mediaInfo.type];if(t&&0!==t.state){var i=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||i>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=i,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=i,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,_(t,r)}}}function v(e){if(e&&e.metric===r.Z.HTTP_REQUEST&&e.value&&e.value.type===s.w.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=n[e.mediaType],i=a[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),_(t,i))}}function _(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function T(e){if(e&&e.mediaType){var t=n[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function E(e,t){if(e.length!==t.length)return-1;for(var n=0,r=0;r=O.B_target){N.state=2,O.Q=o;for(var P=0;Pk&&(B=-1),O.w[j]=O.prev_w[j]+B*(U/(2*l))*((O.Q+o)*(D*m[j]/k));O.w=function(e){for(var t=e.length,n=!1,r=[],i=0;i=a[u+1]){n=!0;break}n||(o=(s+a[t-1]-1)/t);for(var c=0;cN.lastQuality&&m[N.lastQuality+1]<=k&&(t=N.lastQuality+1),m[t]>=k&&(O.Q=2*Math.max(o,O.Q)),N.lastSegmentUrl=F.url}r.quality=t,r.reason.throughput=C,r.reason.latency=R,r.reason.bufferLevel=w,N.lastQuality=r.quality;break;default:d.debug("L2A ABR rule invoked in bad state."),r.quality=T.getQualityForBitrate(u,I,_.id,R),r.reason.state=N.state,r.reason.throughput=I,r.reason.latency=R,N.state=1,g(N)}return r},reset:function(){b(),p.off(l.Z.PLAYBACK_SEEKING,m,t),p.off(l.Z.MEDIA_FRAGMENT_LOADED,y,t),p.off(l.Z.METRIC_ADDED,v,t),p.off(l.Z.QUALITY_CHANGE_REQUESTED,T,t)}},d=(0,u.Z)(f).getInstance().getLogger(t),b(),p.on(l.Z.PLAYBACK_SEEKING,m,t),p.on(l.Z.MEDIA_FRAGMENT_LOADED,y,t),p.on(l.Z.METRIC_ADDED,v,t),p.on(l.Z.QUALITY_CHANGE_REQUESTED,T,t),t}d.__dashjs_factory_name="L2ARule",t.Z=a.Z.getClassFactory(d)},6070:function(e,t,n){"use strict";var r=n(5448),i=n(6398),a=n(2068);function s(){var e,t,n=this.context;return e={getMaxIndex:function(e){for(var r=e?e.getSwitchHistory():null,i=r?r.getSwitchRequests():[],s=0,o=0,l=0,u=(0,a.Z)(n).create(),c=0;c=6&&s/o>.075)){u.quality=c>0&&i[c].drops>0?c-1:c,u.reason={index:u.quality,drops:s,noDrops:o,dropSize:l},t.debug("Switch history rule index: "+u.quality+" samples: "+(s+o)+" drops: "+s);break}return u}},t=(0,i.Z)(n).getInstance().getLogger(e),e}s.__dashjs_factory_name="SwitchHistoryRule",t.Z=r.Z.getClassFactory(s)},5628:function(e,t,n){"use strict";var r=n(5448),i=n(2068),a=n(3393),s=n(3860);function o(e){e=e||{};var t=this.context,n=e.dashMetrics;return{getMaxIndex:function(e){var r=(0,i.Z)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("useBufferOccupancyABR")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("getScheduleController")))return r;!function(){if(!n||!n.hasOwnProperty("getCurrentBufferState"))throw new Error(a.Z.MISSING_CONFIG_ERROR)}();var o=e.getMediaInfo(),l=e.getMediaType(),u=n.getCurrentBufferState(l),c=e.getScheduleController(),d=e.getAbrController(),f=e.getStreamInfo(),h=f?f.id:null,p=f&&f.manifestInfo?f.manifestInfo.isDynamic:null,g=d.getThroughputHistory(),m=g.getSafeAverageThroughput(l,p),y=g.getAverageLatency(l),v=e.useBufferOccupancyABR();return isNaN(m)||!u||v||d.getAbandonmentStateFor(h,l)!==s.Z.ABANDON_LOAD&&(u.state===s.Z.BUFFER_LOADED||p)&&(r.quality=d.getQualityForBitrate(o,m,h,y),c.setTimeToLoadDelay(0),r.reason={throughput:m,latency:y}),r},reset:function(){}}}o.__dashjs_factory_name="ThroughputRule",t.Z=r.Z.getClassFactory(o)},4722:function(e,t,n){"use strict";var r=n(5448),i=n(6398);function a(){var e,t,n,r,a,s,o,l,u,c=this.context;function d(){n=null,r=1,a=100,s=0,o=null,l=null,u="dynamic_weight_selection"}function f(){var e=0;if(n)for(var t=0;te&&(e=r.state.throughput)}return e}function h(e,t,n){var r=e.map((function(e,r){return n[r]*Math.pow(e-t[r],2)})).reduce((function(e,t){return e+t}));return(r<0?-1:1)*Math.sqrt(Math.abs(r))}function p(e,t){return h([e.state.throughput,e.state.latency,e.state.rebuffer,e.state.switch],[t.state.throughput,t.state.latency,t.state.rebuffer,t.state.switch],[1,1,1,1])}function g(e,t,n){for(var r=0;rs)&&(a=l,s=u)}t.push(a)}for(var p=null,g=null,m=0;mp)&&(p=y,g=m)}var _=[];for(_.push(t[g]),t.splice(g,1);t.length>0;){for(var T=null,E=null,b=0;b1&&(b=f()),c/=a,t.debug("getNextQuality called throughput:".concat(b," latency:").concat(c," bufferSize:").concat(d," currentQualityIndex:").concat(m," playbackRate:").concat(p));var S=E[m],A=S.bitrate*y.getSegmentDuration()/T,w=Math.max(0,A-_);if(_-AC?C=D:Dw?P-w:0;d.setupPerSegmentQoe(w,C,I),d.logSegmentMetrics(N,M,E,b);var x=(0,u.Z)(h).create({targetLatency:1.5,bufferMin:.3,segmentDuration:w,qoeEvaluator:d});return n.quality=i.getNextQuality(g,1e3*S,E,v,b,p,x),n.reason={throughput:S,latency:E},n.priority=o.Z.PRIORITY.STRONG,y.setTimeToLoadDelay(0),n.quality!==p&&t.debug("[TgcLearningRule]["+r+"] requesting switch to index: ",n.quality,"Average throughput",Math.round(S),"kbps"),n}catch(e){throw e}},reset:function(){i.reset(),d.reset()}},t=(0,r.Z)(h).getInstance().getLogger(n),i=(0,a.Z)(h).create(),d=(0,s.Z)(h).create(),n}d.__dashjs_factory_name="LoLPRule",t.Z=i.Z.getClassFactory(d)},6523:function(e,t,n){"use strict";var r=n(5448);function i(e){var t,n,r,i,a=e.targetLatency,s=e.bufferMin,o=e.segmentDuration,l=e.qoeEvaluator;function u(){return o}function c(e,t){var n=u();return t>n?e-n:e+n-t}return t={getMinBuffer:function(){return s},getSegmentDuration:u,getNextBufferWithBitrate:function(e,t,n){return c(t,e*o/n)},getNextBuffer:c,findWeightVector:function(e,t,i,u,d,f){var h=null,p=null,g=null,m=Math.abs(t-r);return e.forEach((function(e){n.forEach((function(n){n[0];var r=n[1],u=n[2],y=(n[3],e.bitrate*o/d),v=c(i,y),_=(0===u?10:1/u)*Math.max(1e-5,y-v),T=(0===r?10:1/r)*e.state.latency,E=l.calculateSingleUseQoe(e.bitrate,_,T,f);(null===h||E>h)&&function(e,t,n){return!(e>a+n)&&t>=s}(t,v,m)&&(h=E,p=n,g=e.bitrate)}))})),null===p&&null===g&&(p=-1),r=t,p}},n=function e(t,n,r){if(r===n)return t;for(var a=t.length,s=0;s=0&&e.value){var t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(r.tilesHor=parseInt(t[0],10),r.tilesVert=parseInt(t[1],10))}})),t?m.updateSegmentData(e).then((function(t){!function(e,t,n){var r=[],i=function(e,t){var n,r,i,a,s=[],o=0;for(n=0,r=e.segments.length;ne)return i=t.url,!0})),i?n(i):t.segments.some((function(i){if(i.mediaStartTime<=e&&i.mediaStartTime+i.duration>e){var a=E.resolve(t.path);return y.load({method:"get",url:a.url,request:{range:i.mediaRange,responseType:"arraybuffer"},onload:function(e){var t=v.getSamplesInfo(e.target.response),a=new Blob([e.target.response.slice(t.sampleList[0].offset,t.sampleList[0].offset+t.sampleList[0].size)],{type:"image/jpeg"}),s=window.URL.createObjectURL(a);r.push({start:i.mediaStartTime,end:i.mediaStartTime+i.duration,url:s}),n&&n(s)}}),!0}}))}}(r,e,t)})):(r.startNumber=e.startNumber,r.segmentDuration=e.segmentDuration,r.timescale=e.timescale,r.templateUrl=function(e){var t=R.isRelative(e.media)?R.resolve(e.media,E.resolve(e.path).url):e.media;return t?(0,l.Aj)(t,e.id):""}(e)),r.tilesHor>0&&r.tilesVert>0&&(r.widthPerTile=r.width/r.tilesHor,r.heightPerTile=r.height/r.tilesVert,n.push(r))}function N(){n=[],p=-1,g=null}return t={getTracks:function(){return n},addTracks:function(){if(b&&T&&(g=T.getMediaInfoForType(b,r.Z.IMAGE))){var e=T.getVoRepresentations(g);e&&e.length>0&&e.forEach((function(e){(e.segmentInfoType===i.Z.SEGMENT_TEMPLATE&&e.segmentDuration>0&&e.media||e.segmentInfoType===i.Z.SEGMENT_TIMELINE)&&D(e),e.segmentInfoType===i.Z.SEGMENT_BASE&&D(e,!0)})),n.length>0&&n.sort((function(e,t){return e.bitrate-t.bitrate}))}},reset:N,setTrackByIndex:function(e){n&&0!==n.length&&(e>=n.length&&(e=n.length-1),p=e)},getCurrentTrack:function(){return p<0?null:n[p]},getCurrentTrackIndex:function(){return p},getThumbnailRequestForTime:function(e){for(var t,r=T.getVoRepresentations(g),i=0;i>>0|e[t+2]<<8>>>0|e[t+1]<<16>>>0|e[t]<<24>>>0}function u(e,t){return String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t])}return t={parse:a,findLastTopIsoBoxCompleted:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new o.Z(0,!1);for(var r,i=t instanceof ArrayBuffer?new Uint8Array(t):t,a=0;n=0?r=new o.Z(n,!0,s):a=n+s),n+=s}return r||new o.Z(a,!1)},getMediaTimescaleFromMoov:function(e){var t=a(e),n=t?t.getBox("mdhd"):void 0;return n?n.timescale:NaN},getSamplesInfo:function(e){if(!e||0===e.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};var t,n,r,i,s,o,l,u,c,d,f,h,p,g,m,y,v=a(e),_=v.getBoxes("moof"),T=v.getBoxes("mfhd");m=v.getBoxes("moof").length,g=T[T.length-1].sequence_number,n=0,s=[];var E=-1,b=-1;for(d=0;d<_.length;d++){var S=_[d],A=S.getChildBoxes("traf");for(u=0;ub&&(E++,b+=P.entries[E].sample_delta),l==b){O.subSizes=[];var M=P.entries[E];for(h=0;h=t.byteLength)return new o.Z(0,!1);for(var r,i=t instanceof ArrayBuffer?new Uint8Array(t):t,a=0;n=0?r=new o.Z(n,!0,s,c):a=n+s),n+=s}return r||new o.Z(a,!1)}},e=(0,r.Z)(n).getInstance().getLogger(t),t}l.__dashjs_factory_name="BoxParser",t.Z=a.Z.getSingletonFactory(l)},1715:function(e,t,n){"use strict";n.d(t,{B:function(){return o}});var r=n(5448),i=n(7803),a=n(3393),s=[{codec:"avc1",compatibleCodecs:["avc3"]},{codec:"avc3",compatibleCodecs:["avc1"]}];function o(){var e="ManagedMediaSource"in window,t="WebKitMediaSource"in window,n="MediaSource"in window;return e||t||n}function l(){var e,t,n;return e={setConfig:function(e){e&&e.settings&&(t=e.settings)},supportsMediaSource:o,supportsEncryptedMedia:function(){return n},supportsCodec:function(e,n){return n!==a.Z.AUDIO&&n!==a.Z.VIDEO?Promise.resolve(!0):function(e,n){return t.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(e.codec&&n===a.Z.AUDIO||n===a.Z.VIDEO&&e.codec&&e.width&&e.height&&e.bitrate&&e.framerate)}(e,n)?function(e,t){return new Promise((function(n){if(e&&e.codec){var r={type:"media-source"};r[t]={},r[t].contentType=e.codec,r[t].width=e.width,r[t].height=e.height,r[t].bitrate=parseInt(e.bitrate),r[t].framerate=parseFloat(e.framerate),navigator.mediaCapabilities.decodingInfo(r).then((function(e){n(e.supported)})).catch((function(){n(!1)}))}else n(!1)}))}(e,n):function(e){return new Promise((function(t){if(e&&e.codec){var n=e.codec;e.width&&e.height&&(n+=';width="'+e.width+'";height="'+e.height+'"'),"ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(n)||"MediaSource"in window&&MediaSource.isTypeSupported(n)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(n)?t(!0):t(!1)}else t(!1)}))}(e)},setEncryptedMediaSupported:function(e){n=e},supportsEssentialProperty:function(e){try{return-1!==i.Y.indexOf(e.schemeIdUri)||a.Z.FONT_DOWNLOAD_DVB_SCHEME===e.schemeIdUri}catch(e){return!0}},codecRootCompatibleWithCodec:function(e,t){for(var n,r=e.split(".")[0],i=0===t.indexOf(r),a=0;athis.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&tthis.customTimeRangeArray[n].start&&ethis.customTimeRangeArray[n].start&&t=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,i.SE)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}a.__dashjs_factory_name="CustomTimeRanges",t.Z=r.Z.getClassFactory(a)},5:function(e,t,n){"use strict";var r=n(5448);function i(){var e,t=/^[a-z][a-z0-9+\-_.]*:/i,n=/^https?:\/\//i,r=/^https:\/\//i,i=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,a=function(e,t){try{return new window.URL(e,t).toString()}catch(t){return e}},s=function(e,t){var n=o;if(!t)return e;if(!c(e))return e;d(e)&&(n=l),f(e)&&(n=u);var r=n(t),i="/"!==r.charAt(r.length-1)&&"/"!==e.charAt(0)?"/":"";return[r,e].join(i)};function o(e){var t=e.indexOf("/"),n=e.lastIndexOf("/");return-1!==t?n===t+1?e:(-1!==e.indexOf("?")&&(e=e.substring(0,e.indexOf("?"))),e.substring(0,n+1)):""}function l(e){var t=e.match(i);return t?t[1]:""}function u(e){var n=e.match(t);return n?n[0]:""}function c(e){return!t.test(e)}function d(e){return c(e)&&"/"===e.charAt(0)}function f(e){return 0===e.indexOf("//")}return function(){try{new window.URL("x","http://y"),e=a}catch(e){}finally{e=e||s}}(),{parseBaseUrl:o,parseOrigin:l,parseScheme:u,isRelative:c,isPathAbsolute:d,isSchemeRelative:f,isHTTPURL:function(e){return n.test(e)},isHTTPS:function(e){return r.test(e)},removeHostname:function(e){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(e)[2].substring(1)},resolve:function(t,n){return e(t,n)}}}i.__dashjs_factory_name="DefaultURLUtils",t.Z=r.Z.getSingletonFactory(i)},8260:function(e,t,n){"use strict";var r=n(2839),i=n(5448);function a(){var e;function t(t){var r=[];if(!t||!e||"function"!=typeof e.fetchAll)return r;for(var i,a=e.fetchAll(t),s=0,o=a.length;s0?n[n.length-1]:null}}}a.__dashjs_factory_name="IsoFile",t.Z=i.Z.getClassFactory(a)},7473:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});var r=n(5448);function i(e,t){var n={url:e.url,method:e.method,headers:Object.assign({},e.headers),credentials:e.withCredentials?"include":void 0,range:e.request.range};return Promise.resolve(t.modifyRequest(n)).then((function(){return Object.assign(e,n,{withCredentials:"include"===n.credentials})}))}function a(){return{modifyRequest:null,modifyRequestURL:function(e){return e},modifyRequestHeader:function(e,t){return t.url,e}}}a.__dashjs_factory_name="RequestModifier",t.Z=r.Z.getSingletonFactory(a)},3106:function(e,t,n){"use strict";n.d(t,{PS:function(){return a},SE:function(){return s}});var r=n(3393);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(i(e)!==t)throw r.Z.BAD_ARGUMENT_ERROR}function s(e){if(null===e||isNaN(e)||e%1!=0)throw r.Z.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},2594:function(e,t,n){"use strict";var r=n(5448),i=n(5);function a(){var e,t=[],n=this.context;function r(n,r,i){var a=function(n){var r;for(r=0;r-1}),!0),t.extendedFilter=n((function(e,t){var n=e.split("-"),r=t.split("-"),i=0,a=0;if("*"!==r[a]&&n[i]!==r[a])return!1;for(i++,a++;a-1||!e[i]||!e[i].length)&&p(e,i,s[i])}function h(e,t,n){var r,i,a,s,o=!1;if(n){if(i=r=e[t],r&&"object"==typeof r)for(i=[],a=-1;++a1&&m<9){if(h.language=p.slice(0,m),m<4)for(c=0;45===g.charCodeAt(m)&&i(g.charCodeAt(m+1))&&i(g.charCodeAt(m+2))&&i(g.charCodeAt(m+3))&&!i(g.charCodeAt(m+4));){if(c>2)return y(m,3,"Too many extended language subtags, expected at most 3 subtags");h.extendedLanguageSubtags.push(p.slice(m+1,m+4)),m+=4,c++}for(45===g.charCodeAt(m)&&i(g.charCodeAt(m+1))&&i(g.charCodeAt(m+2))&&i(g.charCodeAt(m+3))&&i(g.charCodeAt(m+4))&&!i(g.charCodeAt(m+5))&&(h.script=p.slice(m+1,m+5),m+=5),45===g.charCodeAt(m)&&(i(g.charCodeAt(m+1))&&i(g.charCodeAt(m+2))&&!i(g.charCodeAt(m+3))?(h.region=p.slice(m+1,m+3),m+=3):a(g.charCodeAt(m+1))&&a(g.charCodeAt(m+2))&&a(g.charCodeAt(m+3))&&!a(g.charCodeAt(m+4))&&(h.region=p.slice(m+1,m+4),m+=4));45===g.charCodeAt(m);){for(d=u=m+1;r(g.charCodeAt(d));){if(d-u>7)return y(d,1,"Too long variant, expected at most 8 characters");d++}if(!(d-u>4||d-u>3&&a(g.charCodeAt(u))))break;h.variants.push(p.slice(u,d)),m=d}for(;45===g.charCodeAt(m)&&120!==g.charCodeAt(m+1)&&r(g.charCodeAt(m+1))&&45===g.charCodeAt(m+2)&&r(g.charCodeAt(m+3));){for(d=m+2,c=0;45===g.charCodeAt(d)&&r(g.charCodeAt(d+1))&&r(g.charCodeAt(d+2));)for(d=(u=d+1)+2,c++;r(g.charCodeAt(d));){if(d-u>7)return y(d,2,"Too long extension, expected at most 8 characters");d++}if(!c)return y(d,4,"Empty extension, extensions must have at least 2 characters of content");h.extensions.push({singleton:p.charAt(m+1),extensions:p.slice(m+3,d).split("-")}),m=d}}else m=0;if(0===m&&120===g.charCodeAt(m)||45===g.charCodeAt(m)&&120===g.charCodeAt(m+1))for(d=m=m?m+2:1;45===g.charCodeAt(d)&&r(g.charCodeAt(d+1));){for(d=u=m+1;r(g.charCodeAt(d));){if(d-u>7)return y(d,5,"Too long private-use area, expected at most 8 characters");d++}h.privateuse.push(p.slice(m+1,d)),m=d}return m!==p.length?y(m,6,"Found superfluous content after tag"):h;function y(e,t,n){return f.warning&&f.warning(n,t,e),f.forgiving?h:{language:null,extendedLanguageSubtags:[],script:null,region:null,variants:[],extensions:[],privateuse:[],irregular:null,regular:null}}};var l={}.hasOwnProperty},6713:function(e){"use strict";e.exports=function(e){var t,n,r,i=e||{},a=[];if(i.irregular||i.regular)return i.irregular||i.regular;if(i.language)for(a=a.concat(i.language,i.extendedLanguageSubtags||[],i.script||[],i.region||[],i.variants||[]),t=i.extensions||[],n=-1;++ns)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|g(e,t),r=o(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);var i=function(e){if(l.isBuffer(e)){var t=0|p(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||H(e.length)?o(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),o(e<0?0:0|p(e))}function f(e){for(var t=e.length<0?0:0|p(e.length),n=o(t),r=0;r=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(i)return r?-1:U(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),H(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){var a,s=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,l/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(a=n;ao&&(n=o-l),a=n;a>=0;a--){for(var d=!0,f=0;fi&&(r=i):r=i;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function w(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&u)<<6|63&a)>127&&(c=l);break;case 3:a=e[i+1],s=e[i+2],128==(192&a)&&128==(192&s)&&(l=(15&u)<<12|(63&a)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:a=e[i+1],s=e[i+2],o=e[i+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(l=(15&u)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr.length?l.from(a).copy(r,i):Uint8Array.prototype.set.call(r,a,i);else{if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(q(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),o=Math.min(a,s),u=this.slice(r,i),c=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return T(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":case"latin1":case"binary":return b(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function x(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,a){return t=+t,n>>>=0,a||x(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function k(e,t,n,r,a){return t=+t,n>>>=0,a||x(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=0,s=1,o=0;for(this[t]=255&e;++a>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var a=n-1,s=1,o=0;for(this[t+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[t+a+1]&&(o=1),this[t+a]=(e/s>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return k(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return k(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function B(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!=e}var G=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},6693:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=o(e),s=a[0],l=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,l)),c=0,d=l>0?s-4:s;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],s=16383,o=0,u=r-i;ou?u:o+s));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],r[a.charCodeAt(s)]=s;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,a,s=[],o=t;o>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},2165:function(e,t){t.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,a=h&(1<<-c)-1,h>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=f,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=r;c>0;s=256*s+e[t+d],d+=f,c-=8);if(0===a)a=1-u;else{if(a===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,r),a-=u}return(h?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var s,o,l,u=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*l-1)*Math.pow(2,i),s+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+h]=255&o,h+=p,o/=256,i-=8);for(s=s<0;e[n+h]=255&s,h+=p,s/=256,u-=8);e[n+h-p]|=128*g}},6934:function(e,t){var n={parseBuffer:function(e){return new r(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(i.prototype._boxProcessors[e]=t)},createFile:function(){return new r},createBox:function(e,t,n){var r=i.create(e);return t&&t.append(r,n),r},createFullBox:function(e,t,r){var i=n.createBox(e,t,r);return i.version=0,i.flags=0,i},Utils:{}};n.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},n.Utils.appendBox=function(e,t,n){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==n)if(null!=n){var r,i=-1;if("number"==typeof n)i=n;else{if("string"==typeof n)r=n;else{if("object"!=typeof n||!n.type)return void e.boxes.push(t);r=n.type}for(var a=0;a>3,t},i.prototype._readUint=function(e){var t,n,r=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:r=this._raw.getUint8(i);break;case 16:r=this._raw.getUint16(i);break;case 24:r=((t=this._raw.getUint16(i))<<8)+(n=this._raw.getUint8(i+2));break;case 32:r=this._raw.getUint32(i);break;case 64:t=this._raw.getUint32(i),n=this._raw.getUint32(i+4),r=t*Math.pow(2,32)+n}return this._cursor.offset+=e>>3,r},i.prototype._readString=function(e){for(var t="",n=0;n0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,n}return null},i.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?n.Utils.dataViewToString(t):t},i.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},i.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},i.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset>3}else this.size+=e>>3},i.prototype._writeUint=function(e,t){if(this._rawo){var n,r,i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(i,t);break;case 16:this._rawo.setUint16(i,t);break;case 24:n=(16776960&t)>>8,r=255&t,this._rawo.setUint16(i,n),this._rawo.setUint8(i+2,r);break;case 32:this._rawo.setUint32(i,t);break;case 64:r=t-(n=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(i,n),this._rawo.setUint32(i+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},i.prototype._writeString=function(e,t){for(var n=0;n>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},i.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},i.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},i.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},i.prototype._boxProcessors.mp4a=i.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},i.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},i.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},i.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",1==this.version?64:32)},i.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},i.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},i.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},i.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,(function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)}))},i.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},i.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,(function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)}))}))},i.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},i.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_delta","uint",32)}))},i.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,(function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)}))}))},i.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},i.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},i.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},i.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},i.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},i.prototype._boxProcessors["url "]=i.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},i.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},i.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},i.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},i.prototype._boxProcessors.vtte=function(){}},5530:function(e,t,n){"use strict";e.exports=n(6146).polyfill()},6146:function(e,t,n){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,i=void 0,a=void 0,s=function(e,t){h[r]=e,h[r+1]=t,2===(r+=2)&&(a?a(p):_())},o="undefined"!=typeof window?window:void 0,l=o||{},u=l.MutationObserver||l.WebKitMutationObserver,c="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(p,1)}}var h=new Array(1e3);function p(){for(var e=0;e0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var u=l.length,c=p(l,u);for(n=0;n=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},3101:function(e){"use strict";var t=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty;e.exports=function e(i,a){if(i===a)return!0;if(i&&a&&"object"==typeof i&&"object"==typeof a){var s,o,l,u=t(i),c=t(a);if(u&&c){if((o=i.length)!=a.length)return!1;for(s=o;0!=s--;)if(!e(i[s],a[s]))return!1;return!0}if(u!=c)return!1;var d=i instanceof Date,f=a instanceof Date;if(d!=f)return!1;if(d&&f)return i.getTime()==a.getTime();var h=i instanceof RegExp,p=a instanceof RegExp;if(h!=p)return!1;if(h&&p)return i.toString()==a.toString();var g=n(i);if((o=g.length)!==n(a).length)return!1;for(s=o;0!=s--;)if(!r.call(a,g[s]))return!1;for(s=o;0!=s--;)if(!e(i[l=g[s]],a[l]))return!1;return!0}return i!=i&&a!=a}},3362:function(e,t,n){!function(e,t,n,r,i){function a(e){if("contents"in e)for(var t=("styleAttrs"in e?e.styleAttrs[r.byName.ruby.qname]:null),n="span"===e.kind&&("container"===t||"textContainer"===t||"baseContainer"===t),i=e.contents.length-1;i>=0;i--)!n||"styleAttrs"in e.contents[i]&&r.byName.ruby.qname in e.contents[i].styleAttrs?a(e.contents[i]):delete e.contents[i]}function s(e,t,n,r){var i=r&&"seq"===r.timeContainer,a=0;r&&(a=i&&n?n.end:r.begin),t.begin=t.explicit_begin?t.explicit_begin+a:a;var o=t.begin,l=null;if("sets"in t)for(var u=0;u0;){var r=t.styleRefs.pop();r in e.styles?(L(e,e.styles[r],n),F(e.styles[r].styleAttrs,t.styleAttrs)):B(n,"Non-existant style id referenced")}}function k(e,t,n,r){for(var i=t.length-1;i>=0;i--){var a=t[i];a in e.styles?F(e.styles[a].styleAttrs,n):B(r,"Non-existant style id referenced")}}function F(e,t){for(var n in e)e.hasOwnProperty(n)&&(n in t||(t[n]=e[n]))}function U(e,t){if(e&&e.warn&&e.warn(t))throw t}function B(e,t){if(e&&e.error&&e.error(t))throw t}function j(e,t){throw e&&e.fatal&&e.fatal(t),t}function q(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=e[n=Math.floor((r+i)/2)];if(at))return{found:!0,index:n};i=n-1}}return{found:!1,index:r}}e.fromXML=function(e,i,g){var m=t.parser(!0,{xmlns:!0}),y=[],v=[],_=[],T=0,E=null;m.onclosetag=function(e){if(y[0]instanceof R)null!==E.head&&null!==E.head.styling&&k(E.head.styling,y[0].styleRefs,y[0].styleAttrs,i),delete y[0].styleRefs;else if(y[0]instanceof c)for(var t in y[0].styles)y[0].styles.hasOwnProperty(t)&&L(y[0],y[0].styles[t],i);else if(y[0]instanceof A||y[0]instanceof w){if(y[0].contents.length>1){var r,a=[y[0].contents[0]];for(r=1;r0&&g&&"onCloseTag"in g&&g.onCloseTag());_.shift(),v.shift(),y.shift()},m.ontext=function(e){if(void 0===y[0]);else if(y[0]instanceof w||y[0]instanceof A){if(y[0]instanceof w){var t=y[0].styleAttrs[r.byName.ruby.qname];if("container"===t||"textContainer"===t||"baseContainer"===t)return}var n=new I;n.initFromText(E,y[0],e,v[0],_[0],i),y[0].contents.push(n)}else y[0]instanceof o&&T>0&&g&&"onText"in g&&g.onText(e)},m.onopentag=function(e){var t=e.attributes["xml:space"];t?_.unshift(t.value):0===_.length?_.unshift("default"):_.unshift(_[0]);var a=e.attributes["xml:lang"];if(a?v.unshift(a.value):0===v.length?v.unshift(""):v.unshift(v[0]),e.uri===n.ns_tt)if("tt"===e.local)null!==E&&j(i,"Two elements at ("+this.line+","+this.column+")"),(E=new l).initFromNode(e,v[0],i),y.unshift(E);else if("head"===e.local)y[0]instanceof l||j(i,"Parent of element is not at ("+this.line+","+this.column+")"),y.unshift(E.head);else if("styling"===e.local)y[0]instanceof u||j(i,"Parent of element is not at ("+this.line+","+this.column+")"),y.unshift(E.head.styling);else if("style"===e.local){var s;y[0]instanceof c?((s=new d).initFromNode(e,i),s.id?E.head.styling.styles[s.id]=s:B(i,"").appendTo("head")}))}(window,document,r)},3430:(e,t,n)=>{var r,i,a;i=[n(9755)],void 0===(a="function"==typeof(r=function(e){var t,n,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],i="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],a=Array.prototype.slice;if(e.event.fixHooks)for(var s=r.length;s;)e.event.fixHooks[r[--s]]=e.event.mouseHooks;var o=e.event.special.mousewheel={version:"3.1.9",setup:function(){if(this.addEventListener)for(var t=i.length;t;)this.addEventListener(i[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",o.getLineHeight(this)),e.data(this,"mousewheel-page-height",o.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],l,!1);else this.onmousewheel=null},getLineHeight:function(t){return parseInt(e(t)["offsetParent"in e.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0}};function l(r){var i=r||window.event,s=a.call(arguments,1),o=0,l=0,d=0,f=0;if((r=e.event.fix(i)).type="mousewheel","detail"in i&&(d=-1*i.detail),"wheelDelta"in i&&(d=i.wheelDelta),"wheelDeltaY"in i&&(d=i.wheelDeltaY),"wheelDeltaX"in i&&(l=-1*i.wheelDeltaX),"axis"in i&&i.axis===i.HORIZONTAL_AXIS&&(l=-1*d,d=0),o=0===d?l:d,"deltaY"in i&&(o=d=-1*i.deltaY),"deltaX"in i&&(l=i.deltaX,0===d&&(o=-1*l)),0!==d||0!==l){if(1===i.deltaMode){var h=e.data(this,"mousewheel-line-height");o*=h,d*=h,l*=h}else if(2===i.deltaMode){var p=e.data(this,"mousewheel-page-height");o*=p,d*=p,l*=p}return f=Math.max(Math.abs(d),Math.abs(l)),(!n||f=1?"floor":"ceil"](o/n),l=Math[l>=1?"floor":"ceil"](l/n),d=Math[d>=1?"floor":"ceil"](d/n),r.deltaX=l,r.deltaY=d,r.deltaFactor=n,r.deltaMode=0,s.unshift(r,o,l,d),t&&clearTimeout(t),t=setTimeout(u,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function u(){n=null}function c(e,t){return o.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})?r.apply(t,i):r)||(e.exports=a)},7440:(e,t,n)=>{var r,i,a;!function(s){"use strict";i=[n(9755)],void 0===(a="function"==typeof(r=function(e){var t=e.scrollTo=function(t,n,r){return e(window).scrollTo(t,n,r)};function n(t){return!t.nodeName||-1!==e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])}function r(e){return"function"==typeof e}function i(t){return r(t)||e.isPlainObject(t)?t:{top:t,left:t}}return t.defaults={axis:"xy",duration:0,limit:!0},e.fn.scrollTo=function(a,s,o){"object"==typeof s&&(o=s,s=0),"function"==typeof o&&(o={onAfter:o}),"max"===a&&(a=9e9),o=e.extend({},t.defaults,o),s=s||o.duration;var l=o.queue&&o.axis.length>1;return l&&(s/=2),o.offset=i(o.offset),o.over=i(o.over),this.each((function(){if(null!==a){var u,c=n(this),d=c?this.contentWindow||window:this,f=e(d),h=a,p={};switch(typeof h){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(h)){h=i(h);break}h=c?e(h):e(h,d);case"object":if(0===h.length)return;(h.is||h.style)&&(u=(h=e(h)).offset())}var g=r(o.offset)&&o.offset(d,h)||o.offset;e.each(o.axis.split(""),(function(e,n){var r="x"===n?"Left":"Top",i=r.toLowerCase(),a="scroll"+r,s=f[a](),y=t.max(d,n);if(u)p[a]=u[i]+(c?0:s-f.offset()[i]),o.margin&&(p[a]-=parseInt(h.css("margin"+r),10)||0,p[a]-=parseInt(h.css("border"+r+"Width"),10)||0),p[a]+=g[i]||0,o.over[i]&&(p[a]+=h["x"===n?"width":"height"]()*o.over[i]);else{var v=h[i];p[a]=v.slice&&"%"===v.slice(-1)?parseFloat(v)/100*y:v}o.limit&&/^\d+$/.test(p[a])&&(p[a]=p[a]<=0?0:Math.min(p[a],y)),!e&&o.axis.length>1&&(s===p[a]?p={}:l&&(m(o.onAfterFirst),p={}))})),m(o.onAfter)}function m(t){var n=e.extend({},o,{queue:!0,duration:s,complete:t&&function(){t.call(d,h,o)}});f.animate(p,n)}}))},t.max=function(t,r){var i="x"===r?"Width":"Height",a="scroll"+i;if(!n(t))return t[a]-e(t)[i.toLowerCase()]();var s="client"+i,o=t.ownerDocument||t.document,l=o.documentElement,u=o.body;return Math.max(l[a],u[a])-Math.min(l[s],u[s])},e.Tween.propHooks.scrollLeft=e.Tween.propHooks.scrollTop={get:function(t){return e(t.elem)[t.prop]()},set:function(t){var n=this.get(t);if(t.options.interrupt&&t._last&&t._last!==n)return e(t.elem).stop();var r=Math.round(t.now);n!==r&&(e(t.elem)[t.prop](r),t._last=this.get(t))}},t})?r.apply(t,i):r)||(e.exports=a)}()},9755:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var a=[],s=Object.getPrototypeOf,o=a.slice,l=a.flat?function(e){return a.flat.call(e)}:function(e){return a.concat.apply([],e)},u=a.push,c=a.indexOf,d={},f=d.toString,h=d.hasOwnProperty,p=h.toString,g=p.call(Object),m={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},v=function(e){return null!=e&&e===e.window},_=r.document,T={type:!0,src:!0,nonce:!0,noModule:!0};function E(e,t,n){var r,i,a=(n=n||_).createElement("script");if(a.text=e,t)for(r in T)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&a.setAttribute(r,i);n.head.appendChild(a).parentNode.removeChild(a)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[f.call(e)]||"object":typeof e}var S="3.7.1",A=/HTML$/i,w=function(e,t){return new w.fn.init(e,t)};function I(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!y(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function C(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}w.fn=w.prototype={jquery:S,constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+O+")"+O+"*"),q=new RegExp(O+"|>"),H=new RegExp(F),G=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+x),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,z=/[+~]/,W=new RegExp("\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\([^\\r\\n\\f])","g"),X=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},$=function(){le()},Q=fe((function(e){return!0===e.disabled&&C(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(a=o.call(L.childNodes),L.childNodes),a[L.childNodes.length].nodeType}catch(e){g={apply:function(e,t){k.apply(e,o.call(t))},call:function(e){k.apply(e,o.call(arguments,1))}}}function J(e,t,n,r){var i,a,s,o,u,c,h,p=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!r&&(le(t),t=t||l,d)){if(11!==v&&(u=K.exec(e)))if(i=u[1]){if(9===v){if(!(s=t.getElementById(i)))return n;if(s.id===i)return g.call(n,s),n}else if(p&&(s=p.getElementById(i))&&J.contains(t,s)&&s.id===i)return g.call(n,s),n}else{if(u[2])return g.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(i)),n}if(!(S[e+" "]||f&&f.test(e))){if(h=e,p=t,1===v&&(q.test(e)||j.test(e))){for((p=z.test(e)&&oe(t.parentNode)||t)==t&&m.scope||((o=t.getAttribute("id"))?o=w.escapeSelector(o):t.setAttribute("id",o=y)),a=(c=ce(e)).length;a--;)c[a]=(o?"#"+o:":scope")+" "+de(c[a]);h=c.join(",")}try{return g.apply(n,p.querySelectorAll(h)),n}catch(t){S(e,!0)}finally{o===y&&t.removeAttribute("id")}}}return ve(e.replace(P,"$1"),t,n,r)}function ee(){var e=[];return function n(r,i){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=i}}function te(e){return e[y]=!0,e}function ne(e){var t=l.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return C(t,"input")&&t.type===e}}function ie(e){return function(t){return(C(t,"input")||C(t,"button"))&&t.type===e}}function ae(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Q(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te((function(t){return t=+t,te((function(n,r){for(var i,a=e([],n.length,t),s=a.length;s--;)n[i=a[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function oe(e){return e&&void 0!==e.getElementsByTagName&&e}function le(e){var n,r=e?e.ownerDocument||e:L;return r!=l&&9===r.nodeType&&r.documentElement?(u=(l=r).documentElement,d=!w.isXMLDoc(l),p=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,u.msMatchesSelector&&L!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",$),m.getById=ne((function(e){return u.appendChild(e).id=w.expando,!l.getElementsByName||!l.getElementsByName(w.expando).length})),m.disconnectedMatch=ne((function(e){return p.call(e,"*")})),m.scope=ne((function(){return l.querySelectorAll(":scope")})),m.cssHas=ne((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),m.getById?(t.filter.ID=function(e){var t=e.replace(W,X);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(W,X);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&d){var n,r,i,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(i=t.getElementsByName(e),r=0;a=i[r++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&d)return t.getElementsByClassName(e)},f=[],ne((function(e){var t;u.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||f.push("\\["+O+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+y+"-]").length||f.push("~="),e.querySelectorAll("a#"+y+"+*").length||f.push(".#.+[+~]"),e.querySelectorAll(":checked").length||f.push(":checked"),(t=l.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),u.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),(t=l.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||f.push("\\["+O+"*name"+O+"*="+O+"*(?:''|\"\")")})),m.cssHas||f.push(":has"),f=f.length&&new RegExp(f.join("|")),A=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!m.sortDetached&&t.compareDocumentPosition(e)===n?e===l||e.ownerDocument==L&&J.contains(L,e)?-1:t===l||t.ownerDocument==L&&J.contains(L,t)?1:i?c.call(i,e)-c.call(i,t):0:4&n?-1:1)},l):l}for(e in J.matches=function(e,t){return J(e,null,null,t)},J.matchesSelector=function(e,t){if(le(e),d&&!S[t+" "]&&(!f||!f.test(t)))try{var n=p.call(e,t);if(n||m.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){S(t,!0)}return J(t,l,null,[e]).length>0},J.contains=function(e,t){return(e.ownerDocument||e)!=l&&le(e),w.contains(e,t)},J.attr=function(e,n){(e.ownerDocument||e)!=l&&le(e);var r=t.attrHandle[n.toLowerCase()],i=r&&h.call(t.attrHandle,n.toLowerCase())?r(e,n,!d):void 0;return void 0!==i?i:e.getAttribute(n)},J.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},w.uniqueSort=function(e){var t,n=[],r=0,a=0;if(s=!m.sortStable,i=!m.sortStable&&o.call(e,0),D.call(e,A),s){for(;t=e[a++];)t===e[a]&&(r=n.push(a));for(;r--;)N.call(e,n[r],1)}return i=null,e},w.fn.uniqueSort=function(){return this.pushStack(w.uniqueSort(o.apply(this)))},t=w.expr={cacheLength:50,createPseudo:te,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(W,X),e[3]=(e[3]||e[4]||e[5]||"").replace(W,X),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||J.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&J.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&H.test(n)&&(t=ce(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(W,X).toLowerCase();return"*"===e?function(){return!0}:function(e){return C(e,t)}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=J.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var a="nth"!==e.slice(0,3),s="last"!==e.slice(-4),o="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,h,p=a!==s?"nextSibling":"previousSibling",g=t.parentNode,m=o&&t.nodeName.toLowerCase(),_=!l&&!o,T=!1;if(g){if(a){for(;p;){for(d=t;d=d[p];)if(o?C(d,m):1===d.nodeType)return!1;h=p="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&_){for(T=(f=(u=(c=g[y]||(g[y]={}))[e]||[])[0]===v&&u[1])&&u[2],d=f&&g.childNodes[f];d=++f&&d&&d[p]||(T=f=0)||h.pop();)if(1===d.nodeType&&++T&&d===t){c[e]=[v,f,T];break}}else if(_&&(T=f=(u=(c=t[y]||(t[y]={}))[e]||[])[0]===v&&u[1]),!1===T)for(;(d=++f&&d&&d[p]||(T=f=0)||h.pop())&&(!(o?C(d,m):1===d.nodeType)||!++T||(_&&((c=d[y]||(d[y]={}))[e]=[v,T]),d!==t)););return(T-=i)===r||T%r==0&&T/r>=0}}},PSEUDO:function(e,n){var r,i=t.pseudos[e]||t.setFilters[e.toLowerCase()]||J.error("unsupported pseudo: "+e);return i[y]?i(n):i.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var r,a=i(e,n),s=a.length;s--;)e[r=c.call(e,a[s])]=!(t[r]=a[s])})):function(e){return i(e,0,r)}):i}},pseudos:{not:te((function(e){var t=[],n=[],r=ye(e.replace(P,"$1"));return r[y]?te((function(e,t,n,i){for(var a,s=r(e,null,i,[]),o=e.length;o--;)(a=s[o])&&(e[o]=!(t[o]=a))})):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return J(e,t).length>0}})),contains:te((function(e){return e=e.replace(W,X),function(t){return(t.textContent||w.text(t)).indexOf(e)>-1}})),lang:te((function(e){return G.test(e||"")||J.error("unsupported lang: "+e),e=e.replace(W,X).toLowerCase(),function(t){var n;do{if(n=d?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===u},focus:function(e){return e===function(){try{return l.activeElement}catch(e){}}()&&l.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ae(!1),disabled:ae(!0),checked:function(e){return C(e,"input")&&!!e.checked||C(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return Z.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){return C(e,"input")&&"button"===e.type||C(e,"button")},text:function(e){var t;return C(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se((function(){return[0]})),last:se((function(e,t){return[t-1]})),eq:se((function(e,t,n){return[n<0?n+t:n]})),even:se((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:se((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function pe(e,t,n,r,i){for(var a,s=[],o=0,l=e.length,u=null!=t;o-1&&(a[u]=!(s[u]=f))}}else h=pe(h===s?h.splice(y,h.length):h),i?i(null,s,h,l):g.apply(s,h)}))}function me(e){for(var r,i,a,s=e.length,o=t.relative[e[0].type],l=o||t.relative[" "],u=o?1:0,d=fe((function(e){return e===r}),l,!0),f=fe((function(e){return c.call(r,e)>-1}),l,!0),h=[function(e,t,i){var a=!o&&(i||t!=n)||((r=t).nodeType?d(e,t,i):f(e,t,i));return r=null,a}];u1&&he(h),u>1&&de(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(P,"$1"),i,u0,a=e.length>0,s=function(s,o,u,c,f){var h,p,m,y=0,_="0",T=s&&[],E=[],b=n,S=s||a&&t.find.TAG("*",f),A=v+=null==b?1:Math.random()||.1,I=S.length;for(f&&(n=o==l||o||f);_!==I&&null!=(h=S[_]);_++){if(a&&h){for(p=0,o||h.ownerDocument==l||(le(h),u=!d);m=e[p++];)if(m(h,o||l,u)){g.call(c,h);break}f&&(v=A)}i&&((h=!m&&h)&&y--,s&&T.push(h))}if(y+=_,i&&_!==y){for(p=0;m=r[p++];)m(T,E,o,u);if(s){if(y>0)for(;_--;)T[_]||E[_]||(E[_]=R.call(c));E=pe(E)}g.apply(c,E),f&&!s&&E.length>0&&y+r.length>1&&w.uniqueSort(c)}return f&&(v=A,n=b),T};return i?te(s):s}(s,a)),o.selector=e}return o}function ve(e,n,r,i){var a,s,o,l,u,c="function"==typeof e&&e,f=!i&&ce(e=c.selector||e);if(r=r||[],1===f.length){if((s=f[0]=f[0].slice(0)).length>2&&"ID"===(o=s[0]).type&&9===n.nodeType&&d&&t.relative[s[1].type]){if(!(n=(t.find.ID(o.matches[0].replace(W,X),n)||[])[0]))return r;c&&(n=n.parentNode),e=e.slice(s.shift().value.length)}for(a=V.needsContext.test(e)?0:s.length;a--&&(o=s[a],!t.relative[l=o.type]);)if((u=t.find[l])&&(i=u(o.matches[0].replace(W,X),z.test(s[0].type)&&oe(n.parentNode)||n))){if(s.splice(a,1),!(e=i.length&&de(s)))return g.apply(r,i),r;break}}return(c||ye(e,f))(i,n,!d,r,!n||z.test(e)&&oe(n.parentNode)||n),r}ue.prototype=t.filters=t.pseudos,t.setFilters=new ue,m.sortStable=y.split("").sort(A).join("")===y,le(),m.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(l.createElement("fieldset"))})),w.find=J,w.expr[":"]=w.expr.pseudos,w.unique=w.uniqueSort,J.compile=ye,J.select=ve,J.setDocument=le,J.tokenize=ce,J.escape=w.escapeSelector,J.getText=w.text,J.isXML=w.isXMLDoc,J.selectors=w.expr,J.support=w.support,J.uniqueSort=w.uniqueSort}();var F=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},U=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},B=w.expr.match.needsContext,j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function q(e,t,n){return y(t)?w.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?w.grep(e,(function(e){return c.call(t,e)>-1!==n})):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,(function(e){return 1===e.nodeType})))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter((function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(q(this,e||[],!1))},not:function(e){return this.pushStack(q(this,e||[],!0))},is:function(e){return!!q(this,"string"==typeof e&&B.test(e)?w(e):e||[],!1).length}});var H,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:G.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:_,!0)),j.test(r[1])&&w.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=_.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,H=w(_);var V=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function Z(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?w.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?c.call(w(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return F(e,"parentNode")},parentsUntil:function(e,t,n){return F(e,"parentNode",n)},next:function(e){return Z(e,"nextSibling")},prev:function(e){return Z(e,"previousSibling")},nextAll:function(e){return F(e,"nextSibling")},prevAll:function(e){return F(e,"previousSibling")},nextUntil:function(e,t,n){return F(e,"nextSibling",n)},prevUntil:function(e,t,n){return F(e,"previousSibling",n)},siblings:function(e){return U((e.parentNode||{}).firstChild,e)},children:function(e){return U(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(C(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},(function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(Y[e]||w.uniqueSort(i),V.test(e)&&i.reverse()),this.pushStack(i)}}));var K=/[^\x20\t\r\n\f]+/g;function z(e){return e}function W(e){throw e}function X(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return w.each(e.match(K)||[],(function(e,n){t[n]=!0})),t}(e):w.extend({},e);var t,n,r,i,a=[],s=[],o=-1,l=function(){for(i=i||e.once,r=t=!0;s.length;o=-1)for(n=s.shift();++o-1;)a.splice(n,1),n<=o&&o--})),this},has:function(e){return e?w.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=s=[],n||t||(a=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},w.extend({Deferred:function(e){var t=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred((function(n){w.each(t,(function(t,r){var i=y(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var a=0;function s(e,t,n,i){return function(){var o=this,l=arguments,u=function(){var r,u;if(!(e=a&&(n!==W&&(o=void 0,l=[r]),t.rejectWith(o,l))}};e?c():(w.Deferred.getErrorHook?c.error=w.Deferred.getErrorHook():w.Deferred.getStackHook&&(c.error=w.Deferred.getStackHook()),r.setTimeout(c))}}return w.Deferred((function(r){t[0][3].add(s(0,r,y(i)?i:z,r.notifyWith)),t[1][3].add(s(0,r,y(e)?e:z)),t[2][3].add(s(0,r,y(n)?n:W))})).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},a={};return w.each(t,(function(e,r){var s=r[2],o=r[5];i[r[1]]=s.add,o&&s.add((function(){n=o}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(r[3].fire),a[r[0]]=function(){return a[r[0]+"With"](this===a?void 0:this,arguments),this},a[r[0]+"With"]=s.fireWith})),i.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(X(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||y(i[n]&&i[n].then)))return a.then();for(;n--;)X(i[n],s(n),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&$.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},w.readyException=function(e){r.setTimeout((function(){throw e}))};var Q=w.Deferred();function J(){_.removeEventListener("DOMContentLoaded",J),r.removeEventListener("load",J),w.ready()}w.fn.ready=function(e){return Q.then(e).catch((function(e){w.readyException(e)})),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||Q.resolveWith(_,[w]))}}),w.ready.then=Q.then,"complete"===_.readyState||"loading"!==_.readyState&&!_.documentElement.doScroll?r.setTimeout(w.ready):(_.addEventListener("DOMContentLoaded",J),r.addEventListener("load",J));var ee=function(e,t,n,r,i,a,s){var o=0,l=e.length,u=null==n;if("object"===b(n))for(o in i=!0,n)ee(e,t,o,n[o],!0,a,s);else if(void 0!==r&&(i=!0,y(r)||(s=!0),u&&(s?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(w(e),n)})),t))for(;o1,null,!0)},removeData:function(e){return this.each((function(){le.remove(this,e)}))}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=oe.get(e,t),n&&(!r||Array.isArray(n)?r=oe.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),a=w._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,(function(){w.dequeue(e,t)}),a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return oe.get(e,n)||oe.access(e,n,{empty:w.Callbacks("once memory").add((function(){oe.remove(e,[t+"queue",n])}))})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;Se=_.createDocumentFragment().appendChild(_.createElement("div")),(Ae=_.createElement("input")).setAttribute("type","radio"),Ae.setAttribute("checked","checked"),Ae.setAttribute("name","t"),Se.appendChild(Ae),m.checkClone=Se.cloneNode(!0).cloneNode(!0).lastChild.checked,Se.innerHTML="",m.noCloneChecked=!!Se.cloneNode(!0).lastChild.defaultValue,Se.innerHTML="",m.option=!!Se.lastChild;var Re={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function De(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&C(e,t)?w.merge([e],n):n}function Ne(e,t){for(var n=0,r=e.length;n",""]);var Oe=/<|&#?\w+;/;function Pe(e,t,n,r,i){for(var a,s,o,l,u,c,d=t.createDocumentFragment(),f=[],h=0,p=e.length;h-1)i&&i.push(a);else if(u=me(a),s=De(d.appendChild(a),"script"),u&&Ne(s),n)for(c=0;a=s[c++];)Ce.test(a.type||"")&&n.push(a);return d}var Me=/^([^.]*)(?:\.(.+)|)/;function xe(){return!0}function Le(){return!1}function ke(e,t,n,r,i,a){var s,o;if("object"==typeof t){for(o in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,o,n,r,t[o],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Le;else if(!i)return e;return 1===a&&(s=i,i=function(e){return w().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=w.guid++)),e.each((function(){w.event.add(this,t,i,r,n)}))}function Fe(e,t,n){n?(oe.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var n,r=oe.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=o.call(arguments),oe.set(this,t,r),this[t](),n=oe.get(this,t),oe.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(oe.set(this,t,w.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=xe)}})):void 0===oe.get(e,t)&&w.event.add(e,t,xe)}w.event={global:{},add:function(e,t,n,r,i){var a,s,o,l,u,c,d,f,h,p,g,m=oe.get(e);if(ae(e))for(n.handler&&(n=(a=n).handler,i=a.selector),i&&w.find.matchesSelector(ge,i),n.guid||(n.guid=w.guid++),(l=m.events)||(l=m.events=Object.create(null)),(s=m.handle)||(s=m.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(K)||[""]).length;u--;)h=g=(o=Me.exec(t[u])||[])[1],p=(o[2]||"").split(".").sort(),h&&(d=w.event.special[h]||{},h=(i?d.delegateType:d.bindType)||h,d=w.event.special[h]||{},c=w.extend({type:h,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:p.join(".")},a),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,p,s)||e.addEventListener&&e.addEventListener(h,s)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,c):f.push(c),w.event.global[h]=!0)},remove:function(e,t,n,r,i){var a,s,o,l,u,c,d,f,h,p,g,m=oe.hasData(e)&&oe.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(K)||[""]).length;u--;)if(h=g=(o=Me.exec(t[u])||[])[1],p=(o[2]||"").split(".").sort(),h){for(d=w.event.special[h]||{},f=l[h=(r?d.delegateType:d.bindType)||h]||[],o=o[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=a=f.length;a--;)c=f[a],!i&&g!==c.origType||n&&n.guid!==c.guid||o&&!o.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(a,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));s&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||w.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)w.event.remove(e,h+t[u],n,r,!0);w.isEmptyObject(l)&&oe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,a,s,o=new Array(arguments.length),l=w.event.fix(e),u=(oe.get(this,"events")||Object.create(null))[l.type]||[],c=w.event.special[l.type]||{};for(o[0]=l,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(a=[],s={},n=0;n-1:w.find(i,this,null,[u]).length),s[i]&&a.push(r);a.length&&o.push({elem:u,handlers:a})}return u=this,l\s*$/g;function qe(e,t){return C(e,"table")&&C(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ge(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ve(e,t){var n,r,i,a,s,o;if(1===t.nodeType){if(oe.hasData(e)&&(o=oe.get(e).events))for(i in oe.remove(t,"handle events"),o)for(n=0,r=o[i].length;n1&&"string"==typeof p&&!m.checkClone&&Be.test(p))return e.each((function(i){var a=e.eq(i);g&&(t[0]=p.call(this,i,a.html())),Ze(a,t,n,r)}));if(f&&(a=(i=Pe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(o=(s=w.map(De(i,"script"),He)).length;d0&&Ne(s,!l&&De(e,"script")),o},cleanData:function(e){for(var t,n,r,i=w.event.special,a=0;void 0!==(n=e[a]);a++)if(ae(n)){if(t=n[oe.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[oe.expando]=void 0}n[le.expando]&&(n[le.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ke(this,e,!0)},remove:function(e){return Ke(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ze(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)}))},prepend:function(){return Ze(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ze(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(De(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return w.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ue.test(e)&&!Re[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-o-.5))||0),l+u}function ct(e,t,n){var r=Xe(e),i=(!m.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,r),a=i,s=Je(e,t,r),o="offset"+t[0].toUpperCase()+t.slice(1);if(ze.test(s)){if(!n)return s;s="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&C(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===w.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===w.css(e,"boxSizing",!1,r),(a=o in e)&&(s=e[o])),(s=parseFloat(s)||0)+ut(e,t,n||(i?"border":"content"),a,r,s)+"px"}function dt(e,t,n,r,i){return new dt.prototype.init(e,t,n,r,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,s,o=ie(t),l=We.test(t),u=e.style;if(l||(t=it(o)),s=w.cssHooks[t]||w.cssHooks[o],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:u[t];"string"==(a=typeof n)&&(i=he.exec(n))&&i[1]&&(n=_e(e,t,i),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=i&&i[3]||(w.cssNumber[o]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,a,s,o=ie(t);return We.test(t)||(t=it(o)),(s=w.cssHooks[t]||w.cssHooks[o])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Je(e,t,r)),"normal"===i&&t in ot&&(i=ot[t]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),w.each(["height","width"],(function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!at.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ct(e,t,r):$e(e,st,(function(){return ct(e,t,r)}))},set:function(e,n,r){var i,a=Xe(e),s=!m.scrollboxSize()&&"absolute"===a.position,o=(s||r)&&"border-box"===w.css(e,"boxSizing",!1,a),l=r?ut(e,t,r,o,a):0;return o&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(a[t])-ut(e,t,"border",!1,a)-.5)),l&&(i=he.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),lt(0,n,l)}}})),w.cssHooks.marginLeft=et(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Je(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},a="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+pe[r]+t]=a[r]||a[r-2]||a[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=lt)})),w.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var r,i,a={},s=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;s1)}}),w.Tween=dt,dt.prototype={constructor:dt,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(w.cssNumber[n]?"":"px")},cur:function(){var e=dt.propHooks[this.prop];return e&&e.get?e.get(this):dt.propHooks._default.get(this)},run:function(e){var t,n=dt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):dt.propHooks._default.set(this),this}},dt.prototype.init.prototype=dt.prototype,dt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[it(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},dt.propHooks.scrollTop=dt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=dt.prototype.init,w.fx.step={};var ft,ht,pt=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;function mt(){ht&&(!1===_.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(mt):r.setTimeout(mt,w.fx.interval),w.fx.tick())}function yt(){return r.setTimeout((function(){ft=void 0})),ft=Date.now()}function vt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=pe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function _t(e,t,n){for(var r,i=(Tt.tweeners[t]||[]).concat(Tt.tweeners["*"]),a=0,s=i.length;a1)},removeAttr:function(e){return this.each((function(){w.removeAttr(this,e)}))}}),w.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?w.prop(e,t,n):(1===a&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?Et:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&C(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(K);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),Et={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=bt[t]||w.find.attr;bt[t]=function(e,t,r){var i,a,s=t.toLowerCase();return r||(a=bt[s],bt[s]=i,i=null!=n(e,t,r)?s:null,bt[s]=a),i}}));var St=/^(?:input|select|textarea|button)$/i,At=/^(?:a|area)$/i;function wt(e){return(e.match(K)||[]).join(" ")}function It(e){return e.getAttribute&&e.getAttribute("class")||""}function Ct(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(K)||[]}w.fn.extend({prop:function(e,t){return ee(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[w.propFix[e]||e]}))}}),w.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):St.test(e.nodeName)||At.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(e){var t,n,r,i,a,s;return y(e)?this.each((function(t){w(this).addClass(e.call(this,t,It(this)))})):(t=Ct(e)).length?this.each((function(){if(r=It(this),n=1===this.nodeType&&" "+wt(r)+" "){for(a=0;a-1;)n=n.replace(" "+i+" "," ");s=wt(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,a,s=typeof e,o="string"===s||Array.isArray(e);return y(e)?this.each((function(n){w(this).toggleClass(e.call(this,n,It(this),t),t)})):"boolean"==typeof t&&o?t?this.addClass(e):this.removeClass(e):(n=Ct(e),this.each((function(){if(o)for(a=w(this),i=0;i-1)return!0;return!1}});var Rt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,(function(e){return null==e?"":e+""}))),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Rt,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:wt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,o=s?null:[],l=s?a+1:i.length;for(r=a<0?l:s?a:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},m.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var Dt=r.location,Nt={guid:Date.now()},Ot=/\?/;w.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||w.error("Invalid XML: "+(n?w.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Pt=/^(?:focusinfocus|focusoutblur)$/,Mt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(e,t,n,i){var a,s,o,l,u,c,d,f,p=[n||_],g=h.call(e,"type")?e.type:e,m=h.call(e,"namespace")?e.namespace.split("."):[];if(s=f=o=n=n||_,3!==n.nodeType&&8!==n.nodeType&&!Pt.test(g+w.event.triggered)&&(g.indexOf(".")>-1&&(m=g.split("."),g=m.shift(),m.sort()),u=g.indexOf(":")<0&&"on"+g,(e=e[w.expando]?e:new w.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:w.makeArray(t,[e]),d=w.event.special[g]||{},i||!d.trigger||!1!==d.trigger.apply(n,t))){if(!i&&!d.noBubble&&!v(n)){for(l=d.delegateType||g,Pt.test(l+g)||(s=s.parentNode);s;s=s.parentNode)p.push(s),o=s;o===(n.ownerDocument||_)&&p.push(o.defaultView||o.parentWindow||r)}for(a=0;(s=p[a++])&&!e.isPropagationStopped();)f=s,e.type=a>1?l:d.bindType||g,(c=(oe.get(s,"events")||Object.create(null))[e.type]&&oe.get(s,"handle"))&&c.apply(s,t),(c=u&&s[u])&&c.apply&&ae(s)&&(e.result=c.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),t)||!ae(n)||u&&y(n[g])&&!v(n)&&((o=n[u])&&(n[u]=null),w.event.triggered=g,e.isPropagationStopped()&&f.addEventListener(g,Mt),n[g](),e.isPropagationStopped()&&f.removeEventListener(g,Mt),w.event.triggered=void 0,o&&(n[u]=o)),e.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each((function(){w.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}});var xt=/\[\]$/,Lt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Ft=/^(?:input|select|textarea|keygen)/i;function Ut(e,t,n,r){var i;if(Array.isArray(t))w.each(t,(function(t,i){n||xt.test(e)?r(e,i):Ut(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==b(t))r(e,t);else for(i in t)Ut(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,(function(){i(this.name,this.value)}));else for(n in e)Ut(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Ft.test(this.nodeName)&&!kt.test(e)&&(this.checked||!we.test(e))})).map((function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}})):{name:t.name,value:n.replace(Lt,"\r\n")}})).get()}});var Bt=/%20/g,jt=/#.*$/,qt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Gt=/^(?:GET|HEAD)$/,Vt=/^\/\//,Yt={},Zt={},Kt="*/".concat("*"),zt=_.createElement("a");function Wt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(K)||[];if(y(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Xt(e,t,n,r){var i={},a=e===Zt;function s(o){var l;return i[o]=!0,w.each(e[o]||[],(function(e,o){var u=o(t,n,r);return"string"!=typeof u||a||i[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function $t(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}zt.href=Dt.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,w.ajaxSettings),t):$t(w.ajaxSettings,e)},ajaxPrefilter:Wt(Yt),ajaxTransport:Wt(Zt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,a,s,o,l,u,c,d,f,h=w.ajaxSetup({},t),p=h.context||h,g=h.context&&(p.nodeType||p.jquery)?w(p):w.event,m=w.Deferred(),y=w.Callbacks("once memory"),v=h.statusCode||{},T={},E={},b="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(u){if(!s)for(s={};t=Ht.exec(a);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(e,t){return null==u&&(e=E[e.toLowerCase()]=E[e.toLowerCase()]||e,T[e]=t),this},overrideMimeType:function(e){return null==u&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)S.always(e[S.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||b;return n&&n.abort(t),A(0,t),this}};if(m.promise(S),h.url=((e||h.url||Dt.href)+"").replace(Vt,Dt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(K)||[""],null==h.crossDomain){l=_.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=zt.protocol+"//"+zt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),Xt(Yt,h,t,S),u)return S;for(d in(c=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Gt.test(h.type),i=h.url.replace(jt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Bt,"+")):(f=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Ot.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(qt,"$1"),f=(Ot.test(i)?"&":"?")+"_="+Nt.guid+++f),h.url=i+f),h.ifModified&&(w.lastModified[i]&&S.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&S.setRequestHeader("If-None-Match",w.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Kt+"; q=0.01":""):h.accepts["*"]),h.headers)S.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(p,S,h)||u))return S.abort();if(b="abort",y.add(h.complete),S.done(h.success),S.fail(h.error),n=Xt(Zt,h,t,S)){if(S.readyState=1,c&&g.trigger("ajaxSend",[S,h]),u)return S;h.async&&h.timeout>0&&(o=r.setTimeout((function(){S.abort("timeout")}),h.timeout));try{u=!1,n.send(T,A)}catch(e){if(u)throw e;A(-1,e)}}else A(-1,"No Transport");function A(e,t,s,l){var d,f,_,T,E,b=t;u||(u=!0,o&&r.clearTimeout(o),n=void 0,a=l||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,s&&(T=function(e,t,n){for(var r,i,a,s,o=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in o)if(o[i]&&o[i].test(r)){l.unshift(i);break}if(l[0]in n)a=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){a=i;break}s||(s=i)}a=a||s}if(a)return a!==l[0]&&l.unshift(a),n[a]}(h,S,s)),!d&&w.inArray("script",h.dataTypes)>-1&&w.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),T=function(e,t,n,r){var i,a,s,o,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(a=c.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=a,a=c.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(!(s=u[l+" "+a]||u["* "+a]))for(i in u)if((o=i.split(" "))[1]===a&&(s=u[l+" "+o[0]]||u["* "+o[0]])){!0===s?s=u[i]:!0!==u[i]&&(a=o[0],c.unshift(o[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+a}}}return{state:"success",data:t}}(h,T,S,d),d?(h.ifModified&&((E=S.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=E),(E=S.getResponseHeader("etag"))&&(w.etag[i]=E)),204===e||"HEAD"===h.type?b="nocontent":304===e?b="notmodified":(b=T.state,f=T.data,d=!(_=T.error))):(_=b,!e&&b||(b="error",e<0&&(e=0))),S.status=e,S.statusText=(t||b)+"",d?m.resolveWith(p,[f,b,S]):m.rejectWith(p,[S,b,_]),S.statusCode(v),v=void 0,c&&g.trigger(d?"ajaxSuccess":"ajaxError",[S,h,d?f:_]),y.fireWith(p,[S,b]),c&&(g.trigger("ajaxComplete",[S,h]),--w.active||w.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],(function(e,t){w[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}})),w.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){w(this).wrapInner(e.call(this,t))})):this.each((function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){w(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Qt={0:200,1223:204},Jt=w.ajaxSettings.xhr();m.cors=!!Jt&&"withCredentials"in Jt,m.ajax=Jt=!!Jt,w.ajaxTransport((function(e){var t,n;if(m.cors||Jt&&!e.crossDomain)return{send:function(i,a){var s,o=e.xhr();if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)o[s]=e.xhrFields[s];for(s in e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)o.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=n=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?a(0,"error"):a(o.status,o.statusText):a(Qt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=t(),n=o.onerror=o.ontimeout=t("error"),void 0!==o.onabort?o.onabort=n:o.onreadystatechange=function(){4===o.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{o.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),w.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),w.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=w("