dashjs
Version:
A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
2 lines • 945 kB
JavaScript
/*! For license information please see dash.all.min.js.LICENSE.txt */
var t={7267:function(t,e){e.byteLength=function(t){var e=o(t),n=e[0],a=e[1];return 3*(n+a)/4-a},e.toByteArray=function(t){var e,n,i=o(t),l=i[0],s=i[1],u=new r(function(t,e,n){return 3*(e+n)/4-n}(0,l,s)),d=0,c=s>0?l-4:l;for(n=0;n<c;n+=4)e=a[t.charCodeAt(n)]<<18|a[t.charCodeAt(n+1)]<<12|a[t.charCodeAt(n+2)]<<6|a[t.charCodeAt(n+3)],u[d++]=e>>16&255,u[d++]=e>>8&255,u[d++]=255&e;return 2===s&&(e=a[t.charCodeAt(n)]<<2|a[t.charCodeAt(n+1)]>>4,u[d++]=255&e),1===s&&(e=a[t.charCodeAt(n)]<<10|a[t.charCodeAt(n+1)]<<4|a[t.charCodeAt(n+2)]>>2,u[d++]=e>>8&255,u[d++]=255&e),u},e.fromByteArray=function(t){for(var e,a=t.length,r=a%3,i=[],l=16383,o=0,u=a-r;o<u;o+=l)i.push(s(t,o,o+l>u?u:o+l));return 1===r?(e=t[a-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[a-2]<<8)+t[a-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),i.join("")};for(var n=[],a=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0;l<64;++l)n[l]=i[l],a[i.charCodeAt(l)]=l;function o(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function s(t,e,a){for(var r,i,l=[],o=e;o<a;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),l.push(n[(i=r)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return l.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},44:function(t,e,n){var a=n(7267),r=n(7986),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},e.INSPECT_MAX_BYTES=50;var l=2147483647;function o(t){if(t>l)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return u(t,e,n)}function u(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var n=0|h(t,e),a=o(n),r=a.write(t,e);return r!==n&&(a=a.slice(0,r)),a}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){var e=new Uint8Array(t);return g(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return g(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return g(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=t.valueOf&&t.valueOf();if(null!=a&&a!==t)return s.from(a,e,n);var r=function(t){if(s.isBuffer(t)){var e=0|m(t.length),n=o(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||B(t.length)?o(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function d(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return d(t),o(t<0?0:0|m(t))}function f(t){for(var e=t.length<0?0:0|m(t.length),n=o(e),a=0;a<e;a+=1)n[a]=255&t[a];return n}function g(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');var a;return a=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(a,s.prototype),a}function m(t){if(t>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return 0|t}function h(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return a?-1:F(t).length;e=(""+e).toLowerCase(),r=!0}}function p(t,e,n){var a=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return k(this,e,n);case"ascii":return R(this,e,n);case"latin1":case"binary":return N(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(a)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}function b(t,e,n){var a=t[e];t[e]=t[n],t[n]=a}function y(t,e,n,a,r){if(0===t.length)return-1;if("string"==typeof n?(a=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),B(n=+n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=s.from(e,a)),s.isBuffer(e))return 0===e.length?-1:E(t,e,n,a,r);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):E(t,[e],n,a,r);throw new TypeError("val must be string, number or Buffer")}function E(t,e,n,a,r){var i,l=1,o=t.length,s=e.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(t.length<2||e.length<2)return-1;l=2,o/=2,s/=2,n/=2}function u(t,e){return 1===l?t[e]:t.readUInt16BE(e*l)}if(r){var d=-1;for(i=n;i<o;i++)if(u(t,i)===u(e,-1===d?0:i-d)){if(-1===d&&(d=i),i-d+1===s)return d*l}else-1!==d&&(i-=i-d),d=-1}else for(n+s>o&&(n=o-s),i=n;i>=0;i--){for(var c=!0,f=0;f<s;f++)if(u(t,i+f)!==u(e,f)){c=!1;break}if(c)return i}return-1}function _(t,e,n,a){n=Number(n)||0;var r=t.length-n;a?(a=Number(a))>r&&(a=r):a=r;var i=e.length;a>i/2&&(a=i/2);for(var l=0;l<a;++l){var o=parseInt(e.substr(2*l,2),16);if(B(o))return l;t[n+l]=o}return l}function T(t,e,n,a){return j(F(e,t.length-n),t,n,a)}function v(t,e,n,a){return j(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,a)}function w(t,e,n,a){return j(U(e),t,n,a)}function S(t,e,n,a){return j(function(t,e){for(var n,a,r,i=[],l=0;l<t.length&&!((e-=2)<0);++l)a=(n=t.charCodeAt(l))>>8,r=n%256,i.push(r),i.push(a);return i}(e,t.length-n),t,n,a)}function I(t,e,n){return 0===e&&n===t.length?a.fromByteArray(t):a.fromByteArray(t.slice(e,n))}function k(t,e,n){n=Math.min(t.length,n);for(var a=[],r=e;r<n;){var i,l,o,s,u=t[r],d=null,c=u>239?4:u>223?3:u>191?2:1;if(r+c<=n)switch(c){case 1:u<128&&(d=u);break;case 2:128==(192&(i=t[r+1]))&&(s=(31&u)<<6|63&i)>127&&(d=s);break;case 3:i=t[r+1],l=t[r+2],128==(192&i)&&128==(192&l)&&(s=(15&u)<<12|(63&i)<<6|63&l)>2047&&(s<55296||s>57343)&&(d=s);break;case 4:i=t[r+1],l=t[r+2],o=t[r+3],128==(192&i)&&128==(192&l)&&128==(192&o)&&(s=(15&u)<<18|(63&i)<<12|(63&l)<<6|63&o)>65535&&s<1114112&&(d=s)}null===d?(d=65533,c=1):d>65535&&(d-=65536,a.push(d>>>10&1023|55296),d=56320|1023&d),a.push(d),r+=c}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);for(var n="",a=0;a<e;)n+=String.fromCharCode.apply(String,t.slice(a,a+=A));return n}(a)}e.kMaxLength=l,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),s.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(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,n){return function(t,e,n){return d(t),t<=0?o(t):void 0!==e?"string"==typeof n?o(t).fill(e,n):o(t).fill(e):o(t)}(t,e,n)},s.allocUnsafe=function(t){return c(t)},s.allocUnsafeSlow=function(t){return c(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var n=t.length,a=e.length,r=0,i=Math.min(n,a);r<i;++r)if(t[r]!==e[r]){n=t[r],a=e[r];break}return n<a?-1:a<n?1:0},s.isEncoding=function(t){switch(String(t).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}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var a=s.allocUnsafe(e),r=0;for(n=0;n<t.length;++n){var i=t[n];if(q(i,Uint8Array))r+i.length>a.length?s.from(i).copy(a,r):Uint8Array.prototype.set.call(a,i,r);else{if(!s.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(a,r)}r+=i.length}return a},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,a,r){if(q(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),e<0||n>t.length||a<0||r>this.length)throw new RangeError("out of range index");if(a>=r&&e>=n)return 0;if(a>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(r>>>=0)-(a>>>=0),l=(n>>>=0)-(e>>>=0),o=Math.min(i,l),u=this.slice(a,r),d=t.slice(e,n),c=0;c<o;++c)if(u[c]!==d[c]){i=u[c],l=d[c];break}return i<l?-1:l<i?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},s.prototype.write=function(t,e,n,a){if(void 0===e)a="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)a=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===a&&(a="utf8")):(a=n,n=void 0)}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var i=!1;;)switch(a){case"hex":return _(this,t,e,n);case"utf8":case"utf-8":return T(this,t,e,n);case"ascii":case"latin1":case"binary":return v(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function R(t,e,n){var a="";n=Math.min(t.length,n);for(var r=e;r<n;++r)a+=String.fromCharCode(127&t[r]);return a}function N(t,e,n){var a="";n=Math.min(t.length,n);for(var r=e;r<n;++r)a+=String.fromCharCode(t[r]);return a}function C(t,e,n){var a=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>a)&&(n=a);for(var r="",i=e;i<n;++i)r+=G[t[i]];return r}function D(t,e,n){for(var a=t.slice(e,n),r="",i=0;i<a.length-1;i+=2)r+=String.fromCharCode(a[i]+256*a[i+1]);return r}function x(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,a,r,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<i)throw new RangeError('"value" argument is out of bounds');if(n+a>t.length)throw new RangeError("Index out of range")}function z(t,e,n,a,r,i){if(n+a>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(t,e,n,a,i){return e=+e,n>>>=0,i||z(t,0,n,4),r.write(t,e,n,a,23,4),n+4}function P(t,e,n,a,i){return e=+e,n>>>=0,i||z(t,0,n,8),r.write(t,e,n,a,52,8),n+8}s.prototype.slice=function(t,e){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var a=this.subarray(t,e);return Object.setPrototypeOf(a,s.prototype),a},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||x(t,e,this.length);for(var a=this[t],r=1,i=0;++i<e&&(r*=256);)a+=this[t+i]*r;return a},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||x(t,e,this.length);for(var a=this[t+--e],r=1;e>0&&(r*=256);)a+=this[t+--e]*r;return a},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||x(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||x(t,e,this.length);for(var a=this[t],r=1,i=0;++i<e&&(r*=256);)a+=this[t+i]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*e)),a},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||x(t,e,this.length);for(var a=e,r=1,i=this[t+--a];a>0&&(r*=256);)i+=this[t+--a]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return t>>>=0,e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||x(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||x(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||x(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||x(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||x(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||x(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,a){t=+t,e>>>=0,n>>>=0,a||M(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,i=0;for(this[e]=255&t;++i<n&&(r*=256);)this[e+i]=t/r&255;return e+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,n,a){t=+t,e>>>=0,n>>>=0,a||M(this,t,e,n,Math.pow(2,8*n)-1,0);var r=n-1,i=1;for(this[e+r]=255&t;--r>=0&&(i*=256);)this[e+r]=t/i&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,n,a){if(t=+t,e>>>=0,!a){var r=Math.pow(2,8*n-1);M(this,t,e,n,r-1,-r)}var i=0,l=1,o=0;for(this[e]=255&t;++i<n&&(l*=256);)t<0&&0===o&&0!==this[e+i-1]&&(o=1),this[e+i]=(t/l|0)-o&255;return e+n},s.prototype.writeIntBE=function(t,e,n,a){if(t=+t,e>>>=0,!a){var r=Math.pow(2,8*n-1);M(this,t,e,n,r-1,-r)}var i=n-1,l=1,o=0;for(this[e+i]=255&t;--i>=0&&(l*=256);)t<0&&0===o&&0!==this[e+i+1]&&(o=1),this[e+i]=(t/l|0)-o&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,n){return O(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return O(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,a){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),a||0===a||(a=this.length),e>=t.length&&(e=t.length),e||(e=0),a>0&&a<n&&(a=n),a===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-e<a-n&&(a=t.length-e+n);var r=a-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,a):Uint8Array.prototype.set.call(t,this.subarray(n,a),e),r},s.prototype.fill=function(t,e,n,a){if("string"==typeof t){if("string"==typeof e?(a=e,e=0,n=this.length):"string"==typeof n&&(a=n,n=this.length),void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!s.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(1===t.length){var r=t.charCodeAt(0);("utf8"===a&&r<128||"latin1"===a)&&(t=r)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var l=s.isBuffer(t)?t:s.from(t,a),o=l.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=l[i%o]}return this};var L=/[^+/0-9A-Za-z-_]/g;function F(t,e){var n;e=e||1/0;for(var a=t.length,r=null,i=[],l=0;l<a;++l){if((n=t.charCodeAt(l))>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(l+1===a){(e-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return a.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function j(t,e,n,a){for(var r=0;r<a&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function B(t){return t!=t}var G=function(){for(var t="0123456789abcdef",e=new Array(256),n=0;n<16;++n)for(var a=16*n,r=0;r<16;++r)e[a+r]=t[n]+t[r];return e}()},6877:function(t,e){var n={parseBuffer:function(t){return new a(t).parse()},addBoxProcessor:function(t,e){"string"==typeof t&&"function"==typeof e&&(r.prototype._boxProcessors[t]=e)},createFile:function(){return new a},createBox:function(t,e,n){var a=r.create(t);return e&&e.append(a,n),a},createFullBox:function(t,e,a){var r=n.createBox(t,e,a);return r.version=0,r.flags=0,r},Utils:{}};n.Utils.dataViewToString=function(t,e){var n=e||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(t);var a=[],r=0;if("utf-8"===n)for(;r<t.byteLength;){var i=t.getUint8(r++);i<128||(i<224?(i=(31&i)<<6,i|=63&t.getUint8(r++)):i<240?(i=(15&i)<<12,i|=(63&t.getUint8(r++))<<6,i|=63&t.getUint8(r++)):(i=(7&i)<<18,i|=(63&t.getUint8(r++))<<12,i|=(63&t.getUint8(r++))<<6,i|=63&t.getUint8(r++))),a.push(String.fromCharCode(i))}else for(;r<t.byteLength;)a.push(String.fromCharCode(t.getUint8(r++)));return a.join("")},n.Utils.utf8ToByteArray=function(t){var e,n;if("undefined"!=typeof TextEncoder)e=(new TextEncoder).encode(t);else for(e=[],n=0;n<t.length;++n){var a=t.charCodeAt(n);a<128?e.push(a):a<2048?(e.push(192|a>>6),e.push(128|63&a)):a<65536?(e.push(224|a>>12),e.push(128|63&a>>6),e.push(128|63&a)):(e.push(240|a>>18),e.push(128|63&a>>12),e.push(128|63&a>>6),e.push(128|63&a))}return e},n.Utils.appendBox=function(t,e,n){if(e._offset=t._cursor.offset,e._root=t._root?t._root:t,e._raw=t._raw,e._parent=t,-1!==n)if(null!=n){var a,r=-1;if("number"==typeof n)r=n;else{if("string"==typeof n)a=n;else{if("object"!=typeof n||!n.type)return void t.boxes.push(e);a=n.type}for(var i=0;i<t.boxes.length;i++)if(a===t.boxes[i].type){r=i+1;break}}t.boxes.splice(r,0,e)}else t.boxes.push(e)},e.parseBuffer=n.parseBuffer,e.addBoxProcessor=n.addBoxProcessor,e.createFile=n.createFile,e.createBox=n.createBox,e.createFullBox=n.createFullBox,e.Utils=n.Utils,n.Cursor=function(t){this.offset=void 0===t?0:t};var a=function(t){this._cursor=new n.Cursor,this.boxes=[],t&&(this._raw=new DataView(t))};a.prototype.fetch=function(t){var e=this.fetchAll(t,!0);return e.length?e[0]:null},a.prototype.fetchAll=function(t,e){var n=[];return a._sweep.call(this,t,n,e),n},a.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var t=r.parse(this);if(void 0===t.type)break;this.boxes.push(t)}return this},a._sweep=function(t,e,n){for(var r in this.type&&this.type==t&&e.push(this),this.boxes){if(e.length&&n)return;a._sweep.call(this.boxes[r],t,e,n)}},a.prototype.write=function(){var t,e=0;for(t=0;t<this.boxes.length;t++)e+=this.boxes[t].getLength(!1);var n=new Uint8Array(e);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,t=0;t<this.boxes.length;t++)this.boxes[t].write();return n.buffer},a.prototype.append=function(t,e){n.Utils.appendBox(this,t,e)};var r=function(){this._cursor=new n.Cursor};r.parse=function(t){var e=new r;return e._offset=t._cursor.offset,e._root=t._root?t._root:t,e._raw=t._raw,e._parent=t,e._parseBox(),t._cursor.offset=e._raw.byteOffset+e._raw.byteLength,e},r.create=function(t){var e=new r;return e.type=t,e.boxes=[],e},r.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca","meta","grpl","prsl"],r.prototype._boxProcessors={},r.prototype._procField=function(t,e,n){this._parsing?this[t]=this._readField(e,n):this._writeField(e,n,this[t])},r.prototype._procFieldArray=function(t,e,n,a){var r;if(this._parsing)for(this[t]=[],r=0;r<e;r++)this[t][r]=this._readField(n,a);else for(r=0;r<this[t].length;r++)this._writeField(n,a,this[t][r])},r.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},r.prototype._procEntries=function(t,e,n){var a;if(this._parsing)for(this[t]=[],a=0;a<e;a++)this[t].push({}),n.call(this,this[t][a]);else for(a=0;a<e;a++)n.call(this,this[t][a])},r.prototype._procSubEntries=function(t,e,n,a){var r;if(this._parsing)for(t[e]=[],r=0;r<n;r++)t[e].push({}),a.call(this,t[e][r]);else for(r=0;r<n;r++)a.call(this,t[e][r])},r.prototype._procEntryField=function(t,e,n,a){this._parsing?t[e]=this._readField(n,a):this._writeField(n,a,t[e])},r.prototype._procSubBoxes=function(t,e){var n;if(this._parsing)for(this[t]=[],n=0;n<e;n++)this[t].push(r.parse(this));else for(n=0;n<e;n++)this._rawo?this[t][n].write():this.size+=this[t][n].getLength()},r.prototype._readField=function(t,e){switch(t){case"uint":return this._readUint(e);case"int":return this._readInt(e);case"template":return this._readTemplate(e);case"string":return-1===e?this._readTerminatedString():this._readString(e);case"data":return this._readData(e);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},r.prototype._readInt=function(t){var e=null,n=this._cursor.offset-this._raw.byteOffset;switch(t){case 8:e=this._raw.getInt8(n);break;case 16:e=this._raw.getInt16(n);break;case 32:e=this._raw.getInt32(n);break;case 64:var a=this._raw.getInt32(n),r=this._raw.getInt32(n+4);e=a*Math.pow(2,32)+r}return this._cursor.offset+=t>>3,e},r.prototype._readUint=function(t){var e,n,a=null,r=this._cursor.offset-this._raw.byteOffset;switch(t){case 8:a=this._raw.getUint8(r);break;case 16:a=this._raw.getUint16(r);break;case 24:a=((e=this._raw.getUint16(r))<<8)+(n=this._raw.getUint8(r+2));break;case 32:a=this._raw.getUint32(r);break;case 64:e=this._raw.getUint32(r),n=this._raw.getUint32(r+4),a=e*Math.pow(2,32)+n}return this._cursor.offset+=t>>3,a},r.prototype._readString=function(t){for(var e="",n=0;n<t;n++){var a=this._readUint(8);e+=String.fromCharCode(a)}return e},r.prototype._readTemplate=function(t){return this._readUint(t/2)+this._readUint(t/2)/Math.pow(2,t/2)},r.prototype._readTerminatedString=function(){for(var t="";this._cursor.offset-this._offset<this._raw.byteLength;){var e=this._readUint(8);if(0===e)break;t+=String.fromCharCode(e)}return t},r.prototype._readData=function(t){var e=t>0?t:this._raw.byteLength-(this._cursor.offset-this._offset);if(e>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,e);return this._cursor.offset+=e,n}return null},r.prototype._readUTF8String=function(){var t=this._raw.byteLength-(this._cursor.offset-this._offset),e=null;return t>0&&(e=new DataView(this._raw.buffer,this._cursor.offset,t),this._cursor.offset+=t),e?n.Utils.dataViewToString(e):e},r.prototype._readUTF8TerminatedString=function(){var t=this._raw.byteLength-(this._cursor.offset-this._offset),e=null;if(t>0){var a;for(e=new DataView(this._raw.buffer,this._cursor.offset,t),a=0;a<t&&0!==e.getUint8(a);a++);e=new DataView(this._raw.buffer,this._cursor.offset,a),this._cursor.offset+=Math.min(a+1,t)}return e?n.Utils.dataViewToString(e):e},r.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},r.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},r.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(r.parse(this))},r.prototype.append=function(t,e){n.Utils.appendBox(this,t,e)},r.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var t=0;t<this.boxes.length;t++)this.size+=this.boxes[t].getLength();return this._data&&this._writeData(this._data),this.size},r.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var t=0;t<this.boxes.length;t++)this.boxes[t].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},r.prototype._writeInt=function(t,e){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(t){case 8:this._rawo.setInt8(n,e);break;case 16:this._rawo.setInt16(n,e);break;case 32:this._rawo.setInt32(n,e);break;case 64:var a=Math.floor(e/Math.pow(2,32)),r=e-a*Math.pow(2,32);this._rawo.setUint32(n,a),this._rawo.setUint32(n+4,r)}this._cursor.offset+=t>>3}else this.size+=t>>3},r.prototype._writeUint=function(t,e){if(this._rawo){var n,a,r=this._cursor.offset-this._rawo.byteOffset;switch(t){case 8:this._rawo.setUint8(r,e);break;case 16:this._rawo.setUint16(r,e);break;case 24:n=(16776960&e)>>8,a=255&e,this._rawo.setUint16(r,n),this._rawo.setUint8(r+2,a);break;case 32:this._rawo.setUint32(r,e);break;case 64:a=e-(n=Math.floor(e/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(r,n),this._rawo.setUint32(r+4,a)}this._cursor.offset+=t>>3}else this.size+=t>>3},r.prototype._writeString=function(t,e){for(var n=0;n<t;n++)this._writeUint(8,e.charCodeAt(n))},r.prototype._writeTerminatedString=function(t){if(0!==t.length){for(var e=0;e<t.length;e++)this._writeUint(8,t.charCodeAt(e));this._writeUint(8,0)}},r.prototype._writeTemplate=function(t,e){var n=Math.floor(e),a=(e-n)*Math.pow(2,t/2);this._writeUint(t/2,n),this._writeUint(t/2,a)},r.prototype._writeData=function(t){if(t)if(this._rawo){if(t instanceof Array){for(var e=this._cursor.offset-this._rawo.byteOffset,n=0;n<t.length;n++)this._rawo.setInt8(e+n,t[n]);this._cursor.offset+=t.length}t instanceof Uint8Array&&(this._root.bytes.set(t,this._cursor.offset),this._cursor.offset+=t.length)}else this.size+=t.length},r.prototype._writeUTF8String=function(t){var e=n.Utils.utf8ToByteArray(t);if(this._rawo)for(var a=new DataView(this._rawo.buffer,this._cursor.offset,e.length),r=0;r<e.length;r++)a.setUint8(r,e[r]);else this.size+=e.length},r.prototype._writeField=function(t,e,n){switch(t){case"uint":this._writeUint(e,n);break;case"int":this._writeInt(e,n);break;case"template":this._writeTemplate(e,n);break;case"string":-1==e?this._writeTerminatedString(n):this._writeString(e,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},r.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},r.prototype._boxProcessors.avc1=r.prototype._boxProcessors.avc2=r.prototype._boxProcessors.avc3=r.prototype._boxProcessors.avc4=r.prototype._boxProcessors.hvc1=r.prototype._boxProcessors.hev1=r.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},r.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"sample_count","uint",32),this._procEntryField(t,"sample_offset",1===this.version?"int":"uint",32)}))},r.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},r.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},r.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"segment_duration","uint",1===this.version?64:32),this._procEntryField(t,"media_time","int",1===this.version?64:32),this._procEntryField(t,"media_rate_integer","int",16),this._procEntryField(t,"media_rate_fraction","int",16)}))},r.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},r.prototype._boxProcessors.free=r.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},r.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},r.prototype._boxProcessors.ftyp=r.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var t=-1;this._parsing&&(t=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",t,"string",4)},r.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},r.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},r.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},r.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=!!(1&this.flags),this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},r.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},r.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},r.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},r.prototype._boxProcessors.meta=function(){this._procFullBox()},r.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},r.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},r.prototype._boxProcessors.mp4a=r.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},r.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},r.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},r.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",1==this.version?64:32)},r.prototype._boxProcessors.prsl=function(){this._procFullBox(),this._procField("group_id","uint",32),this._procField("num_entities_in_group","uint",32),this._procEntries("entities",this.num_entities_in_group,(function(t){this._procEntryField(t,"entity_id","uint",32)})),4096&this.flags&&this._procField("preselection_tag","utf8string"),8192&this.flags&&this._procField("selection_priority","uint",8),16384&this.flags&&this._procField("interleaving_tag","utf8string")},r.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},r.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},r.prototype._boxProcessors.sdtp=function(){this._procFullBox();var t=-1;this._parsing&&(t=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",t,"uint",8)},r.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,(function(t){this._parsing||(t.reference=(1&t.reference_type)<<31,t.reference|=2147483647&t.referenced_size,t.sap=(1&t.starts_with_SAP)<<31,t.sap|=(3&t.SAP_type)<<28,t.sap|=268435455&t.SAP_delta_time),this._procEntryField(t,"reference","uint",32),this._procEntryField(t,"subsegment_duration","uint",32),this._procEntryField(t,"sap","uint",32),this._parsing&&(t.reference_type=t.reference>>31&1,t.referenced_size=2147483647&t.reference,t.starts_with_SAP=t.sap>>31&1,t.SAP_type=t.sap>>28&7,t.SAP_delta_time=268435455&t.sap)}))},r.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},r.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,(function(t){this._procEntryField(t,"ranges_count","uint",32),this._procSubEntries(t,"ranges",t.ranges_count,(function(t){this._procEntryField(t,"level","uint",8),this._procEntryField(t,"range_size","uint",24)}))}))},r.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},r.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},r.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"sample_count","uint",32),this._procEntryField(t,"sample_delta","uint",32)}))},r.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,(function(t){this._procEntryField(t,"sample_delta","uint",32),this._procEntryField(t,"subsample_count","uint",16),this._procSubEntries(t,"subsamples",t.subsample_count,(function(t){this._procEntryField(t,"subsample_size","uint",1===this.version?32:16),this._procEntryField(t,"subsample_priority","uint",8),this._procEntryField(t,"discardable","uint",8),this._procEntryField(t,"codec_specific_parameters","uint",32)}))}))},r.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},r.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},r.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},r.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,(function(t){this._procEntryField(t,"time","uint",1===this.version?64:32),this._procEntryField(t,"moof_offset","uint",1===this.version?64:32),this._procEntryField(t,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(t,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(t,"sample_number","uint",8*(this.length_size_of_sample_num+1))}))},r.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},r.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},r.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,(function(t){256&this.flags&&this._procEntryField(t,"sample_duration","uint",32),512&this.flags&&this._procEntryField(t,"sample_size","uint",32),1024&this.flags&&this._procEntryField(t,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(t,"sample_composition_time_offset",1===this.version?"int":"uint",32)}))},r.prototype._boxProcessors["url "]=r.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},r.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},r.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},r.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},r.prototype._boxProcessors.vtte=function(){}},9826:function(t){var e,n="object"==typeof Reflect?Reflect:null,a=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function i(){i.init.call(this)}t.exports=i,t.exports.once=function(t,e){return new Promise((function(n,a){function r(n){t.removeListener(e,i),a(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",r),n([].slice.call(arguments))}h(t,e,i,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&h(t,"error",e,{once:!0})}(t,r)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var l=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function s(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function u(t,e,n,a){var r,i,l,u;if(o(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),l=i[e]),void 0===l)l=i[e]=n,++t._eventsCount;else if("function"==typeof l?l=i[e]=a?[n,l]:[l,n]:a?l.unshift(n):l.push(n),(r=s(t))>0&&l.length>r&&!l.warned){l.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=t,d.type=e,d.count=l.length,u=d,console&&console.warn&&console.warn(u)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,e,n){var a={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},r=d.bind(a);return r.listener=n,a.wrapFn=r,r}function f(t,e,n){var a=t._events;if(void 0===a)return[];var r=a[e];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener