21 lines
2.2 MiB
JavaScript
21 lines
2.2 MiB
JavaScript
|
!function(A,M){"object"==typeof exports&&"object"==typeof module?module.exports=M():"function"==typeof define&&define.amd?define([],M):"object"==typeof exports?exports.WasmPlayer=M():A.WasmPlayer=M()}(this,function(){return g={},I.m=t=[function(A,M,t){"use strict";var g=t(6),t=t.n(g),g=function(){function t(){}return t.e=function(A,M){A&&!t.FORCE_GLOBAL_TAG||(A=t.GLOBAL_TAG);M="["+A+"] > "+M;t.ENABLE_CALLBACK&&t.emitter.emit("log","error",M),t.ENABLE_ERROR&&(console.error||console.warn)},t.i=function(A,M){A&&!t.FORCE_GLOBAL_TAG||(A=t.GLOBAL_TAG);M="["+A+"] > "+M;t.ENABLE_CALLBACK&&t.emitter.emit("log","info",M),t.ENABLE_INFO&&console.info},t.w=function(A,M){A&&!t.FORCE_GLOBAL_TAG||(A=t.GLOBAL_TAG);M="["+A+"] > "+M;t.ENABLE_CALLBACK&&t.emitter.emit("log","warn",M),t.ENABLE_WARN&&console.warn},t.d=function(A,M){A&&!t.FORCE_GLOBAL_TAG||(A=t.GLOBAL_TAG);M="["+A+"] > "+M;t.ENABLE_CALLBACK&&t.emitter.emit("log","debug",M),t.ENABLE_DEBUG&&console.debug},t.v=function(A,M){A&&!t.FORCE_GLOBAL_TAG||(A=t.GLOBAL_TAG);M="["+A+"] > "+M;t.ENABLE_CALLBACK&&t.emitter.emit("log","verbose",M)},t}();g.GLOBAL_TAG="EasyPlayer.js",g.FORCE_GLOBAL_TAG=!1,g.ENABLE_ERROR=!0,g.ENABLE_INFO=!0,g.ENABLE_WARN=!0,g.ENABLE_DEBUG=!0,g.ENABLE_VERBOSE=!0,g.ENABLE_CALLBACK=!1,g.emitter=new t.a,M.a=g},function(A,M,t){"use strict";t.d(M,"E",function(){return g}),t.d(M,"C",function(){return I}),t.d(M,"D",function(){return e}),t.d(M,"v",function(){return i}),t.d(M,"l",function(){return T}),t.d(M,"p",function(){return E}),t.d(M,"x",function(){return N}),t.d(M,"u",function(){return n}),t.d(M,"k",function(){return D}),t.d(M,"r",function(){return C}),t.d(M,"s",function(){return r}),t.d(M,"m",function(){return c}),t.d(M,"B",function(){return o}),t.d(M,"w",function(){return B}),t.d(M,"z",function(){return Q}),t.d(M,"A",function(){return a}),t.d(M,"t",function(){return h}),t.d(M,"q",function(){return s}),t.d(M,"o",function(){return y}),t.d(M,"y",function(){return w}),t.d(M,"n",function(){return j}),t.d(M,"b",function(){return L}),t.d(M,"a",function(){return d}),t.d(M,"f",function(){return x}),t.d(M,"i",function(){return S}),t.d(M,"d",function(){return z}),t.d(M,"h",function(){return l}),t.d(M,"c",function(){return U}),t.d(M,"j",function(){return f}),t.d(M,"e",function(){return O}),t.d(M,"g",function(){return m});var g=1,I=2,e=3,i=1,T=2,E=3,N=4,n=6,D=7,C=10,r=11,c=12,o=13,B=14,Q=15,a=16,h=20,s=21,y=102,w=103,j=200,L=1,d=2,x=3,Y=!0,u=!0;function S(A){Y=A}function z(){return Y}function l(A){0}function U(){return u}function f(M){return new Promise(function(A){return setTimeout(A,M)})}function O(A){var M=new Date,t=M.getFullYear(),g=M.getMonth()+1,I=M.getDate();M.getDay(),M.getHours(),M.getMinutes(),M.getSeconds()}function m(){for(var A=window.location.href.split("/"),M="",t=0;t<3;t++)M+=A[t],M+="/";return M}},function(A,M,t){"use strict";function g(A,M){A.prototype=Object.create(M.prototype),(A.prototype.constructor=A).__proto__=M}function I(A,M){for(var t=0;t<M.length;t++){var g=M[t];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(A,g.key,g)}}function e(A,M,t){return M&&I(A.prototype,M),t&&I(A,t),A}t.d(M,"d",function(){return i}),t.d(M,"a",function(){return T}),t.d(M,"b",function(){return E}),t.d(M,"c",function(){return N});var i=function(){function A(A){this._message=A}return A.prototype.toString=function(){return this.name+": "+this.message},e(A,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),A}(),T=function(M){function A(A){return M.call(this,A)||this}return g(A,M),e(A,[{key:"name",get:function(){return"IllegalStateException"}}]),A}(i),E=function(M){function A(A){return M.call(this,A)||this}return g(A,M),e(A,[{key:"name",get:function(){return"InvalidArgumentException"}}]),A}(i),N=function(M){function A(A){return M.call(this,A)||this}return g(A,M),e(A,[{key:"name",get:function(){return"NotImplementedException"}}]),A}(i)},function(A,M){"function"==typeof Object.create?A.exports=function(A,M){M&&(A.super_=M,A.prototype=Object.create(M.prototype,{constructor:{va
|
|||
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|||
|
var g=t(9),I=g.Buffer;function e(A,M){for(var t in A)M[t]=A[t]}function i(A,M,t){return I(A,M,t)}I.from&&I.alloc&&I.allocUnsafe&&I.allocUnsafeSlow?A.exports=g:(e(g,M),M.Buffer=i),i.prototype=Object.create(I.prototype),e(I,i),i.from=function(A,M,t){if("number"==typeof A)throw new TypeError("Argument must not be a number");return I(A,M,t)},i.alloc=function(A,M,t){if("number"!=typeof A)throw new TypeError("Argument must be a number");A=I(A);return void 0!==M?"string"==typeof t?A.fill(M,t):A.fill(M):A.fill(0),A},i.allocUnsafe=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return I(A)},i.allocUnsafeSlow=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return g.SlowBuffer(A)}},function(A,M,t){"use strict";M.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},function(A,M,t){"use strict";var g,I="object"==typeof Reflect?Reflect:null,E=I&&"function"==typeof I.apply?I.apply:function(A,M,t){return Function.prototype.apply.call(A,M,t)};g=I&&"function"==typeof I.ownKeys?I.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var e=Number.isNaN||function(A){return A!=A};function i(){i.init.call(this)}A.exports=i,A.exports.once=function(I,e){return new Promise(function(A,M){function t(){void 0!==g&&I.removeListener("error",g),A([].slice.call(arguments))}var g;"error"!==e&&(g=function(A){I.removeListener(e,t),M(A)},I.once("error",g)),I.once(e,t)})},(i.EventEmitter=i).prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var T=10;function N(A){if("function"!=typeof A)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function n(A){return void 0===A._maxListeners?i.defaultMaxListeners:A._maxListeners}function D(A,M,t,g){var I,e;return N(t),void 0===(I=A._events)?(I=A._events=Object.create(null),A._eventsCount=0):(void 0!==I.newListener&&(A.emit("newListener",M,t.listener||t),I=A._events),e=I[M]),void 0===e?(e=I[M]=t,++A._eventsCount):("function"==typeof e?e=I[M]=g?[t,e]:[e,t]:g?e.unshift(t):e.push(t),0<(t=n(A))&&e.length>t&&!e.warned&&(e.warned=!0,(t=new Error("Possible EventEmitter memory leak detected. "+e.length+" "+String(M)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",t.emitter=A,t.type=M,t.count=e.length,console&&console.warn)),A}function C(A,M,t){A={fired:!1,wrapFn:void 0,target:A,type:M,listener:t},M=function(){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)}.bind(A);return M.listener=t,A.wrapFn=M}function r(A,M,t){A=A._events;if(void 0===A)return[];M=A[M];return void 0===M?[]:"function"==typeof M?t?[M.listener||M]:[M]:t?function(A){for(var M=new Array(A.length),t=0;t<M.length;++t)M[t]=A[t].listener||A[t];return M}(M):o(M,M.length)}function c(A){var M=this._events;if(void 0!==M){A=M[A];if("function"==typeof A)return 1;if(void 0!==A)return A.length}return 0}function o(A,M){for(var t=new Array(M),g=0;g<M;++g)t[g]=A[g];return t}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(A){if("number"!=typeof A||A<0||e(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");T=A}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(A){if("number"!=typeof A||A<0||e(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this},i.prototype.getMaxListeners=function(){return n(this)},i.prototype.emit=function(A){for(var M=[],t=1;t<arguments.length;t++
|
|||
|
/*!
|
|||
|
* The buffer module from node.js, for the browser.
|
|||
|
*
|
|||
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|||
|
* @license MIT
|
|||
|
*/
|
|||
|
var T=f(111),e=f(112),i=f(60);function t(){return D.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function I(A,M){if(t()<M)throw new RangeError("Invalid typed array length");return D.TYPED_ARRAY_SUPPORT?(A=new Uint8Array(M)).__proto__=D.prototype:(null===A&&(A=new D(M)),A.length=M),A}function D(A,M,t){if(!(D.TYPED_ARRAY_SUPPORT||this instanceof D))return new D(A,M,t);if("number"!=typeof A)return g(this,A,M,t);if("string"==typeof M)throw new Error("If encoding is specified then the first argument must be a string");return N(this,A)}function g(A,M,t,g){if("number"==typeof M)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&M instanceof ArrayBuffer?function(A,M,t,g){if(M.byteLength,t<0||M.byteLength<t)throw new RangeError("'offset' is out of bounds");if(M.byteLength<t+(g||0))throw new RangeError("'length' is out of bounds");M=void 0===t&&void 0===g?new Uint8Array(M):void 0===g?new Uint8Array(M,t):new Uint8Array(M,t,g);D.TYPED_ARRAY_SUPPORT?(A=M).__proto__=D.prototype:A=n(A,M);return A}(A,M,t,g):"string"==typeof M?function(A,M,t){"string"==typeof t&&""!==t||(t="utf8");if(!D.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var g=0|r(M,t),t=(A=I(A,g)).write(M,t);t!==g&&(A=A.slice(0,t));return A}(A,M,t):function(A,M){if(D.isBuffer(M)){var t=0|C(M.length);return 0===(A=I(A,t)).length?A:(M.copy(A,0,0,t),A)}if(M){if("undefined"!=typeof ArrayBuffer&&M.buffer instanceof ArrayBuffer||"length"in M)return"number"!=typeof M.length||function(A){return A!=A}(M.length)?I(A,0):n(A,M);if("Buffer"===M.type&&i(M.data))return n(A,M.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(A,M)}function E(A){if("number"!=typeof A)throw new TypeError('"size" argument must be a number');if(A<0)throw new RangeError('"size" argument must not be negative')}function N(A,M){if(E(M),A=I(A,M<0?0:0|C(M)),!D.TYPED_ARRAY_SUPPORT)for(var t=0;t<M;++t)A[t]=0;return A}function n(A,M){var t=M.length<0?0:0|C(M.length);A=I(A,t);for(var g=0;g<t;g+=1)A[g]=255&M[g];return A}function C(A){if(A>=t())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t().toString(16)+" bytes");return 0|A}function r(A,M){if(D.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var g=!1;;)switch(M){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return S(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(A).length;default:if(g)return S(A).length;M=(""+M).toLowerCase(),g=!0}}function M(A,M,t){var g,I,e,i=!1;if((void 0===M||M<0)&&(M=0),M>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(M>>>=0))return"";for(A=A||"utf8";;)switch(A){case"hex":return function(A,M,t){var g=A.length;(!M||M<0)&&(M=0);(!t||t<0||g<t)&&(t=g);for(var I="",e=M;e<t;++e)I+=function(A){return A<16?"0"+A.toString(16):A.toString(16)}(A[e]);return I}(this,M,t);case"utf8":case"utf-8":return h(this,M,t);case"ascii":return function(A,M,t){var g="";t=Math.min(A.length,t);for(var I=M;I<t;++I)g+=String.fromCharCode(127&A[I]);return g}(this,M,t);case"latin1":case"binary":return function(A,M,t){var g="";t=Math.min(A.length,t);for(var I=M;I<t;++I)g+=String.fromCharCode(A[I]);return g}(this,M,t);case"base64":return g=this,e=t,0===(I=M)&&e===g.length?T.fromByteArray(g):T.fromByteArray(g.slice(I,e));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(A,M,t){for(var g=A.slice(M,t),I="",e=0;e<g.length;e+=2)I+=String.fromCharCode(g[e]+256*g[e+1]);return I}(this,M,t);default:if(i)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),i=!0}}function c(A,M,t){var g=A[M];A[M]=A[t],A[t]=g}function o(A,M,t,g,I){if(0===A.length)return-1;if("string"==typeof t?(g=t,t=0):2147483647<t?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,is
|
|||
|
/*! @name @videojs/vhs-utils @version 1.3.0 @license MIT */var g=function(){function A(){this.listeners={}}var M=A.prototype;return M.on=function(A,M){this.listeners[A]||(this.listeners[A]=[]),this.listeners[A].push(M)},M.off=function(A,M){if(!this.listeners[A])return!1;M=this.listeners[A].indexOf(M);return this.listeners[A]=this.listeners[A].slice(0),this.listeners[A].splice(M,1),-1<M},M.trigger=function(A){var M=this.listeners[A];if(M)if(2===arguments.length)for(var t=M.length,g=0;g<t;++g)M[g].call(this,arguments[1]);else for(var I=Array.prototype.slice.call(arguments,1),e=M.length,i=0;i<e;++i)M[i].apply(this,I)},M.dispose=function(){this.listeners={}},M.pipe=function(M){this.on("data",function(A){M.push(A)})},A}();A.exports=g},function(A,M,t){"use strict";var g=t(3),I=t(37),e=t(39),i=t(40),T=t(15);function E(A){T.call(this,"digest"),this._hash=A}g(E,T),E.prototype._update=function(A){this._hash.update(A)},E.prototype._final=function(){return this._hash.digest()},A.exports=function(A){return"md5"===(A=A.toLowerCase())?new I:"rmd160"===A||"ripemd160"===A?new e:new E(i(A))}},function(A,M,t){"use strict";var g=t(4).Buffer,I=g.isEncoding||function(A){switch((A=""+A)&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function e(A){var M=function(A){if(!A)return"utf8";for(var M;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(M)return;A=(""+A).toLowerCase(),M=!0}}(A);if("string"!=typeof M&&(g.isEncoding===I||!I(A)))throw new Error("Unknown encoding: "+A);return M||A}function i(A){var M;switch(this.encoding=e(A),this.encoding){case"utf16le":this.text=N,this.end=n,M=4;break;case"utf8":this.fillLast=E,M=4;break;case"base64":this.text=D,this.end=C,M=3;break;default:return this.write=r,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(M)}function T(A){return A<=127?0:A>>5==6?2:A>>4==14?3:A>>3==30?4:A>>6==2?-1:-2}function E(A){var M,t,g=this.lastTotal-this.lastNeed,M=(M=this,128!=(192&(t=A)[0])?(M.lastNeed=0,"<22>"):1<M.lastNeed&&1<t.length?128!=(192&t[1])?(M.lastNeed=1,"<22>"):2<M.lastNeed&&2<t.length&&128!=(192&t[2])?(M.lastNeed=2,"<22>"):void 0:void 0);return void 0!==M?M:this.lastNeed<=A.length?(A.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(A.copy(this.lastChar,g,0,A.length),void(this.lastNeed-=A.length))}function N(A,M){if((A.length-M)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",M,A.length-1);var t=A.toString("utf16le",M);if(t){M=t.charCodeAt(t.length-1);if(55296<=M&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],t.slice(0,-1)}return t}function n(A){var M=A&&A.length?this.write(A):"";if(this.lastNeed){A=this.lastTotal-this.lastNeed;return M+this.lastChar.toString("utf16le",0,A)}return M}function D(A,M){var t=(A.length-M)%3;return 0==t?A.toString("base64",M):(this.lastNeed=3-t,this.lastTotal=3,1==t?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",M,A.length-t))}function C(A){A=A&&A.length?this.write(A):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function r(A){return A.toString(this.encoding)}function c(A){return A&&A.length?this.write(A):""}(M.StringDecoder=i).prototype.write=function(A){if(0===A.length)return"";var M,t;if(this.lastNeed){if(void 0===(M=this.fillLast(A)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<A.length?M?M+this.text(A,t):this.text(A,t):M||""},i.prototype.end=function(A){A=A&&A.length?this.write(A):"";return this.lastNeed?A+"<22>":A},i.prototype.text=function(A,M){var t=function(A,M,t){var g=M.length-1;if(g<t)return 0;var I=T(M[g]);if(0<=I)return 0<I&&(A.lastNeed=I-1),I;if(--g<t||-2===I)return 0;if(0<=(I=T(M[g])))return
|
|||
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|||
|
M.read=function(A,M,t,g,I){var e,i,T=8*I-g-1,E=(1<<T)-1,N=E>>1,n=-7,D=t?I-1:0,C=t?-1:1,t=A[M+D];for(D+=C,e=t&(1<<-n)-1,t>>=-n,n+=T;0<n;e=256*e+A[M+D],D+=C,n-=8);for(i=e&(1<<-n)-1,e>>=-n,n+=g;0<n;i=256*i+A[M+D],D+=C,n-=8);if(0===e)e=1-N;else{if(e===E)return i?NaN:1/0*(t?-1:1);i+=Math.pow(2,g),e-=N}return(t?-1:1)*i*Math.pow(2,e-g)},M.write=function(A,M,t,g,I,e){var i,T,E=8*e-I-1,N=(1<<E)-1,n=N>>1,D=23===I?Math.pow(2,-24)-Math.pow(2,-77):0,C=g?0:e-1,r=g?1:-1,e=M<0||0===M&&1/M<0?1:0;for(M=Math.abs(M),isNaN(M)||M===1/0?(T=isNaN(M)?1:0,i=N):(i=Math.floor(Math.log(M)/Math.LN2),M*(g=Math.pow(2,-i))<1&&(i--,g*=2),2<=(M+=1<=i+n?D/g:D*Math.pow(2,1-n))*g&&(i++,g/=2),N<=i+n?(T=0,i=N):1<=i+n?(T=(M*g-1)*Math.pow(2,I),i+=n):(T=M*Math.pow(2,n-1)*Math.pow(2,I),i=0));8<=I;A[t+C]=255&T,C+=r,T/=256,I-=8);for(i=i<<I|T,E+=I;0<E;A[t+C]=255&i,C+=r,i/=256,E-=8);A[t+C-r]|=128*e}},function(M,A,t){(function(A){A="undefined"!=typeof window?window:void 0!==A?A:"undefined"!=typeof self?self:{};M.exports=A}).call(this,t(10))},function(A,M,t){(function(gA,IA){
|
|||
|
/*!
|
|||
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|||
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|||
|
* @license Licensed under MIT license
|
|||
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|||
|
* @version v4.2.8+1e68dce6
|
|||
|
*/
|
|||
|
A.exports=function(){"use strict";function g(A){var M=typeof A;return A!==null&&(M==="object"||M==="function")}function E(A){return typeof A==="function"}var A=void 0;if(Array.isArray)A=Array.isArray;else A=function A(M){return Object.prototype.toString.call(M)==="[object Array]"};var t=A,I=0,M=void 0,e=void 0,i=function A(M,t){s[I]=M;s[I+1]=t;I+=2;if(I===2)if(e)e(y);else j()};function T(A){e=A}function N(A){i=A}var n=typeof window!=="undefined"?window:undefined,D=n||{},C=D.MutationObserver||D.WebKitMutationObserver,r=typeof self==="undefined"&&typeof gA!=="undefined"&&{}.toString.call(gA)==="[object process]",c=typeof Uint8ClampedArray!=="undefined"&&typeof importScripts!=="undefined"&&typeof MessageChannel!=="undefined";function o(){return function(){return gA.nextTick(y)}}function B(){if(typeof M!=="undefined")return function(){M(y)};return h()}function Q(){var A=0;var M=new C(y);var t=document.createTextNode("");M.observe(t,{characterData:true});return function(){t.data=A=++A%2}}function a(){var A=new MessageChannel;A.port1.onmessage=y;return function(){return A.port2.postMessage(0)}}function h(){var A=setTimeout;return function(){return A(y,1)}}var s=new Array(1e3);function y(){for(var A=0;A<I;A+=2){var M=s[A];var t=s[A+1];M(t);s[A]=undefined;s[A+1]=undefined}I=0}function w(){try{var A=Function("return this")().require("vertx");M=A.runOnLoop||A.runOnContext;return B()}catch(A){return h()}}var j=void 0;if(r)j=o();else if(C)j=Q();else if(c)j=a();else if(n===undefined&&"function"==="function")j=w();else j=h();function L(A,M){var t=this;var g=new this.constructor(Y);if(g[x]===undefined)W(g);var I=t._state;if(I){var e=arguments[I-1];i(function(){return H(I,g,e,t._result)})}else G(t,g,A,M);return g}function d(A){var M=this;if(A&&typeof A==="object"&&A.constructor===M)return A;var t=new M(Y);R(t,A);return t}var x=Math.random().toString(36).substring(2);function Y(){}var u=void 0,S=1,z=2;function l(){return new TypeError("You cannot resolve a promise with itself")}function U(){return new TypeError("A promises callback cannot return that same promise.")}function f(A,M,t,g){try{A.call(M,t,g)}catch(A){return A}}function O(A,g,I){i(function(M){var t=false;var A=f(I,g,function(A){if(t)return;t=true;if(g!==A)R(M,A);else p(M,A)},function(A){if(t)return;t=true;b(M,A)},"Settle: "+(M._label||" unknown promise"));if(!t&&A){t=true;b(M,A)}},A)}function m(M,A){if(A._state===S)p(M,A._result);else if(A._state===z)b(M,A._result);else G(A,undefined,function(A){return R(M,A)},function(A){return b(M,A)})}function F(A,M,t){if(M.constructor===A.constructor&&t===L&&M.constructor.resolve===d)m(A,M);else if(t===undefined)p(A,M);else if(E(t))O(A,M,t);else p(A,M)}function R(M,A){if(M===A)b(M,l());else if(g(A)){var t=void 0;try{t=A.then}catch(A){b(M,A);return}F(M,A,t)}else p(M,A)}function k(A){if(A._onerror)A._onerror(A._result);J(A)}function p(A,M){if(A._state!==u)return;A._result=M;A._state=S;if(A._subscribers.length!==0)i(J,A)}function b(A,M){if(A._state!==u)return;A._state=z;A._result=M;i(k,A)}function G(A,M,t,g){var I=A._subscribers;var e=I.length;A._onerror=null;I[e]=M;I[e+S]=t;I[e+z]=g;if(e===0&&A._state)i(J,A)}function J(A){var M=A._subscribers;var t=A._state;if(M.length===0)return;var g=void 0,I=void 0,e=A._result;for(var i=0;i<M.length;i+=3){g=M[i];I=M[i+t];if(g)H(t,g,I,e);else I(e)}A._subscribers.length=0}function H(A,M,t,g){var I=E(t),e=void 0,i=void 0,T=true;if(I){try{e=t(g)}catch(A){T=false;i=A}if(M===e){b(M,U());return}}else e=g;if(M._state!==u);else if(I&&T)R(M,e);else if(T===false)b(M,i);else if(A===S)p(M,e);else if(A===z)b(M,e)}function X(t,A){try{A(function A(M){R(t,M)},function A(M){b(t,M)})}catch(A){b(t,A)}}var v=0;function V(){return v++}function W(A){A[x]=v++;A._state=undefined;A._result=undefined;A._subscribers=[]}function P(){return new Error("Array Methods must be provided an Array")}var Z=function(){function A(A,M){this._instanceConstructor=A;this.promise=new A(Y);if(!this.promise[x])W(this.promise);if(t(M)){this.length=M.length;this._remaining=M.length;this._result=new Array(this.length);if(this.length===0)p(this.promise,t
|