PageSourceSearch

https://www.safeway.com/ocvp/video-player/abs-video-streaming.min.js

js safeway.com collected 2026-09-24 08:39:10 UTC 410,481 bytes, 1 lines download raw bytes

vendor: 5,215 bytes, line 1
1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],t):"object"==typeof exports?exports.ABSVideo=t(require("video.js")):(e.ABSVideo=e.ABSVideo||{},e.ABSVideo["abs-video-streaming"]=t(e.videojs))}(this,e=>(()=>{var t={582(e,t){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var r=i({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"}),n=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===n.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 i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.find=function(e,t,i){if(void 0===i&&(i=Array.prototype),e&&"function"==typeof i.find)return i.find.call(e,t);for(var r=0;r<e.length;r++)if(Object.prototype.hasOwnProperty.call(e,r)){var n=e[r];if(t.call(void 0,n,r,e))return n}},t.freeze=i,t.MIME_TYPE=r,t.NAMESPACE=n},752(e,t,i){var r=i(582),n=i(722),a=i(559),s=i(466),o=n.DOMImplementation,u=r.NAMESPACE,d=s.ParseError,l=s.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function p(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,i){return"string"==typeof e?e.substr(t,i):e.length>=t+i||t?new java.lang.String(e,t,i)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var i=this.options,r=new l,n=i.domBuilder||new f,s=i.errorHandler,o=i.locator,d=i.xmlns||{},h=/\/x?html?$/.test(t),p=h?a.HTML_ENTITIES:a.XML_ENTITIES;o&&n.setDocumentLocator(o),r.errorHandler=function(e,t,i){if(!e){if(t instanceof f)return t;e=t}var r={},n=e instanceof Function;function a(t){var a=e[t];!a&&n&&(a=2==e.length?function(i){e(t,i)}:e),r[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+m(i))}||function(){}}return i=i||{},a("warning"),a("error"),a("fatalError"),r}(s,n,o),r.domBuilder=i.domBuilder||n,h&&(d[""]=u.HTML),d.xml=d.xml||u.XML;var g=i.normalizeLineEndings||c;return e&&"string"==typeof e?r.parse(g(e),d,p):r.errorHandler.error("invalid doc source"),n.doc},f.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,i,r){var n=this.doc,a=n.createElementNS(e,i||t),s=r.length;y(this,a),this.currentElement=a,this.locator&&p(this.locator,a);for(var o=0;o<s;o++){e=r.getURI(o);var u=r.getValue(o),d=(i=r.getQName(o),n.createAttributeNS(e,i));this.locator&&p(r.getLocator(o),d),d.value=d.nodeValue=u,a.setAttributeNode(d)}},endElement:function(e,t,i){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var i=this.doc.createProcessingInstruction(e,t);this.locator&&p(this.locator,i),y(this,i)},ignorableWhitespace:function(e,t,i){},characters:function(e,t,i){if(e=g.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&p(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,i){e=g.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&p(this.locator,r),y(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,i){var r=this.doc.implementation;if(r&&r.createDocumentType){var n=r.createDocumentType(e,t,i);this.locator&&p(this.locator,n),y(this,n),this.doc.doctype=n}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new d(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){f.prototype[e]=function(){return null}}),t.DOMParser=h},722(e,t,i){var r=i(582),n=r.find,a=r.NAMESPACE;function s(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function u(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 d(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function l(e,t){var i=e.prototype;if(!(i instanceof t)){function r(){}r.prototype=t.prototype,d(i,r=new r),e.prototype=i=r}i.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),i.c
vendor: 3,899 bytes, line 1
1onstructor=e)}var c={},h=c.ELEMENT_NODE=1,f=c.ATTRIBUTE_NODE=2,p=c.TEXT_NODE=3,m=c.CDATA_SECTION_NODE=4,g=c.ENTITY_REFERENCE_NODE=5,y=c.ENTITY_NODE=6,v=c.PROCESSING_INSTRUCTION_NODE=7,b=c.COMMENT_NODE=8,_=c.DOCUMENT_NODE=9,T=c.DOCUMENT_TYPE_NODE=10,S=c.DOCUMENT_FRAGMENT_NODE=11,w=c.NOTATION_NODE=12,E={},I={},A=(E.INDEX_SIZE_ERR=(I[1]="Index size error",1),E.DOMSTRING_SIZE_ERR=(I[2]="DOMString size error",2),E.HIERARCHY_REQUEST_ERR=(I[3]="Hierarchy request error",3)),L=(E.WRONG_DOCUMENT_ERR=(I[4]="Wrong document",4),E.INVALID_CHARACTER_ERR=(I[5]="Invalid character",5)),x=(E.NO_DATA_ALLOWED_ERR=(I[6]="No data allowed",6),E.NO_MODIFICATION_ALLOWED_ERR=(I[7]="No modification allowed",7),E.NOT_FOUND_ERR=(I[8]="Not found",8)),D=(E.NOT_SUPPORTED_ERR=(I[9]="Not supported",9),E.INUSE_ATTRIBUTE_ERR=(I[10]="Attribute in use",10));E.INVALID_STATE_ERR=(I[11]="Invalid state",11),E.SYNTAX_ERR=(I[12]="Syntax error",12),E.INVALID_MODIFICATION_ERR=(I[13]="Invalid modification",13),E.NAMESPACE_ERR=(I[14]="Invalid namespace",14),E.INVALID_ACCESS_ERR=(I[15]="Invalid access",15);function O(e,t){if(t instanceof Error)var i=t;else i=this,Error.call(this,I[e]),this.message=I[e],Error.captureStackTrace&&Error.captureStackTrace(this,O);return i.code=e,t&&(this.message=this.message+": "+t),i}function k(){}function P(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var i=e._refresh(e._node);if(Te(e,"length",i.length),!e.$$length||i.length<e.$$length)for(var r=i.length;r in e;r++)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];d(i,e),e._inc=t}}function U(){}function R(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function N(e,t,i,r){if(r?t[R(t,r)]=i:t[t.length++]=i,e){i.ownerElement=e;var n=e.ownerDocument;n&&(r&&G(n,e,r),function(e,t,i){e&&e._inc++;var r=i.namespaceURI;r===a.XMLNS&&(t._nsMap[i.prefix?i.localName:""]=i.value)}(n,e,i))}}function M(e,t,i){var r=R(t,i);if(!(r>=0))throw new O(x,new Error(e.tagName+"@"+i));for(var n=t.length-1;r<n;)t[r]=t[++r];if(t.length=n,e){var a=e.ownerDocument;a&&(G(a,e,i),i.ownerElement=null)}}function B(){}function q(){}function F(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function V(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(V(e,t))return!0}while(e=e.nextSibling)}function H(){this.ownerDocument=this}function G(e,t,i,r){e&&e._inc++,i.namespaceURI===a.XMLNS&&delete t._nsMap[i.prefix?i.localName:""]}function j(e,t,i){if(e&&e._inc){e._inc++;var r=t.childNodes;if(i)r[r.length++]=i;else{for(var n=t.firstChild,a=0;n;)r[a++]=n,n=n.nextSibling;r.length=a,delete r[r.length]}}}function W(e,t){var i=t.previousSibling,r=t.nextSibling;return i?i.nextSibling=r:e.firstChild=r,r?r.previousSibling=i:e.lastChild=i,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,j(e.ownerDocument,e),t}function z(e){return e&&e.nodeType===q.DOCUMENT_TYPE_NODE}function X(e){return e&&e.nodeType===q.ELEMENT_NODE}function Y(e){return e&&e.nodeType===q.TEXT_NODE}function Q(e,t){var i=e.childNodes||[];if(n(i,X)||z(t))return!1;var r=n(i,z);return!(t&&r&&i.indexOf(r)>i.indexOf(t))}function $(e,t){var i=e.childNodes||[];if(n(i,function(e){return X(e)&&e!==t}))return!1;var r=n(i,z);return!(t&&r&&i.indexOf(r)>i.indexOf(t))}function K(e,t,i){if(!function(e){return e&&(e.nodeType===q.DOCUMENT_NODE||e.nodeType===q.DOCUMENT_FRAGMENT_NODE||e.nodeType===q.ELEMENT_NODE)}(e))throw new O(A,"Unexpected parent node type "+e.nodeType);if(i&&i.parentNode!==e)throw new O(x,"child not in parent");if(!function(e){return e&&(X(e)||Y(e)||z(e)||e.nodeType===q.DOCUMENT_FRAGMENT_NODE||e.nodeType===q.COMMENT_NODE||e.nodeType===q.PROCESSING_INSTRUCTION_NODE)}(t)||z(t)&&e.nodeType!==q.DOCUMENT_NODE)throw new O(A,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function J(e,t,i){var r=e.childNodes||[],a=t.childNodes||[];
vendor: 4,280 bytes, line 1
1if(t.nodeType===q.DOCUMENT_FRAGMENT_NODE){var s=a.filter(X);if(s.length>1||n(a,Y))throw new O(A,"More than one element or text in fragment");if(1===s.length&&!Q(e,i))throw new O(A,"Element in fragment can not be inserted before doctype")}if(X(t)&&!Q(e,i))throw new O(A,"Only one element can be added and only after doctype");if(z(t)){if(n(r,z))throw new O(A,"Only one doctype is allowed");var o=n(r,X);if(i&&r.indexOf(o)<r.indexOf(i))throw new O(A,"Doctype can only be inserted before an element");if(!i&&o)throw new O(A,"Doctype can not be appended since element is present")}}function Z(e,t,i){var r=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===q.DOCUMENT_FRAGMENT_NODE){var s=a.filter(X);if(s.length>1||n(a,Y))throw new O(A,"More than one element or text in fragment");if(1===s.length&&!$(e,i))throw new O(A,"Element in fragment can not be inserted before doctype")}if(X(t)&&!$(e,i))throw new O(A,"Only one element can be added and only after doctype");if(z(t)){if(n(r,function(e){return z(e)&&e!==i}))throw new O(A,"Only one doctype is allowed");var o=n(r,X);if(i&&r.indexOf(o)<r.indexOf(i))throw new O(A,"Doctype can only be inserted before an element")}}function ee(e,t,i,r){K(e,t,i),e.nodeType===q.DOCUMENT_NODE&&(r||J)(e,t,i);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===S){var a=t.firstChild;if(null==a)return t;var s=t.lastChild}else a=s=t;var o=i?i.previousSibling:e.lastChild;a.previousSibling=o,s.nextSibling=i,o?o.nextSibling=a:e.firstChild=a,null==i?e.lastChild=s:i.previousSibling=s;do{a.parentNode=e,te(a,e.ownerDocument||e)}while(a!==s&&(a=a.nextSibling));return j(e.ownerDocument||e,e),t.nodeType==S&&(t.firstChild=t.lastChild=null),t}function te(e,t){if(e.ownerDocument!==t){if(e.ownerDocument=t,e.nodeType===h&&e.attributes)for(var i=0;i<e.attributes.length;i++){var r=e.attributes.item(i);r&&(r.ownerDocument=t)}for(var n=e.firstChild;n;)te(n,t),n=n.nextSibling}}function ie(){this._nsMap={}}function re(){}function ne(){}function ae(){}function se(){}function oe(){}function ue(){}function de(){}function le(){}function ce(){}function he(){}function fe(){}function pe(){}function me(e,t){var i=[],r=9==this.nodeType&&this.documentElement||this,n=r.prefix,a=r.namespaceURI;if(a&&null==n&&null==(n=r.lookupPrefix(a)))var s=[{namespace:a,prefix:null}];return ve(this,i,e,t,s),i.join("")}function ge(e,t,i){var r=e.prefix||"",n=e.namespaceURI;if(!n)return!1;if("xml"===r&&n===a.XML||n===a.XMLNS)return!1;for(var s=i.length;s--;){var o=i[s];if(o.prefix===r)return o.namespace!==n}return!0}function ye(e,t,i){e.push(" ",t,'="',i.replace(/[<>&"\t\n\r]/g,F),'"')}function ve(e,t,i,r,n){if(n||(n=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var s=e.attributes,o=s.length,u=e.firstChild,d=e.tagName,l=d;if(!(i=a.isHTML(e.namespaceURI)||i)&&!e.prefix&&e.namespaceURI){for(var c,y=0;y<s.length;y++)if("xmlns"===s.item(y).name){c=s.item(y).value;break}if(!c)for(var w=n.length-1;w>=0;w--){if(""===(E=n[w]).prefix&&E.namespace===e.namespaceURI){c=E.namespace;break}}if(c!==e.namespaceURI)for(w=n.length-1;w>=0;w--){var E;if((E=n[w]).namespace===e.namespaceURI){E.prefix&&(l=E.prefix+":"+d);break}}}t.push("<",l);for(var I=0;I<o;I++){"xmlns"==(A=s.item(I)).prefix?n.push({prefix:A.localName,namespace:A.value}):"xmlns"==A.nodeName&&n.push({prefix:"",namespace:A.value})}for(I=0;I<o;I++){var A,L,x;if(ge(A=s.item(I),0,n))ye(t,(L=A.prefix||"")?"xmlns:"+L:"xmlns",x=A.namespaceURI),n.push({prefix:L,namespace:x});ve(A,t,i,r,n)}if(d===l&&ge(e,0,n))ye(t,(L=e.prefix||"")?"xmlns:"+L:"xmlns",x=e.namespaceURI),n.push({prefix:L,namespace:x});if(u||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(d)){if(t.push(">"),i&&/^script$/i.test(d))for(;u;)u.data?t.push(u.data):ve(u,t,i,r,n.slice()),u=u.nextSibling;else for(;u;)ve(u,t,i,r,n.slice()),u=u.nextSibling;t.push("</",l,">")}else t.push("/>");return;case _:case S:for(u=e.firstChild;u;)ve(u,t,i,r,n.slice()),u=u.nextSibling;return;case f:return ye(t,e.name,e.value);case p:return t.push(e.data.replace(/[<&>]/g,F));case m:return t.push("<![CDATA[",e.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case b:return t.push("\x3c!--",e.data,"--\x3e");case T:var D=e.publicId,O=e.systemId;if(t.push("<!DOCTYPE ",e.name),D)t.push(" PUBLIC ",D),O&&"."!=O&&t.push(" ",O),t.pu
vendor: 10,412 bytes, line 1
1sh(">");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var k=e.internalSubset;k&&t.push(" [",k,"]"),t.push(">")}return;case v:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function be(e,t,i){var r;switch(t.nodeType){case h:(r=t.cloneNode(!1)).ownerDocument=e;case S:break;case f:i=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,i)for(var n=t.firstChild;n;)r.appendChild(be(e,n,i)),n=n.nextSibling;return r}function _e(e,t,i){var r=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var a=t[n];"object"!=typeof a&&a!=r[n]&&(r[n]=a)}switch(t.childNodes&&(r.childNodes=new k),r.ownerDocument=e,r.nodeType){case h:var s=t.attributes,o=r.attributes=new U,u=s.length;o._ownerElement=r;for(var d=0;d<u;d++)r.setAttributeNode(_e(e,s.item(d),!0));break;case f:i=!0}if(i)for(var l=t.firstChild;l;)r.appendChild(_e(e,l,i)),l=l.nextSibling;return r}function Te(e,t,i){e[t]=i}O.prototype=Error.prototype,d(E,O),k.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var i=[],r=0;r<this.length;r++)ve(this[r],i,e,t);return i.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},P.prototype.item=function(e){return C(this),this[e]||null},l(P,k),U.prototype={length:0,item:k.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var i=this[t];if(i.nodeName==e)return i}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new O(D);var i=this.getNamedItem(e.nodeName);return N(this._ownerElement,this,e,i),i},setNamedItemNS:function(e){var t,i=e.ownerElement;if(i&&i!=this._ownerElement)throw new O(D);return t=this.getNamedItemNS(e.namespaceURI,e.localName),N(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return M(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var i=this.getNamedItemNS(e,t);return M(this._ownerElement,this,i),i},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var r=this[i];if(r.localName==t&&r.namespaceURI==e)return r}return null}},B.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,i){var r=new H;if(r.implementation=this,r.childNodes=new k,r.doctype=i||null,i&&r.appendChild(i),t){var n=r.createElementNS(e,t);r.appendChild(n)}return r},createDocumentType:function(e,t,i){var r=new ue;return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=i||"",r}},q.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return ee(this,e,t)},replaceChild:function(e,t){ee(this,e,t,Z),t&&this.removeChild(t)},removeChild:function(e){return W(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return _e(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==p&&e.nodeType==p?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var i=t._nsMap;if(i)for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)&&i[r]===e)return r;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var i=t._nsMap;if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},d(c,q),d(c,q.prototype),H.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==S){for(var i=e.firstChild;i;){var r=i.nextSibling;this.insertBefore(i,t),i=r}return e}return ee(this,e,t),te(e,this),null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),W(this,e)},replaceChild:function(e,t){ee(this,e,t,Z),te(e,this),t&&this.removeChild(t),X(e)&&(this.documentElement=e)},importNode:function(e,t){return be(this,e,t)},getElementById:function(e){var t=null;return V(this.documentElement,function(i){if(i.nodeType==h&&i.getAttribute("id")==e)return t=i,!0}),t},getElementsByClassName:function(e){var t=u(e);return new P(this,function(i){var r=[];return t.length>0&&V(i.documentElement,function(n){if(n!==i&&n.nodeType===h){var a=n.getAttribute("class");if(a){var s=e===a;if(!s){var o=u(a);s=t.every((d=o,function(e){return d&&-1!==d.indexOf(e)}))}s&&r.push(n)}}var d}),r})},createElement:function(e){var t=new ie;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new k,(t.attributes=new U)._ownerElement=t,t},createDocumentFragment:function(){var e=new he;return e.ownerDocument=this,e.childNodes=new k,e},createTextNode:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new se;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){if(-1!==e.indexOf("]]>"))throw new O(L,'data contains "]]>"');var t=new oe;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var i=new fe;return i.ownerDocument=this,i.tagName=i.nodeName=i.target=e,i.nodeValue=i.data=t,i},createAttribute:function(e){var t=new re;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ce;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var i=new ie,r=t.split(":"),n=i.attributes=new U;return i.childNodes=new k,i.ownerDocument=this,i.nodeName=t,i.tagName=t,i.namespaceURI=e,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=t,n._ownerElement=i,i},createAttributeNS:function(e,t){var i=new re,r=t.split(":");return i.ownerDocument=this,i.nodeName=t,i.name=t,i.namespaceURI=e,i.specified=!0,2==r.length?(i.prefix=r[0],i.localName=r[1]):i.localName=t,i}},l(H,q),ie.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var i=this.ownerDocument.createAttribute(e);i.value=i.nodeValue=""+t,this.setAttributeNode(i)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===S?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,j(e.ownerDocument,e,t),te(t,e.ownerDocument||e),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);i&&this.removeAttributeNode(i)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var i=this.getAttributeNodeNS(e,t);return i&&i.value||""},setAttributeNS:function(e,t,i){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+i,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,function(t){var i=[];return V(t,function(r){r===t||r.nodeType!=h||"*"!==e&&r.tagName!=e||i.push(r)}),i})},getElementsByTagNameNS:function(e,t){return new P(this,function(i){var r=[];return V(i,function(n){n===i||n.nodeType!==h||"*"!==e&&n.namespaceURI!==e||"*"!==t&&n.localName!=t||r.push(n)}),r})}},H.prototype.getElementsByTagName=ie.prototype.getElementsByTagName,H.prototype.getElementsByTagNameNS=ie.prototype.getElementsByTagNameNS,l(ie,q),re.prototype.nodeType=f,l(re,q),ne.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(I[A])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,i){i=this.data.substring(0,e)+i+this.data.substring(e+t),this.nodeValue=this.data=i,this.length=i.length}},l(ne,q),ae.prototype={nodeName:"#text",nodeType:p,splitText:function(e){var t=this.data,i=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},l(ae,ne),se.prototype={nodeName:"#comment",nodeType:b},l(se,ne),oe.prototype={nodeName:"#cdata-section",nodeType:m},l(oe,ne),ue.prototype.nodeType=T,l(ue,q),de.prototype.nodeType=w,l(de,q),le.prototype.nodeType=y,l(le,q),ce.prototype.nodeType=g,l(ce,q),he.prototype.nodeName="#document-fragment",he.prototype.nodeType=S,l(he,q),fe.prototype.nodeType=v,l(fe,q),pe.prototype.serializeToString=function(e,t,i){return me.call(e,t,i)},q.prototype.toString=me;try{if(Object.defineProperty){function Se(e){switch(e.nodeType){case h:case S:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Se(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(P.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(q.prototype,"textContent",{get:function(){return Se(this)},set:function(e){switch(this.nodeType){case h:case S: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}}}),Te=function(e,t,i){e["$$"+t]=i}}}catch(we){}t.DocumentType=ue,t.DOMException=O,t.DOMImplementation=B,t.Element=ie,t.Node=q,t.NodeList=k,t.XMLSerializer=pe},559(e,t,i){"use strict";var r=i(582).freeze;t.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=r
vendor: 28,771 bytes, line 1
1({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},978(e,t,i){var 
vendor: 1,394 bytes, line 1
1r=i(722);r.DOMImplementation,r.XMLSerializer,t.DOMParser=i(752).DOMParser},466(e,t,i){var r=i(582).NAMESPACE,n=/[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"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+n.source+a.source+"*(?::"+n.source+a.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function u(){}function d(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function l(e,t,i,n,a,s){function o(e,t,r){i.attributeNames.hasOwnProperty(e)&&s.fatalError("Attribute "+e+" redefined"),i.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),r)}for(var u,d=++t,l=0;;){var c=e.charAt(d);switch(c){case"=":if(1===l)u=e.slice(t,d),l=3;else{if(2!==l)throw new Error("attribute equal must after attrName");l=3}break;case"'":case'"':if(3===l||1===l){if(1===l&&(s.warning('attribute value must after "="'),u=e.slice(t,d)),t=d+1,!((d=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");o(u,h=e.slice(t,d),t-1),l=5}else{if(4!=l)throw new Error('attribute value must after "="');o(u,h=e.slice(t,d),t),s.warning('attribute "'+u+'" missed start quot('+c+")!!"),t=d+1,l=5}break;case"/":switch(l){case 0:i.setTagName(e.slice(t,d));
vendor: 5,083 bytes, line 1
1case 5:case 6:case 7:l=7,i.closed=!0;case 4:case 1:break;case 2:i.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),0==l&&i.setTagName(e.slice(t,d)),d;case">":switch(l){case 0:i.setTagName(e.slice(t,d));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,d)).slice(-1)&&(i.closed=!0,h=h.slice(0,-1));case 2:2===l&&(h=u),4==l?(s.warning('attribute "'+h+'" missed quot(")!'),o(u,h,t)):(r.isHTML(n[""])&&h.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return d;case"€":c=" ";default:if(c<=" ")switch(l){case 0:i.setTagName(e.slice(t,d)),l=6;break;case 1:u=e.slice(t,d),l=2;break;case 4:var h=e.slice(t,d);s.warning('attribute "'+h+'" missed quot(")!!'),o(u,h,t);case 5:l=6}else switch(l){case 2:i.tagName;r.isHTML(n[""])&&u.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),o(u,u,t),t=d,l=1;break;case 5:s.warning('attribute space is required"'+u+'"!!');case 6:l=1,t=d;break;case 3:l=4,t=d;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}d++}}function c(e,t,i){for(var n=e.tagName,a=null,s=e.length;s--;){var o=e[s],u=o.qName,d=o.value;if((f=u.indexOf(":"))>0)var l=o.prefix=u.slice(0,f),c=u.slice(f+1),h="xmlns"===l&&c;else c=u,l=null,h="xmlns"===u&&"";o.localName=c,!1!==h&&(null==a&&(a={},p(i,i={})),i[h]=a[h]=d,o.uri=r.XMLNS,t.startPrefixMapping(h,d))}for(s=e.length;s--;){(l=(o=e[s]).prefix)&&("xml"===l&&(o.uri=r.XML),"xmlns"!==l&&(o.uri=i[l||""]))}var f;(f=n.indexOf(":"))>0?(l=e.prefix=n.slice(0,f),c=e.localName=n.slice(f+1)):(l=null,c=e.localName=n);var m=e.uri=i[l||""];if(t.startElement(m,c,n,e),!e.closed)return e.currentNSMap=i,e.localNSMap=a,!0;if(t.endElement(m,c,n),a)for(l in a)Object.prototype.hasOwnProperty.call(a,l)&&t.endPrefixMapping(l)}function h(e,t,i,r,n){if(/^(?:script|textarea)$/i.test(i)){var a=e.indexOf("</"+i+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(i)?(n.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,r),n.characters(s,0,s.length),a)}return t+1}function f(e,t,i,r){var n=r[i];return null==n&&((n=e.lastIndexOf("</"+i+">"))<t&&(n=e.lastIndexOf("</"+i)),r[i]=n),n<t}function p(e,t){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}function m(e,t,i,r){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(n=e.indexOf("--\x3e",t+4))>t?(i.comment(e,t+4,n-t-4),n+3):(r.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var n=e.indexOf("]]>",t+9);return i.startCDATA(),i.characters(e,t+9,n-t-9),i.endCDATA(),n+3}var a=function(e,t){var i,r=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;n.lastIndex=t,n.exec(e);for(;i=n.exec(e);)if(r.push(i),i[1])return r}(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=!1,d=!1;s>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],d=s>4&&a[4][0]):/^system$/i.test(a[2][0])&&(d=a[3][0]));var l=a[s-1];return i.startDTD(o,u,d),i.endDTD(),l.index+l[0].length}return-1}function g(e,t,i){var r=e.indexOf("?>",t);if(r){var n=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)$/);if(n){n[0].length;return i.processingInstruction(n[1],n[2]),r+2}return-1}return-1}function y(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,u.prototype={parse:function(e,t,i){var n=this.domBuilder;n.startDocument(),p(t,t={}),function(e,t,i,n,a){function s(e){if(e>65535){var t=55296+((e-=65536)>>10),i=56320+(1023&e);return String.fromCharCode(t,i)}return String.fromCharCode(e)}function u(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(i,t)?i[t]:"#"===t.charAt(0)?s(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function p(t){if(t>I){var i=e.substring(I,t).replace(/&#?\w+;/g,u);S&&v(I),n.characters(i,0,t-I),I=t}}function v(t,i){for(;t>=_&&(i=T.exec(e));)b=i.index,_=b+i[0].length,S.lineNumber++;S.columnNumber=t-b+1}var b=0,_=0,T=/.*(?:\r\n?|\n)|.*$/g,S=n.locator,w=[{currentNSMap:t}],E={},I=0;for(;;){try{var A=e.indexOf("<",I);if(A<0){if(!e.substr(I).match(/^\s*$/)){var L=n.doc,x=L.createTextNode(e.substr(I));L.appendChild(x),n.currentElement=x}return}switch(A>I&&p(A),e.charAt(A+1)){case"/":var D=e.indexOf(">",A+3),O=e.substring(A+2,D).replace(/[ \t\n\r]+$/g,""),k=w.pop();D<0?(O=e.substring(A+2).replace(/[\s<].*/,""),a.error("end tag name: "+O+" is not complete:"+k.tagName),D=A+1+O.length):O.match(/\s</)&&(O=O.replace(/[\s<].*/,""),a.error("end tag name: "+O+" maybe not complete"),D=A+1+O.length);var P=k.localNSMap,C=k.tagName==O;if(C||k.tagName&&k.tagName.toLowerCase()==O.toLowerCase()){if(n.endElement(k.uri,k.localName,O),P)for(var U in P)Object.prototype.hasOwnProperty.call(P,U)&&n.endPrefixMapping(U);C||a.fatalError("end tag name: "+O+" is not match the current start tagName:"+k.tagName)}else w.push(k);D++;break;case"?":S&&v(A),D=g(e,A,n);break;case"!":S&&v(A),D=m(e,A,n,a);break;default:S&&v(A);var R=new y,N=w[w.length-1].currentNSMap,M=(D=l(e,A,R,N,u,a),R.length);
1if(!R.closed&&f(e,D,R.tagName,E)&&(R.closed=!0,i.nbsp||a.warning("unclosed xml attribute")),S&&M){for(var B=d(S,{}),q=0;q<M;q++){var F=R[q];v(F.offset),F.locator=d(S,{})}n.locator=B,c(R,n,N)&&w.push(R),n.locator=S}else c(R,n,N)&&w.push(R);r.isHTML(R.uri)&&!R.closed?D=h(e,D,R.tagName,u,n):D++}}catch(e){if(e instanceof o)throw e;a.error("element parse error: "+e),D=-1}D>I?I=D:p(Math.max(A,I)+1)}}(e,t,i,n,this.errorHandler),n.endDocument()}},y.prototype={setTagName:function(e){if(!s.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,i){if(!s.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:i}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=u,t.ParseError=o},526(e,t){"use strict";t.byteLength=function(e){var t=o(e),i=t[0],r=t[1];return 3*(i+r)/4-r},t.toByteArray=function(e){var t,i,a=o(e),s=a[0],u=a[1],d=new n(function(e,t,i){return 3*(t+i)/4-i}(0,s,u)),l=0,c=u>0?s-4:s;for(i=0;i<c;i+=4)t=r[e.charCodeAt(i)]<<18|r[e.charCodeAt(i+1)]<<12|r[e.charCodeAt(i+2)]<<6|r[e.charCodeAt(i+3)],d[l++]=t>>16&255,d[l++]=t>>8&255,d[l++]=255&t;2===u&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,d[l++]=255&t);1===u&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,d[l++]=t>>8&255,d[l++]=255&t);return d},t.fromByteArray=function(e){for(var t,r=e.length,n=r%3,a=[],s=16383,o=0,u=r-n;o<u;o+=s)a.push(d(e,o,o+s>u?u:o+s));1===n?(t=e[r-1],a.push(i[t>>2]+i[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],a.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return a.join("")};for(var i=[],r=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)i[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 i=e.indexOf("=");return-1===i&&(i=t),[i,i===t?0:4-i%4]}function u(e){return i[e>>18&63]+i[e>>12&63]+i[e>>6&63]+i[63&e]}function d(e,t,i){for(var r,n=[],a=t;a<i;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),n.push(u(r));return n.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},287(e,t,i){"use strict";const r=i(526),n=i(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=u,t.IS=50;const s=2147483647;function o(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,i){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return d(e,t,i)}function d(e,t,i){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const i=0|m(e,t);let r=o(i);const n=r.write(e,t);n!==i&&(r=r.slice(0,n));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(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 f(e,t,i);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return f(e,t,i);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,i);const n=function(e){if(u.isBuffer(e)){const t=0|p(e.length),i=o(t);return 0===i.length||e.copy(i,0,0,t),i}if(void 0!==e.length)return"number"!=typeof e.length||$(e.length)?o(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');
vendor: 4,216 bytes, line 1
1if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),o(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),i=o(t);for(let r=0;r<t;r+=1)i[r]=255&e[r];return i}function f(e,t,i){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),Object.setPrototypeOf(r,u.prototype),r}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(u.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);const i=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return X(e).length;default:if(n)return r?-1:z(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,i){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,i);case"utf8":case"utf-8":return A(this,t,i);case"ascii":return x(this,t,i);case"latin1":case"binary":return D(this,t,i);case"base64":return I(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,i){const r=e[t];e[t]=e[i],e[i]=r}function v(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),$(i=+i)&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:b(e,t,i,r,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):b(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function b(e,t,i,r,n){let a,s=1,o=e.length,u=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,u/=2,i/=2}function d(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){let r=-1;for(a=i;a<o;a++)if(d(e,a)===d(t,-1===r?0:a-r)){if(-1===r&&(r=a),a-r+1===u)return r*s}else-1!==r&&(a-=a-r),r=-1}else for(i+u>o&&(i=o-u),a=i;a>=0;a--){let i=!0;for(let r=0;r<u;r++)if(d(e,a+r)!==d(t,r)){i=!1;break}if(i)return a}return-1}function _(e,t,i,r){i=Number(i)||0;const n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;const a=t.length;let s;for(r>a/2&&(r=a/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if($(r))return s;e[i+s]=r}return s}function T(e,t,i,r){return Y(z(t,e.length-i),e,i,r)}function S(e,t,i,r){return Y(function(e){const t=[];for(let i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,i,r)}function w(e,t,i,r){return Y(X(t),e,i,r)}function E(e,t,i,r){return Y(function(e,t){let i,r,n;const a=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)i=e.charCodeAt(s),r=i>>8,n=i%256,a.push(n),a.push(r);return a}(t,e.length-i),e,i,r)}function I(e,t,i){return 0===t&&i===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,i))}function A(e,t,i){i=Math.min(e.length,i);const r=[];let n=t;for(;n<i;){const t=e[n];let a=null,s=t>239?4:t>223?3:t>191?2:1;if(n+s<=i){let i,r,o,u;switch(s){case 1:t<128&&(a=t);break;case 2:i=e[n+1],128==(192&i)&&(u=(31&t)<<6|63&i,u>127&&(a=u));break;case 3:i=e[n+1],r=e[n+2],128==(192&i)&&128==(192&r)&&(u=(15&t)<<12|(63&i)<<6|63&r,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:i=e[n+1],r=e[n+2],o=e[n+3],128==(192&i)&&128==(192&r)&&128==(192&o)&&(u=(15&t)<<18|(63&i)<<12|(63&r)<<6|63&o,u>
vendor: 15,315 bytes, line 1
165535&&u<1114112&&(a=u))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),n+=s}return function(e){const t=e.length;if(t<=L)return String.fromCharCode.apply(String,e);let i="",r=0;for(;r<t;)i+=String.fromCharCode.apply(String,e.slice(r,r+=L));return i}(r)}u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,i){return d(e,t,i)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,i){return function(e,t,i){return l(e),e<=0?o(e):void 0!==t?"string"==typeof i?o(e).fill(t,i):o(e).fill(t):o(e)}(e,t,i)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,r=t.length;for(let n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const r=u.allocUnsafe(t);let n=0;for(i=0;i<e.length;++i){let t=e[i];if(Q(t,Uint8Array))n+t.length>r.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,n)):Uint8Array.prototype.set.call(r,t,n);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,n)}n+=t.length}return r},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const i=t.IS;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(e,t,i,r,n){if(Q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.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===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return-1;if(t>=i)return 1;if(this===e)return 0;let a=(n>>>=0)-(r>>>=0),s=(i>>>=0)-(t>>>=0);const o=Math.min(a,s),d=this.slice(r,n),l=e.slice(t,i);for(let e=0;e<o;++e)if(d[e]!==l[e]){a=d[e],s=l[e];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i)},u.prototype.indexOf=function(e,t,i){return v(this,e,t,i,!0)},u.prototype.lastIndexOf=function(e,t,i){return v(this,e,t,i,!1)},u.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}const n=this.length-t;if((void 0===i||i>n)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return _(this,e,t,i);case"utf8":case"utf-8":return T(this,e,t,i);case"ascii":case"latin1":case"binary":return S(this,e,t,i);case"base64":return w(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,i);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const L=4096;function x(e,t,i){let r="";i=Math.min(e.length,i);for(let n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}function D(e,t,i){let r="";i=Math.min(e.length,i);for(let n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}function O(e,t,i){const r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);let n="";for(let r=t;r<i;++r)n+=K[e[r]];return n}function k(e,t,i){const r=e.slice(t,i);let n="";for(let e=0;e<r.length-1;e+=2)n+=String.fromCharCode(r[e]+256*r[e+1]);return n}function P(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,i,r,n,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<a)throw new RangeError('"value" argument is out of bounds');if(i+r>e.length)throw new RangeError("Index out of range")}function U(e,t,i,r,n){H(t,r,n,e,i,7);let a=Number(t&BigInt(4294967295));e[i++]=a,a>>=8,e[i++]=a,a>>=8,e[i++]=a,a>>=8,e[i++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[i++]=s,s>>=8,e[i++]=s,s>>=8,e[i++]=s,s>>=8,e[i++]=s,i}function R(e,t,i,r,n){H(t,r,n,e,i,7);let a=Number(t&BigInt(4294967295));e[i+7]=a,a>>=8,e[i+6]=a,a>>=8,e[i+5]=a,a>>=8,e[i+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[i+3]=s,s>>=8,e[i+2]=s,s>>=8,e[i+1]=s,s>>=8,e[i]=s,i+8}function N(e,t,i,r,n,a){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function M(e,t,i,r,a){return t=+t,i>>>=0,a||N(e,0,i,4),n.write(e,t,i,r,23,4),i+4}function B(e,t,i,r,a){return t=+t,i>>>=0,a||N(e,0,i,8),n.write(e,t,i,r,52,8),i+8}u.prototype.slice=function(e,t){const i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);let r=this[e],n=1,a=0;for(;++a<t&&(n*=256);)r+=this[e+a]*n;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);let r=this[e+--t],n=1;for(;t>0&&(n*=256);)r+=this[e+--t]*n;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.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]},u.prototype.readUint32BE=u.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])},u.prototype.readBigUInt64LE=J(function(e){G(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||j(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+i*2**24;return BigInt(r)+(BigInt(n)<<BigInt(32))}),u.prototype.readBigUInt64BE=J(function(e){G(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||j(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+i;return(BigInt(r)<<BigInt(32))+BigInt(n)}),u.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);let r=this[e],n=1,a=0;for(;++a<t&&(n*=256);)r+=this[e+a]*n;return n*=128,r>=n&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||P(e,t,this.length);let r=t,n=1,a=this[e+--r];for(;r>0&&(n*=256);)a+=this[e+--r]*n;return n*=128,a>=n&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},u.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},u.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]},u.prototype.readBigInt64LE=J(function(e){G(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||j(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(i<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=J(function(e){G(e>>>=0,"offset");const t=this[e],i=this[e+7];void 0!==t&&void 0!==i||j(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+i)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,i,r){if(e=+e,t>>>=0,i>>>=0,!r){C(this,e,t,i,Math.pow(2,8*i)-1,0)}let n=1,a=0;for(this[t]=255&e;++a<i&&(n*=256);)this[t+a]=e/n&255;return t+i},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,i,r){if(e=+e,t>>>=0,i>>>=0,!r){C(this,e,t,i,Math.pow(2,8*i)-1,0)}let n=i-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+i},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||C(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||C(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},u.prototype.writeBigUInt64LE=J(function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=J(function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*i-1);C(this,e,t,i,r-1,-r)}let n=0,a=1,s=0;for(this[t]=255&e;++n<i&&(a*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/a|0)-s&255;return t+i},u.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*i-1);C(this,e,t,i,r-1,-r)}let n=i-1,a=1,s=0;for(this[t+n]=255&e;--n>=0&&(a*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/a|0)-s&255;return t+i},u.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||C(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},u.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||C(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},u.prototype.writeBigInt64LE=J(function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=J(function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,i){return M(this,e,t,!0,i)},u.prototype.writeFloatBE=function(e,t,i){return M(this,e,t,!1,i)},u.prototype.writeDoubleLE=function(e,t,i){return B(this,e,t,!0,i)},u.prototype.writeDoubleBE=function(e,t,i){return B(this,e,t,!1,i)},u.prototype.copy=function(e,t,i,r){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=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<r-i&&(r=e.length-t+i);const n=r-i;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,i,r):Uint8Array.prototype.set.call(e,this.subarray(i,r),t),n},u.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;let n;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(n=t;n<i;++n)this[n]=e;else{const a=u.isBuffer(e)?e:u.from(e,r),s=a.length;
vendor: 1,121 bytes, line 1
1if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<i-t;++n)this[n+t]=a[n%s]}return this};const q={};function F(e,t,i){q[e]=class extends i{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",i=e.length;const r="-"===e[0]?1:0;for(;i>=r+4;i-=3)t=`_${e.slice(i-3,i)}${t}`;return`${e.slice(0,i)}${t}`}function H(e,t,i,r,n,a){if(e>i||e<t){const r="bigint"==typeof t?"n":"";let n;throw n=a>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${i}${r}`,new q.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,i){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+i]||j(t,e.length-(i+1))}(r,n,a)}function G(e,t){if("number"!=typeof e)throw new q.ERR_INVALID_ARG_TYPE(t,"number",e)}
1function j(e,t,i){if(Math.floor(e)!==e)throw G(e,i),new q.ERR_OUT_OF_RANGE(i||"offset","an integer",e);if(t<0)throw new q.ERR_BUFFER_OUT_OF_BOUNDS;throw new q.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),F("ERR_OUT_OF_RANGE",function(e,t,i){let r=`The value of "${e}" is out of range.`,n=i;return Number.isInteger(i)&&Math.abs(i)>2**32?n=V(String(i)):"bigint"==typeof i&&(n=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(n=V(n)),n+="n"),r+=` It must be ${t}. Received ${n}`,r},RangeError);const W=/[^+/0-9A-Za-z-_]/g;function z(e,t){let i;t=t||1/0;const r=e.length;let n=null;const a=[];for(let s=0;s<r;++s){if(i=e.charCodeAt(s),i>55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&a.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;a.push(i)}else if(i<2048){if((t-=2)<0)break;a.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;a.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return a}function X(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,i,r){let n;for(n=0;n<r&&!(n+i>=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let i=0;i<16;++i){const r=16*i;for(let n=0;n<16;++n)t[r+n]=e[i]+e[n]}return t}();function J(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},697(e,t,i){var r,n=void 0!==i.g?i.g:"undefined"!=typeof window?window:{},a=i(542);"undefined"!=typeof document?r=document:(r=n["__GLOBAL_DOCUMENT_CACHE@4"])||(r=n["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=r},840(e,t,i){var r;r="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=r},251(e,t){t.read=function(e,t,i,r,n){var a,s,o=8*n-r-1,u=(1<<o)-1,d=u>>1,l=-7,c=i?n-1:0,h=i?-1:1,f=e[t+c];for(c+=h,a=f&(1<<-l)-1,f>>=-l,l+=o;l>0;a=256*a+e[t+c],c+=h,l-=8);for(s=a&(1<<-l)-1,a>>=-l,l+=r;l>0;s=256*s+e[t+c],c+=h,l-=8);if(0===a)a=1-d;else{if(a===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),a-=d}return(f?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,i,r,n,a){var s,o,u,d=8*a-n-1,l=(1<<d)-1,c=l>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,p=r?1:-1,m=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=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=l?(o=0,s=l):s+c>=1?(o=(t*u-1)*Math.pow(2,n),s+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),s=0));n>=8;e[i+f]=255&o,f+=p,o/=256,n-=8);for(s=s<<n|o,d+=n;d>0;e[i+f]=255&s,f+=p,s/=256,d-=8);e[i+f-p]|=128*m}},962(e,t,i){var r=i(626).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=r(e.subarray(n)),i.firstOffset=r(e.subarray(n+8)),n+=16),n+=2;var a=t.getUint16(n);for(n+=2;a>0;n+=12,a--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i}},622(e){var t,i,r,n,a,s,o,u=9e4;t=function(e){return e*u},i=function(e,t){return e*t},r=function(e){return e/u},n=function(e,t){return e/t},a=function(e,i){return t(n(e,i))},s=function(e,t){return i(r(e),t)},o=function(e,t,i){return r(i?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:t,secondsToAudioTs:i,videoTsToSeconds:r,audioTsToSeconds:n,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:o}},626(e){var t=Math.pow(2,32);e.exports={getUint64:function(e){var i,r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getBigUint64?(i=r.getBigUint64(0))<Number.MAX_SAFE_INTEGER?
1Number(i):i:r.getUint32(0)*t+r.getUint32(4)},MAX_UINT32:t}},842(e){var t,i,r,n,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var n=a.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=a.normalizePath(n.path),a.buildURLFromParts(n)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return r.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=i.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var d={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(d.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var l=o.path,c=l.substring(0,l.lastIndexOf("/")+1)+s.path;d.path=a.normalizePath(c)}else d.path=o.path,s.params||(d.params=o.params,s.query||(d.query=o.query));return null===d.path&&(d.path=r.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(d)},parseURL:function(e){var i=t.exec(e);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(n,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a},660(t){"use strict";t.exports=e},542(){}},i={};function r(e){var n=i[e];if(void 0!==n)return n.exports;var a=i[e]={exports:{}};return t[e].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,i){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,i)}function i(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,t(e,i)}r.r(n),r.d(n,{default:()=>jn});var a=r(697),s=r.n(a),o=r(840),u=r.n(o),d=r(842),l=r.n(d),c="http://example.com";const h=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=u().location&&u().location.href||"");var i="function"==typeof u().URL,r=/^\/\//.test(e),n=!u().location&&!/\/\//i.test(e);if(i?e=new(u().URL)(e,u().location||c):/\/\//i.test(e)||(e=l().buildAbsoluteURL(u().location&&u().location.href||"",e)),i){var a=new URL(t,e);return n?a.href.slice(18):r?a.href.slice(a.protocol.length):a.href}return l().buildAbsoluteURL(e,t)};var f=r(660),p=r.n(f);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},m.apply(null,arguments)}var g=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);
1else for(var n=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",function(t){e.push(t)})},e}(),y=r(287).hp;function v(e){for(var t,i=(t=e,u().atob?u().atob(t):y.from(t,"base64").toString("binary")),r=new Uint8Array(i.length),n=0;n<i.length;n++)r[n]=i.charCodeAt(n);return r}var b,_,T,S=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return i(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(g),w=String.fromCharCode(9),E=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),i={};return t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),i},I=function(e){for(var t,i=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},n=i.length;n--;)""!==i[n]&&((t=/([^=]*)=(.*)/.exec(i[n]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},A=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}i(t,e);var r=t.prototype;return r.push=function(e){var t,i,r=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce(function(t,i){var r=i(e);return r===e?t:t.concat([r])},[e]).forEach(function(e){for(var n=0;n<r.customParsers.length;n++)if(r.customParsers[n].call(r,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void r.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void r.trigger("data",i);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void r.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void r.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void r.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void r.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return i=m(E(t[1]),{type:"tag",tagType:"byterange"}),void r.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void r.trigger("data",i);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"map"},t[1]){var a=I(t[1]);a.URI&&(i.uri=a.URI),a.BYTERANGE&&(i.byterange=E(a.BYTERANGE))}r.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=I(t[1]),i.attributes.RESOLUTION){var s=i.attributes.RESOLUTION.split("x"),o={};s[0]&&(o.width=parseInt(s[0],10)),s[1]&&(o.height=parseInt(s[1],10)),i.attributes.RESOLUTION=o}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["FRAME-RATE"]&&(i.attributes["FRAME-RATE"]=parseFloat(i.attributes["FRAME-RATE"])),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}r.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=I(t[1])),void r.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e))r.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void r.trigger("data",i);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=I(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void r.trigger("data",i);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=I(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void r.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void r.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void r.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void r.trigger("data",i);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"skip"}).attributes=I(t[1]),i.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(i.attributes["SKIPPED-SEGMENTS"]=parseInt(i.attributes["SKIPPED-SEGMENTS"],10)),i.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(i.attributes["RECENTLY-REMOVED-DATERANGES"]=i.attributes["RECENTLY-REMOVED-DATERANGES"].split(w)),void r.trigger("data",i);
1if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"part"}).attributes=I(t[1]),["DURATION"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),["INDEPENDENT","GAP"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),i.attributes.hasOwnProperty("BYTERANGE")&&(i.attributes.byterange=E(i.attributes.BYTERANGE)),void r.trigger("data",i);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"server-control"}).attributes=I(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=/YES/.test(i.attributes[e]))}),void r.trigger("data",i);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"part-inf"}).attributes=I(t[1]),["PART-TARGET"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseFloat(i.attributes[e]))}),void r.trigger("data",i);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"preload-hint"}).attributes=I(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(e){if(i.attributes.hasOwnProperty(e)){i.attributes[e]=parseInt(i.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";i.attributes.byterange=i.attributes.byterange||{},i.attributes.byterange[t]=i.attributes[e],delete i.attributes[e]}}),void r.trigger("data",i);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(i={type:"tag",tagType:"rendition-report"}).attributes=I(t[1]),["LAST-MSN","LAST-PART"].forEach(function(e){i.attributes.hasOwnProperty(e)&&(i.attributes[e]=parseInt(i.attributes[e],10))}),void r.trigger("data",i);r.trigger("data",{type:"tag",data:e.slice(4)})}}}else r.trigger("data",{type:"comment",text:e.slice(1)})}):this.trigger("data",{type:"uri",uri:e}))},r.addParser=function(e){var t=this,i=e.expression,r=e.customType,n=e.dataParser,a=e.segment;"function"!=typeof n&&(n=function(e){return e}),this.customParsers.push(function(e){if(i.exec(e))return t.trigger("data",{type:"custom",data:n(e),customType:r,segment:a}),!0})},r.addTagMapper=function(e){var t=e.expression,i=e.map;this.tagMappers.push(function(e){return t.test(e)?i(e):e})},t}(g),L=function(e){var t={};return Object.keys(e).forEach(function(i){var r;t[r=i,r.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})]=e[i]}),t},x=function(e){var t=e.serverControl,i=e.targetDuration,r=e.partTargetDuration;if(t){var n="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",o=i&&3*i,u=r&&2*r;i&&!t.hasOwnProperty(a)&&(t[a]=o,this.trigger("info",{message:n+" defaulting HOLD-BACK to targetDuration * 3 ("+o+")."})),o&&t[a]<o&&(this.trigger("warn",{message:n+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+o+")"}),t[a]=o),r&&!t.hasOwnProperty(s)&&(t[s]=3*r,this.trigger("info",{message:n+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[s]+")."})),r&&t[s]<u&&(this.trigger("warn",{message:n+" clamping PART-HOLD-BACK ("+t[s]+") to partTargetDuration * 2 ("+u+")."}),t[s]=u)}},D=function(t){function r(){var i;(i=t.call(this)||this).lineStream=new S,i.parseStream=new A,i.lineStream.pipe(i.parseStream);var r,n,a=e(i),s=[],o={},u=!1,d=function(){},l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;i.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var h=0,f=0;return i.on("end",function(){o.uri||!o.parts&&!o.preloadHints||(!o.map&&r&&(o.map=r),!o.key&&n&&(o.key=n),o.timeline||"number"!=typeof c||(o.timeline=c),i.manifest.preloadSegment=o)}),i.parseStream.on("data",function(e){var t,i;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(o.byterange=t,t.length=e.length,"offset"in e||(e.offset=h)),"offset"in e&&(o.byterange=t,t.offset=e.offset),h=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(o.duration=e.duration),0===e.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=s},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:v(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(n.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else n=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,c=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){r={}
1,e.uri&&(r.uri=e.uri),e.byterange&&(r.byterange=e.byterange),n&&(r.key=n)},"stream-inf":function(){this.manifest.playlists=s,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(o.attributes||(o.attributes={}),m(o.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var r=this.manifest.mediaGroups[e.attributes.TYPE];r[e.attributes["GROUP-ID"]]=r[e.attributes["GROUP-ID"]]||{},t=r[e.attributes["GROUP-ID"]],(i={default:/yes/i.test(e.attributes.DEFAULT)}).default?i.autoselect=!0:i.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(i.language=e.attributes.LANGUAGE),e.attributes.URI&&(i.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(i.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(i.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(i.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=i}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(s.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),o.dateTimeString=e.dateTimeString,o.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,x.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){o.cueOut=e.data},"cue-out-cont":function(){o.cueOutCont=e.data},"cue-in":function(){o.cueIn=e.data},skip:function(){this.manifest.skip=L(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;u=!0;var i=this.manifest.segments.length,r=L(e.attributes);o.parts=o.parts||[],o.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=f),f=r.byterange.offset+r.byterange.length);var n=o.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+n+" for segment #"+i,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(e,i){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+i+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var t=this.manifest.serverControl=L(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),x.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,i=L(e.attributes),r=i.type&&"PART"===i.type;o.preloadHints=o.preloadHints||[],o.preloadHints.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=r?f:0,r&&(f=i.byterange.offset+i.byterange.length)));var n=o.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+n+" for segment #"+t,e.attributes,["TYPE","URI"]),i.type)for(var a=0;a<o.preloadHints.length-1;a++){var s=o.preloadHints[a];s.type&&(s.type===i.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+n+" for segment #"+t+" has the same TYPE "+i.type+" as preload hint #"+a}))}},"rendition-report":function(){var t=L(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var i=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];u&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+i,e.attributes,r)},"part-inf":function(){this.manifest.partInf=L(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),x.call(this,this.manifest)}}[e.tagType]||d).call(a)}
vendor: 4,958 bytes, line 1
1,uri:function(){o.uri=e.uri,s.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),n&&(o.key=n),o.timeline=c,r&&(o.map=r),f=0,o={}},comment:function(){},custom:function(){e.segment?(o.custom=o.custom||{},o.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(a)}),i}i(r,t);var n=r.prototype;return n.warnOnMissingAttributes_=function(e,t,i){var r=[];i.forEach(function(e){t.hasOwnProperty(e)||r.push(e)}),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},r}(g),O={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},k=["video","audio","text"],P=["Video","Audio","Text"],C=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)}):e},U=function(e){void 0===e&&(e="");var t=e.split(","),i=[];return t.forEach(function(e){var t;e=e.trim(),k.forEach(function(r){var n=O[r].exec(e.toLowerCase());if(n&&!(n.length<=1)){t=r;var a=e.substring(0,n[1].length),s=e.replace(a,"");i.push({type:a,details:s,mediaType:r})}}),t||i.push({type:e,details:"",mediaType:"unknown"})}),i},R=function(e){return void 0===e&&(e=""),O.audio.test(e.trim().toLowerCase())},N=function(e){if(e&&"string"==typeof e){var t,i=e.toLowerCase().split(",").map(function(e){return C(e.trim())}),r="video";1===i.length&&R(i[0])?r="audio":1===i.length&&(void 0===(t=i[0])&&(t=""),O.text.test(t.trim().toLowerCase()))&&(r="application");var n="mp4";return i.every(function(e){return O.mp4.test(e)})?n="mp4":i.every(function(e){return O.webm.test(e)})?n="webm":i.every(function(e){return O.ogg.test(e)})&&(n="ogg"),r+"/"+n+';codecs="'+e+'"'}},M=function(e){return void 0===e&&(e=""),u().MediaSource&&u().MediaSource.isTypeSupported&&u().MediaSource.isTypeSupported(N(e))||!1},B=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every(function(e){e=e.trim();for(var t=0;t<P.length;t++){if(O["muxer"+P[t]].test(e))return!0}return!1})},q="mp4a.40.2",F=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,V=/^application\/dash\+xml/i,H=function(e){return F.test(e)?"hls":V.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},G=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},j=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||G(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},W=u().BigInt||Number,z=[W("0x1"),W("0x100"),W("0x10000"),W("0x1000000"),W("0x100000000"),W("0x10000000000"),W("0x1000000000000"),W("0x100000000000000"),W("0x10000000000000000")],X=(b=new Uint16Array([65484]),255===(_=new Uint8Array(b.buffer,b.byteOffset,b.byteLength))[0]||_[0],function(e,t){var i=void 0===t?{}:t,r=i.signed,n=void 0!==r&&r,a=i.le,s=void 0!==a&&a;e=j(e);var o=s?"reduce":"reduceRight",u=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,i,r){var n=s?r:Math.abs(r+1-e.length);return t+W(i)*z[n]},W(0));if(n){var d=z[e.length]/W(2)-W(1);(u=W(u))>d&&(u-=d,u-=d,u-=W(2))}return Number(u)}),Y=function(e,t){var i=(void 0===t?{}:t).le,r=void 0!==i&&i;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=W(e);for(var n,a=(n=e,Math.ceil(function(e){return e.toString(2).length}(n)/8)),s=new Uint8Array(new ArrayBuffer(a)),o=0;o<a;o++){var u=r?o:Math.abs(o+1-s.length);s[u]=Number(e/z[o]&W(255)),e<0&&(s[u]=Math.abs(~s[u]),s[u]-=0===o?1:2)}return s},Q=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var i=new Uint8Array(e.length),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i},$=function(e,t,i){var r=void 0===i?{}:i,n=r.offset,a=void 0===n?0:n,s=r.mask,o=void 0===s?[]:s;e=j(e);var u=(t=j(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&u.call(t,function(t,i){return t===(o[i]?o[i]&e[a+i]:e[a+i])})},K=r(978),J=function(e){return!!e&&"object"==typeof e},Z=function e(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return i.reduce(function(t,i){return"object"!=typeof i||Object.keys(i).forEac
1h(function(r){Array.isArray(t[r])&&Array.isArray(i[r])?t[r]=t[r].concat(i[r]):J(t[r])&&J(i[r])?t[r]=e(t[r],i[r]):t[r]=i[r]}),t},{})},ee=function(e){return Object.keys(e).map(function(t){return e[t]})},te=function(e){return e.reduce(function(e,t){return e.concat(t)},[])},ie=function(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},re=function(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i;return-1},ne="INVALID_NUMBER_OF_PERIOD",ae="DASH_EMPTY_MANIFEST",se="DASH_INVALID_XML",oe="NO_BASE_URL",ue="SEGMENT_TIME_UNSPECIFIED",de="UNSUPPORTED_UTC_TIMING_SCHEME",le=function(e){var t=e.baseUrl,i=void 0===t?"":t,r=e.source,n=void 0===r?"":r,a=e.range,s=void 0===a?"":a,o=e.indexRange,d=void 0===o?"":o,l={uri:n,resolvedUri:h(i||"",n)};if(s||d){var c,f=(s||d).split("-"),p=u().BigInt?u().BigInt(f[0]):parseInt(f[0],10),m=u().BigInt?u().BigInt(f[1]):parseInt(f[1],10);p<Number.MAX_SAFE_INTEGER&&"bigint"==typeof p&&(p=Number(p)),m<Number.MAX_SAFE_INTEGER&&"bigint"==typeof m&&(m=Number(m)),"bigint"==typeof(c="bigint"==typeof m||"bigint"==typeof p?u().BigInt(m)-u().BigInt(p)+u().BigInt(1):m-p+1)&&c<Number.MAX_SAFE_INTEGER&&(c=Number(c)),l.byterange={length:c,offset:p}}return l},ce=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},he={static:function(e){var t=e.duration,i=e.timescale,r=void 0===i?1:i,n=e.sourceDuration,a=e.periodDuration,s=ce(e.endNumber),o=t/r;return"number"==typeof s?{start:0,end:s}:"number"==typeof a?{start:0,end:a/o}:{start:0,end:n/o}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,r=e.availabilityStartTime,n=e.timescale,a=void 0===n?1:n,s=e.duration,o=e.periodStart,u=void 0===o?0:o,d=e.minimumUpdatePeriod,l=void 0===d?0:d,c=e.timeShiftBufferDepth,h=void 0===c?1/0:c,f=ce(e.endNumber),p=(t+i)/1e3,m=r+u,g=p+l-m,y=Math.ceil(g*a/s),v=Math.floor((p-m-h)*a/s),b=Math.floor((p-m)*a/s);return{start:Math.max(0,v),end:"number"==typeof f?f:Math.min(y,b)}}},fe=function(e){var t=e.type,i=e.duration,r=e.timescale,n=void 0===r?1:r,a=e.periodDuration,s=e.sourceDuration,o=he[t](e),u=function(e,t){for(var i=[],r=e;r<t;r++)i.push(r);return i}(o.start,o.end).map(function(e){return function(t){var i=e.duration,r=e.timescale,n=void 0===r?1:r,a=e.periodStart,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:i/n,timeline:a,time:t*i}}}(e));if("static"===t){var d=u.length-1,l="number"==typeof a?a:s;u[d].duration=l-i/n*d}return u},pe=function(e){var t=e.baseUrl,i=e.initialization,r=void 0===i?{}:i,n=e.sourceDuration,a=e.indexRange,s=void 0===a?"":a,o=e.periodStart,u=e.presentationTime,d=e.number,l=void 0===d?0:d,c=e.duration;if(!t)throw new Error(oe);var h=le({baseUrl:t,source:r.sourceURL,range:r.range}),f=le({baseUrl:t,source:t,indexRange:s});if(f.map=h,c){var p=fe(e);p.length&&(f.duration=p[0].duration,f.timeline=p[0].timeline)}else n&&(f.duration=n,f.timeline=o);return f.presentationTime=u||o,f.number=l,[f]},me=function(e,t,i){var r,n=e.sidx.map?e.sidx.map:null,a=e.sidx.duration,s=e.timeline||0,o=e.sidx.byterange,d=o.offset+o.length,l=t.timescale,c=t.references.filter(function(e){return 1!==e.referenceType}),h=[],f=e.endList?"static":"dynamic",p=e.sidx.timeline,m=p,g=e.mediaSequence||0;r="bigint"==typeof t.firstOffset?u().BigInt(d)+t.firstOffset:d+t.firstOffset;for(var y=0;y<c.length;y++){var v=t.references[y],b=v.referencedSize,_=v.subsegmentDuration,T=void 0;T="bigint"==typeof r?r+u().BigInt(b)-u().BigInt(1):r+b-1;var S=pe({baseUrl:i,timescale:l,timeline:s,periodStart:p,presentationTime:m,number:g,duration:_,sourceDuration:a,indexRange:r+"-"+T,type:f})[0];n&&(S.map=n),h.push(S),r+="bigint"==typeof r?u().BigInt(b):b,m+=_/l,g++}return e.segments=h,e},ge=["AUDIO","SUBTITLES"],ye=1/60,ve=function(e){return(t=e,i=function(e){return e.timeline},ee(t.reduce(function(e,t){return t.forEach(function(t){e[i(t)]=t}),e},{}))).sort(function(e,t){return e.timeline>t.timeline?1:-1});var t,i},be=function(e){var t,i,r=[];return t=e,i=function(e,t,i,n){r=r.concat(e.playlists||[])},ge.forEach(function(e){for(var r in t.mediaGroups[e])for(var n in t.mediaGroups[e][r]){var a=t.mediaGroups[e][r][n];i(a,e,r,n)}}),r},_e=function(e){var t=e.playlist,i=e.mediaSequence;
1t.mediaSequence=i,t.segments.forEach(function(e,i){e.number=t.mediaSequence+i})},Te=function(e){var t=e.oldManifest,i=e.newManifest,r=t.playlists.concat(be(t)),n=i.playlists.concat(be(i));return i.timelineStarts=ve([t.timelineStarts,i.timelineStarts]),function(e){var t=e.oldPlaylists,i=e.newPlaylists,r=e.timelineStarts;i.forEach(function(e){e.discontinuitySequence=re(r,function(t){return t.timeline===e.timeline});var i=function(e,t){for(var i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null}(t,e.attributes.NAME);if(i&&!e.sidx){var n=e.segments[0],a=re(i.segments,function(e){return Math.abs(e.presentationTime-n.presentationTime)<ye});if(-1===a)return _e({playlist:e,mediaSequence:i.mediaSequence+i.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!i.segments.length&&e.timeline>i.timeline||i.segments.length&&e.timeline>i.segments[i.segments.length-1].timeline)&&e.discontinuitySequence--);i.segments[a].discontinuity&&!n.discontinuity&&(n.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),_e({playlist:e,mediaSequence:i.segments[a].number})}})}({oldPlaylists:r,newPlaylists:n,timelineStarts:i.timelineStarts}),i},Se=function(e){return e&&e.uri+"-"+(t=e.byterange,i="bigint"==typeof t.offset||"bigint"==typeof t.length?u().BigInt(t.offset)+u().BigInt(t.length)-u().BigInt(1):t.offset+t.length-1,t.offset+"-"+i);var t,i},we=function(e){return ee(e.reduce(function(e,t){var i=t.attributes.id+(t.attributes.lang||"");if(e[i]){var r;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(r=e[i].segments).push.apply(r,t.segments);t.attributes.contentProtection&&(e[i].attributes.contentProtection=t.attributes.contentProtection)}else e[i]=t,e[i].attributes.timelineStarts=[];return e[i].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{})).map(function(e){var t,i;return e.discontinuityStarts=(t=e.segments||[],i="discontinuity",t.reduce(function(e,t,r){return t[i]&&e.push(r),e},[])),e})},Ee=function(e,t){var i=Se(e.sidx),r=i&&t[i]&&t[i].sidx;return r&&me(e,r,e.sidx.resolvedUri),e},Ie=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e)e[i]=Ee(e[i],t);return e},Ae=function(e){var t,i=e.attributes,r=e.segments,n=e.sidx,a=e.discontinuityStarts,s={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuityStarts:a,timelineStarts:i.timelineStarts,segments:r};return i.frameRate&&(s.attributes["FRAME-RATE"]=i.frameRate),i.contentProtection&&(s.contentProtection=i.contentProtection),n&&(s.sidx=n),s},Le=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},xe=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},De=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},Oe=function(e){return e?Object.keys(e).reduce(function(t,i){var r=e[i];return t.concat(r.playlists)},[]):[]},ke=function(e){var t,i=e.dashPlaylists,r=e.locations,n=e.sidxMapping,a=void 0===n?{}:n,s=e.previousManifest;if(!i.length)return{};var o=i[0].attributes,u=o.sourceDuration,d=o.type,l=o.suggestedPresentationDelay,c=o.minimumUpdatePeriod,h=we(i.filter(Le)).map(Ae),f=we(i.filter(xe)),p=we(i.filter(De)),m=i.map(function(e){return e.attributes.captionServices}).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:u,playlists:Ie(h,a)};c>=0&&(g.minimumUpdatePeriod=1e3*c),r&&(g.locations=r),"dynamic"===d&&(g.suggestedPresentationDelay=l);var y,v,b=0===g.playlists.length,_=f.length?function(e,t,i){var r;void 0===t&&(t={}),void 0===i&&(i=!1);var n=e.reduce(function(e,n){var a=n.attributes.role&&n.attributes.role.value||"",s=n.attributes.lang||"",o=n.attributes.label||"main";if(s&&!n.attributes.label){var u=a?" ("+a+")":"";o=""+n.attributes.lang+u}e[o]||(e[o]={language:s,autoselect:!0,default:"main"===a,playlists:[],uri:""});var d=Ee(function(e,t){var i,r=e.attributes,n=e.segments,a=e.sidx,s=e.mediaSequence,o=e.discontinuitySequence,u=e.discontinuityStarts,d={attributes:(i={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},i["PROGRAM-ID"]=1,i),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuitySequence:o,discontinuityStarts:u,timelineStarts:r.timelineStarts,mediaSequence:s,segments:n};return r.contentProtection&&(d.contentProtection=r.contentProtection),a&&(d.sidx=a),t&&(d.attributes.AUDIO="audio",d.attributes.SUBTITLES="subs"),d}(n,i),t);return e[o].playlists.push(d),void 0===r&&"main"===a&&((r=n).default=!0),e},{});return r||(n[Object.keys(n)[0]].default=!0),n}(f,a,b):null,T=p.length?function(e,t){return void 0===t&&(t={}),e.reduce(function(e,i){var r=i.attributes.lang||"text";return e[r]||(e[r]={language:r,default:!1,autoselect:!1,playlists:[],uri:""}),e[r].playlists.push(Ee(function(e){var t,i=e.attributes,r=e.segments,n=e.mediaSequence,a=e.discontinuityStarts,s=e.discontinuitySequence;void 0===r&&(r=[{uri:i.baseUrl,timeline:i.periodStart,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);var o=((t={NAME:i.id,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,t);return i.codecs&&(o.CODECS=i.codecs),{attributes:o,uri:"",endList:"static"===i.t
1ype,timeline:i.periodStart,resolvedUri:i.baseUrl||"",targetDuration:i.duration,timelineStarts:i.timelineStarts,discontinuityStarts:a,discontinuitySequence:s,mediaSequence:n,segments:r}}(i),t)),e},{})}(p,a):null,S=h.concat(Oe(_),Oe(T)),w=S.map(function(e){return e.timelineStarts});return g.timelineStarts=ve(w),y=S,v=g.timelineStarts,y.forEach(function(e){e.mediaSequence=0,e.discontinuitySequence=re(v,function(t){return t.timeline===e.timeline}),e.segments&&e.segments.forEach(function(e,t){e.number=t})}),_&&(g.mediaGroups.AUDIO.audio=_),T&&(g.mediaGroups.SUBTITLES.subs=T),m.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=m.reduce(function(e,t){return t?(t.forEach(function(t){var i=t.channel,r=t.language;e[r]={autoselect:!1,default:!1,instreamId:i,language:r},t.hasOwnProperty("aspectRatio")&&(e[r].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[r].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[r]["3D"]=t["3D"])}),e):e},{})),s?Te({oldManifest:s,newManifest:g}):g},Pe=function(e,t,i){var r=e.NOW,n=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.periodStart,d=void 0===u?0:u,l=e.minimumUpdatePeriod,c=(r+n)/1e3+(void 0===l?0:l)-(a+d);return Math.ceil((c*o-t)/i)},Ce=function(e,t){for(var i=e.type,r=e.minimumUpdatePeriod,n=void 0===r?0:r,a=e.media,s=void 0===a?"":a,o=e.sourceDuration,u=e.timescale,d=void 0===u?1:u,l=e.startNumber,c=void 0===l?1:l,h=e.periodStart,f=[],p=-1,m=0;m<t.length;m++){var g=t[m],y=g.d,v=g.r||0,b=g.t||0;p<0&&(p=b),b&&b>p&&(p=b);var _=void 0;if(v<0){var T=m+1;_=T===t.length?"dynamic"===i&&n>0&&s.indexOf("$Number$")>0?Pe(e,p,y):(o*d-p)/y:(t[T].t-p)/y}else _=v+1;for(var S=c+f.length+_,w=c+f.length;w<S;)f.push({number:w,duration:y/d,time:p,timeline:h}),p+=y,w++}return f},Ue=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Re=function(e,t){return e.replace(Ue,function(e){return function(t,i,r,n){if("$$"===t)return"$";if(void 0===e[i])return t;var a=""+e[i];return"RepresentationID"===i?a:(n=r?parseInt(n,10):1,a.length>=n?a:""+new Array(n-a.length+1).join("0")+a)}}(t))},Ne=function(e,t){var i={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,n=void 0===r?{sourceURL:"",range:""}:r,a=le({baseUrl:e.baseUrl,source:Re(n.sourceURL,i),range:n.range}),s=function(e,t){return e.duration||t?e.duration?fe(e):Ce(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t);return s.map(function(t){i.Number=t.number,i.Time=t.time;var r=Re(e.media||"",i),n=e.timescale||1,s=e.presentationTimeOffset||0,o=e.periodStart+(t.time-s)/n;return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:h(e.baseUrl||"",r),map:a,number:t.number,presentationTime:o}})},Me=function(e,t){var i=e.duration,r=e.segmentUrls,n=void 0===r?[]:r,a=e.periodStart;if(!i&&!t||i&&t)throw new Error(ue);var s,o=n.map(function(t){return function(e,t){var i=e.baseUrl,r=e.initialization,n=void 0===r?{}:r,a=le({baseUrl:i,source:n.sourceURL,range:n.range}),s=le({baseUrl:i,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)});return i&&(s=fe(e)),t&&(s=Ce(e,t)),s.map(function(t,i){if(o[i]){var r=o[i],n=e.timescale||1,s=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=a+(t.time-s)/n,r}}).filter(function(e){return e})},Be=function(e){var t,i,r=e.attributes,n=e.segmentInfo;n.template?(i=Ne,t=Z(r,n.template)):n.base?(i=pe,t=Z(r,n.base)):n.list&&(i=Me,t=Z(r,n.list));var a={attributes:r};if(!i)return a;var s=i(t,n.segmentTimeline);if(t.duration){var o=t,u=o.duration,d=o.timescale,l=void 0===d?1:d;t.duration=u/l}else s.length?t.duration=s.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return a.attributes=t,a.segments=s,n.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a},qe=function(e,t){return ie(e.childNodes).filter(function(e){return e.tagName===t})},Fe=function(e){return e.textContent.trim()},Ve=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var i=t.slice(1),r=i[0],n=i[1],a=i[2],s=i[3],o=i[4],u=i[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(n||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},He={mediaPresentationDuration:function(e){return Ve(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return Ve(e)},suggestedPresentationDelay:function(e){return Ve(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Ve(e)},start:function(e){return Ve(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return function(e){return parseFloat(e.split("/").reduce(function(e,t){return e/t}))}(e)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Ve(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Ge=function(e){return e&&e.attributes?ie(e.attributes).reduce(function(e,t){var i=He[t.name]||He.DEFAULT;return e[t.name]=i(t.value),e},{}):{}},je={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},We=function(e,t){return t.length?te(e.map(function(e){return t.map(function(t){return h(e,Fe(t))})})):e},ze=function(e){var t=qe(e,"SegmentTemplate")[0],i=qe(e,"SegmentList")[0],r=i&&qe(i,"SegmentURL").map(function(e){return Z({tag:"SegmentURL"},Ge(e))}),n=qe(e,"SegmentBase")[0],a=i||t,s=a&&qe(a,"SegmentTimeline")[0],o=i||n||t,u=o&&qe(o,"Initialization")[0],d=t&&Ge(t);d&&u?d.initialization=u&&Ge(u):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});var l={template:d,segmentTimeline:s&&qe(s,"S").map(function(e){return Ge(e)}),list:i&&Z(Ge(i),{segmentUrls:r,initialization:Ge(u)}),base:n&&Z(Ge(n),{initialization:Ge(u)})};return Object.keys(l).forEach(function(e){l[e]||delete l[e]}),l},Xe=function(e,t,i){return function(r){var n,a=Ge(r),s=We(t,qe(r,"BaseURL")),o=qe(r,"Role")[0],u={role:Ge(o)},d=Z(e,a,u),l=qe(r,"Accessibility")[0],c="urn:scte:dash:cc:cea-608:2
1015"===(n=Ge(l)).schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var t,i;if(i=e,/^CC\d=/.test(e)){var r=e.split("=");t=r[0],i=r[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:i}}):"urn:scte:dash:cc:cea-708:2015"===n.schemeIdUri?("string"!=typeof n.value?[]:n.value.split(";")).map(function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var i=e.split("="),r=i[0],n=i[1],a=void 0===n?"":n;t.channel=r,t.language=e,a.split(",").forEach(function(e){var i=e.split(":"),r=i[0],n=i[1];"lang"===r?t.language=n:"er"===r?t.easyReader=Number(n):"war"===r?t.aspectRatio=Number(n):"3D"===r&&(t["3D"]=Number(n))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t}):void 0;c&&(d=Z(d,{captionServices:c}));var h=qe(r,"Label")[0];if(h&&h.childNodes.length){var f=h.childNodes[0].nodeValue.trim();d=Z(d,{label:f})}var p=qe(r,"ContentProtection").reduce(function(e,t){var i=Ge(t);i.schemeIdUri&&(i.schemeIdUri=i.schemeIdUri.toLowerCase());var r=je[i.schemeIdUri];if(r){e[r]={attributes:i};var n=qe(t,"cenc:pssh")[0];if(n){var a=Fe(n);e[r].pssh=a&&v(a)}}return e},{});Object.keys(p).length&&(d=Z(d,{contentProtection:p}));var m=ze(r),g=qe(r,"Representation"),y=Z(i,m);return te(g.map(function(e,t,i){return function(r){var n=qe(r,"BaseURL"),a=We(t,n),s=Z(e,Ge(r)),o=ze(r);return a.map(function(e){return{segmentInfo:Z(i,o),attributes:Z(s,{baseUrl:e})}})}}(d,s,y)))}},Ye=function(e,t){return function(i,r){var n=We(t,qe(i.node,"BaseURL")),a=Z(e,{periodStart:i.attributes.start});"number"==typeof i.attributes.duration&&(a.periodDuration=i.attributes.duration);var s=qe(i.node,"AdaptationSet"),o=ze(i.node);return te(s.map(Xe(a,n,o)))}},Qe=function(e){if(""===e)throw new Error(ae);var t,i,r=new K.DOMParser;try{i=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(se);return i},$e=function(e,t){void 0===t&&(t={});var i=function(e,t){void 0===t&&(t={});var i=t,r=i.manifestUri,n=void 0===r?"":r,a=i.NOW,s=void 0===a?Date.now():a,o=i.clientOffset,u=void 0===o?0:o,d=qe(e,"Period");if(!d.length)throw new Error(ne);var l=qe(e,"Location"),c=Ge(e),h=We([n],qe(e,"BaseURL"));c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=s,c.clientOffset=u,l.length&&(c.locations=l.map(Fe));var f=[];return d.forEach(function(e,t){var i=Ge(e),r=f[t-1];i.start=function(e){var t=e.attributes,i=e.priorPeriodAttributes,r=e.mpdType;return"number"==typeof t.start?t.start:i&&"number"==typeof i.start&&"number"==typeof i.duration?i.start+i.duration:i||"static"!==r?null:0}({attributes:i,priorPeriodAttributes:r?r.attributes:null,mpdType:c.type}),f.push({node:e,attributes:i})}),{locations:c.locations,representationInfo:te(f.map(Ye(c,h)))}}(Qe(e),t),r=i.representationInfo.map(Be);return ke({dashPlaylists:r,locations:i.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},Ke=function(e){return function(e){var t=qe(e,"UTCTiming")[0];if(!t)return null;var i=Ge(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;default:throw new Error(de)}return i}(Qe(e))},Je=r(962),Ze=r.n(Je),et=j([73,68,51]),tt=function e(t,i){return void 0===i&&(i=0),(t=j(t)).length-i<10||!$(t,et,{offset:i})?i:(i+=function(e,t){void 0===t&&(t=0);var i=(e=j(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&i)>>4?r+20:r+10}(t,i),e(t,i))},it=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Q(e):e}),rt=function(e){e=j(e);for(var t=[],i=0;e.length>i;){var r=e[i],n=0,a=0,s=e[++a];for(a++;128&s;)n=(127&s)<<7,s=e[a],a++;n+=127&s;for(var o=0;o<T.length;o++){var u=T[o],d=u.id,l=u.parser;if(r===d){t.push(l(e.subarray(a,a+n)));break}}i+=n+a}return t};T=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var i=e[t.size];t.url=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,j(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}(e.subarray(t.size+1,t.size+1+i)),t.size+=i}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=rt(e.subarray(t.size))||[],t}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:rt(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var nt=function e(t,i,r){void 0===r&&(r=!1),i=function(e){return Array.isArray(e)?e.map(function(e){return it(e)}):[it(e)]}(i),t=j(t);var n=[];if(!i.length)return n;for(var a=0;a<t.length;){var s=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,o=t.subarray(a+4,a+8);if(0===s)break;var u=a+s;if(u>t.length){if(r)break;u=t.length}var d=t.subarray(a+8,u);$(o,i[0])&&(1===i.length?n.push(d):n.push.apply(n,e(d,i.slice(1),r))),a=u}return n},at={EBML:j([26,69,223,163]),DocType:j([66,130]),Segment:j([24,83,128,103]),SegmentInfo:j([21,73,169,102]),Tracks:j([22,84,174,107]),Track:j([174]),TrackNumber:j([215]),DefaultDuration:j([35,227,131]),TrackEntry:j([174]),TrackType:j([131]),FlagDefault:j([136]),CodecID:j([134]),CodecPr
1ivate:j([99,162]),VideoTrack:j([224]),AudioTrack:j([225]),Cluster:j([31,67,182,117]),Timestamp:j([231]),TimestampScale:j([42,215,177]),BlockGroup:j([160]),BlockDuration:j([155]),Block:j([161]),SimpleBlock:j([163])},st=[128,64,32,16,8,4,2,1],ot=function(e,t,i,r){void 0===i&&(i=!0),void 0===r&&(r=!1);var n=function(e){for(var t=1,i=0;i<st.length&&!(e&st[i]);i++)t++;return t}(e[t]),a=e.subarray(t,t+n);return i&&((a=Array.prototype.slice.call(e,t,t+n))[0]^=st[n-1]),{length:n,value:X(a,{signed:r}),bytes:a}},ut=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):"number"==typeof t?Y(t):t},dt=function e(t,i,r){if(r>=i.length)return i.length;var n=ot(i,r,!1);if($(t.bytes,n.bytes))return r;var a=ot(i,r+n.length);return e(t,i,r+a.length+a.value+n.length)},lt=function e(t,i){i=function(e){return Array.isArray(e)?e.map(function(e){return ut(e)}):[ut(e)]}(i),t=j(t);var r=[];if(!i.length)return r;for(var n=0;n<t.length;){var a=ot(t,n,!1),s=ot(t,n+a.length),o=n+a.length+s.length;127===s.value&&(s.value=dt(a,t,o),s.value!==t.length&&(s.value-=o));var u=o+s.value>t.length?t.length:o+s.value,d=t.subarray(o,u);$(i[0],a.bytes)&&(1===i.length?r.push(d):r=r.concat(e(d,i.slice(1)))),n+=a.length+s.length+d.length}return r},ct=j([0,0,0,1]),ht=j([0,0,1]),ft=j([0,0,3]),pt=function(e){for(var t=[],i=1;i<e.length-2;)$(e.subarray(i,i+3),ft)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var r=e.length-t.length,n=new Uint8Array(r),a=0;for(i=0;i<r;a++,i++)a===t[0]&&(a++,t.shift()),n[i]=e[a];return n},mt=function(e,t,i,r){void 0===r&&(r=1/0),e=j(e),i=[].concat(i);for(var n,a=0,s=0;a<e.length&&(s<r||n);){var o=void 0;if($(e.subarray(a),ct)?o=4:$(e.subarray(a),ht)&&(o=3),o){if(s++,n)return pt(e.subarray(n,a));var u=void 0;"h264"===t?u=31&e[a+o]:"h265"===t&&(u=e[a+o]>>1&63),-1!==i.indexOf(u)&&(n=a+o),a+=o+("h264"===t?1:2)}else a++}return e.subarray(0,0)},gt={webm:j([119,101,98,109]),matroska:j([109,97,116,114,111,115,107,97]),flac:j([102,76,97,67]),ogg:j([79,103,103,83]),ac3:j([11,119]),riff:j([82,73,70,70]),avi:j([65,86,73]),wav:j([87,65,86,69]),"3gp":j([102,116,121,112,51,103]),mp4:j([102,116,121,112]),fmp4:j([115,116,121,112]),mov:j([102,116,121,112,113,116]),moov:j([109,111,111,118]),moof:j([109,111,111,102])},yt={aac:function(e){var t=tt(e);return $(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=tt(e);return $(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=lt(e,[at.EBML,at.DocType])[0];return $(t,gt.webm)},mkv:function(e){var t=lt(e,[at.EBML,at.DocType])[0];return $(t,gt.matroska)},mp4:function(e){return!yt["3gp"](e)&&!yt.mov(e)&&(!(!$(e,gt.mp4,{offset:4})&&!$(e,gt.fmp4,{offset:4}))||(!(!$(e,gt.moof,{offset:4})&&!$(e,gt.moov,{offset:4}))||void 0))},mov:function(e){return $(e,gt.mov,{offset:4})},"3gp":function(e){return $(e,gt["3gp"],{offset:4})},ac3:function(e){var t=tt(e);return $(e,gt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=tt(e);return $(e,gt.flac,{offset:t})},ogg:function(e){return $(e,gt.ogg)},avi:function(e){return $(e,gt.riff)&&$(e,gt.avi,{offset:8})},wav:function(e){return $(e,gt.riff)&&$(e,gt.wav,{offset:8})},h264:function(e){return function(e,t,i){return mt(e,"h264",t,i)}(e,7,3).length},h265:function(e){return function(e,t,i){return mt(e,"h265",t,i)}(e,[32,33],3).length}},vt=Object.keys(yt).filter(function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e}).concat(["ts","h264","h265"]);vt.forEach(function(e){var t=yt[e];yt[e]=function(e){return t(j(e))}});var bt=yt,_t=function(e){e=j(e);for(var t=0;t<vt.length;t++){var i=vt[t];if(bt[i](e))return i}return""},Tt=r(622);function St(e){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},St(e)}function wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wt=function(){return!!e})()}function Et(e){var i="function"==typeof Map?new Map:void 0;return Et=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(e))return i.get(e);i.set(e,r)}function r(){return function(e,i,r){if(wt())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,i);var a=new(e.bind.apply(e,n));return r&&t(a,r.prototype),a}(e,arguments,St(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),t(r,e)},Et(e)}var It=h,At=function(e,t,i){return e&&i&&i.responseURL&&t!==i.responseURL?i.responseURL:t},Lt=function(e){return p().log.debug?p().log.debug.bind(p(),"VHS:",e+" >"):function(){}},xt=1/30,Dt=.1,Ot=function(e,t){var i,r=[];if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&r.push([e.start(i),e.end(i)]);return p().createTimeRanges(r)}
1,kt=function(e,t){return Ot(e,function(e,i){return e-Dt<=t&&i+Dt>=t})},Pt=function(e,t){return Ot(e,function(e){return e-xt>=t})},Ct=function(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},Ut=function(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Rt=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},Nt=function(e,t){var i=0;if(!e||!e.length)return i;for(var r=0;r<e.length;r++){var n=e.start(r),a=e.end(r);t>a||(i+=t>n&&t<=a?a-t:a-n)}return i},Mt=p().createTimeRange,Bt=function(e,t){if(!t.preload)return t.duration;var i=0;return(t.parts||[]).forEach(function(e){i+=e.duration}),(t.preloadHints||[]).forEach(function(t){"PART"===t.type&&(i+=e.partTargetDuration)}),i},qt=function(e){return(e.segments||[]).reduce(function(e,t,i){return t.parts?t.parts.forEach(function(r,n){e.push({duration:r.duration,segmentIndex:i,partIndex:n,part:r,segment:t})}):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e},[])},Ft=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},Vt=function(e){var t=e.preloadSegment;if(t){var i=t.parts,r=(t.preloadHints||[]).reduce(function(e,t){return e+("PART"===t.type?1:0)},0);return r+=i&&i.length?i.length:0}},Ht=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var i=Ft(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},Gt=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var i=0,r=t-e.mediaSequence,n=e.segments[r];if(n){if(void 0!==n.start)return{result:n.start,precise:!0};if(void 0!==n.end)return{result:n.end-n.duration,precise:!0}}for(;r--;){if(void 0!==(n=e.segments[r]).end)return{result:i+n.end,precise:!0};if(i+=Bt(e,n),void 0!==n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(r.precise)return r.result;var n=function(e,t){for(var i,r=0,n=t-e.mediaSequence;n<e.segments.length;n++){if(void 0!==(i=e.segments[n]).start)return{result:i.start-r,precise:!0};if(r+=Bt(e,i),void 0!==i.end)return{result:i.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return n.precise?n.result:r.result+i},jt=function(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return u()[1/0]}return Gt(e,t,i)},Wt=function(e){var t=e.defaultDuration,i=e.durationList,r=e.startIndex,n=e.endIndex,a=0;if(r>n){var s=[n,r];r=s[0],n=s[1]}if(r<0){for(var o=r;o<Math.min(0,n);o++)a+=t;r=0}for(var u=r;u<n;u++)a+=i[u].duration;return a},zt=function(e,t,i,r){if(!e||!e.segments)return null;if(e.endList)return jt(e);if(null===t)return null;t=t||0;var n=Gt(e,e.mediaSequence+e.segments.length,t);return i&&(n-=r="number"==typeof r?r:Ht(null,e)),Math.max(0,n)},Xt=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Yt=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Qt=function(e){var t=Xt(e);return!e.disabled&&!t},$t=function(e,t){return t.attributes&&t.attributes[e]},Kt=function(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!Qt(e)&&(e.attributes.BANDWIDTH||0)<i}).length},Jt=function(e,t){return!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri))))},Zt=function(e,t){var i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var n in i){for(var a in i[n])if(r=t(i[n][a]))break;if(r)break}return!!r},ei=function(e){if(!e||!e.playlists||!e.playlists.length)return Zt(e,function(e){return e.playlists&&e.playlists.length||e.uri});for(var t=function(t){var i=e.playlists[t],r=i.attributes&&i.attributes.CODECS;return r&&r.split(",").every(function(e){return R(e)})||Zt(e,function(e){return Jt(i,e)})?"continue":{v:!1}},i=0;i<e.playlists.length;i++){var r=t(i);if("continue"!==r&&"object"==typeof r)return r.v}return!0},ti={liveEdgeDelay:Ht,duration:jt,seekable:function(e,t,i){var r=t||0,n=zt(e,t,!0,i);return null===n?Mt():Mt(r,n)},getMediaInfoForTime:function(e){for(var t=e.playlist,i=e.currentTime,r=e.startingSegmentIndex,n=e.startingPartIndex,a=e.startTime,s=e.experimentalExactManifestTimings,o=i-a,u=qt(t),d=0,l=0;l<u.length;l++){var c=u[l];
1if(r===c.segmentIndex&&("number"!=typeof n||"number"!=typeof c.partIndex||n===c.partIndex)){d=l;break}}if(o<0){if(d>0)for(var h=d-1;h>=0;h--){var f=u[h];if(o+=f.duration,s){if(o<0)continue}else if(o+xt<=0)continue;return{partIndex:f.partIndex,segmentIndex:f.segmentIndex,startTime:a-Wt({defaultDuration:t.targetDuration,durationList:u,startIndex:d,endIndex:h})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:i}}if(d<0){for(var p=d;p<0;p++)if((o-=t.targetDuration)<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:i};d=0}for(var m=d;m<u.length;m++){var g=u[m];if(o-=g.duration,s){if(o>0)continue}else if(o-xt>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+Wt({defaultDuration:t.targetDuration,durationList:u,startIndex:d,endIndex:m})}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:i}},isEnabled:Qt,isDisabled:function(e){return e.disabled},isBlacklisted:Xt,isIncompatible:Yt,playlistEnd:zt,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:$t,estimateSegmentRequestTime:function(e,t,i,r){return void 0===r&&(r=0),$t("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:Kt,isAudioOnly:ei,playlistMatch:Jt,segmentDurationWithParts:Bt},ii=p().log,ri=function(e,t){return e+"-"+t},ni=function(e,t,i){return"placeholder-uri-"+e+"-"+t+"-"+i},ai=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(i){if(e.mediaGroups[i])for(var r in e.mediaGroups[i])for(var n in e.mediaGroups[i][r]){var a=e.mediaGroups[i][r][n];t(a,i,r,n)}})},si=function(e){var t=e.playlist,i=e.uri,r=e.id;t.id=r,t.playlistErrors_=0,i&&(t.uri=i),t.attributes=t.attributes||{}},oi=function(e,t,i){void 0===i&&(i=ni),e.uri=t;
1for(var r=0;r<e.playlists.length;r++)if(!e.playlists[r].uri){var n="placeholder-uri-"+r;e.playlists[r].uri=n}var a=ei(e);ai(e,function(t,r,n,s){if(!t.playlists||!t.playlists.length){if(a&&"AUDIO"===r&&!t.uri)for(var o=0;o<e.playlists.length;o++){var u=e.playlists[o];if(u.attributes&&u.attributes.AUDIO&&u.attributes.AUDIO===n)return}t.playlists=[m({},t)]}t.playlists.forEach(function(t,a){var o=i(r,n,s,t),u=ri(a,o);t.uri?t.resolvedUri=t.resolvedUri||It(e.uri,t.uri):(t.uri=0===a?o:u,t.resolvedUri=t.uri),t.id=t.id||u,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),function(e){for(var t=e.playlists.length;t--;){var i=e.playlists[t];si({playlist:i,id:ri(t,i.uri)}),i.resolvedUri=It(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||ii.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){ai(e,function(t){t.uri&&(t.resolvedUri=It(e.uri,t.uri))})}(e)},ui=p().mergeOptions,di=p().EventTarget,li=function(e,t){if(!e)return t;var i=ui(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(var r=0;r<t.parts.length;r++)e.parts&&e.parts[r]&&(i.parts[r]=ui(e.parts[r],t.parts[r]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},ci=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=It(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=It(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=It(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=It(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(function(e){e.resolvedUri||(e.resolvedUri=It(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(function(e){e.resolvedUri||(e.resolvedUri=It(t,e.uri))})},hi=function(e){var t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(var r=0;r<i.preloadHints.length;r++)if("MAP"===i.preloadHints[r].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},fi=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment},pi=function(e,t,i){void 0===i&&(i=fi);var r=ui(e,{}),n=r.playlists[t.id];if(!n)return null;if(i(n,t))return null;t.segments=hi(t);var a=ui(n,t);if(a.preloadSegment&&!t.preloadSegment&&delete a.preloadSegment,n.segments){if(t.skip){t.segments=t.segments||[];for(var s=0;s<t.skip.skippedSegments;s++)t.segments.unshift({skipped:!0})}a.segments=function(e,t,i){var r=e.slice(),n=t.slice();i=i||0;for(var a,s=[],o=0;o<n.length;o++){var u=r[o+i],d=n[o];u?(a=u.map||a,s.push(li(u,d))):(a&&!d.map&&(d.map=a),s.push(d))}return s}(n.segments,t.segments,t.mediaSequence-n.mediaSequence)}a.segments.forEach(function(e){ci(e,a.resolvedUri)});for(var o=0;o<r.playlists.length;o++)r.playlists[o].id===t.id&&(r.playlists[o]=a);return r.playlists[t.id]=a,r.playlists[t.uri]=a,ai(e,function(e,i,r,n){if(e.playlists)for(var s=0;s<e.playlists.length;s++)t.id===e.playlists[s].id&&(e.playlists[s]=a)}),r},mi=function(e,t){var i=e.segments||[],r=i[i.length-1],n=r&&r.parts&&r.parts[r.parts.length-1],a=n&&n.duration||r&&r.duration;return t&&a?1e3*a:500*(e.partTargetDuration||e.targetDuration||10)},gi=function(t){function r(i,r,n){var a;if(void 0===n&&(n={}),a=t.call(this)||this,!i)throw new Error("A non-empty playlist URL or object is required");a.logger_=Lt("PlaylistLoader");var s=n,o=s.withCredentials,u=void 0!==o&&o,d=s.handleManifestRedirects,l=void 0!==d&&d;a.src=i,a.vhs_=r,a.withCredentials=u,a.handleManifestRedirects=l;var c=r.options_;return a.customTagParsers=c&&c.customTagParsers||[],a.customTagMappers=c&&c.customTagMappers||[],a.experimentalLLHLS=c&&c.experimentalLLHLS||!1,p().browser.IE_VERSION&&(a.experimentalLLHLS=!1),a.state="HAVE_NOTHING",a.handleMediaupdatetimeout_=a.handleMediaupdatetimeout_.bind(e(a)),a.on("mediaupdatetimeout",a.handleMediaupdatetimeout_),a}i(r,t);var n=r.prototype;return n.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),i=It(this.master.uri,t.uri);this.experimentalLLHLS&&(i=function(e,t){if(t.endList||!t.serverControl)return e;var i={};if(t.serverControl.canBlockReload){var r=t.preloadSegment,n=t.mediaSequence+t.segments.length;if(r){var a=r.parts||[],s=Vt(t)-1;s>-1&&s!==a.length-1&&(i._HLS_part=s),(s>-1||a.length)&&n--}i._HLS_msn=n}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){var o=new(u().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(e){i.hasOwnProperty(e)&&o.searchParams.set(e,i[e])}),e=o.toString()}return e}(i,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials},function(t,i){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})})}},n.playlistRequestError=function(e,t,i){var r=t.uri,n=t.id;this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[n],status:e.status,message:"HLS playlist request error at URL: "+r+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,i=e.url;return function(e){var t=e.onwarn,i=e.oninfo,r=e.manifestString,n=e.customTagParsers,a=void 0===n?[]:n,s=e.customTagMappers,o=void 0===s?[]:s,u=e.experimentalLLHLS,d=new D;t&&d.on("warn",t),i&&d.on("info",i),a.forEach(function(e){return d.addParser(e)}),o.forEach(function(e){return d.addTagMapper(e)}),d.push(r),d.end();var l=d.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(e){l.hasOwnProperty(e)&&delete l[e]}
1),l.segments&&l.segments.forEach(function(e){["parts","preloadHints"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!l.targetDuration){var c=10;l.segments&&l.segments.length&&(c=l.segments.reduce(function(e,t){return Math.max(e,t.duration)},0)),t&&t("manifest has no targetDuration defaulting to "+c),l.targetDuration=c}var h=Ft(l);if(h.length&&!l.partTargetDuration){var f=h.reduce(function(e,t){return Math.max(e,t.duration)},0);t&&(t("manifest has no partTargetDuration defaulting to "+f),ii.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),l.partTargetDuration=f}return l}({onwarn:function(e){var r=e.message;return t.logger_("m3u8-parser warn for "+i+": "+r)},oninfo:function(e){var r=e.message;return t.logger_("m3u8-parser info for "+i+": "+r)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,i=e.playlistObject,r=e.url,n=e.id;this.request=null,this.state="HAVE_METADATA";var a=i||this.parseManifest_({url:r,manifestString:t});a.lastRequest=Date.now(),si({playlist:a,uri:r,id:n});var s=pi(this.master,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,s?(this.master=s,this.media_=this.master.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(mi(this.media(),!!s)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),u().clearTimeout(this.mediaUpdateTimeout),u().clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var i=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(u().clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=u().setTimeout(this.media.bind(this,e,!1),r)}else{var n=this.state,a=!this.media_||e.id!==this.media_.id,s=this.master.playlists[e.id];if(s&&s.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===n?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(mi(e,!0)),a){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(t,r){if(i.request){if(e.lastRequest=Date.now(),e.resolvedUri=At(i.handleManifestRedirects,e.resolvedUri,r),t)return i.playlistRequestError(i.request,e,n);i.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===n?i.trigger("loadedmetadata"):i.trigger("mediachange")}})}}},n.pause=function(){this.mediaUpdateTimeout&&(u().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;this.mediaUpdateTimeout&&(u().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var i=this.media();if(e){var r=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=u().setTimeout(function(){t.mediaUpdateTimeout=null,t.load()},r)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(u().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=u().setTimeout(function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)},e))},n.start=function(){var e=this;
1if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=u().location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){e.setupInitialPlaylist(e.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(t,i){if(e.request){if(e.request=null,t)return e.error={status:i.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:i.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=At(e.handleManifestRedirects,e.src,i);var r=e.parseManifest_({manifestString:i.responseText,url:e.src});e.setupInitialPlaylist(r)}})},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,oi(this.master,this.srcUri()),e.playlists.forEach(function(e){e.segments=hi(e),e.segments.forEach(function(t){ci(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||u().location.href;this.master=function(e,t){var i=ri(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:u().location.href,resolvedUri:u().location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},r}(di),yi=p().xhr,vi=p().mergeOptions,bi=function(e,t,i,r){var n="arraybuffer"===e.responseType?e.response:e.responseText;!t&&n&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=n.byteLength||n.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(n||e.responseText)))),r(t,e)},_i=function(){var e=function e(t,i){t=vi({timeout:45e3},t);var r=e.beforeRequest||p().Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var n=r(t);n&&(t=n)}var a=(!0===p().Vhs.xhr.original?yi:p().Vhs.xhr)(t,function(e,t){return bi(a,e,t,i)}),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},Ti=function(e){var t,i={};return e.byterange&&(i.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?u().BigInt(t.offset)+u().BigInt(t.length)-u().BigInt(1):t.offset+t.length-1)),i},Si=function(e,t){return e.start(t)+"-"+e.end(t)},wi=function(e,t){var i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Ei=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ii=function(e){var t={};return Object.keys(e).forEach(function(i){var r=e[i];G(r)?t[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[i]=r}),t},Ai=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Li=function(e){return e.resolvedUri},xi=function(e){for(var t=Array.prototype.slice.call(e),i=16,r="",n=0;n<t.length/i;n++)r+=t.slice(n*i,n*i+i).map(wi).join("")+" "+t.slice(n*i,n*i+i).map(Ei).join("")+"\n";return r},Di=Object.freeze({__proto__:null,createTransferableMessage:Ii,initSegmentId:Ai,segmentKeyId:Li,hexDump:xi,tagDump:function(e){var t=e.bytes;return xi(t)},textRanges:function(e){var t,i="";for(t=0;t<e.length;t++)i+=Si(e,t)+" ";return i}}),Oi=function(e){var t=e.playlist,i=e.time,r=void 0===i?void 0:i,n=e.callback;if(!n)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===r)return n({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var i,r=0,n=0;n<t.segments.length&&!(e<=(r=(i=t.segments[n]).videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:r+i.duration));n++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>r){if(e>r+.25*a.duration)return null;i=a}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:r-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}}(r,t);if(!a)return n({message:"valid programTime was not found"});if("estimate"===a.type)return n({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:r},o=function(e,t){if(!t.dateTimeObject)return null;var i=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*r)}(r,a.segment);return o&&(s.programDateTime=o.toISOString()),n(null,s)},ki=function e(t){var i=t.programTime,r=t.playlist,n=t.retryCount,a=void 0===n?2:n,s=t.seekTo,o=t.pauseAfterSeek,u=void 0===o||o,d=t.tech,l=t.callback;if(!l)throw new Error("seekToProgramTime: callback must be provided");
1if(void 0===i||!r||!s)return l({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!d.hasStarted_)return l({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(r))return l({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var c=function(e,t){var i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(i<r.dateTimeObject)return null;for(var n=0;n<t.segments.length-1&&(r=t.segments[n],!(i<t.segments[n+1].dateTimeObject));n++);var a,s=t.segments[t.segments.length-1],o=s.dateTimeObject,u=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return i>new Date(o.getTime()+1e3*u)?null:(i>o&&(r=s),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:ti.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(i,r);if(!c)return l({message:i+" was not found in the stream"});var h=c.segment,f=function(e,t){var i,r;try{i=new Date(e),r=new Date(t)}catch(e){}var n=i.getTime();return(r.getTime()-n)/1e3}(h.dateTimeObject,i);if("estimate"===c.type)return 0===a?l({message:i+" is not buffered yet. Try again"}):(s(c.estimatedStart+f),void d.one("seeked",function(){e({programTime:i,playlist:r,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:d,callback:l})}));var p=h.start+f;d.one("seeked",function(){return l(null,d.currentTime())}),u&&d.pause(),s(p)},Pi=function(e,t){if(4===e.readyState)return t()},Ci=function(e,t,i){var r,n=[],a=!1,s=function(e,t,r,n){return t.abort(),a=!0,i(e,t,r,n)},o=function(e,t){if(!a){if(e)return s(e,t,"",n);var i=t.responseText.substring(n&&n.byteLength||0,t.responseText.length);if(n=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e}),t.length<=1)return j(t[0]);var r=t.reduce(function(e,t,i){return e+(t.byteLength||t.length)},0),n=new Uint8Array(r),a=0;return t.forEach(function(e){e=j(e),n.set(e,a),a+=e.byteLength}),n}(n,Q(i,!0)),r=r||tt(n),n.length<10||r&&n.length<r+2)return Pi(t,function(){return s(e,t,"",n)});var o=_t(n);return"ts"===o&&n.length<188||!o&&n.length<376?Pi(t,function(){return s(e,t,"",n)}):s(null,t,o,n)}},u={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",function(t){return t.total,t.loaded,bi(e,null,{statusCode:e.status},o)})}},d=t(u,function(e,t){return bi(d,e,t,o)});return d},Ui=p().EventTarget,Ri=p().mergeOptions,Ni=function(e,t){if(!fi(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var i=0;i<e.segments.length;i++){var r=e.segments[i],n=t.segments[i];if(r.uri!==n.uri)return!1;if(r.byterange||n.byterange){var a=r.byterange,s=n.byterange;if(a&&!s||!a&&s)return!1;if(a.offset!==s.offset||a.length!==s.length)return!1}}return!0},Mi=function(e,t,i,r){return"placeholder-uri-"+e+"-"+t+"-"+(r.attributes.NAME||i)},Bi=function(e,t,i){for(var r=!0,n=Ri(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a<t.playlists.length;a++){var s=t.playlists[a];if(s.sidx){var o=Se(s.sidx);i&&i[o]&&i[o].sidx&&me(s,i[o].sidx,s.sidx.resolvedUri)}var u=pi(n,s,Ni);u&&(n=u,r=!1)}return ai(t,function(e,t,i,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].id,o=pi(n,e.playlists[0],Ni);o&&(a in(n=o).mediaGroups[t][i]||(n.mediaGroups[t][i][a]=e),n.mediaGroups[t][i][a].playlists[0]=n.playlists[s],r=!1)}}),function(e,t){ai(e,function(i,r,n,a){a in t.mediaGroups[r][n]||delete e.mediaGroups[r][n][a]})}(n,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:n},qi=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},Fi=function(e,t){var i={};for(var r in e){var n=e[r].sidx;if(n){var a=Se(n);if(!t[a])break;var s=t[a].sidxInfo;qi(s,n)&&(i[a]=t[a])}}return i},Vi=function(t){function r(i,r,n,a){var s;void 0===n&&(n={}),(s=t.call(this)||this).masterPlaylistLoader_=a||e(s),a||(s.isMaster_=!0);var o=n,u=o.withCredentials,d=void 0!==u&&u,l=o.handleManifestRedirects,c=void 0!==l&&l;
1if(s.vhs_=r,s.withCredentials=d,s.handleManifestRedirects=c,!i)throw new Error("A non-empty playlist URL or object is required");return s.on("minimumUpdatePeriod",function(){s.refreshXml_()}),s.on("mediaupdatetimeout",function(){s.refreshMedia_(s.media().id)}),s.state="HAVE_NOTHING",s.loadedPlaylists_={},s.logger_=Lt("DashPlaylistLoader"),s.isMaster_?(s.masterPlaylistLoader_.srcUrl=i,s.masterPlaylistLoader_.sidxMapping_={}):s.childPlaylist_=i,s}i(r,t);var n=r.prototype;return n.requestErrored_=function(e,t,i){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,i){var r=this,n=e.sidx&&Se(e.sidx);if(e.sidx&&n&&!this.masterPlaylistLoader_.sidxMapping_[n]){var a=At(this.handleManifestRedirects,e.sidx.resolvedUri),s=function(a,s){if(!r.requestErrored_(a,s,t)){var o,u=r.masterPlaylistLoader_.sidxMapping_;try{o=Ze()(j(s.response).subarray(8))}catch(e){return void r.requestErrored_(e,s,t)}return u[n]={sidxInfo:e.sidx,sidx:o},me(e,o,e.sidx.resolvedUri),i(!0)}};this.request=Ci(a,this.vhs_.xhr,function(t,i,n,o){if(t)return s(t,i);if(!n||"mp4"!==n)return s({status:i.status,message:"Unsupported "+(n||"unknown")+" container type for sidx segment at URL: "+a,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},i);var u=e.sidx.byterange,d=u.offset,l=u.length;if(o.length>=l+d)return s(t,{response:o.subarray(d,d+l),status:i.status,uri:i.uri});r.request=r.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:Ti({byterange:e.sidx.byterange})},s)})}else this.mediaRequest_=u().setTimeout(function(){return i(!1)},0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},u().clearTimeout(this.minimumUpdatePeriodTimeout_),u().clearTimeout(this.mediaRequest_),u().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,function(r){t.haveMetadata({startingState:i,playlist:e})}))},n.haveMetadata=function(e){var t=e.startingState,i=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,this.mediaRequest_=null,this.refreshMedia_(i.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),u().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(u().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;u().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var i=this.media();if(e){var r=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=u().setTimeout(function(){return t.load()},r)}else this.started?i&&!i.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_(function(t,i){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=u().setTimeout(function(){return e.haveMaster_()},0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(i,r){if(!t.requestErrored_(i,r)){var n=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=At(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),n?(t.handleMaster_(),void t.syncClientServerClock_(function(){return e(r,n)})):e(r,n)}"HAVE_NOTHING"===t.state&&(t.started=!1)})},n.syncClientServerClock_=function(e){var t=this,i=Ke(this.masterPlaylistLoader_.masterXml_);return null===i?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===i.method?(this.masterPlaylistLoader_.clientOffset_=i.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:It(this.masterPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},function(r,n){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var a;a="HEAD"===i.method?n.responseHeaders&&n.responseHeaders.date?Date.parse(n.responseHeaders.date):t.masterLoaded_:Date.parse(n.responseText),t.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}}))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,i,r,n,a,s,o=this.masterPlaylistLoader_.master,u=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:o},t=e.masterXml,i=e.srcUrl,r=e.clientOffset,n=e.sidxMapping,a=e.previousManifest,s=$e(t,{manifestUri:i,clientOffset:r,sidxMapping:n,previousManifest:a}),oi(s,i,Mi),s);o&&(u=Bi(o,u,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=u||o;var d=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return d&&d!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=d),(!o||u&&u.minimumUpdatePeriod!==o.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(u)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(u().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;
vendor: 7,996 bytes, line 1
10===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=u().setTimeout(function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)},n.refreshXml_=function(){var e=this;this.requestMaster_(function(t,i){var r,n,a;i&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,n=e.masterPlaylistLoader_.sidxMapping_,a=Fi(r.playlists,n),ai(r,function(e,t,i,r){if(e.playlists&&e.playlists.length){var s=e.playlists;a=Ri(a,Fi(s,n))}}),a),e.addSidxSegments_(e.media(),e.state,function(t){e.refreshMedia_(e.media().id)}))})},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var i=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==i[e];if(r?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=u().setTimeout(function(){t.trigger("mediaupdatetimeout"),e()},mi(t.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},r}(Ui),Hi={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},Gi=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ji=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(i){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),i=Gi(new Worker(t));i.objURL=t;var r=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),r.call(this)},i}},Wi=function(e){return"var browserWorkerPolyFill = "+Gi.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},zi=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Xi=Wi(zi(function(){var e=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var r;return!!e[t]&&(r=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var i,r,n,a;if(i=e[t])if(2===arguments.length)for(n=i.length,r=0;r<n;++r)i[r].call(this,arguments[1]);else{for(a=[],r=arguments.length,r=1;r<arguments.length;++r)a.push(arguments[r]);for(n=i.length,r=0;r<n;++r)i[r].apply(this,a)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),this.on("partialdone",function(t){e.partialFlush(t)}),this.on("endedtimeline",function(t){e.endTimeline(t)}),this.on("reset",function(t){e.reset(t)}),e},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,i,n,a,s,o,u,d,l,c,h,f,p,m,g,y,v,b,_,T,S,w,E,I,A,L,x,D,O,k,P,C,U,R,N,M,B,q,F,V,H=e,G=Math.pow(2,32),j={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:i.getUint32(0)*G+i.getUint32(4)},MAX_UINT32:G},W=j.MAX_UINT32;!function(){var e;if(w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);E=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),A=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),I=new Uint8Array([0,0,0,1]),L=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),x=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),D={video:L,audio:x},P=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),k=new Uint8Array([0,0,0,0,0,0,0,0]),C=new Uint8Array([0,0,0,0,0,0,0,0]),U=C,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=C,O=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,i,r=[],n=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)n+=r[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<r.length;t++)i.set(r[t],n),n+=r[t].byteLength;return i},i=function(){return t(w.dinf,t(w.dref,P))},n=function(e){return t(w.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return t(w.hdlr,D[e])},m=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(i[12]=e.samplerate>>>24&255,i[13]=e.samplerate>>>16&255,i[14]=e.samplerate>>>8&255,i[15]=255&e.samplerate),t(w.mdhd,i)},p=function(e){return t(w.mdia,m(e),g(e.type),o(e))},s=function(e){return t(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(w.minf,"video"===e.type?t(w.vmhd,O):t(w.smhd,k),i(),v(e))},u=function(e,i){for(var r=[],n=i.length;n--;)r[n]=_(i[n]);return t.apply(null,[w.moof,s(e)].concat(r))},d=function(e){for(var i=e.length,r=[];i--;)r[i]=h(e[i]);return t.apply(null,[w.moov,c(4294967295)].concat(r).concat(l(e)))},l=function(e){for(var i=e.length,r=[];i--;)r[i]=T(e[i]);return t.apply(null,[w.mvex].concat(r))},c=function(e){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(w.mvhd,i)},y=function(e){var i,r,n=e.samples||[],a=new Uint8Array(4+n.length);for(r=0;r<n.length;r++)i=n[r].flags,a[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t(w.sdtp,a)},v=function(e){return t(w.stbl,b(e),t(w.stts,N),t(w.stsc,U),t(w.stsz,R),t(w.stco,C))},b=function(e){return t(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?M(e):B(e))},M=function(e){var i,r,n=e.sps||[],a=e.pps||[],s=[],o=[];for(i=0;i<n.length;i++)s.push((65280&n[i].byteLength)>>>8),s.push(255&n[i].byteLength),s=s.concat(Array.prototype.slice.call(n[i]));for(i=0;i<a.length;i++)o.push((65280&a[i].byteLength)>>>8),o.push(255&a[i].byteLength),o=o.concat(Array.prototype.slice.call(a[i]));if(r=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([n.length],s,[a.length],o))),t(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],d=e.sarRatio[1];
vendor: 10,456 bytes, line 1
1r.push(t(w.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&d)>>24,(16711680&d)>>16,(65280&d)>>8,255&d])))}return t.apply(null,r)},B=function(e){return t(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),n(e))},f=function(e){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(w.tkhd,i)},_=function(e){var i,r,n,a,s,o;return i=t(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/W),o=Math.floor(e.baseMediaDecodeTime%W),r=t(w.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(n=S(e,92),t(w.traf,i,r,n)):(a=y(e),n=S(e,a.length+92),t(w.traf,i,r,n,a))},h=function(e){return e.duration=e.duration||4294967295,t(w.trak,f(e),p(e))},T=function(e){var i=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(i[i.length-1]=0),t(w.trex,i)},V=function(e,t){var i=0,r=0,n=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|r|n|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,i){var r,n,a,s,o,u;for(i+=20+16*(s=e.samples||[]).length,a=V(s,i),(n=new Uint8Array(a.length+16*s.length)).set(a),r=a.length,u=0;u<s.length;u++)o=s[u],n[r++]=(4278190080&o.duration)>>>24,n[r++]=(16711680&o.duration)>>>16,n[r++]=(65280&o.duration)>>>8,n[r++]=255&o.duration,n[r++]=(4278190080&o.size)>>>24,n[r++]=(16711680&o.size)>>>16,n[r++]=(65280&o.size)>>>8,n[r++]=255&o.size,n[r++]=o.flags.isLeading<<2|o.flags.dependsOn,n[r++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,n[r++]=61440&o.flags.degradationPriority,n[r++]=15&o.flags.degradationPriority,n[r++]=(4278190080&o.compositionTimeOffset)>>>24,n[r++]=(16711680&o.compositionTimeOffset)>>>16,n[r++]=(65280&o.compositionTimeOffset)>>>8,n[r++]=255&o.compositionTimeOffset;return t(w.trun,n)},q=function(e,i){var r,n,a,s,o,u;for(i+=20+8*(s=e.samples||[]).length,a=V(s,i),(r=new Uint8Array(a.length+8*s.length)).set(a),n=a.length,u=0;u<s.length;u++)o=s[u],r[n++]=(4278190080&o.duration)>>>24,r[n++]=(16711680&o.duration)>>>16,r[n++]=(65280&o.duration)>>>8,r[n++]=255&o.duration,r[n++]=(4278190080&o.size)>>>24,r[n++]=(16711680&o.size)>>>16,r[n++]=(65280&o.size)>>>8,r[n++]=255&o.size;return t(w.trun,r)},S=function(e,t){return"audio"===e.type?q(e,t):F(e,t)};a=function(){return t(w.ftyp,E,I,E,A)};var z,X,Y,Q,$,K,J,Z,ee=function(e){return t(w.mdat,e)},te=u,ie=function(e){var t,i=a(),r=d(e);return(t=new Uint8Array(i.byteLength+r.byteLength)).set(i),t.set(r,i.byteLength),t},re=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ne=function(e){var t,i,r=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,r.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(r.length&&(r.duration=i.dts-r.dts,n.byteLength+=r.byteLength,n.nalCount+=r.length,n.duration+=r.duration,n.push(r)),(r=[i]).byteLength=i.data.byteLength,r.pts=i.pts,r.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(r.keyFrame=!0),r.duration=i.dts-r.dts,r.byteLength+=i.data.byteLength,r.push(i));return n.length&&(!r.duration||r.duration<=0)&&(r.duration=n[n.length-1].duration),n.byteLength+=r.byteLength,n.nalCount+=r.length,n.duration+=r.duration,n.push(r),n},ae=function(e){var t,i,r=[],n=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(r.length&&(n.push(r),n.byteLength+=r.byteLength,n.nalCount+=r.nalCount,n.duration+=r.duration),(r=[i]).nalCount=i.length,r.byteLength=i.byteLength,r.pts=i.pts,r.dts=i.dts,r.duration=i.duration):(r.duration+=i.duration,r.nalCount+=i.length,r.byteLength+=i.byteLength,r.push(i));return n.length&&r.duration<=0&&(r.duration=n[n.length-1].duration),n.byteLength+=r.byteLength,n.nalCount+=r.nalCount,n.duration+=r.duration,n.push(r),n},se=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var i,r,n,a,s,o=t||0,u=[];for(i=0;i<e.length;i++)for(a=e[i],r=0;r<a.length;r++)s=a[r],o+=(n=re(s,o)).size,u.push(n);return u},ue=function(e){var t,i,r,n,a,s,o=0,u=e.byteLength,d=e.nalCount,l=new Uint8Array(u+4*d),c=new DataView(l.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(a=n[i],r=0;r<a.length;r++)s=a[r],c.setUint32(o,s.data.byteLength),o+=4,l.set(s.data,o),o+=s.data.byteLength;return l},de=[33,16,5,32,164,27],le=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ce=function(e){for(var t=[];e--;)t.push(0);return t},he=function(){if(!z){var e={96e3:[de,[227,64],ce(154),[56]],88200:[de,[231],ce(170),[56]],64e3:[de,[248,192],ce(240),[56]],48e3:[de,[255,192],ce(268),[55,148,128],ce(54),[112]],44100:[de,[255,192],ce(268),[55,163,128],ce(84),[112]],32e3:[de,[255,192],ce(268),[55,234],ce(226),[112]],24e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,112],ce(126),[224]],16e3:[de,[255,192],ce(268),[55,255,128],ce(268),[111,255],ce(269),[223,108],ce(195),[1,192]],12e3:[le,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,253,128],ce(259),[56]],11025:[le,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,255,192],ce(268),[55,175,128],ce(108),[112]],8e3:[le,ce(268),[3,121,16],ce(47),[7]]};t=e,z=Object.keys(t).reduce(function(e,i){return e[i]=new Uint8Array(t[i].reduce(function(e,t){return e.concat(t)},[])),e},{})}var t;return z},fe=9e4;K=function(e,t){return X($(e,t))},J=function(e,t){return Y(Q(e),t)},Z=function(e,t,i){return Q(i?e:e-t)};var pe=fe,me=X=function(e){return e*fe},ge=(Y=function(e,t){return e*t},Q=function(e){return e/fe}),ye=($=function(e,t){return e/t},K),ve=J,be=Z,_e=function(e,t,i,r){var n,a,s,o,u,d=0,l=0,c=0;if(t.length&&(n=ye(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(pe/(e.samplerate/1024)),i&&r&&(d=n-Math.max(i,r),c=(l=Math.floor(d/a))*a),!(l<1||c>pe/2))){for((s=he()[e.samplerate])||(s=t[0].data),o=0;o<l;o++)u=t[0],t.splice(0,0,{data:s,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(ve(c,e.samplerate)),c}},Te=function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},Se=function(e){var t,i,r=[];for(t=0;t<e.length;t++)i=e[t],r.push({size:i.data.byteLength,duration:1024});return r},we=function(e){var t,i,r=0,n=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,r),r+=i.data.byteLength;return n},Ee=pe,Ie=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Ae=function(e,t){var i,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=r,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/Ee,i=Math.floor(i)),i},Le=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},xe=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},r=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===r){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=r,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}i.payload=void 0}t+=n,r=0,n=0}return i},De=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Oe=function(e,t){var i,r,n,a,s=[];if(!(64&t[0]))return s;for(r=31&t[0],i=0;i<r;i++)a={type:3&t[(n=3*i)+2],pts:e},4&t[n+2]&&(a.ccData=t[n+3]<<8|t[n+4],s.push(a));return s},ke=function(e){for(var t,i,r=e.byteLength,n=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(n.push(a+2),a+=2):a++;if(0===n.length)return e;t=r-n.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===n[0]&&(s++,n.shift()),i[a]=e[s];return i},Pe=4,Ce=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ge(0,0),new Ge(0,1),new Ge(1,0),new Ge(1,1)],this.parse708captions_&&(this.cc708Stream_=new Be({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(Ce.prototype=new H).push=function(e){var t,i,r;
vendor: 4,370 bytes, line 1
1if("sei_rbsp"===e.nalUnitType&&(t=xe(e.escapedRBSP)).payload&&t.payloadType===Pe&&(i=De(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Oe(e.pts,i),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},Ce.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return"flush"===e?t.flush():t.partialFlush()},this)},Ce.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},Ce.prototype.flush=function(){return this.flushStream("flush")},Ce.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ce.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},Ce.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},Ce.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},Ce.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},Ce.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},Ce.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var Ue={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Re=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Ne=function(e){this.windowNum=e,this.reset()};Ne.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Ne.prototype.getText=function(){return this.rows.join("\n")},Ne.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ne.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Ne.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ne.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ne.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Me=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new Ne(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};Me.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new Ne(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},Me.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Me.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Be=function e(t){t=t||{},e.prototype.init.call(this);var i,r=this,n=t.captionServices||{},a={};
vendor: 14,157 bytes, line 1
1Object.keys(n).forEach(function(e){i=n[e],/^SERVICE/.test(e)&&(a[e]=i.encoding)}),this.serviceEncodings=a,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(r.new708Packet(),r.add708Bytes(e)):(null===r.current708Packet&&r.new708Packet(),r.add708Bytes(e))}};Be.prototype=new H,Be.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Be.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,r=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(r)},Be.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,r=null,n=0,a=t[n++];for(e.seq=a>>6,e.sizeCode=63&a;n<t.length;n++)r=31&(a=t[n++]),7===(i=a>>5)&&r>0&&(i=a=t[n++]),this.pushServiceBlock(i,n,r),r>0&&(n+=r-1)},Be.prototype.pushServiceBlock=function(e,t,i){var r,n=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,n));n<t+i&&n<a.length;n++)r=a[n],Re(r)?n=this.handleText(n,s):24===r?n=this.multiByteCharacter(n,s):16===r?n=this.extendedCommands(n,s):128<=r&&r<=135?n=this.setCurrentWindow(n,s):152<=r&&r<=159?n=this.defineWindow(n,s):136===r?n=this.clearWindows(n,s):140===r?n=this.deleteWindows(n,s):137===r?n=this.displayWindows(n,s):138===r?n=this.hideWindows(n,s):139===r?n=this.toggleWindows(n,s):151===r?n=this.setWindowAttributes(n,s):144===r?n=this.setPenAttributes(n,s):145===r?n=this.setPenColor(n,s):146===r?n=this.setPenLocation(n,s):143===r?s=this.reset(n,s):8===r?s.currentWindow.backspace():12===r?s.currentWindow.clearText():13===r?s.currentWindow.pendingNewLine=!0:14===r?s.currentWindow.clearText():141===r&&n++},Be.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return Re(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Be.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Be.prototype.initService=function(e,t){var i,r,n=this;return(i="SERVICE"+e)in this.serviceEncodings&&(r=this.serviceEncodings[i]),this.services[e]=new Me(e,r,n),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},Be.prototype.handleText=function(e,t,i){var r,n,a,s,o=i&&i.isExtended,u=i&&i.isMultiByte,d=this.current708Packet.data,l=o?4096:0,c=d[e],h=d[e+1],f=t.currentWindow;return t.textDecoder_&&!o?(u?(n=[c,h],e++):n=[c],r=t.textDecoder_.decode(new Uint8Array(n))):(s=Ue[a=l|c]||a,r=4096&a&&a===s?"":String.fromCharCode(s)),f.pendingNewLine&&!f.isEmpty()&&f.newLine(this.getPts(e)),f.pendingNewLine=!1,f.addText(r),e},Be.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,r=i[e+1],n=i[e+2];return Re(r)&&Re(n)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Be.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Be.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,r=i[e],n=7&r;t.setCurrentWindow(n);var a=t.currentWindow;return r=i[++e],a.visible=(32&r)>>5,a.rowLock=(16&r)>>4,a.columnLock=(8&r)>>3,a.priority=7&r,r=i[++e],a.relativePositioning=(128&r)>>7,a.anchorVertical=127&r,r=i[++e],a.anchorHorizontal=r,r=i[++e],a.anchorPoint=(240&r)>>4,a.rowCount=15&r,r=i[++e],a.columnCount=63&r,r=i[++e],a.windowStyle=(56&r)>>3,a.penStyle=7&r,a.virtualRowCount=a.rowCount+1,e},Be.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,r=i[e],n=t.currentWindow.winAttr;return r=i[++e],n.fillOpacity=(192&r)>>6,n.fillRed=(48&r)>>4,n.fillGreen=(12&r)>>2,n.fillBlue=3&r,r=i[++e],n.borderType=(192&r)>>6,n.borderRed=(48&r)>>4,n.borderGreen=(12&r)>>2,n.borderBlue=3&r,r=i[++e],n.borderType+=(128&r)>>5,n.wordWrap=(64&r)>>6,n.printDirection=(48&r)>>4,n.scrollDirection=(12&r)>>2,n.justify=3&r,r=i[++e],n.effectSpeed=(240&r)>>4,n.effectDirection=(12&r)>>2,n.displayEffect=3&r,e},Be.prototype.flushDisplayed=function(e,t){for(var i=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&i.push(t.windows[r].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Be.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Be.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=1);return e},Be.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible=0);return e},Be.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var n=0;n<8;n++)i&1<<n&&(t.windows[n].visible^=1);return e},Be.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].clearText();return e},Be.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],r=this.getPts(e);this.flushDisplayed(r,t);for(var n=0;n<8;n++)i&1<<n&&t.windows[n].reset();return e},Be.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,r=i[e],n=t.currentWindow.penAttr;return r=i[++e],n.textTag=(240&r)>>4,n.offset=(12&r)>>2,n.penSize=3&r,r=i[++e],n.italics=(128&r)>>7,n.underline=(64&r)>>6,n.edgeType=(56&r)>>3,n.fontStyle=7&r,e},Be.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,r=i[e],n=t.currentWindow.penColor;return r=i[++e],n.fgOpacity=(192&r)>>6,n.fgRed=(48&r)>>4,n.fgGreen=(12&r)>>2,n.fgBlue=3&r,r=i[++e],n.bgOpacity=(192&r)>>6,n.bgRed=(48&r)>>4,n.bgGreen=(12&r)>>2,n.bgBlue=3&r,r=i[++e],n.edgeRed=(48&r)>>4,n.edgeGreen=(12&r)>>2,n.edgeBlue=3&r,e},Be.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,r=i[e],n=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,r=i[++e],n.row=15&r,r=i[++e],n.column=63&r,e},Be.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var qe={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Fe=function(e){return null===e?"":(e=qe[e]||e,String.fromCharCode(e))},Ve=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],He=function(){for(var e=[],t=15;t--;)e.push("");return e},Ge=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,r,n,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=He();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=He();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=He()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(r,n))a=Fe((r=(3&r)<<8)|n),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,n))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Fe((r=(3&r)<<8)|n),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,n))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14&~n||this.addFormatting(e.pts,["i"]),1&~n||this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,n))this.column_+=3&n;else if(this.isPAC(r,n)){var s=Ve.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&n&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16&~t||(this.column_=4*((14&t)>>1)),this.isColorPAC(n)&&(14&~n||this.addFormatting(e.pts,["i"]))}else this.isNormalChar(r)&&(0===n&&(n=null),a=Fe(r),a+=Fe(n),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Ge.prototype=new H,Ge.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},Ge.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=He(),this.nonDisplayed_=He(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ge.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Ge.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ge.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ge.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ge.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ge.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ge.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ge.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ge.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=He(),this.displayed_=He()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ge.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)},Ge.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},Ge.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Ge.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i},Ge.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},Ge.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_];i+=t,this.displayed_[this.row_]=i};var je={CaptionStream:Ce,Cea608Stream:Ge,Cea708Stream:Be},We={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},ze="shared",Xe=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Ye=function e(t){var i,r;e.prototype.init.call(this),this.type_=t||ze,this.push=function(e){this.type_!==ze&&e.type!==this.type_||(void 0===r&&(r=e.dts),e.dts=Xe(e.dts,r),e.pts=Xe(e.pts,r),i=e.dts,this.trigger("data",e))},this.flush=function(){r=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ye.prototype=new H;var Qe,$e=Ye,Ke=Xe,Je=function(e,t,i){var r,n="";for(r=t;r<i;r++)n+="%"+("00"+e[r].toString(16)).slice(-2);return n},Ze=function(e,t,i){return decodeURIComponent(Je(e,t,i))},et=function(e,t,i){return unescape(Je(e,t,i))},tt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},it={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ze(e.data,1,t),e.value=Ze(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ze(e.data,1,t),e.url=Ze(e.data,t+1,e.data.length);break}},PRIV:function(e){var t;for(t=0;t<e.data.length;
vendor: 4,282 bytes, line 1
1t++)if(0===e.data[t]){e.owner=et(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(Qe=function(e){var t,i={descriptor:e&&e.descriptor},r=0,n=[],a=0;if(Qe.prototype.init.call(this),this.dispatchType=We.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,s,o,u;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=0,n.length=0),0===n.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(n.push(e),a+=e.data.byteLength,1===n.length&&(r=tt(e.data.subarray(6,10)),r+=10),!(a<r)){for(t={data:new Uint8Array(r),frames:[],pts:n[0].pts,dts:n[0].dts},u=0;u<r;)t.data.set(n[0].data.subarray(0,r-u),u),u+=n[0].data.byteLength,a-=n[0].data.byteLength,n.shift();i=10,64&t.data[5]&&(i+=4,i+=tt(t.data.subarray(10,14)),r-=tt(t.data.subarray(16,20)));do{if((s=tt(t.data.subarray(i+4,i+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+s+10)}).key=o.id,it[o.id]&&(it[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner)){var d=o.data,l=(1&d[3])<<30|d[4]<<22|d[5]<<14|d[6]<<6|d[7]>>>2;l*=4,l+=3&d[7],o.timeStamp=l,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=s}while(i<r);this.trigger("data",t)}}}).prototype=new H;var rt,nt,at,st=Qe,ot=$e,ut=188;(rt=function(){var e=new Uint8Array(ut),t=0;rt.prototype.init.call(this),this.push=function(i){var r,n=0,a=ut;for(t?((r=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),r.set(i,t),t=0):r=i;a<r.byteLength;)71!==r[n]||71!==r[a]?(n++,a++):(this.trigger("data",r.subarray(n,a)),n+=ut,a+=ut);n<r.byteLength&&(e.set(r.subarray(n),0),t=r.byteLength-n)},this.flush=function(){t===ut&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new H,nt=function(){var e,t,i,r;nt.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var n=0;r.payloadUnitStartIndicator&&(n+=e[n]+1),"pat"===r.type?t(e.subarray(n),r):i(e.subarray(n),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},i=function(e,t){var i,n;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,n=12+((15&e[10])<<8|e[11]);n<i;){var a=e[n],s=(31&e[n+1])<<8|e[n+2];a===We.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=s:a===We.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=s:a===We.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][s]=a),n+=5+((15&e[n+3])<<8|e[n+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var i={},r=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===i.pid)i.type="pat",e(t.subarray(r),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(r),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,i]):this.processPes_(t,r,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=We.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=We.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}},nt.prototype=new H,nt.STREAM_TYPES={h264:27,adts:15},at=function(){var e,t=this,i=!1,r={data:[],size:0},n={data:[],size:0},a={data:[],size:0},s=function(e,i,r){var n,a,s=new Uint8Array(e.size),o={type:i},u=0,d=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,u=0;u<e.data.length;u++)a=e.data[u],s.set(a.data,d),d+=a.data.byteLength;var l,c,h,f;
vendor: 5,103 bytes, line 1
1c=o,f=(l=s)[0]<<16|l[1]<<8|l[2],c.data=new Uint8Array,1===f&&(c.packetLength=6+(l[4]<<8|l[5]),c.dataAlignmentIndicator=!!(4&l[6]),192&(h=l[7])&&(c.pts=(14&l[9])<<27|(255&l[10])<<20|(254&l[11])<<12|(255&l[12])<<5|(254&l[13])>>>3,c.pts*=4,c.pts+=(6&l[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,c.dts*=4,c.dts+=(6&l[18])>>>1)),c.data=l.subarray(9+l[8])),n="video"===i||o.packetLength<=e.size,(r||n)&&(e.size=0,e.data.length=0),n&&t.trigger("data",o)}};at.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case We.H264_STREAM_TYPE:e=r,t="video";break;case We.ADTS_STREAM_TYPE:e=n,t="audio";break;case We.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&s(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",r)}})[o.type]()},this.reset=function(){r.size=0,r.data.length=0,n.size=0,n.data.length=0,this.trigger("reset")},this.flushStreams_=function(){s(r,"video"),s(n,"audio"),s(a,"timed-metadata")},this.flush=function(){if(!i&&e){var r={type:"metadata",tracks:[]};null!==e.video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",r)}i=!1,this.flushStreams_(),this.trigger("done")}},at.prototype=new H;var dt={PAT_PID:0,MP2T_PACKET_LENGTH:ut,TransportPacketStream:rt,TransportParseStream:nt,ElementaryStream:at,TimestampRolloverStream:ot,CaptionStream:je.CaptionStream,Cea608Stream:je.Cea608Stream,Cea708Stream:je.Cea708Stream,MetadataStream:st};for(var lt in We)We.hasOwnProperty(lt)&&(dt[lt]=We[lt]);var ct,ht=dt,ft=pe,pt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(ct=function(e){var t,i=0;ct.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+i+" outside syncword"})},this.push=function(r){var n,a,s,o,u,d=0;if(e||(i=0),"audio"===r.type){var l;for(t&&t.length?(s=t,(t=new Uint8Array(s.byteLength+r.data.byteLength)).set(s),t.set(r.data,s.byteLength)):t=r.data;d+7<t.length;)if(255===t[d]&&240==(246&t[d+1])){if("number"==typeof l&&(this.skipWarn_(l,d),l=null),a=2*(1&~t[d+1]),n=(3&t[d+3])<<11|t[d+4]<<3|(224&t[d+5])>>5,u=(o=1024*(1+(3&t[d+6])))*ft/pt[(60&t[d+2])>>>2],t.byteLength-d<n)break;this.trigger("data",{pts:r.pts+i*u,dts:r.dts+i*u,sampleCount:o,audioobjecttype:1+(t[d+2]>>>6&3),channelcount:(1&t[d+2])<<2|(192&t[d+3])>>>6,samplerate:pt[(60&t[d+2])>>>2],samplingfrequencyindex:(60&t[d+2])>>>2,samplesize:16,data:t.subarray(d+7+a,d+n)}),i++,d+=n}else"number"!=typeof l&&(l=d),d++;"number"==typeof l&&(this.skipWarn_(l,d),l=null),t=t.subarray(d)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new H;var mt,gt,yt,vt=ct,bt=function(e){var t=e.byteLength,i=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var n=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(n,n+s)),i=new DataView(a.buffer).getUint32(0),r=8*s,t-=s},this.skipBits=function(e){var n;r>e?(i<<=e,r-=e):(e-=r,e-=8*(n=Math.floor(e/8)),t-=n,this.loadWord(),i<<=e,r-=e)},this.readBits=function(e){var n=Math.min(r,e),a=i>>>32-n;return(r-=n)>0?i<<=n:t>0&&this.loadWord(),(n=e-n)>0?a<<n|this.readBits(n):a},this.skipLeadingZeros=function(){var e;for(e=0;e<r;++e)if(i&2147483648>>>e)return i<<=e,r-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(gt=function(){var e,t,i=0;gt.prototype.init.call(this),this.push=function(r){var n;t?((n=new Uint8Array(t.byteLength+r.data.byteLength)).set(t),n.set(r.data,t.byteLength),t=n):t=r.data;for(var a=t.byteLength;i<a-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<a);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0}
vendor: 8,389 bytes, line 1
1,this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new H,yt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},mt=function(){var e,t,i,r,n,a,s,o=new gt;mt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,r=e.dts,o.push(e))},o.on("data",function(s){var o={trackId:t,pts:i,dts:r,data:s,nalUnitTypeCode:31&s[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=n(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=n(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)}),o.on("done",function(){e.trigger("done")}),o.on("partialdone",function(){e.trigger("partialdone")}),o.on("reset",function(){e.trigger("reset")}),o.on("endedtimeline",function(){e.trigger("endedtimeline")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},s=function(e,t){var i,r=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(r+t.readExpGolomb()+256)%256),r=0===n?r:n},n=function(e){for(var t,i,r=e.byteLength,n=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(n.push(a+2),a+=2):a++;if(0===n.length)return e;t=r-n.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===n[0]&&(s++,n.shift()),i[a]=e[s];return i},a=function(e){var t,i,r,n,a,o,u,d,l,c,h,f,p=0,m=0,g=0,y=0,v=[1,1];if(i=(t=new bt(e)).readUnsignedByte(),n=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),yt[i]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,f=0;f<h;f++)t.readBoolean()&&s(f<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),f=0;f<u;f++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),l=t.readUnsignedExpGolomb(),0===(c=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(p=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}v&&(v[0],v[1])}return{profileIdc:i,levelIdc:r,profileCompatibility:n,width:16*(d+1)-2*p-2*m,height:(2-c)*(l+1)*16-2*g-2*y,sarRatio:v}}},mt.prototype=new H;var _t,Tt={H264Stream:mt,NalByteStream:gt},St=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],wt=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},Et=function e(t,i){return t.length-i<10||t[i]!=="I".charCodeAt(0)||t[i+1]!=="D".charCodeAt(0)||t[i+2]!=="3".charCodeAt(0)?i:e(t,i+=wt(t,i))},It=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},At=function(e,t,i){return unescape(function(e,t,i){var r,n="";for(r=t;r<i;r++)n+="%"+("00"+e[r].toString(16)).slice(-2);return n}(e,t,i))},Lt={isLikelyAacData:function(e){var t=Et(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:wt,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&!(240&~e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return St[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,r;t=10,64&e[5]&&(t+=4,t+=It(e.subarray(10,14)));do{if((i=It(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+i+10);for(var n=0;n<r.byteLength;n++)if(0===r[n]){if("com.apple.streaming.transportStreamTimestamp"===At(r,0,n)){var a=r.subarray(n+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}};(_t=function(){var e=new Uint8Array,t=0;_t.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var r,n,a,s,o=0,u=0;for(e.length?(s=e.length,(e=new Uint8Array(i.byteLength+s)).set(e.subarray(0,s)),e.set(i,s)):e=i;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255&~e[u]||240&~e[u+1])u++;else{if(e.length-u<7)break;if(u+(o=Lt.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else{if(e.length-u<10)break;if(u+(o=Lt.parseId3TagSize(e,u))>e.length)break;n={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",n),u+=o}r=e.length-u,e=r>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var xt,Dt,Ot,kt,Pt=_t,Ct=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Ut=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Rt=Tt.H264Stream,Nt=Lt.isLikelyAacData,Mt=pe,Bt=function(e,t){t.stream=e,this.trigger("log",t)},qt=function(e,t){for(var i=Object.keys(t),r=0;r<i.length;r++){var n=i[r];"headOfPipeline"!==n&&t[n].on&&t[n].on("log",Bt.bind(e,n))}},Ft=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Vt=function(e,t,i,r,n,a){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(r-t),pts:e+(n-i)},prependedContentDuration:a,baseMediaDecodeTime:e}};Dt=function(e,t){var i,r=[],n=0,a=0,s=1/0;i=(t=t||{}).firstSequenceNumber||0,Dt.prototype.init.call(this),this.push=function(t){Le(e,t),e&&Ct.forEach(function(i){e[i]=t[i]}),r.push(t)},this.setEarliestDts=function(e){n=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var o,u,d,l,c,h,f;0!==r.length?(o=Te(r,e,n),e.baseMediaDecodeTime=Ae(e,t.keepOriginalTimestamps),f=_e(e,o,a,s),e.samples=Se(o),d=ee(we(o)),r=[],u=te(i,[e]),l=new Uint8Array(u.byteLength+d.byteLength),i++,l.set(u),l.set(d,u.byteLength),Ie(e),c=Math.ceil(1024*Mt/e.samplerate),o.length&&(h=o.length*c,this.trigger("segmentTimingInfo",Vt(ye(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,f||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:l}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ie(e),r=[],this.trigger("reset")}},Dt.prototype=new H,xt=function(e,t){var i,r,n,a=[],s=[];i=(t=t||{}).firstSequenceNumber||0,xt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Le(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.config,e.sps=[t.data],Ut.forEach(function(t){e[t]=r[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var r,n,o,u,d,l,c,h,f=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(r=ne(a),(o=ae(r))[0][0].keyFrame||((n=this.getGopForFusion_(a[0],e))?(f=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=se(o)),s.length){var p;if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_
vendor: 11,041 bytes, line 1
1(),void this.trigger("done","VideoSegmentStream");Ie(e),o=p}Le(e,o),e.samples=oe(o),d=ee(ue(o)),e.baseMediaDecodeTime=Ae(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),c=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",Vt(e.baseMediaDecodeTime,c.dts,c.pts,h.dts+h.duration,h.pts+h.duration,f)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=te(i,[e]),l=new Uint8Array(u.byteLength+d.byteLength),i++,l.set(u),l.set(d,u.byteLength),this.trigger("data",{track:e,boxes:l}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,s.length=0,this.trigger("reset")},this.resetStream_=function(){Ie(e),r=void 0,n=void 0},this.getGopForFusion_=function(t){var i,r,n,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)n=(a=this.gopCache_[s]).gop,e.pps&&Ft(e.pps[0],a.pps[0])&&e.sps&&Ft(e.sps[0],a.sps[0])&&(n.dts<e.timelineStartInfo.dts||(i=t.dts-n.dts-n.duration)>=-1e4&&i<=45e3&&(!r||o>i)&&(r=a,o=i));return r?r.gop:null},this.alignGopsAtStart_=function(e){var t,i,r,n,a,o,u,d;for(a=e.byteLength,o=e.nalCount,u=e.duration,t=i=0;t<s.length&&i<e.length&&(r=s[t],n=e[i],r.pts!==n.pts);)n.pts>r.pts?t++:(i++,a-=n.byteLength,o-=n.nalCount,u-=n.duration);return 0===i?e:i===e.length?null:((d=e.slice(i)).byteLength=a,d.duration=u,d.nalCount=o,d.pts=d[0].pts,d.dts=d[0].dts,d)},this.alignGopsAtEnd_=function(e){var t,i,r,n,a,o,u;for(t=s.length-1,i=e.length-1,a=null,o=!1;t>=0&&i>=0;){if(r=s[t],n=e[i],r.pts===n.pts){o=!0;break}r.pts>n.pts?t--:(t===s.length-1&&(a=i),i--)}if(!o&&null===a)return null;if(0===(u=o?i:a))return e;var d=e.slice(u),l=d.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return d.byteLength=l.byteLength,d.duration=l.duration,d.nalCount=l.nalCount,d.pts=d[0].pts,d.dts=d[0].dts,d},this.alignGopsWith=function(e){s=e}},xt.prototype=new H,kt=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,kt.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},kt.prototype=new H,kt.prototype.flush=function(e){var t,i,r,n,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ut.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ct.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,r=ie(this.pendingTracks),s.initSegment=new Uint8Array(r.byteLength),s.initSegment.set(r),s.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)s.data.set(this.pendingBoxes[n],a),a+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=be(t.startPts,o,this.keepOriginalTimestamps),t.endTime=be(t.endPts,o,this.keepOriginalTimestamps),s.captionStreams[t.stream]=!0,s.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=be(i.pts,o,this.keepOriginalTimestamps),s.metadata.push(i);for(s.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",s),n=0;n<s.captions.length;n++)t=s.captions[n],this.trigger("caption",t);for(n=0;n<s.metadata.length;n++)i=s.metadata[n],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},kt.prototype.setRemux=function(e){this.remuxTracks=e},(Ot=function(e){var t,i,r=this,n=!0;Ot.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var n={};this.transmuxPipeline_=n,n.type="aac",n.metadataStream=new ht.MetadataStream,n.aacStream=new Pt,n.audioTimestampRolloverStream=new ht.TimestampRolloverStream("audio"),n.timedMetadataTimestampRolloverStream=new ht.TimestampRolloverStream("timed-metadata"),n.adtsStream=new vt,n.coalesceStream=new kt(e,n.metadataStream),n.headOfPipeline=n.aacStream,n.aacStream.pipe(n.audioTimestampRolloverStream).pipe(n.adtsStream),n.aacStream.pipe(n.timedMetadataTimestampRolloverStream).pipe(n.metadataStream).pipe(n.coalesceStream),n.metadataStream.on("timestamp",function(e){n.aacStream.setTimestamp(e.timeStamp)}),n.aacStream.on("data",function(a){"timed-metadata"!==a.type&&"audio"!==a.type||n.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new Dt(i,e),n.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),n.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream),r.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))}),n.coalesceStream.on("data",this.trigger.bind(this,"data")),n.coalesceStream.on("done",this.trigger.bind(this,"done")),qt(this,n)},this.setupTsPipeline=function(){var n={};this.transmuxPipeline_=n,n.type="ts",n.metadataStream=new ht.MetadataStream,n.packetStream=new ht.TransportPacketStream,n.parseStream=new ht.TransportParseStream,n.elementaryStream=new ht.ElementaryStream,n.timestampRolloverStream=new ht.TimestampRolloverStream,n.adtsStream=new vt,n.h264Stream=new Rt,n.captionStream=new ht.CaptionStream(e),n.coalesceStream=new kt(e,n.metadataStream),n.headOfPipeline=n.packetStream,n.packetStream.pipe(n.parseStream).pipe(n.elementaryStream).pipe(n.timestampRolloverStream),n.timestampRolloverStream.pipe(n.h264Stream),n.timestampRolloverStream.pipe(n.adtsStream),n.timestampRolloverStream.pipe(n.metadataStream).pipe(n.coalesceStream),n.h264Stream.pipe(n.captionStream).pipe(n.coalesceStream),n.elementaryStream.on("data",function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?i||"audio"!==a.tracks[s].type||((i=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!n.videoSegmentStream&&(n.coalesceStream.numberOfTracks++,n.videoSegmentStream=new xt(t,e),n.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),n.videoSegmentStream.on("timelineStartInfo",function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,n.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))}),n.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),n.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),n.videoSegmentStream.on("baseMediaDecodeTime",function(e){i&&n.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),n.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),n.h264Stream.pipe(n.videoSegmentStream).pipe(n.coalesceStream)),i&&!n.audioSegmentStream&&(n.coalesceStream.numberOfTracks++,n.audioSegmentStream=new Dt(i,e),n.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),n.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),n.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),n.adtsStream.pipe(n.audioSegmentStream).pipe(n.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}}),n.coalesceStream.on("data",this.trigger.bind(this,"data")),n.coalesceStream.on("id3Frame",function(e){e.dispatchType=n.metadataStream.dispatchType,r.trigger("id3Frame",e)}),n.coalesceStream.on("caption",this.trigger.bind(this,"caption")),n.coalesceStream.on("done",this.trigger.bind(this,"done")),qt(this,n)},this.setBaseMediaDecodeTime=function(r){var n=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,Ie(i),n.audioTimestampRolloverStream&&n.audioTimestampRolloverStream.discontinuity()),t&&(n.videoSegmentStream&&(n.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ie(t),n.captionStream.reset()),n.timestampRolloverStream&&n.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(n){var t=Nt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),n=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){n=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new H;var Ht,Gt,jt,Wt={Transmuxer:Ot,VideoSegmentStream:xt,AudioSegmentStream:Dt,AUDIO_PROPERTIES:Ct,VIDEO_PROPERTIES:Ut,generateSegmentTimingInfo:Vt},zt=function(e){return e>>>0},Xt=function(e){return("00"+e.toString(16)).slice(-2)},Yt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Qt=zt,$t=function e(t,i){var r,n,a,s,o,u=[];
vendor: 11,083 bytes, line 1
1if(!i.length)return null;for(r=0;r<t.byteLength;)n=Qt(t[r]<<24|t[r+1]<<16|t[r+2]<<8|t[r+3]),a=Yt(t.subarray(r+4,r+8)),s=n>1?r+n:t.byteLength,a===i[0]&&(1===i.length?u.push(t.subarray(r+8,s)):(o=e(t.subarray(r+8,s),i.slice(1))).length&&(u=u.concat(o))),r=s;return u},Kt=zt,Jt=j.getUint64,Zt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Jt(e.subarray(4)):t.baseMediaDecodeTime=Kt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},ei=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},ti=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},r=new DataView(e.buffer,e.byteOffset,e.byteLength),n=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],d=8&i.flags[1],l=r.getUint32(4),c=8;for(n&&(i.dataOffset=r.getInt32(c),c+=4),a&&l&&(t={flags:ei(e.subarray(c,c+4))},c+=4,s&&(t.duration=r.getUint32(c),c+=4),o&&(t.size=r.getUint32(c),c+=4),d&&(1===i.version?t.compositionTimeOffset=r.getInt32(c):t.compositionTimeOffset=r.getUint32(c),c+=4),i.samples.push(t),l--);l--;)t={},s&&(t.duration=r.getUint32(c),c+=4),o&&(t.size=r.getUint32(c),c+=4),u&&(t.flags=ei(e.subarray(c,c+4)),c+=4),d&&(1===i.version?t.compositionTimeOffset=r.getInt32(c):t.compositionTimeOffset=r.getUint32(c),c+=4),i.samples.push(t);return i},ii=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},n=1&r.flags[2],a=2&r.flags[2],s=8&r.flags[2],o=16&r.flags[2],u=32&r.flags[2],d=65536&r.flags[0],l=131072&r.flags[0];return t=8,n&&(t+=4,r.baseDataOffset=i.getUint32(12),t+=4),a&&(r.sampleDescriptionIndex=i.getUint32(t),t+=4),s&&(r.defaultSampleDuration=i.getUint32(t),t+=4),o&&(r.defaultSampleSize=i.getUint32(t),t+=4),u&&(r.defaultSampleFlags=i.getUint32(t)),d&&(r.durationIsEmpty=!0),!n&&l&&(r.baseDataOffsetIsMoof=!0),r},ri="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},ni="undefined"!=typeof window?window:void 0!==ri?ri:"undefined"!=typeof self?self:{},ai=ke,si=je.CaptionStream,oi=function(e,t){for(var i=e,r=0;r<t.length;r++){var n=t[r];if(i<n.size)return n;i-=n.size}return null},ui=function(e,t){var i=$t(e,["moof","traf"]),r=$t(e,["mdat"]),n={},a=[];return r.forEach(function(e,t){var r=i[t];a.push({mdat:e,traf:r})}),a.forEach(function(e){var i,r,a=e.mdat,s=e.traf,o=$t(s,["tfhd"]),u=ii(o[0]),d=u.trackId,l=$t(s,["tfdt"]),c=l.length>0?Zt(l[0]).baseMediaDecodeTime:0,h=$t(s,["trun"]);t===d&&h.length>0&&(i=function(e,t,i){var r=t,n=i.defaultSampleDuration||0,a=i.defaultSampleSize||0,s=i.trackId,o=[];return e.forEach(function(e){var t=ti(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=n),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof r?(e.pts=r+ni.BigInt(e.compositionTimeOffset),r+=ni.BigInt(e.duration)):(e.pts=r+e.compositionTimeOffset,r+=e.duration)}),o=o.concat(t)}),o}(h,c,u),r=function(e,t,i){var r,n,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),u={logs:[],seiNals:[]};for(n=0;n+4<e.length;n+=a)if(a=o.getUint32(n),n+=4,!(a<=0))switch(31&e[n]){case 6:var d=e.subarray(n+1,n+1+a),l=oi(n,t);if(r={nalUnitType:"sei_rbsp",size:a,data:d,escapedRBSP:ai(d),trackId:i},l)r.pts=l.pts,r.dts=l.dts,s=l;else{if(!s){u.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+n+" for trackId "+i+". See mux.js#223."});break}r.pts=s.pts,r.dts=s.dts}u.seiNals.push(r)}return u}(a,i,d),n[d]||(n[d]={seiNals:[],logs:[]}),n[d].seiNals=n[d].seiNals.concat(r.seiNals),n[d].logs=n[d].logs.concat(r.logs))}),n},di=function(){var e,t,i,r,n,a,s=!1;this.isInitialized=function(){return s},this.init=function(t){e=new si,s=!0,a=!!t&&t.isPartial,e.on("data",function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,n.captions.push(e),n.captionStreams[e.stream]=!0}),e.on("log",function(e){n.logs.push(e)})},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(i!==e[0]||r!==t[i])},this.parse=function(e,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))i=a[0],r=s[i];else if(null===i||!r)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,s)}return o=function(e,t,i){if(null===t)return null;var r=ui(e,t)[t]||{};return{seiNals:r.seiNals,logs:r.logs,timescale:i}}(e,i,r),o&&o.logs&&(n.logs=n.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),n):n.logs.length?{logs:n.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={},n.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,r=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},li=zt,ci=Xt,hi=j.getUint64;Ht=function(e,t){var i=$t(t,["moof","traf"]).reduce(function(t,i){var r,n,a=$t(i,["tfhd"])[0],s=li(a[4]<<24|a[5]<<16|a[6]<<8|a[7]),o=e[s]||9e4,u=$t(i,["tfdt"])[0],d=new DataView(u.buffer,u.byteOffset,u.byteLength);return"bigint"==typeof(r=1===u[0]?hi(u.subarray(4,12)):d.getUint32(4))?n=r/ni.BigInt(o):"number"!=typeof r||isNaN(r)||(n=r/o),n<Number.MAX_SAFE_INTEGER&&(n=Number(n)),n<t&&(t=n),t},1/0);return"bigint"==typeof i||isFinite(i)?i:0},jt=function(e){var t=0===e[0]?12:20;return li(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Gt=function(e){var t=$t(e,["moov","trak"]),i=[];return t.forEach(function(e){var t,r,n={},a=$t(e,["tkhd"])[0];a&&(r=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),n.id=0===r?t.getUint32(12):t.getUint32(20));var s=$t(e,["mdia","hdlr"])[0];if(s){var o=Yt(s.subarray(8,12));n.type="vide"===o?"video":"soun"===o?"audio":o}var u=$t(e,["mdia","minf","stbl","stsd"])[0];if(u){var d=u.subarray(8);n.codec=Yt(d.subarray(4,8));var l,c=$t(d,[n.codec])[0];c&&(/^[asm]vc[1-9]$/i.test(n.codec)?(l=c.subarray(78),"avcC"===Yt(l.subarray(4,8))&&l.length>11?(n.codec+=".",n.codec+=ci(l[9]),n.codec+=ci(l[10]),n.codec+=ci(l[11])):n.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(n.codec)?(l=c.subarray(28),"esds"===Yt(l.subarray(4,8))&&l.length>20&&0!==l[19]?(n.codec+="."+ci(l[19]),n.codec+="."+ci(l[20]>>>2&63).replace(/^0/,"")):n.codec="mp4a.40.2"):n.codec=n.codec.toLowerCase())}var h=$t(e,["mdia","mdhd"])[0];h&&(n.timescale=jt(h)),i.push(n)}),i};var fi=Ht,pi=Gt,mi=function(e){var t=31&e[1];return t<<=8,t|=e[2]},gi=function(e){return!!(64&e[1])},yi=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},vi=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},bi={parseType:function(e,t){var i=mi(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=gi(e),i=4+yi(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=gi(e),r=4+yi(e);if(i&&(r+=e[r]+1),1&e[r+5]){var n;n=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a<n;){var s=r+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:gi,parsePesType:function(e,t){switch(t[mi(e)]){case We.H264_STREAM_TYPE:return"video";case We.ADTS_STREAM_TYPE:return"audio";case We.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!gi(e))return null;var t=4+yi(e);if(t>=e.byteLength)return null;var i,r=null;return 192&(i=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&i&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+yi(e),i=e.subarray(t),r=0,n=0,a=!1;n<i.byteLength-3;n++)if(1===i[n+2]){r=n+5;break}for(;r<i.byteLength;)switch(i[r]){case 0:if(0!==i[r-1]){r+=2;break}if(0!==i[r-2]){r++;break}n+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===vi(31&i[n+3])&&(a=!0);do{r++}while(1!==i[r]&&r<i.length);n=r-2,r+=3;break;case 1:if(0!==i[r-1]||0!==i[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===vi(31&i[n+3])&&(a=!0),n=r-2,r+=3;break;default:r+=3}return i=i.subarray(n),r-=n,n=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===vi(31&i[n+3])&&(a=!0),a}},_i=Ke,Ti={};Ti.ts=bi,Ti.aac=Lt;var Si=pe,wi=188,Ei=71,Ii=function(e,t,i){for(var r,n,a,s,o=0,u=wi,d=!1;u<=e.byteLength;)if(e[o]!==Ei||e[u]!==Ei&&u!==e.byteLength)o++,u++;else{if(r=e.subarray(o,u),"pes"===Ti.ts.parseType(r,t.pid))n=Ti.ts.parsePesType(r,t.table),a=Ti.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(s=Ti.ts.parsePesTime(r))&&(s.type="audio",i.audio.push(s),d=!0);if(d)break;o+=wi,u+=wi}for(o=(u=e.byteLength)-wi,d=!1;o>=0;)if(e[o]!==Ei||e[u]!==Ei&&u!==e.byteLength)o--,u--;else{if(r=e.subarray(o,u),"pes"===Ti.ts.parseType(r,t.pid))n=Ti.ts.parsePesType(r,t.table),a=Ti.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(s=Ti.ts.parsePesTime(r))&&(s.type="audio",i.audio.push(s),d=!0);if(d)break;o-=wi,u-=wi}},Ai=function(e,t,i){for(var r,n,a,s,o,u,d,l=0,c=wi,h=!1,f={data:[],size:0};c<e.byteLength;)if(e[l]!==Ei||e[c]!==Ei)l++,c++;else{if(r=e.subarray(l,c),"pes"===Ti.ts.parseType(r,t.pid))if(n=Ti.ts.parsePesType(r,t.table),a=Ti.ts.parsePayloadUnitStartIndicator(r),"video"===n&&(a&&!h&&(s=Ti.ts.parsePesTime(r))&&(s.type="video",i.video.push(s),h=!0),!i.firstKeyFrame)){if(a&&0!==f.size){for(o=new Uint8Array(f.size),u=0;f.data.length;)d=f.data.shift(),o.set(d,u),u+=d.byteLength;if(Ti.ts.videoPacketContainsKeyFrame(o)){var p=Ti.ts.parsePesTime(o);p?(i.firstKeyFrame=p,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(r),f.size+=r.byteLength}if(h&&i.firstKeyFrame)break;l+=wi,c+=wi}for(l=(c=e.byteLength)-wi,h=!1;l>=0;)if(e[l]!==Ei||e[c]!==Ei)l--,c--;else{if(r=e.subarray(l,c),"pes"===Ti.ts.parseType(r,t.pid))n=Ti.ts.parsePesType(r,t.table),a=Ti.ts.parsePayloadUnitStartIndicator(r),"video"===n&&a&&(s=Ti.ts.parsePesTime(r))&&(s.type="video",i.video.push(s),h=!0);if(h)break;l-=wi,c-=wi}},Li=function(e){var t={pid:null,table:null},i={};for(var r in function(e,t){for(var i,r=0,n=wi;
1n<e.byteLength;)if(e[r]!==Ei||e[n]!==Ei)r++,n++;else{switch(i=e.subarray(r,n),Ti.ts.parseType(i,t.pid)){case"pat":t.pid=Ti.ts.parsePat(i);break;case"pmt":var a=Ti.ts.parsePmt(i);t.table=t.table||{},Object.keys(a).forEach(function(e){t.table[e]=a[e]})}r+=wi,n+=wi}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case We.H264_STREAM_TYPE:i.video=[],Ai(e,t,i),0===i.video.length&&delete i.video;break;case We.ADTS_STREAM_TYPE:i.audio=[],Ii(e,t,i),0===i.audio.length&&delete i.audio}}return i},xi=function(e,t){var i;return i=Ti.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,r=0,n=null,a=null,s=0,o=0;e.length-o>=3;){switch(Ti.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((s=Ti.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===a&&(t=e.subarray(o,o+s),a=Ti.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){i=!0;break}if((s=Ti.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+s),n=Ti.aac.parseSampleRate(t)),r++,o+=s;break;default:o++}if(i)return null}if(null===n||null===a)return null;var u=Si/n;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):Li(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=_i(e.dts,i),e.pts=_i(e.pts,i),e.dtsTime=e.dts/Si,e.ptsTime=e.pts/Si})}if(e.video&&e.video.length){var r=t;if((void 0===r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach(function(e){e.dts=_i(e.dts,r),e.pts=_i(e.pts,r),e.dtsTime=e.dts/Si,e.ptsTime=e.pts/Si}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=_i(n.dts,r),n.pts=_i(n.pts,r),n.dtsTime=n.dts/Si,n.ptsTime=n.pts/Si}}}(i,t),i):null},Di=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Wt.Transmuxer(this.options),function(e,t){t.on("data",function(t){var i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};var r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])}),t.on("done",function(t){e.postMessage({action:"done"})}),t.on("gopInfo",function(t){e.postMessage({action:"gopInfo",gopInfo:t})}),t.on("videoSegmentTimingInfo",function(t){var i={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=ge(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})}),t.on("audioSegmentTimingInfo",function(t){var i={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=ge(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})}),t.on("id3Frame",function(t){e.postMessage({action:"id3Frame",id3Frame:t})}),t.on("caption",function(t){e.postMessage({action:"caption",caption:t})}),t.on("trackinfo",function(t){e.postMessage({action:"trackinfo",trackInfo:t})}),t.on("audioTimingInfo",function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ge(t.start),end:ge(t.end)}})}),t.on("videoTimingInfo",function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ge(t.start),end:ge(t.end)}})}),t.on("log",function(t){e.postMessage({action:"log",log:t})})}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new di,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,i=e.data,r=fi(t,i);this.self.postMessage({action:"probeMp4StartTime",startTime:r,data:i},[i.buffer])},t.probeMp4Tracks=function(e){var t=e.data,i=pi(t);this.self.postMessage({action:"probeMp4Tracks",tracks:i,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,i=e.baseStartTime,r="number"!=typeof i||isNaN(i)?void 0:i*pe,n=xi(t,r),a=null;n&&((a={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1}).hasVideo&&(a.videoStart=n.video[0].ptsTime),a.hasAudio&&(a.audioStart=n.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(me(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(me(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();
1self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Di(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Di(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})),Yi=ji(Xi),Qi=function(e){var t=e.transmuxer,i=e.bytes,r=e.audioAppendStart,n=e.gopsToAlignWith,a=e.remux,s=e.onData,o=e.onTrackInfo,u=e.onAudioTimingInfo,d=e.onVideoTimingInfo,l=e.onVideoSegmentTimingInfo,c=e.onAudioSegmentTimingInfo,h=e.onId3,f=e.onCaptions,p=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,y=e.isEndOfTimeline,v={buffer:[]},b=y;if(t.onmessage=function(i){t.currentTransmux===e&&("data"===i.data.action&&function(e,t,i){var r=e.data.segment,n=r.type,a=r.initSegment,s=r.captions,o=r.captionStreams,u=r.metadata,d=r.videoFrameDtsTime,l=r.videoFramePtsTime;t.buffer.push({captions:s,captionStreams:o,metadata:u});var c=e.data.segment.boxes||{data:e.data.segment.data},h={type:n,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==d&&(h.videoFrameDtsTime=d),void 0!==l&&(h.videoFramePtsTime=l),i(h)}(i,v,s),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(i,v),"audioTimingInfo"===i.data.action&&u(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&d(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&l(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&c(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&h([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&f(i.data.caption),"endedtimeline"===i.data.action&&(b=!1,m()),"log"===i.data.action&&g(i.data.log),"transmuxed"===i.data.type&&(b||(t.onmessage=null,function(e){var t=e.transmuxedData,i=e.callback;t.buffer=[],i(t)}({transmuxedData:v,callback:p}),$i(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(n)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:n}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),i.byteLength){var _=i instanceof ArrayBuffer?i:i.buffer,T=i instanceof ArrayBuffer?0:i.byteOffset;t.postMessage({action:"push",data:_,byteOffset:T,byteLength:i.byteLength},[_])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},$i=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():Qi(e.currentTransmux))},Ki=function(e,t){e.postMessage({action:t}),$i(e)},Ji=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void Ki(t,e);t.transmuxQueue.push(Ki.bind(null,t,e))},Zi=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Qi(e);e.transmuxer.transmuxQueue.push(e)},er=function(e){Ji("reset",e)},tr=function(e){var t=new Yi;t.currentTransmux=null,t.transmuxQueue=[];var i=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)},t.postMessage({action:"init",options:e}),t},ir=function(e){var t=e.transmuxer,i=e.endAction||e.action,r=e.callback,n=m({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",function n(a){a.data.action===i&&(t.removeEventListener("message",n),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),r(a.data))}),e.data){var a=e.data instanceof ArrayBuffer;n.byteOffset=a?0:e.data.byteOffset,n.byteLength=e.data.byteLength;var s=[a?e.data:e.data.buffer];t.postMessage(n,s)}else t.postMessage(n)},rr=2,nr=-101,ar=-102,sr=function(e){e.forEach(function(e){e.abort()})},or=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:nr,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:ar,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:rr,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:rr,xhr:t}:null},ur=function(e,t,i){return function(r,n){var a=n.response,s=or(r,n);if(s)return i(s,e);if(16!==a.byteLength)return i({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:rr,xhr:n},e);for(var o=new DataView(a),u=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),d=0;d<t.length;d++)t[d].bytes=u;return i(null,e)}},dr=function(e,t){var i=_t(e.map.bytes);if("mp4"!==i){var r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(i||"unknown")+" container for initialization segment at URL: "+r,code:rr})}ir({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(i){var r=i.tracks,n=i.data;return e.map.bytes=n,r.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))}),t(null)}})},lr=function(e){var t=e.segment,i=e.finishProcessingFn,r=e.responseType;return function(e,n){var a=or(e,n);if(a)return i(a,t);var s="arraybuffer"!==r&&n.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer}(n.responseText.substring(t.lastReachedChar||0)):n.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(n),t.key?t.encryptedBytes=new Uint8Array(s):t.bytes=new Uint8Array(s),i(null,t)}},cr=function(e){var t=e.segment,i=e.bytes,r=e.trackInfoFn,n=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,d=e.isEndOfTimeline,l=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog,p=t.map&&t.map.tracks||{},m=Boolean(p.audio&&p.video),g=n.bind(null,t,"audio","start"),y=n.bind(null,t,"audio","end"),v=n.bind(null,t,"video","start"),b=n.bind(null,t,"video","end");ir({action:"probeTs",transmuxer:t.transmuxer,data:i,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=i=e.data;var n=e.result;n&&(r(t,{hasAudio:n.hasAudio,hasVideo:n.hasVideo,isMuxed:m}),r=null,n.hasAudio&&!m&&g(n.audioStart),n.hasVideo&&v(n.videoStart),g=null,v=null),Zi({bytes:i,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:m,onData:function(e){e.type="combined"===e.type?"video":e.type,c(t,e)},onTrackInfo:function(e){r&&(m&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){g&&void 0!==e.start&&(g(e.start),g=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:function(e){v&&void 0!==e.start&&(v(e.start),v=null),b&&void 0!==e.end&&b(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){s(e)},onId3:function(e,i){o(t,e,i)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:d,onEndedTimeline:function(){l()},onTransmuxerLog:f,onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},hr=function(e){var t=e.segment,i=e.bytes,r=e.trackInfoFn,n=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,d=e.isEndOfTimeline,l=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog,m=new Uint8Array(i);if(function(e){return nt(e,["moof"]).length>0}(m)){t.isFmp4=!0;var g=t.map.tracks,y={isFmp4:!0,hasVideo:!!g.video,hasAudio:!!g.audio};g.audio&&g.audio.codec&&"enca"!==g.audio.codec&&(y.audioCodec=g.audio.codec),g.video&&g.video.codec&&"encv"!==g.video.codec&&(y.videoCodec=g.video.codec),g.video&&g.audio&&(y.isMuxed=!0),r(t,y);var v=function(e){c(t,{data:m,type:y.hasAudio&&!y.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),h(null,t,{})};ir({action:"probeMp4StartTime",timescales:t.map.timescales,data:m,transmuxer:t.transmuxer,callback:function(e){var r=e.data,a=e.startTime;i=r.buffer,t.bytes=m=r,y.hasAudio&&!y.isMuxed&&n(t,"audio","start",a),y.hasVideo&&n(t,"video","start",a),g.video&&r.byteLength&&t.transmuxer?ir({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:m,timescales:t.map.timescales,trackIds:[g.video.id],callback:function(e){i=e.data.buffer,t.bytes=m=e.data,e.logs.forEac
1h(function(e){f(p().mergeOptions(e,{stream:"mp4CaptionParser"}))}),v(e.captions)}}):v()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=_t(m)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});cr({segment:t,bytes:i,trackInfoFn:r,timingInfoFn:n,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:l,dataFn:c,doneFn:h,onTransmuxerLog:f})}else h(null,t,{})},fr=function(e,t){var i,r=e.id,n=e.key,a=e.encryptedBytes,s=e.decryptionWorker;s.addEventListener("message",function e(i){if(i.data.source===r){s.removeEventListener("message",e);var n=i.data.decrypted;t(new Uint8Array(n.bytes,n.byteOffset,n.byteLength))}}),i=n.bytes.slice?n.bytes.slice():new Uint32Array(Array.prototype.slice.call(n.bytes)),s.postMessage(Ii({source:r,encrypted:a,key:i,iv:n.iv}),[a.buffer,i.buffer])},pr=function(e){var t=e.activeXhrs,i=e.decryptionWorker,r=e.trackInfoFn,n=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,d=e.isEndOfTimeline,l=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog,p=0,m=!1;return function(e,g){if(!m){if(e)return m=!0,sr(t),h(e,g);if((p+=1)===t.length){var y=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,i=e.segment,r=e.trackInfoFn,n=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,d=e.isEndOfTimeline,l=e.endedTimelineFn,c=e.dataFn,h=e.doneFn,f=e.onTransmuxerLog;fr({id:i.requestId,key:i.key,encryptedBytes:i.encryptedBytes,decryptionWorker:t},function(e){i.bytes=e,hr({segment:i,bytes:i.bytes,trackInfoFn:r,timingInfoFn:n,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:l,dataFn:c,doneFn:h,onTransmuxerLog:f})})}({decryptionWorker:i,segment:g,trackInfoFn:r,timingInfoFn:n,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:l,dataFn:c,doneFn:h,onTransmuxerLog:f});hr({segment:g,bytes:g.bytes,trackInfoFn:r,timingInfoFn:n,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:l,dataFn:c,doneFn:h,onTransmuxerLog:f})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return fr({decryptionWorker:i,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},function(e){g.map.bytes=e,dr(g,function(e){if(e)return sr(t),h(e,g);y()})});y()}}}},mr=function(e){var t=e.segment,i=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=p().mergeOptions(t.stats,function(e){var t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),i(e,t)}},gr=function(e){var t=e.xhr,i=e.xhrOptions,r=e.decryptionWorker,n=e.segment,a=e.abortFn,s=e.progressFn,o=e.trackInfoFn,u=e.timingInfoFn,d=e.videoSegmentTimingInfoFn,l=e.audioSegmentTimingInfoFn,c=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,m=e.endedTimelineFn,g=e.dataFn,y=e.doneFn,v=e.onTransmuxerLog,b=[],_=pr({activeXhrs:b,decryptionWorker:r,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:m,dataFn:g,doneFn:y,onTransmuxerLog:v});if(n.key&&!n.key.bytes){var T=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&T.push(n.map.key);var S=t(p().mergeOptions(i,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),ur(n,T,_));b.push(S)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){var w=t(p().mergeOptions(i,{uri:n.map.key.resolvedUri,responseType:"arraybuffer"}),ur(n,[n.map.key],_));b.push(w)}var E=p().mergeOptions(i,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Ti(n.map)}),I=function(e){var t=e.segment,i=e.finishProcessingFn;return function(e,r){var n=or(e,r);if(n)return i(n,t);var a=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=a,i(null,t);t.map.bytes=a,dr(t,function(e){if(e)return e.xhr=r,e.status=r.status,i(e,t);i(null,t)})}}({segment:n,finishProcessingFn:_}),A=t(E,I);b.push(A)}var L=p().mergeOptions(i,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Ti(n)}),x=t(L,lr({segment:n,finishProcessingFn:_,responseType:L.responseType}));x.addEventListener("progress",mr({segment:n,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:l,id3Fn:c,captionsFn:h,isEndOfTimeline:f,endedT
1imelineFn:m,dataFn:g})),b.push(x);var D={};return b.forEach(function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,i=e.abortFn;return function(e){e.target.aborted&&i&&!t.calledAbortFn&&(i(),t.calledAbortFn=!0)}}({loadendState:D,abortFn:a}))}),function(){return sr(b)}},yr=Lt("CodecUtils"),vr=function(e,t){var i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},br=function(e){var t={};return e.forEach(function(e){var i=e.mediaType,r=e.type,n=e.details;t[i]=t[i]||[],t[i].push(C(""+r+n))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return yr("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]}),t},_r=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},Tr=function(e,t){var i=t.attributes||{},r=br(function(e){var t=e.attributes||{};if(t.CODECS)return U(t.CODECS)}(t)||[]);if(vr(e,t)&&!r.audio&&!function(e,t){if(!vr(e,t))return!0;var i=t.attributes||{},r=e.mediaGroups.AUDIO[i.AUDIO];for(var n in r)if(!r[n].uri&&!r[n].playlists)return!0;return!1}(e,t)){var n=br(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var r in i){var n=i[r];if(n.default&&n.playlists)return U(n.playlists[0].attributes.CODECS)}return null}(e,i.AUDIO)||[]);n.audio&&(r.audio=n.audio)}return r},Sr=Lt("PlaylistSelector"),wr=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Er=function(e,t){if(!e)return"";var i=u().getComputedStyle(e);return i?i[t]:""},Ir=function(e,t){var i=e.slice();e.sort(function(e,r){var n=t(e,r);return 0===n?i.indexOf(e)-i.indexOf(r):n})},Ar=function(e,t){var i,r;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||u().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),i-(r=r||u().Number.MAX_VALUE)},Lr=function(e,t,i,r,n,a){if(e){var s={bandwidth:t,width:i,height:r,limitRenditionByPlayerDimensions:n},o=e.playlists;ti.isAudioOnly(e)&&(o=a.getAudioTrackPlaylists_(),s.audioOnly=!0);var d=o.map(function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||u().Number.MAX_VALUE,width:t,height:i,playlist:e}});Ir(d,function(e,t){return e.bandwidth-t.bandwidth});var l=(d=d.filter(function(e){return!ti.isIncompatible(e.playlist)})).filter(function(e){return ti.isEnabled(e.playlist)});l.length||(l=d.filter(function(e){return!ti.isDisabled(e.playlist)}));var c=l.filter(function(e){return e.bandwidth*Hi.BANDWIDTH_VARIANCE<t}),h=c[c.length-1],f=c.filter(function(e){return e.bandwidth===h.bandwidth})[0];if(!1===n){var p=f||l[0]||d[0];if(p&&p.playlist){var m="sortedPlaylistReps";return f&&(m="bandwidthBestRep"),l[0]&&(m="enabledPlaylistReps"),Sr("choosing "+wr(p)+" using "+m+" with options",s),p.playlist}return Sr("could not choose a playlist with options",s),null}var g=c.filter(function(e){return e.width&&e.height});Ir(g,function(e,t){return e.width-t.width});var y=g.filter(function(e){return e.width===i&&e.height===r});h=y[y.length-1];var v,b,_,T,S=y.filter(function(e){return e.bandwidth===h.bandwidth})[0];if(S||(b=(v=g.filter(function(e){return e.width>i||e.height>r})).filter(function(e){return e.width===v[0].width&&e.height===v[0].height}),h=b[b.length-1],_=b.filter(function(e){return e.bandwidth===h.bandwidth})[0]),a.experimentalLeastPixelDiffSelector){var w=g.map(function(e){return e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-r),e});Ir(w,function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff}),T=w[0]}var E=T||_||S||f||l[0]||d[0];if(E&&E.playlist){var I="sortedPlaylistReps";return T?I="leastPixelDiffRep":_?I="resolutionPlusOneRep":S?I="resolutionBestRep":f?I="bandwidthBestRep":l[0]&&(I="enabledPlaylistReps"),Sr("choosing "+wr(E)+" using "+I+" with options",s),E.playlist}return Sr("could not choose a playlist with options",s),null}},xr=function(){var e=this.useDevicePixelRatio&&u().devicePixelRatio||1;return Lr(this.playlists.master,this.systemBandwidth,parseInt(Er(this.tech_.el(),"width"),10)*e,parseInt(Er(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Dr=function(e){var t=e.inbandTextTracks,i=e.metadataArray,r=e.timestampOffset,n=e.videoDuration;if(i){var a=u().WebKitDataCue||u().VTTCue,s=t.metadataTrack_;if(s&&(i.forEach(function(e){var t=e.cueTime+r;!("number"!=typeof t||u().isNaN(t)||t<0)&&t<1/0&&e.frames.forEac
1h(function(e){var i=new a(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return p().log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return p().log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return p().log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(i),s.addCue(i)})}),s.cues&&s.cues.length)){for(var o=s.cues,d=[],l=0;l<o.length;l++)o[l]&&d.push(o[l]);var c=d.reduce(function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),h=Object.keys(c).sort(function(e,t){return Number(e)-Number(t)});h.forEach(function(e,t){var i=c[e],r=Number(h[t+1])||n;i.forEach(function(e){e.endTime=r})})}}},Or=function(e,t,i){var r,n;if(i&&i.cues)for(r=i.cues.length;r--;)(n=i.cues[r]).startTime>=e&&n.endTime<=t&&i.removeCue(n)},kr=function(e){return"number"==typeof e&&isFinite(e)},Pr=1/60,Cr=function(e){var t=e.startOfSegment,i=e.duration,r=e.segment,n=e.part,a=e.playlist,s=a.mediaSequence,o=a.id,u=a.segments,d=void 0===u?[]:u,l=e.mediaIndex,c=e.partIndex,h=e.timeline,f=d.length-1,p="mediaIndex/partIndex increment";e.getMediaInfoForTime?p="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(p="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(p+=" with independent "+e.independent);var m="number"==typeof c,g=e.segment.uri?"segment":"pre-segment",y=m?Vt({preloadSegment:r})-1:0;return g+" ["+(s+l)+"/"+(s+f)+"]"+(m?" part ["+c+"/"+y+"]":"")+" segment start/end ["+r.start+" => "+r.end+"]"+(m?" part start/end ["+n.start+" => "+n.end+"]":"")+" startOfSegment ["+t+"] duration ["+i+"] timeline ["+h+"] selected by ["+p+"] playlist ["+o+"]"},Ur=function(e){return e+"TimingInfo"},Rr=function(e){var t=e.timelineChangeController,i=e.currentTimeline,r=e.segmentTimeline,n=e.loaderType,a=e.audioDisabled;if(i===r)return!1;if("audio"===n){var s=t.lastTimelineChange({type:"main"});return!s||s.to!==r}if("main"===n&&a){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==r}return!1},Nr=function(e){var t=e.segmentDuration,i=e.maxDuration;return!!t&&Math.round(t)>i+xt},Mr=function(e,t){if("hls"!==t)return null;var i,r,n=(i={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},r=0,["video","audio"].forEach(function(e){var t=i[e+"TimingInfo"];if(t){var n,a=t.start,s=t.end;"bigint"==typeof a||"bigint"==typeof s?n=u().BigInt(s)-u().BigInt(a):"number"==typeof a&&"number"==typeof s&&(n=s-a),void 0!==n&&n>r&&(r=n)}}
1),"bigint"==typeof r&&r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r);if(!n)return null;var a=e.playlist.targetDuration,s=Nr({segmentDuration:n,maxDuration:2*a}),o=Nr({segmentDuration:n,maxDuration:a}),d="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+n+" when the reported duration is "+e.duration+" and the target duration is "+a+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return s||o?{severity:s?"warn":"info",message:d}:null},Br=function(t){function r(i,r){var n;if(n=t.call(this)||this,!i)throw new TypeError("Initialization settings are required");if("function"!=typeof i.currentTime)throw new TypeError("No currentTime getter specified");if(!i.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=i.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.partIndex=null,n.hasPlayed_=i.hasPlayed,n.currentTime_=i.currentTime,n.seekable_=i.seekable,n.seeking_=i.seeking,n.duration_=i.duration,n.mediaSource_=i.mediaSource,n.vhs_=i.vhs,n.loaderType_=i.loaderType,n.currentMediaInfo_=void 0,n.startingMediaInfo_=void 0,n.segmentMetadataTrack_=i.segmentMetadataTrack,n.goalBufferLength_=i.goalBufferLength,n.sourceType_=i.sourceType,n.sourceUpdater_=i.sourceUpdater,n.inbandTextTracks_=i.inbandTextTracks,n.state_="INIT",n.timelineChangeController_=i.timelineChangeController,n.shouldSaveSegmentTimingInfo_=!0,n.parse708captions_=i.parse708captions,n.useDtsForTimestampOffset_=i.useDtsForTimestampOffset,n.captionServices_=i.captionServices,n.experimentalExactManifestTimings=i.experimentalExactManifestTimings,n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.xhrOptions_=null,n.pendingSegments_=[],n.audioDisabled_=!1,n.isPendingTimestampOffset_=!1,n.gopBuffer_=[],n.timeMapping_=0,n.safeAppend_=p().browser.IE_VERSION>=11,n.appendInitSegment_={audio:!0,video:!0},n.playlistOfLastInitSegment_={audio:null,video:null},n.callQueue_=[],n.loadQueue_=[],n.metadataQueue_={id3:[],caption:[]},n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=null,n.activeInitSegmentId_=null,n.initSegments_={},n.cacheEncryptionKeys_=i.cacheEncryptionKeys,n.keyCache_={},n.decrypter_=i.decrypter,n.syncController_=i.syncController,n.syncPoint_={segmentIndex:0,time:0},n.transmuxer_=n.createTransmuxer_(),n.triggerSyncInfoUpdate_=function(){return n.trigger("syncinfoupdate")},n.syncController_.on("syncinfoupdate",n.triggerSyncInfoUpdate_),n.mediaSource_.addEventListener("sourceopen",function(){n.isEndOfStream_()||(n.ended_=!1)}),n.fetchAtBuffer_=!1,n.logger_=Lt("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty(e(n),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),n.sourceUpdater_.on("ready",function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()}),"main"===n.loaderType_&&n.timelineChangeController_.on("pendingtimelinechange",function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()}),"audio"===n.loaderType_&&n.timelineChangeController_.on("timelinechange",function(){n.hasEnoughInfoToLoad_()&&n.processLoadQueue_(),n.hasEnoughInfoToAppend_()&&n.processCallQueue_()}),n}i(r,t);var n=r.prototype;return n.createTransmuxer_=function(){return tr({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&u().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,u().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e
1:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&er(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return p().createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,i=e.hasVideo,r=e.isMuxed;if(i&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Ai(e),r=this.initSegments_[i];return t&&!r&&e.bytes&&(this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),r||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Li(e),r=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[i]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var n={resolvedUri:(r||e).resolvedUri};return r&&(n.bytes=r.bytes),n},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var i=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var n=null;if(i&&(i.id?n=i.id:i.uri&&(n=i.uri)),this.logger_("playlist update ["+n+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var a=e.mediaSequence-i.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var s=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!s.parts||!s.parts.length||!s.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}r&&(r.mediaIndex-=a,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}},n.pause=function(){this.checkBufferTimeout_&&(u().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&er(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,i,r){if(void 0===i&&(i=function(){}),void 0===r&&(r=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var n=1,a=function(){0===--n&&i()};for(var s in!r&&this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(e,t,a)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,i,r){for(var n=Math.ceil((t-r)*Tt.ONE_SECOND_IN_TS),a=Math.ceil((i-r)*Tt.ONE_SECOND_IN_TS),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=n););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)Or(e,t,this.inbandTextTracks_[s]);Or(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&u().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=u().setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&u().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=u().setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,i){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===i&&(i=this.partIndex),!t||!this.mediaSource_)return!1;var r="number"==typeof e&&t.segments[e],n=e+1===t.segments.length,a=!r||!r.parts||i+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&n&&a},n.chooseNextRequest_=function(){var e=this.buffered_(),t=Rt(e)||0,i=Nt(e,this.currentTime_()),r=!this.hasPlayed_()&&i>=1,n=i>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||r||n)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var s={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(s.isSyncRequest)s.mediaIndex=function(e,t,i){t=t||[];for(var r=[],n=0,a=0;a<t.length;a++){var s=t[a];if(e===s.timeline&&(r.push(a),(n+=s.duration)>i))return a}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,a,t);else if(null!==this.mediaIndex){var o=a[this.mediaIndex],u="number"==typeof this.partIndex?this.partIndex:-1;s.startOfSegment=o.end?o.end:t,o.parts&&o.parts[u+1]?(s.mediaIndex=this.mediaIndex,s.partIndex=u+1):s.mediaIndex=this.mediaIndex+1}else{var d=ti.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),l=d.segmentIndex,c=d.startTime,h=d.partIndex;s.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),s.mediaIndex=l,s.startOfSegment=c,s.partIndex=h}var f=a[s.mediaIndex],p=f&&"number"==typeof s.partIndex&&f.parts&&f.parts[s.partIndex];if(!f||"number"==typeof s.partIndex&&!p)return null;if("number"!=typeof s.partIndex&&f.parts&&(s.partIndex=0,p=f.parts[0]),!i&&p&&!p.independent)if(0===s.partIndex){var m=a[s.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(s.mediaIndex-=1,s.partIndex=m.parts.length-1,s.independent="previous segment")}else f.parts[s.partIndex-1].independent&&(s.partIndex-=1,s.independent="previous part");var y=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return s.mediaIndex>=a.length-1&&y&&!this.seeking_()?null:this.generateSegmentInfo_(s)},n.generateSegmentInfo_=function(e){var t=e.independent,i=e.playlist,r=e.mediaIndex,n=e.startOfSegment,a=e.isSyncRequest,s=e.partIndex,o=e.forceTimestampOffset,u=e.getMediaInfoForTime,d=i.segments[r],l="number"==typeof s&&d.parts[s],c={requestId:"segment-loader-"+Math.random(),uri:l&&l.resolvedUri||d.resolvedUri,mediaIndex:r,partIndex:l?s:null,isSyncRequest:a,startOfSegment:n,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:d.timeline,duration:l&&l.duration||d.duration,segment:d,part:l,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:d.timeline,currentTimeline:this.currentTimeline_,startOfSegment:n,buffered:this.buffered_(),overrideCheck:h});
1var f=Rt(this.sourceUpdater_.audioBuffered());return"number"==typeof f&&(c.audioAppendStart=f-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=function(e,t,i){if(null==t||!e.length)return[];var r,n=Math.ceil((t-i+3)*Tt.ONE_SECOND_IN_TS);for(r=0;r<e.length&&!(e[r].pts>n);r++);return e.slice(r)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c},n.timestampOffsetForSegment_=function(e){return i=(t=e).segmentTimeline,r=t.currentTimeline,n=t.startOfSegment,a=t.buffered,t.overrideCheck||i!==r?i<r?n:a.length?a.end(a.length-1):n:null;var t,i,r,n,a},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),i=e.bandwidth,r=this.pendingSegment_.duration,n=ti.estimateSegmentRequestTime(r,i,this.playlist_,e.bytesReceived),a=function(e,t,i){return void 0===i&&(i=1),((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(n<=a)){var s=function(e){var t=e.master,i=e.currentTime,r=e.bandwidth,n=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,u=e.syncController,d=t.playlists.filter(function(e){return!ti.isIncompatible(e)}),l=d.filter(ti.isEnabled);l.length||(l=d.filter(function(e){return!ti.isDisabled(e)}));var c=l.filter(ti.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=u.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:ti.estimateSegmentRequestTime(a,r,e)*t-s}}),h=c.filter(function(e){return e.rebufferingImpact<=0});return Ir(h,function(e,t){return Ar(t.playlist,e.playlist)}),h.length?h[0]:(Ir(c,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),c[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=n-a-s.rebufferingImpact,u=.5;a<=xt&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u||(this.bandwidth=s.playlist.attributes.BANDWIDTH*Hi.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+Cr(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var i=Object.keys(e).sort(),r=Object.keys(t).sort();if(i.length!==r.length)return!1;for(var n=0;n<i.length;n++){var a=i[n];if(a!==r[n])return!1;if(e[a]!==t[a])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,i,r){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var n=this.pendingSegment_,a=Ur(t);n[a]=n[a]||{},n[a][i]=r,this.logger_("timinginfo: "+t+" - "+i+" - "+r),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var i=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),n={};t.forEach(function(e){n[e.stream]=n[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=n[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)}),Object.keys(n).forEach(function(e){var t=n[e],a=t.startTime,s=t.endTime,o=t.captions,d=i.inbandTextTracks_;i.logger_("adding cues from "+a+" -> "+s+" for "+e),function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=i;/^cc708_/.test(i)&&(r="SERVICE"+i.split("_")[1]);var n=t.textTracks().getTrackById(r);if(n)e[i]=n;else{var a=i,s=i,o=!1,u=(t.options_.vhs&&t.options_.vhs.captionServices||{})[r];u&&(a=u.label,s=u.language,o=u.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:r,default:o,label:a,language:s},!1).track}}}(d,i.vhs_.tech_,e),Or(a,s,d[e]),function(e){var t=e.inbandTextTracks,i=e.captionArray,r=e.timestampOffset;if(i){var n=u().WebKitDataCue||u().VTTCue;
1i.forEach(function(e){var i=e.stream;t[i].addCue(new n(e.startTime+r,e.endTime+r,e.text))})}}({captionArray:o,inbandTextTracks:d,timestampOffset:r})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,i){e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,i,this.vhs_.tech_),Dr({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(e){return e()})},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(e){return e()})},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!Rr({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},n.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},n.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var i=t.hasAudio,r=t.hasVideo,n=t.isMuxed;return!(r&&!e.videoTimingInfo)&&(!(i&&!this.audioDisabled_&&!n&&!e.audioTimingInfo)&&!Rr({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Ur(t.type)].start;else{var r,n=this.getCurrentMediaInfo_(),a="main"===this.loaderType_&&n&&n.hasVideo;a&&(r=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:r,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});var s=this.chooseNextRequest_();if(s.mediaIndex!==i.mediaIndex||s.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,i=e.initSegment,r=e.map,n=e.playlist;if(r){var a=Ai(r);if(this.activeInitSegmentId_===a)return null;i=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=a}return i&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=n,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,i):null},n.handleQuotaExceededError_=function(e,t){var i=this,r=e.segmentInfo,n=e.type,a=e.bytes,s=this.sourceUpdater_.audio
1Buffered(),o=this.sourceUpdater_.videoBuffered();s.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Ut(s).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Ut(o).join(", "));var d=s.length?s.start(0):0,l=s.length?s.end(s.length-1):0,c=o.length?o.start(0):0,h=o.length?o.end(o.length-1):0;if(l-d<=1&&h-c<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+a.byteLength+", audio buffer: "+Ut(s).join(", ")+", video buffer: "+Ut(o).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:r,type:n,bytes:a}));var f=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+f),this.remove(0,f,function(){i.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=u().setTimeout(function(){i.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),i.quotaExceededErrorRetryTimeout_=null,i.processCallQueue_()},1e3)},!0)},n.handleAppendError_=function(e,t){var i=e.segmentInfo,r=e.type,n=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+n.length+"b failed for segment #"+i.mediaIndex+" in playlist "+i.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:i,type:r,bytes:n}))},n.appendToSourceBuffer_=function(e){var t,i,r,n=e.segmentInfo,a=e.type,s=e.initSegment,o=e.data,u=e.bytes;if(!u){var d=[o],l=o.byteLength;s&&(d.unshift(s),l+=s.byteLength),r=0,(t={bytes:l,segments:d}
1).bytes&&(i=new Uint8Array(t.bytes),t.segments.forEach(function(e){i.set(e,r),r+=e.byteLength})),u=i}this.sourceUpdater_.appendBuffer({segmentInfo:n,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:n,type:a,bytes:u}))},n.handleSegmentTimingInfo_=function(e,t,i){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,n=e+"TimingInfo";r[n]||(r[n]={}),r[n].transmuxerPrependedSeconds=i.prependedContentDuration||0,r[n].transmuxedPresentationStart=i.start.presentation,r[n].transmuxedDecodeStart=i.start.decode,r[n].transmuxedPresentationEnd=i.end.presentation,r[n].transmuxedDecodeEnd=i.end.decode,r[n].baseMediaDecodeTime=i.baseMediaDecodeTime}},n.appendData_=function(e,t){var i=t.type,r=t.data;if(r&&r.byteLength&&("audio"!==i||!this.audioDisabled_)){var n=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:r})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(function(){var i=m({},e,{forceTimestampOffset:!0});m(e,t.generateSegmentInfo_(i)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)})},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var i=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),n=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,s=r||n&&a;this.logger_("Requesting "+Cr(e)),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=gr({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(i){var r=i.message,n=i.level,a=i.stream;t.logger_(Cr(e)+" logged from transmuxer stream "+a+" as a "+n+": "+r)}})},n.trimBackBuffer_=function(e){var t=function(e,t,i){var r=t-Hi.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var n=t-i;return Math.min(n,r)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,i=e.part,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},n=e.playlist.segments[e.mediaIndex-1];if(n&&n.timeline===t.timeline&&(n.videoTimingInfo?r.baseStartTime=n.videoTimingInfo.transmuxedDecodeEnd:n.audioTimingInfo&&(r.baseStartTime=n.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=a}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<Pr?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+Pr):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},n.segmentRequestFinished_=function(e,t,i){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if
1(e){if(this.pendingSegment_=null,this.state="READY",e.code===ar)return;return this.pause(),e.code===nr?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=function(e,t,i){if(!t.length)return e;if(i)return t.slice();for(var r=t[0].pts,n=0;n<e.length&&!(e[n].pts>=r);n++);return e.slice(0,n).concat(t)}(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,i=e.playlist,r=e.mediaIndex,n=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!s)return u.start;var d=i.segments[r-1];return 0!==r&&d&&void 0!==d.start&&d.end===n+a?o.start:n},n.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var i=t.hasAudio,r=t.hasVideo,n=t.isMuxed,a="main"===this.loaderType_&&r,s=!this.audioDisabled_&&i&&!n;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,i){return"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,i=e.audioTimingInfo,r=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i&&"number"==typeof i.transmuxedDecodeStart?i.transmuxedDecodeStart:r.start:r.start},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end="number"==typeof i.end?i.end:i.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=Mr(e,this.sourceType_);if(t&&("warn"===t.severity?p().log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+Cr(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var i=e.segment,r=e.part,n=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,a=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(n||a)return this.logger_("bad "+(n?"segment":"part")+" "+Cr(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_
1(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Cr(e))},n.recordThroughput_=function(e){if(e.duration<Pr)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+Pr);else{var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,r=t.end;if(kr(i)&&kr(r)){Or(i,r,this.segmentMetadataTrack_);var n=u().WebKitDataCue||u().VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:i,end:r},s=new n(i,r,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}},r}(p().EventTarget);function qr(){}var Fr,Vr=function(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})},Hr=["video","audio"],Gr=function(e,t){var i=t[e+"Buffer"];return i&&i.updating||t.queuePending[e]},jr=function e(t,i){if(0!==i.queue.length){var r=0,n=i.queue[r];if("mediaSource"!==n.type){if("mediaSource"!==t&&i.ready()&&"closed"!==i.mediaSource.readyState&&!Gr(t,i)){if(n.type!==t){if(r=function(e,t){for(var i=0;i<t.length;i++){var r=t[i];if("mediaSource"===r.type)return null;if(r.type===e)return i}return null}(t,i.queue),null===r)return;n=i.queue[r]}return i.queue.splice(r,1),i.queuePending[t]=n,n.action(t,i),n.doneFn?void 0:(i.queuePending[t]=null,void e(t,i))}}else i.updating()||"closed"===i.mediaSource.readyState||(i.queue.shift(),n.action(i),n.doneFn&&n.doneFn(),e("audio",i),e("video",i))}},Wr=function(e,t){var i=t[e+"Buffer"],r=Vr(e);i&&(i.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),i.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},zr=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},Xr=function(e,t,i){return function(r,n){var a=n[r+"Buffer"];if(zr(n.mediaSource,a)){n.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{a.appendBuffer(e)}catch(e){n.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),n.queuePending[r]=null,i(e)}}}},Yr=function(e,t){return function(i,r){var n=r[i+"Buffer"];if(zr(r.mediaSource,n)){r.logger_("Removing "+e+" to "+t+" from "+i+"Buffer");try{n.remove(e,t)}catch(n){r.logger_("Remove "+e+" to "+t+" from "+i+"Buffer failed")}}}},Qr=function(e){return function(t,i){var r=i[t+"Buffer"];zr(i.mediaSource,r)&&(i.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},$r=function(e){return function(t,i){e()}},Kr=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){p().log.warn("Failed to call media source endOfStream",e)}}}},Jr=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){p().log.warn("Failed to set media source duration",e)}}},Zr=function(){return function(e,t){if("open"===t.mediaSource.readyState){var i=t[e+"Buffer"];if(zr(t.mediaSource,i)){t.logger_("calling abort on "+e+"Buffer");try{i.abort()}catch(t){p().log.warn("Failed to abort on "+e+"Buffer",t)}}}}},en=function(e,t){return function(i){var r=Vr(e),n=N(t);i.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=i.mediaSource.addSourceBuffer(n);a.addEventListener("updateend",i["on"+r+"UpdateEnd_"]),a.addEventListener("error",i["on"+r+"Error_"]),i.codecs[e]=t,i[e+"Buffer"]=a}},tn=function(e){return function(t){var i=t[e+"Buffer"];if(Wr(e,t),zr(t.mediaSource,i)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(i)}catch(t){p().log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},rn=function(e){return function(t,i){var r=i[t+"Buffer"],n=N(e);if(zr(i.mediaSource,r)&&i.codecs[t]!==e){i.logger_("changing "+t+"Buffer codec from "+i.codecs[t]+" to "+e);try{r.changeType(n),i.codecs[t]=e}catch(e){p().log.warn("Failed to changeType on "+t+"Buffer",e)}}}},nn=function(e){var t=e.type,i=e.sourceUpdater,r=e.action,n=e.doneFn,a=e.name;i.queue.push({type:t,action:r,doneFn:n,name:a}),jr(t,i)},an=function(e,t){return function(i){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}jr(e,t)}},sn=function(t){function r(i){var r;return(r=t.call(this)||this).mediaSource=i,r.sourceopenListener_=function(){return jr("mediaSource",e(r))},r.mediaSource.addEventListener("sourceopen",r.sourceopenListener_),r.logger_=Lt("SourceUpdater"),r.audioTimestampOffset_=0,r.videoTimestampOffset_=0,r.queue=[],r.queuePending={audio:null,video:null},r.delayedAudioAppendQueue_=[],r.videoAppendQueued_=!1,r.codecs={},r.onVideoUpdateEnd_=an("video",e(r)),r.onAudioUpdateEnd_=an("audio",e(r)),r.onVideoError_=function(e){r.videoError_=e},r.onAudioError_=function(e){r.audioError_=e},r.createdSourceBuffers_=!1,r.initializedEme_=!1,r.triggeredReady_=!1,r}i(r,t);var n=r.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
1,n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){nn({type:"mediaSource",sourceUpdater:this,action:en(e,t),name:"addSourceBuffer"})},n.abort=function(e){nn({type:e,sourceUpdater:this,action:Zr(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?nn({type:"mediaSource",sourceUpdater:this,action:tn(e),name:"removeSourceBuffer"}):p().log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!p().browser.IE_VERSION&&!p().browser.IS_FIREFOX&&u().MediaSource&&u().MediaSource.prototype&&"function"==typeof u().MediaSource.prototype.removeSourceBuffer},r.canChangeType=function(){return u().SourceBuffer&&u().SourceBuffer.prototype&&"function"==typeof u().SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?nn({type:e,sourceUpdater:this,action:rn(t),name:"changeType"}):p().log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(function(i){var r=e[i];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(i,r);t.canChangeType()&&t.changeType(i,r)})},n.appendBuffer=function(e,t){var i=this,r=e.segmentInfo,n=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===n&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(nn({type:n,sourceUpdater:this,action:Xr(a,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===n){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var s=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+s.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,s.forEach(function(e){i.appendBuffer.apply(i,e)})}},n.audioBuffered=function(){return zr(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:p().createTimeRange()},n.videoBuffered=function(){return zr(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:p().createTimeRange()},n.buffered=function(){var e=zr(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=zr(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var i=null,r=null,n=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return p().createTimeRange();for(var o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(o=t.length;o--;)a.push({time:t.start(o),type:"start"}),a.push({time:t.end(o),type:"end"});for(a.sort(function(e,t){return e.time-t.time}),o=0;o<a.length;o++)"start"===a[o].type?2===++n&&(i=a[o].time):"end"===a[o].type&&1===--n&&(r=a[o].time),null!==i&&null!==r&&(s.push([i,r]),i=null,r=null);return p().createTimeRanges(s)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=qr),nn({type:"mediaSource",sourceUpdater:this,action:Jr(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=qr),"string"!=typeof e&&(e=void 0),nn({type:"mediaSource",sourceUpdater:this,action:Kr(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,i){void 0===i&&(i=qr),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?nn({type:"audio",sourceUpdater:this,action:Yr(e,t),doneFn:i,name:"remove"}):i()},n.removeVideo=function(e,t,i){void 0===i&&(i=qr),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?nn({type:"video",sourceUpdater:this,action:Yr(e,t),doneFn:i,name:"remove"}):i()},n.updating=function(){return!(!Gr("audio",this)&&!Gr("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(nn({type:"audio",sourceUpdater:this,action:Qr(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(nn({type:"video",sourceUpdater:this,action:Qr(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&nn({type:"audio",sourceUpdater:this,action:$r(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&nn({type:"video",sourceUpdater:this,action:$r(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Hr.forEach(function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"](function(){return Wr(t,e)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},r}(p().EventTarget),on=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},un=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)})),dn=function(e){function t(){return e.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return i(t,e),t}(Et(Error)),ln=function(e){function t(t,i){var r;return void 0===i&&(i={}),(r=e.call(this,t,i)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.loadVttJs=t.loadVttJs,r.shouldSaveSegmentTimingInfo_=!1,r}i(t,e);var r=t.prototype;return r.createTransmuxer_=function(){return null},r.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return p().createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return p().createTimeRanges([[t,i]])},r.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var i=Ai(e),r=this.initSegments_[i];if(t&&!r&&e.bytes){var n=un.byteLength+e.bytes.byteLength,a=new Uint8Array(n);a.set(e.bytes),a.set(un,e.bytes.byteLength),this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e},r.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},r.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},r.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},r.remove=function(e,t){Or(e,t,this.subtitlesTrack_)},r.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},r.timestampOffsetForSegment_=function(){return null},r.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},r.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},r.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},r.segmentRequestFinished_=function(e,t,i){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===nr&&this.handleTimeout_(),e.code===ar?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var a=n.segment;if(a.map&&(a.map.bytes=t.map.bytes),n.bytes=t.bytes,"function"!=typeof u().WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then(function(){return r.segmentRequestFinished_(e,t,i)},function(){return r.stopForError({message:"Error loading vtt.js"})});a.requested=!0;try{this.parseVTTCues_(n)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,n.cues.forEac
1h(function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new(u().VTTCue)(e.startTime,e.endTime,e.text):e)}),function(e){var t=e.cues;if(t)for(var i=0;i<t.length;i++){for(var r=[],n=0,a=0;a<t.length;a++)t[i].startTime===t[a].startTime&&t[i].endTime===t[a].endTime&&t[i].text===t[a].text&&++n>1&&r.push(t[a]);r.length&&r.forEach(function(t){return e.removeCue(t)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},r.handleData_=function(){},r.updateTimingInfoEnd_=function(){},r.parseVTTCues_=function(e){var t,i=!1;if("function"!=typeof u().WebVTT)throw new dn;"function"==typeof u().TextDecoder?t=new(u().TextDecoder)("utf8"):(t=u().WebVTT.StringDecoder(),i=!0);var r=new(u().WebVTT.Parser)(u(),u().vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){p().log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var n=e.segment.map.bytes;i&&(n=on(n)),r.parse(n)}var a=e.bytes;i&&(a=on(a)),r.parse(a),r.flush()},r.updateTimeMapping_=function(e,t,i){var r=e.segment;if(t)if(e.cues.length){var n=e.timestampmap,a=n.MPEGTS/Tt.ONE_SECOND_IN_TS-n.LOCAL+t.mapping;if(e.cues.forEach(function(e){e.startTime+=a,e.endTime+=a}),!i.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(s,o-r.duration)}}}else r.empty=!0},t}(Br),cn=function(e,t){for(var i=e.cues,r=0;r<i.length;r++){var n=i[r];if(t>=n.adStartTime&&t<=n.adEndTime)return n}return null},hn=[{name:"VOD",run:function(e,t,i,r,n){if(i!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,i,r,n){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,s=null,o=qt(t);n=n||0;for(var u=0;u<o.length;u++){var d=o[t.endList||0===n?u:o.length-(u+1)],l=d.segment,c=e.timelineToDatetimeMappings[l.timeline];if(c&&l.dateTimeObject){var h=l.dateTimeObject.getTime()/1e3+c;if(l.parts&&"number"==typeof d.partIndex)for(var f=0;f<d.partIndex;f++)h+=l.parts[f].duration;var p=Math.abs(n-h);if(null!==s&&(0===p||s<p))break;s=p,a={time:h,segmentIndex:d.segmentIndex,partIndex:d.partIndex}}}return a}},{name:"Segment",run:function(e,t,i,r,n){var a=null,s=null;n=n||0;for(var o=qt(t),u=0;u<o.length;u++){var d=o[t.endList||0===n?u:o.length-(u+1)],l=d.segment,c=d.part&&d.part.start||l&&l.start;if(l.timeline===r&&void 0!==c){var h=Math.abs(n-c);if(null!==s&&s<h)break;(!a||null===s||s>=h)&&(s=h,a={time:c,segmentIndex:d.segmentIndex,partIndex:d.partIndex})}}return a}},{name:"Discontinuity",run:function(e,t,i,r,n){var a=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],d=t.discontinuitySequence+o+1,l=e.discontinuities[d];if(l){var c=Math.abs(n-l.time);if(null!==s&&s<c)break;(!a||null===s||s>=c)&&(s=c,a={time:l.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(e,t,i,r,n){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],fn=function(e){function t(t){var i;return(i=e.call(this)||this).timelines=[],i.discontinuities=[],i.timelineToDatetimeMappings={},i.logger_=Lt("SyncController"),i}i(t,e);var r=t.prototype;return r.getSyncPoint=function(e,t,i,r){var n=this.runStrategies_(e,t,i,r);return n.length?this.selectSyncPoint_(n,{key:"time",value:r}):null},r.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var r=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+Wt({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))},r.runStrategies_=function(e,t,i,r){for(var n=[],a=0;a<hn.length;a++){var s=hn[a],o=s.run(this,e,t,i,r);o&&(o.strategy=s.name,n.push({strategy:s.name,syncPoint:o}))}return n},r.selectSyncPoint_=function(e,t){for(var i=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<r&&(r=s,i=e[a].syncPoint,n=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+n+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+("number"==typeof i.partIndex?",partIndex:"+i.partIndex:"")+"]"),i},r.saveExpiredSegmentInfo=function(e,t){var i=t.mediaSequence-e.mediaSequence;if(i>86400)p().log.warn("Not saving expired segment info. Media sequence gap "+i+" is too large.");else for(var r=i-1;r>=0;r--){var n=e.segments[r];if(n&&void 0!==n.start){t.syncInfo={mediaSequence:e.mediaSequence+r,time:n.start}
1,this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},r.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}},r.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,i=e.shouldSaveTimelineMapping,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,i),n=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:n.start}));var a=n.dateTimeObject;n.discontinuity&&i&&a&&(this.timelineToDatetimeMappings[n.timeline]=-a.getTime()/1e3)},r.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},r.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},r.calculateSegmentTimeMapping_=function(e,t,i){var r,n,a=e.segment,s=e.part,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+o.time+"] [mapping: "+o.mapping+"]")),r=e.startOfSegment,n=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,n=t.end+o.mapping}return s&&(s.start=r,s.end=n),(!a.start||r<a.start)&&(a.start=r),a.end=n,!0},r.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var n=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,s=n-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u=void 0;u=s<0?i.start-Wt({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:n}):i.end+Wt({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:n}),this.discontinuities[a]={time:u,accuracy:o}}}},r.dispose=function(){this.trigger("dispose"),this.off()},t}(p().EventTarget),pn=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}i(t,e);var r=t.prototype;return r.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},r.pendingTimelineChange=function(e){var t=e.type,i=e.from,r=e.to;return"number"==typeof i&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:i,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},r.lastTimelineChange=function(e){var t=e.type,i=e.from,r=e.to;return"number"==typeof i&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:i,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},r.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(p().EventTarget),mn=Wi(zi(function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function t(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var i=t(function(e){function t(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0}),n=t(function(e){function t(i,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(i,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),a=t(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0}),s=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);
1else for(var n=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,n)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",function(t){e.push(t)})},e}();var o,u=null,d=function(){function e(e){var t,i,r;u||(u=function(){var e,t,i,r,n,a,s,o,u=[[[],[],[],[],[]],[[],[],[],[],[]]],d=u[0],l=u[1],c=d[4],h=l[4],f=[],p=[];for(e=0;e<256;e++)p[(f[e]=e<<1^283*(e>>7))^e]=e;for(t=i=0;!c[t];t^=r||1,i=p[i]||1)for(a=(a=i^i<<1^i<<2^i<<3^i<<4)>>8^255&a^99,c[t]=a,h[a]=t,o=16843009*f[n=f[r=f[t]]]^65537*n^257*r^16843008*t,s=257*f[a]^16843008*a,e=0;e<4;e++)d[e][t]=s=s<<24^s>>>8,l[e][a]=o=o<<24^o>>>8;for(e=0;e<5;e++)d[e]=d[e].slice(0),l[e]=l[e].slice(0);return u}()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var n=this._tables[0][4],a=this._tables[1],s=e.length,o=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var d=e.slice(0),l=[];for(this._key=[d,l],t=s;t<4*s+28;t++)r=d[t-1],(t%s===0||8===s&&t%s===4)&&(r=n[r>>>24]<<24^n[r>>16&255]<<16^n[r>>8&255]<<8^n[255&r],t%s===0&&(r=r<<8^r>>>24^o<<24,o=o<<1^283*(o>>7))),d[t]=d[t-s]^r;for(i=0;t;i++,t--)r=d[3&i?t:t-4],l[i]=t<=4||i<4?r:a[0][n[r>>>24]]^a[1][n[r>>16&255]]^a[2][n[r>>8&255]]^a[3][n[255&r]]}return e.prototype.decrypt=function(e,t,i,r,n,a){var s,o,u,d,l=this._key[1],c=e^l[0],h=r^l[1],f=i^l[2],p=t^l[3],m=l.length/4-2,g=4,y=this._tables[1],v=y[0],b=y[1],_=y[2],T=y[3],S=y[4];for(d=0;d<m;d++)s=v[c>>>24]^b[h>>16&255]^_[f>>8&255]^T[255&p]^l[g],o=v[h>>>24]^b[f>>16&255]^_[p>>8&255]^T[255&c]^l[g+1],u=v[f>>>24]^b[p>>16&255]^_[c>>8&255]^T[255&h]^l[g+2],p=v[p>>>24]^b[c>>16&255]^_[h>>8&255]^T[255&f]^l[g+3],g+=4,c=s,h=o,f=u;for(d=0;d<4;d++)n[(3&-d)+a]=S[c>>>24]<<24^S[h>>16&255]<<16^S[f>>8&255]<<8^S[255&p]^l[g++],s=c,c=h,h=f,f=p,p=s},e}(),l=function(e){function t(){var t;return(t=e.call(this,s)||this).jobs=[],t.delay=1,t.timeout_=null,t}a(t,e);var i=t.prototype;return i.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(s),c=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},h=function(){function e(t,i,r,n){var a=e.STEP,s=new Int32Array(t.buffer),o=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),i,r,o)),u=a;u<s.length;u+=a)r=new Uint32Array([c(s[u-4]),c(s[u-3]),c(s[u-2]),c(s[u-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),i,r,o));this.asyncStream_.push(function(){var e;n(null,(e=o).subarray(0,e.byteLength-e[e.byteLength-1]))})}return e.prototype.decryptChunk_=function(e,t,i,r){return function(){var n=function(e,t,i){var r,n,a,s,o,u,l,h,f,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new d(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),y=new Int32Array(g.buffer);for(r=i[0],n=i[1],a=i[2],s=i[3],f=0;f<p.length;f+=4)o=c(p[f]),u=c(p[f+1]),l=c(p[f+2]),h=c(p[f+3]),m.decrypt(o,u,l,h,y,f),y[f]=c(y[f]^r),y[f+1]=c(y[f+1]^n),y[f+2]=c(y[f+2]^a),y[f+3]=c(y[f+3]^s),r=o,n=u,a=l,s=h;return g}(e,t,i);r.set(n,e.byteOffset)}},i(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();o="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var f=o.BigInt||Number;f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000"),function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}();var p=function(e){var t={};return Object.keys(e).forEach(function(i){var r,n=e[i];r=n,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n}),t};self.onmessage=function(e){var t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new 
1Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),n=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new h(i,r,n,function(e,i){self.postMessage(p({source:t.source,decrypted:i}),[i.buffer])})}})),gn=ji(mn),yn=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},vn=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},bn=function(e,t){t.activePlaylistLoader=e,e.load()},_n={AUDIO:function(e,t){return function(){var i=t.segmentLoaders[e],r=t.mediaTypes[e],n=t.blacklistCurrentPlaylist;vn(i,r);var a=r.activeTrack(),s=r.activeGroup(),o=(s.filter(function(e){return e.default})[0]||s[0]).id,u=r.tracks[o];if(a!==u){for(var d in p().log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[d].enabled=r.tracks[d]===u;r.onTrackChanged()}else n({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var i=t.segmentLoaders[e],r=t.mediaTypes[e];p().log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),vn(i,r);var n=r.activeTrack();n&&(n.mode="disabled"),r.onTrackChanged()}}},Tn={AUDIO:function(e,t,i){if(t){var r=i.tech,n=i.requestOptions,a=i.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,n),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),n),r.paused()||a.load()}),t.on("error",_n[e](e,i))}},SUBTITLES:function(e,t,i){var r=i.tech,n=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,n),a.track(s.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),n),r.paused()||a.load()}),t.on("error",_n[e](e,i))}},Sn={AUDIO:function(e,t){var i=t.vhs,r=t.sourceType,n=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,o=t.mediaTypes[e],u=o.groups,d=o.tracks,l=o.logger_,c=t.masterPlaylistLoader,h=ei(c.master);for(var f in s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}},h&&(s[e].main.default.playlists=c.master.playlists)),s[e])for(var m in u[f]||(u[f]=[]),s[e][f]){var g=s[e][f][m],y=void 0;if(h?(l("AUDIO group '"+f+"' label '"+m+"' is a master playlist"),g.isMasterPlaylist=!0,y=null):y="vhs-json"===r&&g.playlists?new gi(g.playlists[0],i,a):g.resolvedUri?new gi(g.resolvedUri,i,a):g.playlists&&"dash"===r?new Vi(g.playlists[0],i,a,c):null,g=p().mergeOptions({id:m,playlistLoader:y},g),Tn[e](e,g.playlistLoader,t),u[f].push(g),void 0===d[m]){var v=new(p().AudioTrack)({id:m,kind:yn(g),enabled:!1,language:g.language,default:g.default,label:m});d[m]=v}}n.on("error",_n[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,r=t.vhs,n=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],d=u.groups,l=u.tracks,c=t.masterPlaylistLoader;for(var h in o[e])for(var f in d[h]||(d[h]=[]),o[e][h])if(!o[e][h][f].forced){var m=o[e][h][f],g=void 0;if("hls"===n)g=new gi(m.resolvedUri,r,s);else if("dash"===n){if(!m.playlists.filter(function(e){return e.excludeUntil!==1/0}).length)return;g=new Vi(m.playlists[0],r,s,c)}else"vhs-json"===n&&(g=new gi(m.playlists?m.playlists[0]:m.resolvedUri,r,s));if(m=p().mergeOptions({id:f,playlistLoader:g},m),Tn[e](e,m.playlistLoader,t),d[h].push(m),void 0===l[f]){var y=i.addRemoteTextTrack({id:f,kind:"subtitles",default:m.default&&m.autoselect,language:m.language,label:f},!1).track;l[f]=y}}a.on("error",_n[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,r=t.master.mediaGroups,n=t.mediaTypes[e],a=n.groups,s=n.tracks;for(var o in r[e])for(var u in a[o]||(a[o]=[]),r[e][o]){var d=r[e][o][u];if(/^(?:CC|SERVICE)/.test(d.instreamId)){var l=i.options_.vhs&&i.options_.vhs.captionServices||{},c={label:u,language:d.language,instreamId:d.instreamId,default:d.default&&d.autoselect};if(l[c.instreamId]&&(c=p().mergeOptions(c,l[c.instreamId])),void 0===c.default&&delete c.default,a[o].push(p().mergeOptions({id:u},d)),void 0===s[u]){var h=i.addRemoteTextTrack({id:c.instreamId,
1kind:"captions",default:c.default,language:c.language,label:c.label},!1).track;s[u]=h}}}}},wn=function e(t,i){for(var r=0;r<t.length;r++){if(Jt(i,t[r]))return!0;if(t[r].playlists&&e(t[r].playlists,i))return!0}return!1},En={AUDIO:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var r in i)if(i[r].enabled)return i[r];return null}},SUBTITLES:function(e,t){return function(){var i=t.mediaTypes[e].tracks;for(var r in i)if("showing"===i[r].mode||"hidden"===i[r].mode)return i[r];return null}}},In=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){Sn[t](t,e)});var t=e.mediaTypes,i=e.masterPlaylistLoader,r=e.tech,n=e.vhs,a=e.segmentLoaders,s=a.AUDIO,o=a.main;["AUDIO","SUBTITLES"].forEach(function(i){t[i].activeGroup=function(e,t){return function(i){var r=t.masterPlaylistLoader,n=t.mediaTypes[e].groups,a=r.media();if(!a)return null;var s=null;a.attributes[e]&&(s=n[a.attributes[e]]);var o=Object.keys(n);if(!s)if("AUDIO"===e&&o.length>1&&ei(t.master))for(var u=0;u<o.length;u++){var d=n[o[u]];if(wn(d,a)){s=d;break}}else n.main?s=n.main:1===o.length&&(s=n[o[0]]);return void 0===i?s:null!==i&&s&&s.filter(function(e){return e.id===i.id})[0]||null}}(i,e),t[i].activeTrack=En[i](i,e),t[i].onGroupChanged=function(e,t){return function(){var i=t.segmentLoaders,r=i[e],n=i.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.getActiveGroup(),u=a.activePlaylistLoader,d=a.lastGroup_;o&&d&&o.id===d.id||(a.lastGroup_=o,a.lastTrack_=s,vn(r,a),o&&!o.isMasterPlaylist&&(o.playlistLoader?(r.resyncLoader(),bn(o.playlistLoader,a)):u&&n.resetEverything()))}}(i,e),t[i].onGroupChanging=function(e,t){return function(){var i=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,i.abort(),i.pause()}}(i,e),t[i].onTrackChanged=function(e,t){return function(){var i=t.masterPlaylistLoader,r=t.segmentLoaders,n=r[e],a=r.main,s=t.mediaTypes[e],o=s.activeTrack(),u=s.getActiveGroup(),d=s.activePlaylistLoader,l=s.lastTrack_;if((!l||!o||l.id!==o.id)&&(s.lastGroup_=u,s.lastTrack_=o,vn(n,s),u)){if(u.isMasterPlaylist){if(!o||!l||o.id===l.id)return;var c=t.vhs.masterPlaylistController_,h=c.selectPlaylist();if(c.media()===h)return;return s.logger_("track change. Switching master audio from "+l.id+" to "+o.id),i.pause(),a.resetEverything(),void c.fastQualityChange_(h)}if("AUDIO"===e){if(!u.playlistLoader)return a.setAudio(!0),void a.resetEverything();n.setAudio(!0),a.setAudio(!1)}d!==u.playlistLoader?(n.track&&n.track(o),n.resetEverything(),bn(u.playlistLoader,s)):bn(u.playlistLoader,s)}}}(i,e),t[i].getActiveGroup=function(e,t){var i=t.mediaTypes;return function(){var t=i[e].activeTrack();return t?i[e].activeGroup(t):null}}(i,e)});var u=t.AUDIO.activeGroup();if(u){var d=(u.filter(function(e){return e.default})[0]||u[0]).id;t.AUDIO.tracks[d].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),s.setAudio(!0)):o.setAudio(!0)}i.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return t[e].onGroupChanged()})}),i.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(e){return t[e].onGroupChanging()})});var l=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var c in r.audioTracks().addEventListener("change",l),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),n.on("dispose",function(){r.audioTracks().removeEventListener("change",l),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[c])},An=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Ln=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},xn=function(t){function r(i){var r;r=t.call(this)||this;var n=i.src,a=i.handleManifestRedirects,s=i.withCredentials,o=i.tech,d=i.bandwidth,l=i.externVhs,c=i.useCueTags,h=i.blackl
1istDuration,f=i.enableLowInitialPlaylist,m=i.sourceType,g=i.cacheEncryptionKeys,y=i.experimentalBufferBasedABR,v=i.experimentalLeastPixelDiffSelector,b=i.captionServices;if(!n)throw new Error("A non-empty playlist URL or JSON manifest string is required");var _=i.maxPlaylistRetries;null==_&&(_=1/0),Fr=l,r.experimentalBufferBasedABR=Boolean(y),r.experimentalLeastPixelDiffSelector=Boolean(v),r.withCredentials=s,r.tech_=o,r.vhs_=o.vhs,r.sourceType_=m,r.useCueTags_=c,r.blacklistDuration=h,r.maxPlaylistRetries=_,r.enableLowInitialPlaylist=f,r.useCueTags_&&(r.cueTagsTrack_=r.tech_.addTextTrack("metadata","ad-cues"),r.cueTagsTrack_.inBandMetadataTrackDispatchType=""),r.requestOptions_={withCredentials:s,handleManifestRedirects:a,maxPlaylistRetries:_,timeout:null},r.on("error",r.pauseLoading),r.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:qr,activeTrack:qr,getActiveGroup:qr,onGroupChanged:qr,onTrackChanged:qr,lastTrack_:null,logger_:Lt("MediaGroups["+t+"]")}}),e}(),r.mediaSource=new(u().MediaSource),r.handleDurationChange_=r.handleDurationChange_.bind(e(r)),r.handleSourceOpen_=r.handleSourceOpen_.bind(e(r)),r.handleSourceEnded_=r.handleSourceEnded_.bind(e(r)),r.mediaSource.addEventListener("durationchange",r.handleDurationChange_),r.mediaSource.addEventListener("sourceopen",r.handleSourceOpen_),r.mediaSource.addEventListener("sourceended",r.handleSourceEnded_),r.seekable_=p().createTimeRanges(),r.hasPlayed_=!1,r.syncController_=new fn(i),r.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,r.decrypter_=new gn,r.sourceUpdater_=new sn(r.mediaSource),r.inbandTextTracks_={},r.timelineChangeController_=new pn;var T={vhs:r.vhs_,parse708captions:i.parse708captions,useDtsForTimestampOffset:i.useDtsForTimestampOffset,captionServices:b,mediaSource:r.mediaSource,currentTime:r.tech_.currentTime.bind(r.tech_),seekable:function(){return r.seekable()},seeking:function(){return r.tech_.seeking()},duration:function(){return r.duration()},hasPlayed:function(){return r.hasPlayed_},goalBufferLength:function(){return r.goalBufferLength()},bandwidth:d,syncController:r.syncController_,decrypter:r.decrypter_,sourceType:r.sourceType_,inbandTextTracks:r.inbandTextTracks_,cacheEncryptionKeys:g,sourceUpdater:r.sourceUpdater_,timelineChangeController:r.timelineChangeController_,experimentalExactManifestTimings:i.experimentalExactManifestTimings};r.masterPlaylistLoader_="dash"===r.sourceType_?new Vi(n,r.vhs_,r.requestOptions_):new gi(n,r.vhs_,r.requestOptions_),r.setupMasterPlaylistLoaderListeners_(),r.mainSegmentLoader_=new Br(p().mergeOptions(T,{segmentMetadataTrack:r.segmentMetadataTrack_,loaderType:"main"}),i),r.audioSegmentLoader_=new Br(p().mergeOptions(T,{loaderType:"audio"}),i),r.subtitleSegmentLoader_=new ln(p().mergeOptions(T,{loaderType:"vtt",featuresNativeTextTracks:r.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(e,t){function i(){o.off("vttjserror",r),e()}function r(){o.off("vttjsloaded",i),t()}o.one("vttjsloaded",i),o.one("vttjserror",r),o.addWebVttScript_()})}}),i),r.setupSegmentLoaderListeners_(),r.experimentalBufferBasedABR&&(r.masterPlaylistLoader_.one("loadedplaylist",function(){return r.startABRTimer_()}),r.tech_.on("pause",function(){return r.stopABRTimer_()}),r.tech_.on("play",function(){return r.startABRTimer_()})),An.forEach(function(t){r[t+"_"]=Ln.bind(e(r),t)}),r.logger_=Lt("MPC"),r.triggeredFmp4Usage=!1,"none"===r.tech_.preload()?(r.loadOnPlay_=function(){r.loadOnPlay_=null,r.masterPlaylistLoader_.load()},r.tech_.one("play",r.loadOnPlay_)):r.masterPlaylistLoader_.load(),r.timeToLoadedData__=-1,r.mainAppendsToLoadedData__=-1,r.audioAppendsToLoadedData__=-1;var S="none"===r.tech_.preload()?"play":"loadstart";return r.tech_.one(S,function(){var e=Date.now();r.tech_.one("loadeddata",function(){r.timeToLoadedData__=Date.now()-e,r.mainAppendsToLoadedData__=r.mainSegmentLoader_.mediaAppends,r.audioAppendsToLoadedData__=r.audioSegmentLoader_.mediaAppends})}),r}i(r,t);var n=r.prototype;return n.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},n.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},n.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},n.timeToLoadedData_=function(){return this.timeToLoadedData__},n.checkABR_=function(e){void 0===e&&(e="abr");var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)},n.switchMedia_=function(e,t,i){var r=this.media(),n=r&&(r.id||r.uri),a=e.id||e.uri;n&&n!==a&&(this.logger_("switch media "+n+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,i)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=u().setInterval(function(){return e.checkABR_()},250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(u().clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var i,r=e.mediaGroups.AUDIO,n=Object.keys(r);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)i=this.mediaTypes_.AUDIO.activeTrack();else{var a=r.main||n.length&&r[n[0]];for(var s in a)if(a[s].default){i={label:s};break}}if(!i)return t;var o=[];for(var u in r)if(r[u][i.label]){var d=r[u][i.label];if(d.playlists&&d.playlists.length)o.push.apply(o,d.playlists);else if(d.uri)o.push(d);else if(e.playlists.length)for(var l=0;l<e.playlists.length;l++){var c=e.playlists[l];c.attributes&&c.attributes.AUDIO&&c.attributes.AUDIO===u&&o.push(c)}}return o.length?o:t},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=e.masterPlaylistLoader_.media(),i=1.5*t.targetDuration*1e3;Kt(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),In({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){e.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var i;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(i=e.selectInitialPlaylist()),i||(i=e.selectPlaylist()),!i||!e.shouldSwitchToMedia_(i))return;if(e.initialMedia_=i,e.switchMedia_(e.initialMedia_,"initial"),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)}
1),this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var t=e.masterPlaylistLoader_.media(),i=1.5*t.targetDuration*1e3;Kt(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=i,e.masterPlaylistLoader_.load(),e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&(e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck")))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var i=e.mediaGroups||{},r=!0,n=Object.keys(i.AUDIO);for(var a in i.AUDIO)for(var s in i.AUDIO[a]){i.AUDIO[a][s].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(i.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Fr.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),n.length&&Object.keys(i.AUDIO[n[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,i=this.tech_.currentTime(),r=this.bufferLowWaterLine(),n=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,i=e.buffered,r=e.currentTime,n=e.nextPlaylist,a=e.bufferLowWaterLine,s=e.bufferHighWaterLine,o=e.duration,u=e.experimentalBufferBasedABR,d=e.log;if(!n)return p().log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t)return d(l+" as current playlist is not set"),!0;if(n.id===t.id)return!1;var c=Boolean(kt(i,r).length);if(!t.endList)return c||"number"!=typeof t.partTargetDuration?(d(l+" as current playlist is live"),!0):(d("not "+l+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=Nt(i,r),f=u?Hi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Hi.MAX_BUFFER_LOW_WATER_LINE;if(o<f)return d(l+" as duration < max low water line ("+o+" < "+f+")"),!0;var m=n.attributes.BANDWIDTH,g=t.attributes.BANDWIDTH;if(m<g&&(!u||h<s)){var y=l+" as next bandwidth < current bandwidth ("+m+" < "+g+")";return u&&(y+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+s+")"),d(y),!0}if((!u||m>g)&&h>=a){var v=l+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+a+")";return u&&(v+=" and next bandwidth > current bandwidth ("+m+" > "+g+")"),d(v),!0}return d("not "+l+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:n,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){p().browser.IE_VERSION||p().browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var i=this.seekable();if(!i.length)return!1;if(p().browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.tech_.setCurrentTime(i.end(0)),e.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,function(e){})}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")}
1,n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var i=Fr.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-r<=Dt;var a=n.end(n.length-1);return a-r<=Dt&&i-a<=Dt},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var i=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!i)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));i.playlistErrors_++;var r,n=this.masterPlaylistLoader_.master.playlists,a=n.filter(Qt),s=1===a.length&&a[0]===i;if(1===n.length&&t!==1/0)return p().log.warn("Problem encountered with playlist "+i.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(s);if(s){var o=!1;n.forEach(function(e){if(e!==i){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(o=!0,delete e.excludeUntil)}}),o&&(p().log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}r=i.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,i.excludeUntil=r,e.reason&&(i.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var u=this.selectPlaylist();if(!u)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var d=e.internal?this.logger_:p().log.warn,l=e.message?" "+e.message:"";d((e.internal?"Internal problem":"Problem")+" encountered with playlist "+i.id+"."+l+" Switching to playlist "+u.id+"."),u.attributes.AUDIO!==i.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==i.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=u.targetDuration/2*1e3||5e3,h="number"==typeof u.lastRequest&&Date.now()-u.lastRequest<=c;return this.switchMedia_(u,"exclude",s||h)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var i=this,r=[],n="all"===e;(n||"main"===e)&&r.push(this.masterPlaylistLoader_);var a=[];(n||"audio"===e)&&a.push("AUDIO"),(n||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(function(e){var t=i.mediaTypes_[e]&&i.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)}),["main","audio","subtitle"].forEach(function(t){var n=i[t+"SegmentLoader_"];!n||e!==t&&"all"!==e||r.push(n)}),r.forEach(function(e){return t.forEach(function(t){"function"==typeof e[t]&&e[t]()})})},n.setCurrentTime=function(e){var t=kt(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Fr.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var i=this.syncController_.getExpiredTime(t,this.duration());if(null!==i){var r=this.masterPlaylistLoader_.master,n=Fr.Playlist.seekable(t,i,Fr.Playlist.liveEdgeDelay(r,t));if(0!==n.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=Fr.Playlist.seekable(t,i,Fr.Playlist.liveEdgeDelay(r,t))).length)return}var a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>n.end(0)||n.start(0)>e.end(0)?this.seekable_=n:this.seekable_=p().createTimeRanges([[e.start(0)>n.start(0)?e.start(0):n.start(0),e.end(0)<n.end(0)?e.end(0):n.end(0)]]):this.seekable_=n,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_("seekable updated ["+Ct(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var i=this.tech_.buffered(),r=Fr.Playlist.duration(this.masterPlaylistLoader_.media());i.length>
10&&(r=Math.max(r,i.end(i.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(t){var i=e.mediaTypes_[t].groups;for(var r in i)i[r].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var r=Tr(this.master(),i),n={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(n.video=r.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(n.video+=","+(r.audio||t.main.audioCodec||q)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||a)&&(n.audio=r.audio||t.main.audioCodec||t.audio.audioCodec||q,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),n.audio||n.video){var s,o={};if(["video","audio"].forEach(function(e){if(n.hasOwnProperty(e)&&(r=t[e].isFmp4,a=n[e],!(r?M(a):B(a)))){var i=t[e].isFmp4?"browser":"muxer";o[i]=o[i]||[],o[i].push(n[e]),"audio"===e&&(s=i)}var r,a}),a&&s&&i.attributes.AUDIO){var u=i.attributes.AUDIO;
1this.master().playlists.forEach(function(e){(e.attributes&&e.attributes.AUDIO)===u&&e!==i&&(e.excludeUntil=1/0)}),this.logger_("excluding audio group "+u+" as "+s+' does not support codec(s): "'+n.audio+'"')}if(!Object.keys(o).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var d=[];if(["video","audio"].forEach(function(t){var i=(U(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,r=(U(n[t]||"")[0]||{}).type;i&&r&&i.toLowerCase()!==r.toLowerCase()&&d.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+n[t]+'"')}),d.length)return void this.blacklistCurrentPlaylist({playlist:i,message:"Codec switching not supported: "+d.join(", ")+".",blacklistDuration:1/0,internal:!0})}return n}var l=Object.keys(o).reduce(function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+o[t].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:i,internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:i,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,i=[];Object.keys(t).forEach(function(r){var n=t[r];if(-1===i.indexOf(n.id)){i.push(n.id);var a=Tr(e.master,n),s=[];!a.audio||B(a.audio)||M(a.audio)||s.push("audio codec "+a.audio),!a.video||B(a.video)||M(a.video)||s.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&s.push("text codec "+a.text),s.length&&(n.excludeUntil=1/0,e.logger_("excluding "+n.id+" for unsupported: "+s.join(", ")))}})},n.excludeIncompatibleVariants_=function(e){var t=this,i=[],r=this.master().playlists,n=br(U(e)),a=_r(n),s=n.video&&U(n.video)[0]||null,o=n.audio&&U(n.audio)[0]||null;Object.keys(r).forEach(function(e){var n=r[e];if(-1===i.indexOf(n.id)&&n.excludeUntil!==1/0){i.push(n.id);var u=[],d=Tr(t.masterPlaylistLoader_.master,n),l=_r(d);if(d.audio||d.video){if(l!==a&&u.push('codec count "'+l+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var c=d.video&&U(d.video)[0]||null,h=d.audio&&U(d.audio)[0]||null;c&&s&&c.type.toLowerCase()!==s.type.toLowerCase()&&u.push('video codec "'+c.type+'" !== "'+s.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&u.push('audio codec "'+h.type+'" !== "'+o.type+'"')}u.length&&(n.excludeUntil=1/0,t.logger_("blacklisting "+n.id+": "+u.join(" && ")))}}})},n.updateAdCues_=function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i){if(void 0===i&&(i=0),e.segments)for(var r,n=i,a=0;a<e.segments.length;a++){var s=e.segments[a];if(r||(r=cn(t,n+s.duration/2)),r){if("cueIn"in s){r.endTime=n,r.adEndTime=n,n+=s.duration,r=null;continue}if(n<r.endTime){n+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new(u().VTTCue)(n,n+s.duration,s.cueOut)).adStartTime=n,r.adEndTime=n+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var o=s.cueOutCont.split("/").map(parseFloat),d=o[0],l=o[1];(r=new(u().VTTCue)(n,n+s.duration,"")).adStartTime=n-d,r.adEndTime=r.adStartTime+l,t.addCue(r)}n+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Hi.GOAL_BUFFER_LENGTH,i=Hi.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Hi.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Hi.BUFFER_LOW_WATER_LINE,i=Hi.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Hi.MAX_BUFFER_LOW_WATER_LINE),n=Math.max(t,Hi.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.experimentalBufferBasedABR?n:r)},n.bufferHighWaterLine=function(){return Hi.BUFFER_HIGH_WATER_LINE},r}(p().EventTarget),Dn=function(e,t,i){var r,n,a,s=e.masterPlaylistController_,o=s[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(s);if(t.attributes){var u=t.attributes.RESOLUTION;this.width=u&&u.width,this.height=u&&u.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=Tr(s.master(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,n=t.id,a=o,function(e){var t=r.master.playlists[n],i=Yt(t),s=Qt(t);return void 0===e?s:(e?delete t.disabled:t.disabled=!0,e===s||i||(a(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},On=["seeking","seeked","pause","playing","error"],kn=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Lt("PlaybackWatcher"),this.logger_("initialize");var i=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},n=function(){return t.techWaiting_()},a=function(){return t.cancelTimer_()},s=this.masterPlaylistController_,o=["main","subtitle","audio"],d={};o.forEach(function(e){d[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",d[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",d[e].reset),t.tech_.on(["seeked","seeking"],d[e].reset)});var l=function(e){["main","audio"].forEach(function(i){s[i+"SegmentLoader_"][e]("appended",t.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){t.fixesBadSeeks_()&&(t.consecutiveUpdates=0,t.lastRecordedTime=t.tech_.currentTime(),l("off"))},this.clearSeekingAppendCheck_=function(){return l("off")},this.watchForBadSeeking_=function(){t.clearSeekingAppendCheck_(),l("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(On,a),this.tech_.on("canplay",r),this.tech_.one("play",i),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",n),t.tech_.off(On,a),t.tech_.off("canplay",r),t.tech_.off("play",i),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),o.forEach(function(e){s[e+"SegmentLoader_"].off("appendsdone",d[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",d[e].reset),t.tech_.off(["seeked","seeking"],d[e].reset)}),t.checkCurrentTimeTimeout_&&u().clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&u().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=u().setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,i=t[e+"SegmentLoader_"],r=i.buffered_(),n=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;
1if(e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,n?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:i.playlist_&&i.playlist_.id,buffered:Ut(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Dt>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),i=this.tech_.currentTime();this.afterSeekableWindow_(t,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,i)){var r=t.start(0);e=r+(r===t.end(0)?0:Dt)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+Ct(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var n=this.masterPlaylistController_.sourceUpdater_,a=this.tech_.buffered(),s=n.audioBuffer?n.audioBuffered():null,o=n.videoBuffer?n.videoBuffered():null,u=this.media(),d=u.partTargetDuration?u.partTargetDuration:2*(u.targetDuration-xt),l=[s,o],c=0;c<l.length;c++){if(l[c])if(Nt(l[c],i)<d)return!1}var h=Pt(a,i);return 0!==h.length&&(e=h.start(0)+Dt,this.logger_("Buffered region starts ("+h.start(0)+")  just beyond seek point ("+i+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=kt(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,n=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=Pt(n,t);if(a.length>0){var s=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+s+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*s,t),!0}return!1},t.afterSeekableWindow_=function(e,t,i,r){if(void 0===r&&(r=!1),!e.length)return!1;var n=e.end(e.length-1)+Dt;return!i.endList&&r&&(n=e.end(e.length-1)+3*i.targetDuration),t>n},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,i=e.audioBuffered,r=e.currentTime;if(t){var n;if(t.length&&i.length){var a=kt(t,r-3),s=kt(t,r),o=kt(i,r);o.length&&!s.length&&a.length&&(n={start:a.end(0),end:o.end(0)})}else{Pt(t,r).length||(n=this.gapFromVideoUnderflow_(t,r))}return!!n&&(this.logger_("Encountered a gap in video from "+n.start+" to "+n.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),r=Pt(t,i);this.cancelTimer_(),0!==r.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+xt),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}
1,t.gapFromVideoUnderflow_=function(e,t){for(var i=function(e){if(e.length<2)return p().createTimeRanges();for(var t=[],i=1;i<e.length;i++){var r=e.end(i-1),n=e.start(i);t.push([r,n])}return p().createTimeRanges(t)}(e),r=0;r<i.length;r++){var n=i.start(r),a=i.end(r);if(t-n<4&&t-n>2)return{start:n,end:a}}return null},e}(),Pn={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Cn=function e(t,i){var r=0,n=0,a=p().mergeOptions(Pn,i);t.ready(function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var s=function(){n&&t.currentTime(n)},o=function(e){null!=e&&(n=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(r=Date.now(),a.getSource.call(t,o)):void p().log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},d=function e(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",d),t.reloadSourceOnError=function(i){d(),e(t,i)}},Un="2.16.3",Rn={PlaylistLoader:gi,Playlist:ti,utils:Di,STANDARD_PLAYLIST_SELECTOR:xr,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(ti.isEnabled);return Ir(t,function(e,t){return Ar(e,t)}),t.filter(function(t){return!!Tr(e.playlists.master,t).video})[0]||null},lastBandwidthSelector:xr,movingAverageBandwidthSelector:function(e){var t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var r=this.useDevicePixelRatio&&u().devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Lr(this.playlists.master,t,parseInt(Er(this.tech_.el(),"width"),10)*r,parseInt(Er(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Ar,comparePlaylistResolution:function(e,t){var i,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||u().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),i===(r=r||u().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-r},xhr:_i()};Object.keys(Hi).forEach(function(e){Object.defineProperty(Rn,e,{get:function(){return p().log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Hi[e]},set:function(t){p().log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?p().log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Hi[e]=t}})});var Nn="videojs-vhs",Mn=function(e,t){for(var i=t.media(),r=-1,n=0;n<e.length;n++)if(e[n].id===i.id){r=n;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Rn.canPlaySource=function(){return p().log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Bn=function(e){var t=e.player,i=e.sourceKeySystems,r=e.audioMedia,n=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a=function(e,t){return e.reduce(function(e,i){if(!i.contentProtection)return e;var r=t.reduce(function(e,t){var r=i.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e},{});return Object.keys(r).length&&e.push(r),e},[])}(r?n.concat([r]):n,Object.keys(i)),s=[],o=[];return a.forEach(function(e){o.push(new Promise(function(e,i){t.tech_.one("keysessioncreated",e)})),s.push(new Promise(function(i,r){t.eme.initializeMediaKeys({keySystems:e},function(e){e?r(e):i()})}))}),Promise.race([Promise.all(s),Promise.race(o)])},qn=function(e){var t=e.player,i=function(e,t,i){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=br(U(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(r.audio=i.attributes.CODECS);var n=N(r.video),a=N(r.audio),s={};for(var o in e)s[o]={},a&&(s[o].audioContentType=a),n&&(s[o].videoContentType=n),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(s[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(s[o].url=e[o]);return p().mergeOptions(e,s)}(e.sourceKeySystems,e.media,e.audioMedia);return!!i&&(t.currentSource().keySystems=i,!(i&&!t.eme)||(p().log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Fn=function(){if(!u().localStorage)return null;var e=u().localStorage.getItem(Nn);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Rn.supportsNativeHls=function(){if(!s()||!s().createElement)return!1;var e=s().createElement("video");if(!p().getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),Rn.supportsNativeDash=!!(s()&&s().createElement&&p().getTech("Html5").isSupported())&&/maybe|probably/i.test(s().createElement("video").canPlayType("application/d
1ash+xml")),Rn.supportsTypeNatively=function(e){return"hls"===e?Rn.supportsNativeHls:"dash"===e&&Rn.supportsNativeDash},Rn.isSupported=function(){return p().log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Vn=function(t){function r(i,r,n){var a;if(a=t.call(this,r,p().mergeOptions(n.hls,n.vhs))||this,n.hls&&Object.keys(n.hls).length&&p().log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"==typeof n.initialBandwidth&&(a.options_.bandwidth=n.initialBandwidth),a.logger_=Lt("VhsHandler"),r.options_&&r.options_.playerId){var o=p()(r.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return p().log.warn("player.hls is deprecated. Use player.tech().vhs instead."),r.trigger({type:"usage",name:"hls-player-access"}),e(a)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return p().log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),r.trigger({type:"usage",name:"vhs-player-access"}),e(a)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return p().log.warn("player.dash is deprecated. Use player.tech().vhs instead."),e(a)},configurable:!0}),a.player_=o}if(a.tech_=r,a.source_=i,a.stats={},a.ignoreNextSeekingEvent_=!1,a.setOptions_(),a.options_.overrideNative&&r.overrideNativeAudioTracks&&r.overrideNativeVideoTracks)r.overrideNativeAudioTracks(!0),r.overrideNativeVideoTracks(!0);else if(a.options_.overrideNative&&(r.featuresNativeVideoTracks||r.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return a.on(s(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=s().fullscreenElement||s().webkitFullscreenElement||s().mozFullScreenElement||s().msFullscreenElement;t&&t.contains(a.tech_.el())?a.masterPlaylistController_.fastQualityChange_():a.masterPlaylistController_.checkABR_()}),a.on(a.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),a.on(a.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),a.on(a.tech_,"play",a.play),a}i(r,t);var n=r.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Fn();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Hi.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Hi.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var i=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=Rn,this.options_.sourceType=H(t),this.options_.seekTo=function(e){i.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&p().log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new xn(this.options_);var n=p().mergeOptions({liveRangeSafeTimeDelta:Dt},this.options_,{seekable:function(){return i.seekable()},media:function(){return i.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new kn(n),this.masterPlaylistController_.on("error",function(){var e=p().players[i.tech_.options_.playerId],t=i.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});var a=this.options_.experimentalBufferBasedABR?Rn.movingAverageBandwidthSelector(.55):Rn.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):a.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Rn.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var e=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,t=u().navigator.connection||u().navigator.mozConnection||u().navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){var r=1e3*t.downlink*1e3;e=r>=i&&e>=i?Math.max(e,r):r}return e},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){p().log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return i.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return i.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return i.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return i.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return i.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return i.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return i.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return i.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return i.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return i.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return i.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return Ut(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return i.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return i.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return i.tech_.name_},enumerable:!0},duration:{get:function(){return i.tech_.duration()},enumerable:!0},master:{get:function(){return i.playlists.master},enumerable:!0},playerDimensions:{get:function(){return i.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Ut(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){i.options_.useBandwidthFromLocalStorage&&function(e){if(!u().localStorage)return!1;var t=Fn();t=t?p().mergeOptions(t,e):e;try{u().localStorage.setItem(Nn,JSON.stringify(t))}catch(e){return!1}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var e;(e=i).representations=function(){var t=e.masterPlaylistController_.master(),i=ei(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter(function(e){return!Yt(e)}).map(function(t,i){return new Dn(e,t,t.id)}):[]}}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){i.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=u().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Bn({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media ke
1ys for EME",code:3})})},n.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=qn({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",function(t){if("output-restricted"===t.status){var i=e.masterPlaylistController_.master();if(i&&i.playlists){var r,n=[];if(i.playlists.forEach(function(e){e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,n.push(e))}),n.length)(r=p().log).warn.apply(r,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(n)),e.masterPlaylistController_.fastQualityChange_()}}}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==p().browser.IE_VERSION&&i?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=p().players[this.tech_.options_.playerId];
1t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var t,i;t=e.qualityLevels_,(i=e).representations().forEach(function(e){t.addQualityLevel(e)}),Mn(t,i.playlists)}),this.playlists.on("mediachange",function(){Mn(e.qualityLevels_,e.playlists)}))},r.version=function(){return{"@videojs/http-streaming":Un,"mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return sn.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&u().URL.revokeObjectURL&&(u().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),t.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Oi({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,i,r){return void 0===i&&(i=!0),void 0===r&&(r=2),ki({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},r}(p().getComponent("Component")),Hn={name:"videojs-http-streaming",VERSION:Un,canHandleSource:function(e,t){void 0===t&&(t={});var i=p().mergeOptions(p().options,t);return Hn.canPlayType(e.type,i)},handleSource:function(e,t,i){void 0===i&&(i={});var r=p().mergeOptions(p().options,i);return t.vhs=new Vn(e,t,r),p().hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return p().log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=_i(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){var i=H(e);if(!i)return"";var r=Hn.getOverrideNative(t);return!Rn.supportsTypeNatively(i)||r?"maybe":""},getOverrideNative:function(e){void 0===e&&(e={});var t=e,i=t.vhs,r=void 0===i?{}:i,n=t.hls,a=void 0===n?{}:n,s=!(p().browser.IS_ANY_SAFARI||p().browser.IS_IOS),o=r.overrideNative,u=void 0===o?s:o,d=a.overrideNative;return void 0!==d&&d||u}};(M("avc1.4d400d,mp4a.40.2")&&p().getTech("Html5").registerSourceHandler(Hn,0),p().VhsHandler=Vn,Object.defineProperty(p(),"HlsHandler",{get:function(){return p().log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Vn},configurable:!0}),p().VhsSourceHandler=Hn,Object.defineProperty(p(),"HlsSourceHandler",{get:function(){return p().log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Hn},configurable:!0}),p().Vhs=Rn,Object.defineProperty(p(),"Hls",{get:function(){return p().log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Rn},configurable:!0}),p().use||(p().registerComponent("Hls",Rn),p().registerComponent("Vhs",Rn)),p().options.vhs=p().options.vhs||{},p().options.hls=p().options.hls||{},p().getPlugin&&p().getPlugin("reloadSourceOnError"))||(p().registerPlugin||p().plugin)("reloadSourceOnError",function(e){Cn(this,e)});var Gn={name:"streaming",version:"1.0.0",loaded:!0,supports:["hls","dash","m3u8","mpd"],isAvailable:function(){return void 0!==window.videojs&&!!window.videojs.Vhs},getDefaultOptions:function(){return{overrideNative:!0,smoothQualityChange:!0,handlePartialData:!0}}};console.log("[ABSVideo] Streaming plugin loaded (HLS + DASH via VHS)");const jn=Gn})(),n})());

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.