SkeyeWebPlayer-pack.js
1.12 MB
/*! For license information please see SkeyeWebPlayer_2.0.1.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.WebMediaPlayer=e():t.WebMediaPlayer=e()}(this,(function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=283)}([function(t,e,i){"use strict";i.r(e),i.d(e,"tVideoRenderYV12",(function(){return n})),i.d(e,"tVideoRenderRGB",(function(){return o})),i.d(e,"tVideoRenderRGBA",(function(){return a})),i.d(e,"tOpenStream",(function(){return s})),i.d(e,"tCloseStream",(function(){return h})),i.d(e,"tFrameData",(function(){return u})),i.d(e,"tReOpenStream",(function(){return l})),i.d(e,"tConnecting",(function(){return d})),i.d(e,"tOpenAudio",(function(){return c})),i.d(e,"tCloseAudio",(function(){return p})),i.d(e,"tOutputStatInfo",(function(){return m})),i.d(e,"tGetTsStream",(function(){return g})),i.d(e,"tGetTsStreamRsp",(function(){return v})),i.d(e,"tDecode",(function(){return y})),i.d(e,"tVidInterval",(function(){return b})),i.d(e,"tPauseStream",(function(){return _})),i.d(e,"tResumeStream",(function(){return w})),i.d(e,"tSeekStream",(function(){return A})),i.d(e,"tMediaInfo",(function(){return M})),i.d(e,"tGetTsComplete",(function(){return E})),i.d(e,"tError",(function(){return S})),i.d(e,"tExcept",(function(){return k})),i.d(e,"tDisconnect",(function(){return T})),i.d(e,"tResetMSE",(function(){return R})),i.d(e,"tDecoderWorkerStartup",(function(){return I})),i.d(e,"DOWNLOAD_WORKER_ID",(function(){return C})),i.d(e,"DECODE_WORKER_ID",(function(){return P})),i.d(e,"RENDER_WORKER_ID",(function(){return x})),i.d(e,"setLiveStreamType",(function(){return V})),i.d(e,"GetLiveStreamType",(function(){return H})),i.d(e,"setCodecTypeStr",(function(){return z})),i.d(e,"setVideoWidth",(function(){return G})),i.d(e,"setVideoHeight",(function(){return X})),i.d(e,"setVideoBitrate",(function(){return Z})),i.d(e,"GetCodecTypeStr",(function(){return K})),i.d(e,"GetVideoWidth",(function(){return Q})),i.d(e,"GetVideoHeight",(function(){return Y})),i.d(e,"GetVideoBitrate",(function(){return J})),i.d(e,"SetEnableAudio",(function(){return $})),i.d(e,"GetEnableAudio",(function(){return tt})),i.d(e,"ClearAppendBufferError",(function(){return et})),i.d(e,"SetAppendBufferError",(function(){return it})),i.d(e,"GetAppendBufferError",(function(){return rt})),i.d(e,"sleep",(function(){return nt})),i.d(e,"MediaWorkerLog",(function(){return ot})),i.d(e,"getFullURL",(function(){return at})),i.d(e,"getMessage",(function(){return st})),i.d(e,"setMessage",(function(){return ht}));var r=f;!function(t,e){for(var i=f,r=t();;)try{if(568290===-parseInt(i(133,"z*d^"))/1*(parseInt(i(143,"910C"))/2)+parseInt(i(160,"CDl3"))/3*(-parseInt(i(150,"a8ng"))/4)+-parseInt(i(139,"LEw2"))/5*(parseInt(i(164,"Jo^l"))/6)+parseInt(i(154,"gvq)"))/7*(-parseInt(i(129,"fRUp"))/8)+parseInt(i(146,"^0y0"))/9*(parseInt(i(138,"!YIt"))/10)+-parseInt(i(151,"O%q4"))/11+parseInt(i(130,"UnZ4"))/12*(parseInt(i(141,"E^JA"))/13))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(q);var n=1,o=2,a=3,s=1,h=2,u=3,l=4,d=5;function f(t,e){var i=q();return f=function(e,r){var n=i[e-=127];if(void 0===f.DsHZPz){var o=function(t){for(var e,i,r="",n="",o=0,a=0;i=t.charAt(a++);~i&&(e=o%4?64*e+i:i,o++%4)?r+=String.fromCharCode(255&e>>(-2*o&6)):0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(var s=0,h=r.length;s<h;s++)n+="%"+("00"+r.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(n)},a=function(t,e){var i,r,n=[],a=0,s="";for(t=o(t),r=0;r<256;r++)n[r]=r;for(r=0;r<256;r++)a=(a+n[r]+e.charCodeAt(r%e.length))%256,i=n[r],n[r]=n[a],n[a]=i;r=0,a=0;for(var h=0;h<t.length;h++)a=(a+n[r=(r+1)%256])%256,i=n[r],n[r]=n[a],n[a]=i,s+=String.fromCharCode(t.charCodeAt(h)^n[(n[r]+n[a])%256]);return s};f.BEleuN=a,t=arguments,f.DsHZPz=!0}var s=i[0],h=e+s,u=t[h];return u?n=u:(void 0===f.FreeCU&&(f.FreeCU=!0),n=f.BEleuN(n,r),t[h]=n),n},f(t,e)}var c=6,p=7,m=8,g=10,v=11,y=12,b=13,_=14,w=15,A=16,M=20,E=21,S=100,k=101,T=102,R=103,I=200,C=1,P=2,x=3,D=!0,O=r(128,"phS^"),B=1920,L=1080,W=0,N=!0,F={};F[r(162,"l7Tx")]=!1,F[r(148,"gvq)")]=!1;var U=F,j=[];function V(t){D=t}function H(){return D}function z(t){O=t}function G(t){B=t}function q(){var t=["W7JdKCkVWOriWRFdIgLJWQWFW6iC","E8kzW40tqsRdUcO","kIBcKSkipcldULRdPCkFvCkKka","dmoBfmkeCdpdP2a","W5z0WQDBbSkg","WQ1yWOTHka","o8o9W4vqWPdcI8kKoa","vmoGwmkXi3b+oa","fSkZBmkIWOmvW7JcUSoCwCoLmCkBWPO","WOb+W7FdVmkyW67dOZdcObrFcSo1WQ0","WOuudSkEka","W6KjWR9tmCodWQyz","dtidDCoiW5jPWOWXW4vkp2G","W7ZcQmkECYRdPZ4h","sc5fWPhdHCkwpNtdPmoN","W4nHwx3cTWrmc8kqvxDTimoB","sc5fWPtdG8knoxm","ESkAWObsovZdPbawWQddNxW","W5tcSmo9rq","tJ5vWRxdGW","g0vqnSoj","W6PuWRpcN8ksW7VdQCkZW78+W47cGG","sc5fWPJdJCkmlG","vL4njs8","dSoqsCoNfutdMMyhW600rG","e0mv","ACk5sc4","wqmoB8klWRpdNSk1WPFcSXOrW58","cdeaD8ohW5bRW5yoW7TIoN/cPG","EHBcSmorq8ouEq","qN88imk1","ACoVySoflgWs","W7NdV8kUdq","ACkeuCo+WPJdMSkXEmk9","hxnHWOVdMSk6a1y","W4X/x8ksW4i","tr1kECoysCkzWPNcI8kjW6xcQ8oc","WRJcUmoTagSJaCo5nq","nspcVutdTSoiW7ZdPq","W5VdTLRcI8olWPlcMti","hLXyoSos"];return(q=function(){return t})()}function X(t){L=t}function Z(t){W=t}function K(){return O}function Q(){return B}function Y(){return L}function J(){return W}function $(t){N=t}function tt(){return N}function et(){var t=r;U[t(153,"Wo@Z")]=!1,U[t(137,"PFV2")]=!1}function it(t){var e=r;t===e(132,"wu1V")?U[e(142,"fRUp")]=!0:"audio"===t&&(U[e(166,"[W2e")]=!0)}function rt(){return U}function nt(t){return new Promise((function(e){return setTimeout(e,t)}))}function ot(t){var e=r,i=new Date,n=i.getFullYear(),o=i[e(140,"O7#I")]()+1,a=i[e(165,"l7Tx")]();i[e(147,"wYCL")]();i[e(159,"l7Tx")](),i[e(157,"l7Tx")](),i.getSeconds()}function at(){for(var t=r,e=window[t(149,"BsNI")].href[t(163,"fRUp")]("/"),i="",n=0;n<3;n++)i+=e[n],i+="/";return i}function st(t){return j}function ht(t){j[r(134,"LEw2")](t)}},function(t,e,i){"use strict";var r=i(6),n=i.n(r),o=function(){function t(){}return t.e=function(e,i){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+i;t.ENABLE_CALLBACK&&t.emitter.emit("log","error",r),t.ENABLE_ERROR&&(console.error||console.warn)},t.i=function(e,i){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+i;t.ENABLE_CALLBACK&&t.emitter.emit("log","info",r),t.ENABLE_INFO&&console.info},t.w=function(e,i){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+i;t.ENABLE_CALLBACK&&t.emitter.emit("log","warn",r),t.ENABLE_WARN&&console.warn},t.d=function(e,i){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+i;t.ENABLE_CALLBACK&&t.emitter.emit("log","debug",r),t.ENABLE_DEBUG&&console.debug},t.v=function(e,i){e&&!t.FORCE_GLOBAL_TAG||(e=t.GLOBAL_TAG);var r="["+e+"] > "+i;t.ENABLE_CALLBACK&&t.emitter.emit("log","verbose",r),t.ENABLE_VERBOSE},t}();o.GLOBAL_TAG="SyncPlayer.js",o.FORCE_GLOBAL_TAG=!1,o.ENABLE_ERROR=!0,o.ENABLE_INFO=!0,o.ENABLE_WARN=!0,o.ENABLE_DEBUG=!0,o.ENABLE_VERBOSE=!0,o.ENABLE_CALLBACK=!1,o.emitter=new n.a,e.a=o},function(t,e,i){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}function n(t,e){return n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(t,e)}function o(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e,i){return e&&o(t.prototype,e),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}i.d(e,"d",(function(){return s})),i.d(e,"a",(function(){return h})),i.d(e,"b",(function(){return u})),i.d(e,"c",(function(){return l}));var s=function(){function t(t){this._message=t}return t.prototype.toString=function(){return this.name+": "+this.message},a(t,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}}]),t}(),h=function(t){function e(e){return t.call(this,e)||this}return r(e,t),a(e,[{key:"name",get:function(){return"IllegalStateException"}}]),e}(s),u=function(t){function e(e){return t.call(this,e)||this}return r(e,t),a(e,[{key:"name",get:function(){return"InvalidArgumentException"}}]),e}(s),l=function(t){function e(e){return t.call(this,e)||this}return r(e,t),a(e,[{key:"name",get:function(){return"NotImplementedException"}}]),e}(s)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}}},function(t,e,i){var r=i(9),n=r.Buffer;function o(t,e){for(var i in t)e[i]=t[i]}function a(t,e,i){return n(t,e,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(n.prototype),o(n,a),a.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,i)},a.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=n(t);return void 0!==e?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,i){(function(e){var r;t.exports=(r=r||function(t,r){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"undefined"!=typeof self&&self.crypto&&(n=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(n=globalThis.crypto),!n&&"undefined"!=typeof window&&window.msCrypto&&(n=window.msCrypto),!n&&void 0!==e&&e.crypto&&(n=e.crypto),!n)try{n=i(258)}catch(t){}var o=function(){if(n){if("function"==typeof n.getRandomValues)try{return n.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof n.randomBytes)try{return n.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(e){var i;return t.prototype=e,i=new t,t.prototype=null,i}}(),s={},h=s.lib={},u=h.Base={extend:function(t){var e=a(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=h.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=r?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,i=t.words,r=this.sigBytes,n=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<n;o++){var a=i[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<n;s+=4)e[r+s>>>2]=i[s>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,i=this.sigBytes;e[i>>>2]&=4294967295<<32-i%4*8,e.length=t.ceil(i/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i<t;i+=4)e.push(o());return new l.init(e,t)}}),d=s.enc={},f=d.Hex={stringify:function(t){for(var e=t.words,i=t.sigBytes,r=[],n=0;n<i;n++){var o=e[n>>>2]>>>24-n%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r<e;r+=2)i[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(i,e/2)}},c=d.Latin1={stringify:function(t){for(var e=t.words,i=t.sigBytes,r=[],n=0;n<i;n++){var o=e[n>>>2]>>>24-n%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,i=[],r=0;r<e;r++)i[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(i,e)}},p=d.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},m=h.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var i,r=this._data,n=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),h=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*h,o);if(h){for(var d=0;d<h;d+=a)this._doProcessBlock(n,d);i=n.splice(0,h),r.sigBytes-=u}return new l.init(i,u)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(h.Hasher=m.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,i){return new t.init(i).finalize(e)}},_createHmacHelper:function(t){return function(e,i){return new g.HMAC.init(t,i).finalize(e)}}}),s.algo={});return s}(Math),r)}).call(this,i(10))},function(t,e,i){"use strict";var r,n="object"==typeof Reflect?Reflect:null,o=n&&"function"==typeof n.apply?n.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};r=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 a=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(i,r){function n(i){t.removeListener(e,o),r(i)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",n),i([].slice.call(arguments))}v(t,e,o,{once:!0}),"error"!==e&&function(t,e,i){"function"==typeof t.on&&v(t,"error",e,i)}(t,n,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var h=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function d(t,e,i,r){var n,o,a;if(u(i),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),a=o[e]),void 0===a)a=o[e]=i,++t._eventsCount;else if("function"==typeof a?a=o[e]=r?[i,a]:[a,i]:r?a.unshift(i):a.push(i),(n=l(t))>0&&a.length>n&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,console&&console.warn}return t}function f(){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,i){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},n=f.bind(r);return n.listener=i,r.wrapFn=n,n}function p(t,e,i){var r=t._events;if(void 0===r)return[];var n=r[e];return void 0===n?[]:"function"==typeof n?i?[n.listener||n]:[n]:i?function(t){for(var e=new Array(t.length),i=0;i<e.length;++i)e[i]=t[i].listener||t[i];return e}(n):g(n,n.length)}function m(t){var e=this._events;if(void 0!==e){var i=e[t];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function g(t,e){for(var i=new Array(e),r=0;r<e;++r)i[r]=t[r];return i}function v(t,e,i,r){if("function"==typeof t.on)r.once?t.once(e,i):t.on(e,i);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function n(o){r.once&&t.removeEventListener(e,n),i(o)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");h=t}}),s.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},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(t){for(var e=[],i=1;i<arguments.length;i++)e.push(arguments[i]);var r="error"===t,n=this._events;if(void 0!==n)r=r&&void 0===n.error;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var h=n[t];if(void 0===h)return!1;if("function"==typeof h)o(h,this,e);else{var u=h.length,l=g(h,u);for(i=0;i<u;++i)o(l[i],this,e)}return!0},s.prototype.addListener=function(t,e){return d(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return d(this,t,e,!0)},s.prototype.once=function(t,e){return u(e),this.on(t,c(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,c(this,t,e)),this},s.prototype.removeListener=function(t,e){var i,r,n,o,a;if(u(e),void 0===(r=this._events))return this;if(void 0===(i=r[t]))return this;if(i===e||i.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||e));else if("function"!=typeof i){for(n=-1,o=i.length-1;o>=0;o--)if(i[o]===e||i[o].listener===e){a=i[o].listener,n=o;break}if(n<0)return this;0===n?i.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(i,n),1===i.length&&(r[t]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,i,r;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[t]),this;if(0===arguments.length){var n,o=Object.keys(i);for(r=0;r<o.length;++r)"removeListener"!==(n=o[r])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=i[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,i){"use strict";e.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},function(t,e){var i,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(i===setTimeout)return setTimeout(t,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(t){i=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var h,u=[],l=!1,d=-1;function f(){l&&h&&(l=!1,h.length?u=h.concat(u):d=-1,u.length&&c())}function c(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(h=u,u=[];++d<e;)h&&h[d].run();d=-1,e=u.length}h=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new p(t,e)),1!==u.length||l||s(c)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(t,e,i){"use strict";(function(t){var r=i(140),n=i(141),o=i(78);function a(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=h.prototype:(null===t&&(t=new h(e)),t.length=e),t}function h(t,e,i){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(t,e,i);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return u(this,t,e,i)}function u(t,e,i,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,r){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===i&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,i):new Uint8Array(e,i,r);h.TYPED_ARRAY_SUPPORT?(t=e).__proto__=h.prototype:t=f(t,e);return t}(t,e,i,r):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!h.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,i),n=(t=s(t,r)).write(e,i);n!==r&&(t=t.slice(0,n));return t}(t,e,i):function(t,e){if(h.isBuffer(e)){var i=0|c(e.length);return 0===(t=s(t,i)).length||e.copy(t,0,0,i),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?s(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(l(e),t=s(t,e<0?0:0|c(e)),!h.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function f(t,e){var i=e.length<0?0:0|c(e.length);t=s(t,i);for(var r=0;r<i;r+=1)t[r]=255&e[r];return t}function c(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return V(t).length;default:if(r)return j(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,i){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,i);case"utf8":case"utf-8":return k(this,e,i);case"ascii":return R(this,e,i);case"latin1":case"binary":return I(this,e,i);case"base64":return S(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function v(t,e,i,r,n){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=h.from(e,r)),h.isBuffer(e))return 0===e.length?-1:y(t,e,i,r,n);if("number"==typeof e)return e&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,r,n){var o,a=1,s=t.length,h=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,h/=2,i/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(n){var l=-1;for(o=i;o<s;o++)if(u(t,o)===u(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===h)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(i+h>s&&(i=s-h),o=i;o>=0;o--){for(var d=!0,f=0;f<h;f++)if(u(t,o+f)!==u(e,f)){d=!1;break}if(d)return o}return-1}function b(t,e,i,r){i=Number(i)||0;var n=t.length-i;r?(r=Number(r))>n&&(r=n):r=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[i+a]=s}return a}function _(t,e,i,r){return H(j(e,t.length-i),t,i,r)}function w(t,e,i,r){return H(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,r)}function A(t,e,i,r){return w(t,e,i,r)}function M(t,e,i,r){return H(V(e),t,i,r)}function E(t,e,i,r){return H(function(t,e){for(var i,r,n,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(i=t.charCodeAt(a))>>8,n=i%256,o.push(n),o.push(r);return o}(e,t.length-i),t,i,r)}function S(t,e,i){return 0===e&&i===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,i))}function k(t,e,i){i=Math.min(t.length,i);for(var r=[],n=e;n<i;){var o,a,s,h,u=t[n],l=null,d=u>239?4:u>223?3:u>191?2:1;if(n+d<=i)switch(d){case 1:u<128&&(l=u);break;case 2:128==(192&(o=t[n+1]))&&(h=(31&u)<<6|63&o)>127&&(l=h);break;case 3:o=t[n+1],a=t[n+2],128==(192&o)&&128==(192&a)&&(h=(15&u)<<12|(63&o)<<6|63&a)>2047&&(h<55296||h>57343)&&(l=h);break;case 4:o=t[n+1],a=t[n+2],s=t[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(h=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&h<1114112&&(l=h)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),n+=d}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var i="",r=0;for(;r<e;)i+=String.fromCharCode.apply(String,t.slice(r,r+=T));return i}(r)}e.Buffer=h,e.SlowBuffer=function(t){+t!=t&&(t=0);return h.alloc(+t)},e.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),h.poolSize=8192,h._augment=function(t){return t.__proto__=h.prototype,t},h.from=function(t,e,i){return u(null,t,e,i)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(t,e,i){return function(t,e,i,r){return l(e),e<=0?s(t,e):void 0!==i?"string"==typeof r?s(t,e).fill(i,r):s(t,e).fill(i):s(t,e)}(null,t,e,i)},h.allocUnsafe=function(t){return d(null,t)},h.allocUnsafeSlow=function(t){return d(null,t)},h.isBuffer=function(t){return!(null==t||!t._isBuffer)},h.compare=function(t,e){if(!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,r=e.length,n=0,o=Math.min(i,r);n<o;++n)if(t[n]!==e[n]){i=t[n],r=e[n];break}return i<r?-1:r<i?1:0},h.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}},h.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var r=h.allocUnsafe(e),n=0;for(i=0;i<t.length;++i){var a=t[i];if(!h.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,n),n+=a.length}return r},h.byteLength=p,h.prototype._isBuffer=!0,h.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)g(this,e,e+1);return this},h.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)g(this,e,e+3),g(this,e+1,e+2);return this},h.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)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},h.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):m.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",i=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},h.prototype.compare=function(t,e,i,r,n){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=i)return 0;if(r>=n)return-1;if(e>=i)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(r>>>=0),a=(i>>>=0)-(e>>>=0),s=Math.min(o,a),u=this.slice(r,n),l=t.slice(e,i),d=0;d<s;++d)if(u[d]!==l[d]){o=u[d],a=l[d];break}return o<a?-1:a<o?1:0},h.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},h.prototype.indexOf=function(t,e,i){return v(this,t,e,i,!0)},h.prototype.lastIndexOf=function(t,e,i){return v(this,t,e,i,!1)},h.prototype.write=function(t,e,i,r){if(void 0===e)r="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)r=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}var n=this.length-e;if((void 0===i||i>n)&&(i=n),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,i);case"utf8":case"utf-8":return _(this,t,e,i);case"ascii":return w(this,t,e,i);case"latin1":case"binary":return A(this,t,e,i);case"base64":return M(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function R(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(127&t[n]);return r}function I(t,e,i){var r="";i=Math.min(t.length,i);for(var n=e;n<i;++n)r+=String.fromCharCode(t[n]);return r}function C(t,e,i){var r=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>r)&&(i=r);for(var n="",o=e;o<i;++o)n+=U(t[o]);return n}function P(t,e,i){for(var r=t.slice(e,i),n="",o=0;o<r.length;o+=2)n+=String.fromCharCode(r[o]+256*r[o+1]);return n}function x(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,i,r,n,o){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(i+r>t.length)throw new RangeError("Index out of range")}function O(t,e,i,r){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-i,2);n<o;++n)t[i+n]=(e&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function B(t,e,i,r){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-i,4);n<o;++n)t[i+n]=e>>>8*(r?n:3-n)&255}function L(t,e,i,r,n,o){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function W(t,e,i,r,o){return o||L(t,0,i,4),n.write(t,e,i,r,23,4),i+4}function N(t,e,i,r,o){return o||L(t,0,i,8),n.write(t,e,i,r,52,8),i+8}h.prototype.slice=function(t,e){var i,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),h.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=h.prototype;else{var n=e-t;i=new h(n,void 0);for(var o=0;o<n;++o)i[o]=this[o+t]}return i},h.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||x(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r},h.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||x(t,e,this.length);for(var r=this[t+--e],n=1;e>0&&(n*=256);)r+=this[t+--e]*n;return r},h.prototype.readUInt8=function(t,e){return e||x(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,e){return e||x(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,e){return e||x(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,e){return e||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,e){return e||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||x(t,e,this.length);for(var r=this[t],n=1,o=0;++o<e&&(n*=256);)r+=this[t+o]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*e)),r},h.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||x(t,e,this.length);for(var r=e,n=1,o=this[t+--r];r>0&&(n*=256);)o+=this[t+--r]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},h.prototype.readInt8=function(t,e){return e||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){e||x(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt16BE=function(t,e){e||x(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt32LE=function(t,e){return e||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return e||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,e){return e||x(t,4,this.length),n.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return e||x(t,4,this.length),n.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return e||x(t,8,this.length),n.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return e||x(t,8,this.length),n.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||D(this,t,e,i,Math.pow(2,8*i)-1,0);var n=1,o=0;for(this[e]=255&t;++o<i&&(n*=256);)this[e+o]=t/n&255;return e+i},h.prototype.writeUIntBE=function(t,e,i,r){(t=+t,e|=0,i|=0,r)||D(this,t,e,i,Math.pow(2,8*i)-1,0);var n=i-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+i},h.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,1,255,0),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},h.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},h.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},h.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},h.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},h.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);D(this,t,e,i,n-1,-n)}var o=0,a=1,s=0;for(this[e]=255&t;++o<i&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+i},h.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e|=0,!r){var n=Math.pow(2,8*i-1);D(this,t,e,i,n-1,-n)}var o=i-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+i},h.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,1,127,-128),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},h.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},h.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},h.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),h.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},h.prototype.writeFloatLE=function(t,e,i){return W(this,t,e,!0,i)},h.prototype.writeFloatBE=function(t,e,i){return W(this,t,e,!1,i)},h.prototype.writeDoubleLE=function(t,e,i){return N(this,t,e,!0,i)},h.prototype.writeDoubleBE=function(t,e,i){return N(this,t,e,!1,i)},h.prototype.copy=function(t,e,i,r){if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<i&&(r=i),r===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-i&&(r=t.length-e+i);var n,o=r-i;if(this===t&&i<e&&e<r)for(n=o-1;n>=0;--n)t[n+e]=this[n+i];else if(o<1e3||!h.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)t[n+e]=this[n+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+o),e);return o},h.prototype.fill=function(t,e,i,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),1===t.length){var n=t.charCodeAt(0);n<256&&(t=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var o;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(o=e;o<i;++o)this[o]=t;else{var a=h.isBuffer(t)?t:j(new h(t,r).toString()),s=a.length;for(o=0;o<i-e;++o)this[o+e]=a[o%s]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function j(t,e){var i;e=e||1/0;for(var r=t.length,n=null,o=[],a=0;a<r;++a){if((i=t.charCodeAt(a))>55295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(e-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((e-=1)<0)break;o.push(i)}else if(i<2048){if((e-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function V(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,i,r){for(var n=0;n<r&&!(n+i>=e.length||n>=t.length);++n)e[n+i]=t[n];return n}}).call(this,i(10))},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var r;t.exports=(r=i(5),i(21),void(r.lib.Cipher||function(t){var e=r,i=e.lib,n=i.Base,o=i.WordArray,a=i.BufferedBlockAlgorithm,s=e.enc,h=(s.Utf8,s.Base64),u=e.algo.EvpKDF,l=i.Cipher=a.extend({cfg:n.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,i){this.cfg=this.cfg.extend(i),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?b:v}return function(e){return{encrypt:function(i,r,n){return t(r).encrypt(e,i,r,n)},decrypt:function(i,r,n){return t(r).decrypt(e,i,r,n)}}}}()}),d=(i.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),e.mode={}),f=i.BlockCipherMode=n.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),c=d.CBC=function(){var e=f.extend();function i(e,i,r){var n,o=this._iv;o?(n=o,this._iv=t):n=this._prevBlock;for(var a=0;a<r;a++)e[i+a]^=n[a]}return e.Encryptor=e.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize;i.call(this,t,e,n),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+n)}}),e.Decryptor=e.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,o=t.slice(e,e+n);r.decryptBlock(t,e),i.call(this,t,e,n),this._prevBlock=o}}),e}(),p=(e.pad={}).Pkcs7={pad:function(t,e){for(var i=4*e,r=i-t.sigBytes%i,n=r<<24|r<<16|r<<8|r,a=[],s=0;s<r;s+=4)a.push(n);var h=o.create(a,r);t.concat(h)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},m=(i.BlockCipher=l.extend({cfg:l.cfg.extend({mode:c,padding:p}),reset:function(){var t;l.reset.call(this);var e=this.cfg,i=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,i&&i.words):(this._mode=t.call(r,this,i&&i.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,i=t.salt;return(i?o.create([1398893684,1701076831]).concat(i).concat(e):e).toString(h)},parse:function(t){var e,i=h.parse(t),r=i.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=o.create(r.slice(2,4)),r.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:e})}},v=i.SerializableCipher=n.extend({cfg:n.extend({format:g}),encrypt:function(t,e,i,r){r=this.cfg.extend(r);var n=t.createEncryptor(i,r),o=n.finalize(e),a=n.cfg;return m.create({ciphertext:o,key:i,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,i,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(i,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),y=(e.kdf={}).OpenSSL={execute:function(t,e,i,r){r||(r=o.random(8));var n=u.create({keySize:e+i}).compute(t,r),a=o.create(n.words.slice(e),4*i);return n.sigBytes=4*e,m.create({key:n,iv:a,salt:r})}},b=i.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:y}),encrypt:function(t,e,i,r){var n=(r=this.cfg.extend(r)).kdf.execute(i,t.keySize,t.ivSize);r.iv=n.iv;var o=v.encrypt.call(this,t,e,n.key,r);return o.mixIn(n),o},decrypt:function(t,e,i,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var n=r.kdf.execute(i,t.keySize,t.ivSize,e.salt);return r.iv=n.iv,v.decrypt.call(this,t,e,n.key,r)}})}()))},function(t,e,i){"use strict";var r=function(){function t(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}var e=t.prototype;return e.isComplete=function(){var t=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,e=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&t&&e},e.isSeekable=function(){return!0===this.hasKeyframesIndex},e.getNearestKeyframe=function(t){if(null==this.keyframesIndex)return null;var e=this.keyframesIndex,i=this._search(e.times,t);return{index:i,milliseconds:e.times[i],fileposition:e.filepositions[i]}},e._search=function(t,e){var i=0,r=t.length-1,n=0,o=0,a=r;for(e<t[0]&&(i=0,o=a+1);o<=a;){if((n=o+Math.floor((a-o)/2))===r||e>=t[n]&&e<t[n+1]){i=n;break}t[n]<e?o=n+1:a=n-1}return i},t}();e.a=r},function(t,e){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=i,i.equal=function(t,e,i){if(t!=e)throw new Error(i||"Assertion failed: "+t+" != "+e)}},function(t,e,i){"use strict";var r=e,n=i(16),o=i(13),a=i(116);r.assert=o,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(t,e,i){var r=new Array(Math.max(t.bitLength(),i)+1);r.fill(0);for(var n=1<<e+1,o=t.clone(),a=0;a<r.length;a++){var s,h=o.andln(n-1);o.isOdd()?(s=h>(n>>1)-1?(n>>1)-h:h,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},r.getJSF=function(t,e){var i=[[],[]];t=t.clone(),e=e.clone();for(var r,n=0,o=0;t.cmpn(-n)>0||e.cmpn(-o)>0;){var a,s,h=t.andln(3)+n&3,u=e.andln(3)+o&3;3===h&&(h=-1),3===u&&(u=-1),a=0==(1&h)?0:3!==(r=t.andln(7)+n&7)&&5!==r||2!==u?h:-h,i[0].push(a),s=0==(1&u)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==h?u:-u,i[1].push(s),2*n===a+1&&(n=1-n),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return i},r.cachedProperty=function(t,e,i){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=i.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new n(t,"hex","le")}},function(t,e,i){"use strict";var r=i(13),n=i(3);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=n,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)i.push(parseInt(t[n]+t[n+1],16))}else for(var r=0,n=0;n<t.length;n++){var a=t.charCodeAt(n);a<128?i[r++]=a:a<2048?(i[r++]=a>>6|192,i[r++]=63&a|128):o(t,n)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++n)),i[r++]=a>>18|240,i[r++]=a>>12&63|128,i[r++]=a>>6&63|128,i[r++]=63&a|128):(i[r++]=a>>12|224,i[r++]=a>>6&63|128,i[r++]=63&a|128)}else for(n=0;n<t.length;n++)i[n]=0|t[n];return i},e.toHex=function(t){for(var e="",i=0;i<t.length;i++)e+=s(t[i].toString(16));return e},e.htonl=a,e.toHex32=function(t,e){for(var i="",r=0;r<t.length;r++){var n=t[r];"little"===e&&(n=a(n)),i+=h(n.toString(16))}return i},e.zero2=s,e.zero8=h,e.join32=function(t,e,i,n){var o=i-e;r(o%4==0);for(var a=new Array(o/4),s=0,h=e;s<a.length;s++,h+=4){var u;u="big"===n?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],a[s]=u>>>0}return a},e.split32=function(t,e){for(var i=new Array(4*t.length),r=0,n=0;r<t.length;r++,n+=4){var o=t[r];"big"===e?(i[n]=o>>>24,i[n+1]=o>>>16&255,i[n+2]=o>>>8&255,i[n+3]=255&o):(i[n+3]=o>>>24,i[n+2]=o>>>16&255,i[n+1]=o>>>8&255,i[n]=255&o)}return i},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,i){return t+e+i>>>0},e.sum32_4=function(t,e,i,r){return t+e+i+r>>>0},e.sum32_5=function(t,e,i,r,n){return t+e+i+r+n>>>0},e.sum64=function(t,e,i,r){var n=t[e],o=r+t[e+1]>>>0,a=(o<r?1:0)+i+n;t[e]=a>>>0,t[e+1]=o},e.sum64_hi=function(t,e,i,r){return(e+r>>>0<e?1:0)+t+i>>>0},e.sum64_lo=function(t,e,i,r){return e+r>>>0},e.sum64_4_hi=function(t,e,i,r,n,o,a,s){var h=0,u=e;return h+=(u=u+r>>>0)<e?1:0,h+=(u=u+o>>>0)<o?1:0,t+i+n+a+(h+=(u=u+s>>>0)<s?1:0)>>>0},e.sum64_4_lo=function(t,e,i,r,n,o,a,s){return e+r+o+s>>>0},e.sum64_5_hi=function(t,e,i,r,n,o,a,s,h,u){var l=0,d=e;return l+=(d=d+r>>>0)<e?1:0,l+=(d=d+o>>>0)<o?1:0,l+=(d=d+s>>>0)<s?1:0,t+i+n+a+h+(l+=(d=d+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,i,r,n,o,a,s,h,u){return e+r+o+s+u>>>0},e.rotr64_hi=function(t,e,i){return(e<<32-i|t>>>i)>>>0},e.rotr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0},e.shr64_hi=function(t,e,i){return t>>>i},e.shr64_lo=function(t,e,i){return(t<<32-i|e>>>i)>>>0}},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(209).Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),a=e;a<o;a++){var s=t.charCodeAt(a)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},o.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,a=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,a=o%r,s=Math.min(o,o-a)+i,h=0,l=i;l<s;l+=r)h=u(t,l,l+r,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==a){var d=1;for(h=u(t,l,t.length,e),l=0;l<a;l++)d*=e;this.imuln(d),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,h=a/67108864|0;i.words[0]=s;for(var u=1;u<r;u++){for(var l=h>>>26,d=67108863&h,f=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=f;c++){var p=u-c|0;l+=(a=(n=0|t.words[p])*(o=0|e.words[c])+d)/67108864|0,d=67108863&a}i.words[u]=0|d,h=0|l}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],h=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||a!==this.length-1?l[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],c=f[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);i=(p=p.idivn(c)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,h="le"===e,u=new t(o),l=this.clone();if(h){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-n;s++)u[s]=0;for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|i.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<i.length;a++)o=(e=(0|i.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<i.length&&i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this.length=Math.max(this.length,a),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,i){var r,n,o,a=t.words,s=e.words,h=i.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,c=0|a[1],p=8191&c,m=c>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],_=8191&b,w=b>>>13,A=0|a[4],M=8191&A,E=A>>>13,S=0|a[5],k=8191&S,T=S>>>13,R=0|a[6],I=8191&R,C=R>>>13,P=0|a[7],x=8191&P,D=P>>>13,O=0|a[8],B=8191&O,L=O>>>13,W=0|a[9],N=8191&W,F=W>>>13,U=0|s[0],j=8191&U,V=U>>>13,H=0|s[1],z=8191&H,G=H>>>13,q=0|s[2],X=8191&q,Z=q>>>13,K=0|s[3],Q=8191&K,Y=K>>>13,J=0|s[4],$=8191&J,tt=J>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ht=8191&st,ut=st>>>13,lt=0|s[8],dt=8191<,ft=lt>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(d,j))|0)+((8191&(n=(n=Math.imul(d,V))+Math.imul(f,j)|0))<<13)|0;u=((o=Math.imul(f,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,j),n=(n=Math.imul(p,V))+Math.imul(m,j)|0,o=Math.imul(m,V);var vt=(u+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(f,z)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,j),n=(n=Math.imul(v,V))+Math.imul(y,j)|0,o=Math.imul(y,V),r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,j),n=(n=Math.imul(_,V))+Math.imul(w,j)|0,o=Math.imul(w,V),r=r+Math.imul(v,z)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Z)|0;var bt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,Y)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,j),n=(n=Math.imul(M,V))+Math.imul(E,j)|0,o=Math.imul(E,V),r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var _t=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,tt)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,V))+Math.imul(T,j)|0,o=Math.imul(T,V),r=r+Math.imul(M,z)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(r=r+Math.imul(d,it)|0)|0)+((8191&(n=(n=n+Math.imul(d,rt)|0)+Math.imul(f,it)|0))<<13)|0;u=((o=o+Math.imul(f,rt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,j),n=(n=Math.imul(I,V))+Math.imul(C,j)|0,o=Math.imul(C,V),r=r+Math.imul(k,z)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var At=(u+(r=r+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,at)|0)+Math.imul(f,ot)|0))<<13)|0;u=((o=o+Math.imul(f,at)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(x,j),n=(n=Math.imul(x,V))+Math.imul(D,j)|0,o=Math.imul(D,V),r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(u+(r=r+Math.imul(d,ht)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(f,ht)|0))<<13)|0;u=((o=o+Math.imul(f,ut)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,j),n=(n=Math.imul(B,V))+Math.imul(L,j)|0,o=Math.imul(L,V),r=r+Math.imul(x,z)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,it)|0,n=(n=n+Math.imul(_,rt)|0)+Math.imul(w,it)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((o=o+Math.imul(f,ft)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),n=(n=Math.imul(N,V))+Math.imul(F,j)|0,o=Math.imul(F,V),r=r+Math.imul(B,z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(L,z)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(M,it)|0,n=(n=n+Math.imul(M,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,n=(n=n+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ut)|0,r=r+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,o=o+Math.imul(m,ft)|0;var St=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((o=o+Math.imul(f,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,G))+Math.imul(F,z)|0,o=Math.imul(F,G),r=r+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(M,ot)|0,n=(n=n+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,ht)|0,n=(n=n+Math.imul(_,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,r=r+Math.imul(v,dt)|0,n=(n=n+Math.imul(v,ft)|0)+Math.imul(y,dt)|0,o=o+Math.imul(y,ft)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),r=r+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(C,it)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(M,ht)|0,n=(n=n+Math.imul(M,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(_,dt)|0,n=(n=n+Math.imul(_,ft)|0)+Math.imul(w,dt)|0,o=o+Math.imul(w,ft)|0;var Tt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,it)|0,n=(n=n+Math.imul(x,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(k,ht)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(M,dt)|0,n=(n=n+Math.imul(M,ft)|0)+Math.imul(E,dt)|0,o=o+Math.imul(E,ft)|0;var Rt=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(n=(n=n+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ut)|0,r=r+Math.imul(k,dt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(T,dt)|0,o=o+Math.imul(T,ft)|0;var It=(u+(r=r+Math.imul(M,pt)|0)|0)+((8191&(n=(n=n+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,dt)|0,n=(n=n+Math.imul(I,ft)|0)+Math.imul(C,dt)|0,o=o+Math.imul(C,ft)|0;var Ct=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(x,dt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(D,dt)|0,o=o+Math.imul(D,ft)|0;var Pt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(N,ht),n=(n=Math.imul(N,ut))+Math.imul(F,ht)|0,o=Math.imul(F,ut),r=r+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(L,dt)|0,o=o+Math.imul(L,ft)|0;var xt=(u+(r=r+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,dt),n=(n=Math.imul(N,ft))+Math.imul(F,dt)|0,o=Math.imul(F,ft);var Dt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ot=(u+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,h[0]=gt,h[1]=vt,h[2]=yt,h[3]=bt,h[4]=_t,h[5]=wt,h[6]=At,h[7]=Mt,h[8]=Et,h[9]=St,h[10]=kt,h[11]=Tt,h[12]=Rt,h[13]=It,h[14]=Ct,h[15]=Pt,h[16]=xt,h[17]=Dt,h[18]=Ot,0!==u&&(h[19]=u,i.length++),i};function m(t,e,i){return(new g).mulp(t,e,i)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=c),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?p(this,t,e):r<63?c(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var a=n;n=0;for(var s=67108863&r,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var l=o-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):m(this,t,e),i},g.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},g.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},g.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a<o;a++)r[a]=e[t[a]],n[a]=i[t[a]]},g.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,h=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var d=h,f=u,c=0;c<a;c++){var p=i[l+c],m=r[l+c],g=i[l+c+a],v=r[l+c+a],y=d*g-f*v;v=d*v+f*g,g=y,i[l+c]=p+g,r[l+c]=m+v,i[l+c+a]=p-g,r[l+c+a]=m-v,c!==s&&(y=h*d-u*f,f=h*f+u*d,d=y)}},g.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},g.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,i,n){for(var o=0,a=0;a<e;a++)o+=0|t[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},g.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),h=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=i.words;f.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,u,r),this.transform(a,o,s,h,r,n),this.transform(u,o,l,d,r,n);for(var c=0;c<r;c++){var p=s[c]*l[c]-h[c]*d[c];h[c]=s[c]*d[c]+h[c]*l[c],s[c]=p}return this.conjugate(s,h,r),this.transform(s,h,f,o,r,n),this.conjugate(f,o,r),this.normalize13b(f,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,i=0;i<this.length;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,h=(0|this.words[e])-s<<i;this.words[e]=h|a,a=s>>>26-i}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,h=i;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=n);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return h&&0!==l&&(h.words[h.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,i){var n,o,a=t.length+i;this._expand(a);var s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+s;var h=(0|t.words[n])*e;s=((o-=67108863&h)>>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)s=(o=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,a=0|n.words[n.length-1];0!==(i=26-this._countBits(a))&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var s,h=r.length-n.length;if("mod"!==e){(s=new o(null)).length=h+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(n,1,h);0===l.negative&&(r=l,s&&(s.words[h]=1));for(var d=h-1;d>=0;d--){var f=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(n,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),h=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var l=i.clone(),d=e.clone();!e.isZero();){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(l),a.isub(d)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||h.isOdd())&&(s.iadd(l),h.isub(d)),s.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(s),a.isub(h)):(i.isub(e),s.isub(n),h.isub(a))}return{a:s,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var d=0,f=1;0==(i.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);e.cmp(i)>=0?(e.isub(i),a.isub(s)):(i.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(a&i)<<4|o>>>22,o=a}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(w,y),n(A,y),A.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var s=new o(1).toRed(this),h=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(h);)l.redIAdd(h);for(var d=this.pow(l,n),f=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=a;0!==c.cmp(s);){for(var m=c,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),c=c.redMul(d),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var n=i[0],a=0,s=0,h=e.bitLength()%26;for(0===h&&(h=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=h-1;l>=0;l--){var d=u>>l&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(n=this.mul(n,i[a]),s=0,a=0)):s=0}h=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,i(20)(t))},function(t,e,i){var r=i(4).Buffer,n=i(161).Transform,o=i(18).StringDecoder;function a(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}i(3)(a,n),a.prototype.update=function(t,e,i){"string"==typeof t&&(t=r.from(t,e));var n=this._update(t);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,i){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{i(r)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,i){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return i&&(r+=this._decoder.end()),r},t.exports=a},function(t,e,i){"use strict";var r=i(4).Buffer,n=r.isEncoding||function(t){switch((t=""+t)&&t.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 o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=d,e=3;break;default:return this.write=f,void(this.end=c)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,i=function(t,e,i){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var i=t.toString("utf16le",e);if(i){var r=i.charCodeAt(i.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,i)}return e}function l(t,e){var i=(t.length-e)%3;return 0===i?t.toString("base64",e):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-i))}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function c(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,i;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?e?e+this.text(t,i):this.text(t,i):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var i=function(t,e,i){var r=e.length-1;if(r<i)return 0;var n=a(e[r]);if(n>=0)return n>0&&(t.lastNeed=n-1),n;if(--r<i||-2===n)return 0;if((n=a(e[r]))>=0)return n>0&&(t.lastNeed=n-2),n;if(--r<i||-2===n)return 0;if((n=a(e[r]))>=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=i;var r=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,i){"use strict";var r=i(42),n=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};t.exports=d;var o=Object.create(i(36));o.inherits=i(3);var a=i(88),s=i(59);o.inherits(d,a);for(var h=n(s.prototype),u=0;u<h.length;u++){var l=h[u];d.prototype[l]||(d.prototype[l]=s.prototype[l])}function d(t){if(!(this instanceof d))return new d(t);a.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),d.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,i){var r,n,o,a,s,h,u,l;t.exports=(l=i(5),i(75),i(76),n=(r=l).lib,o=n.Base,a=n.WordArray,s=r.algo,h=s.MD5,u=s.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:h,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var i,r=this.cfg,n=r.hasher.create(),o=a.create(),s=o.words,h=r.keySize,u=r.iterations;s.length<h;){i&&n.update(i),i=n.update(t).finalize(e),n.reset();for(var l=1;l<u;l++)i=n.finalize(i),n.reset();o.concat(i)}return o.sigBytes=4*h,o}}),r.EvpKDF=function(t,e,i){return u.create(i).compute(t,e)},l.EvpKDF)},function(t,e,i){function r(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i.oe=function(t){throw t};var r=i(i.s=ENTRY_MODULE);return r.default||r}var n="[\\.|\\-|\\+|\\w|/|@]+",o="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function a(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function s(t,e,r){var s={};s[r]=[];var h=e.toString(),u=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return s;for(var l,d=u[1],f=new RegExp("(\\\\n|\\W)"+a(d)+o,"g");l=f.exec(h);)"dll-reference"!==l[3]&&s[r].push(l[3]);for(f=new RegExp("\\("+a(d)+'\\("(dll-reference\\s('+n+'))"\\)\\)'+o,"g");l=f.exec(h);)t[l[2]]||(s[r].push(l[1]),t[l[2]]=i(l[1]).m),s[l[2]]=s[l[2]]||[],s[l[2]].push(l[4]);for(var c,p=Object.keys(s),m=0;m<p.length;m++)for(var g=0;g<s[p[m]].length;g++)c=s[p[m]][g],isNaN(1*c)||(s[p[m]][g]=1*s[p[m]][g]);return s}function h(t){return Object.keys(t).reduce((function(e,i){return e||t[i].length>0}),!1)}t.exports=function(t,e){e=e||{};var n={main:i.m},o=e.all?{main:Object.keys(n.main)}:function(t,e){for(var i={main:[e]},r={main:[]},n={main:{}};h(i);)for(var o=Object.keys(i),a=0;a<o.length;a++){var u=o[a],l=i[u].pop();if(n[u]=n[u]||{},!n[u][l]&&t[u][l]){n[u][l]=!0,r[u]=r[u]||[],r[u].push(l);for(var d=s(t,t[u][l],u),f=Object.keys(d),c=0;c<f.length;c++)i[f[c]]=i[f[c]]||[],i[f[c]]=i[f[c]].concat(d[f[c]])}}return r}(n,t),a="";Object.keys(o).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;o[t][e];)e++;o[t].push(e),n[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+t+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o[t].map((function(e){return JSON.stringify(e)+": "+n[t][e].toString()})).join(",")+"});\n"})),a=a+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o.main.map((function(t){return JSON.stringify(t)+": "+n.main[t].toString()})).join(",")+"}))(self);";var u=new window.Blob([a],{type:"text/javascript"});if(e.bare)return u;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),d=new window.Worker(l);return d.objectURL=l,d}},function(t,e,i){"use strict";var r=i(2),n=function(){function t(t){this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}var e=t.prototype;return e.destroy=function(){this._buffer=null},e._fillCurrentWord=function(){var t=this._total_bytes-this._buffer_index;if(t<=0)throw new r.a("ExpGolomb: _fillCurrentWord() but no bytes available");var e=Math.min(4,t),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+e)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=e,this._current_word_bits_left=8*e},e.readBits=function(t){if(t>32)throw new r.b("ExpGolomb: readBits() bits exceeded max 32bits!");if(t<=this._current_word_bits_left){var e=this._current_word>>>32-t;return this._current_word<<=t,this._current_word_bits_left-=t,e}var i=this._current_word_bits_left?this._current_word:0;i>>>=32-this._current_word_bits_left;var n=t-this._current_word_bits_left;this._fillCurrentWord();var o=Math.min(n,this._current_word_bits_left),a=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,i=i<<o|a},e.readBool=function(){return 1===this.readBits(1)},e.readByte=function(){return this.readBits(8)},e._skipLeadingZero=function(){var t;for(t=0;t<this._current_word_bits_left;t++)if(0!=(this._current_word&2147483648>>>t))return this._current_word<<=t,this._current_word_bits_left-=t,t;return this._fillCurrentWord(),t+this._skipLeadingZero()},e.readUEG=function(){var t=this._skipLeadingZero();return this.readBits(t+1)-1},e.readSEG=function(){var t=this.readUEG();return 1&t?t+1>>>1:-1*(t>>>1)},t}(),o=function(){function t(){}return t._ebsp2rbsp=function(t){for(var e=t,i=e.byteLength,r=new Uint8Array(i),n=0,o=0;o<i;o++)o>=2&&3===e[o]&&0===e[o-1]&&0===e[o-2]||(r[n]=e[o],n++);return new Uint8Array(r.buffer,0,n)},t.parseSPS=function(e){var i=t._ebsp2rbsp(e),r=new n(i);r.readByte();var o=r.readByte();r.readByte();var a=r.readByte();r.readUEG();var s=t.getProfileString(o),h=t.getLevelString(a),u=1,l=420,d=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(3===(u=r.readUEG())&&r.readBits(1),u<=3&&(l=[0,420,422,444][u]),d=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var f=3!==u?8:12,c=0;c<f;c++)r.readBool()&&(c<6?t._skipScalingList(r,16):t._skipScalingList(r,64));r.readUEG();var p=r.readUEG();if(0===p)r.readUEG();else if(1===p){r.readBits(1),r.readSEG(),r.readSEG();for(var m=r.readUEG(),g=0;g<m;g++)r.readSEG()}var v=r.readUEG();r.readBits(1);var y=r.readUEG(),b=r.readUEG(),_=r.readBits(1);0===_&&r.readBits(1),r.readBits(1);var w=0,A=0,M=0,E=0;r.readBool()&&(w=r.readUEG(),A=r.readUEG(),M=r.readUEG(),E=r.readUEG());var S=1,k=1,T=0,R=!0,I=0,C=0;if(r.readBool()){if(r.readBool()){var P=r.readByte();P>0&&P<16?(S=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][P-1],k=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][P-1]):255===P&&(S=r.readByte()<<8|r.readByte(),k=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var x=r.readBits(32),D=r.readBits(32);R=r.readBool(),T=(I=D)/(C=2*x)}}var O=1;1===S&&1===k||(O=S/k);var B=0,L=0;0===u?(B=1,L=2-_):(B=3===u?1:2,L=(1===u?2:1)*(2-_));var W=16*(y+1),N=16*(b+1)*(2-_);W-=(w+A)*B,N-=(M+E)*L;var F=Math.ceil(W*O);return r.destroy(),r=null,{avc_profile:o,profile_string:s,avc_level:a,level_string:h,bit_depth:d,ref_frames:v,chroma_format:l,chroma_format_string:t.getChromaFormatString(l),frame_rate:{fixed:R,fps:T,fps_den:C,fps_num:I},sar_ratio:{width:S,height:k},codec_size:{width:W,height:N},present_size:{width:F,height:N}}},t._skipScalingList=function(t,e){for(var i=8,r=8,n=0;n<e;n++)0!==r&&(r=(i+t.readSEG()+256)%256),i=0===r?i:r},t.getProfileString=function(t){switch(t){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},t.getLevelString=function(t){return(t/10).toFixed(1)},t.getChromaFormatString=function(t){switch(t){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},t}();e.a=o},function(t,e,i){var r;t.exports=(r=i(5),i(49),i(259),i(260),i(31),i(261),i(32),i(75),i(131),i(262),i(132),i(263),i(264),i(265),i(76),i(266),i(21),i(11),i(267),i(268),i(269),i(270),i(271),i(272),i(273),i(274),i(275),i(276),i(277),i(278),i(279),i(280),i(281),i(282),r)},function(t,e,i){"use strict";(function(e,r){var n=65536,o=4294967295;var a=i(4).Buffer,s=e.crypto||e.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>o)throw new RangeError("requested too many random bytes");var i=a.allocUnsafe(t);if(t>0)if(t>n)for(var h=0;h<t;h+=n)s.getRandomValues(i.slice(h,h+n));else s.getRandomValues(i);if("function"==typeof e)return r.nextTick((function(){e(null,i)}));return i}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,i(10),i(8))},function(t,e,i){"use strict";var r={};function n(t,e,i){i||(i=Error);var n=function(t){var i,r;function n(i,r,n){return t.call(this,function(t,i,r){return"string"==typeof e?e:e(t,i,r)}(i,r,n))||this}return r=t,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);n.prototype.name=i.name,n.prototype.code=t,r[t]=n}function o(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,n,a,s;if("string"==typeof e&&(n="not ",e.substr(!a||a<0?0:+a,n.length)===n)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var h=function(t,e,i){return"number"!=typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,i){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};t.exports=u;var n=i(80),o=i(84);i(3)(u,n);for(var a=r(o.prototype),s=0;s<a.length;s++){var h=a[s];u.prototype[h]||(u.prototype[h]=o.prototype[h])}function u(t){if(!(this instanceof u))return new u(t);n.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,i(8))},function(t,e,i){var r=i(4).Buffer;function n(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}n.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var i=this._block,n=this._blockSize,o=t.length,a=this._len,s=0;s<o;){for(var h=a%n,u=Math.min(o-s,n-h),l=0;l<u;l++)i[h+l]=t[s+l];s+=u,(a+=u)%n==0&&this._update(i)}return this._len+=o,this},n.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e,i){"use strict";var r={};function n(t,e,i){i||(i=Error);var n=function(t){var i,r;function n(i,r,n){return t.call(this,function(t,i,r){return"string"==typeof e?e:e(t,i,r)}(i,r,n))||this}return r=t,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);n.prototype.name=i.name,n.prototype.code=t,r[t]=n}function o(t,e){if(Array.isArray(t)){var i=t.length;return t=t.map((function(t){return String(t)})),i>2?"one of ".concat(e," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,i){var r,n,a,s;if("string"==typeof e&&(n="not ",e.substr(!a||a<0?0:+a,n.length)===n)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-e.length,i)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var h=function(t,e,i){return"number"!=typeof i&&(i=0),!(i+e.length>t.length)&&-1!==t.indexOf(e,i)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,i){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var i in t)e.push(i);return e};t.exports=u;var n=i(110),o=i(114);i(3)(u,n);for(var a=r(o.prototype),s=0;s<a.length;s++){var h=a[s];u.prototype[h]||(u.prototype[h]=o.prototype[h])}function u(t){if(!(this instanceof u))return new u(t);n.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,i(8))},function(t,e,i){var r;t.exports=(r=i(5),function(){var t=r,e=t.lib.WordArray;function i(t,i,r){for(var n=[],o=0,a=0;a<i;a++)if(a%4){var s=r[t.charCodeAt(a-1)]<<a%4*2|r[t.charCodeAt(a)]>>>6-a%4*2;n[o>>>2]|=s<<24-o%4*8,o++}return e.create(n,o)}t.enc.Base64={stringify:function(t){var e=t.words,i=t.sigBytes,r=this._map;t.clamp();for(var n=[],o=0;o<i;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<i;s++)n.push(r.charAt(a>>>6*(3-s)&63));var h=r.charAt(64);if(h)for(;n.length%4;)n.push(h);return n.join("")},parse:function(t){var e=t.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<r.length;o++)n[r.charCodeAt(o)]=o}var a=r.charAt(64);if(a){var s=t.indexOf(a);-1!==s&&(e=s)}return i(t,e,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)},function(t,e,i){var r;t.exports=(r=i(5),function(t){var e=r,i=e.lib,n=i.WordArray,o=i.Hasher,a=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var h=a.MD5=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var r=e+i,n=t[r];t[r]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,a=t[e+0],h=t[e+1],c=t[e+2],p=t[e+3],m=t[e+4],g=t[e+5],v=t[e+6],y=t[e+7],b=t[e+8],_=t[e+9],w=t[e+10],A=t[e+11],M=t[e+12],E=t[e+13],S=t[e+14],k=t[e+15],T=o[0],R=o[1],I=o[2],C=o[3];T=u(T,R,I,C,a,7,s[0]),C=u(C,T,R,I,h,12,s[1]),I=u(I,C,T,R,c,17,s[2]),R=u(R,I,C,T,p,22,s[3]),T=u(T,R,I,C,m,7,s[4]),C=u(C,T,R,I,g,12,s[5]),I=u(I,C,T,R,v,17,s[6]),R=u(R,I,C,T,y,22,s[7]),T=u(T,R,I,C,b,7,s[8]),C=u(C,T,R,I,_,12,s[9]),I=u(I,C,T,R,w,17,s[10]),R=u(R,I,C,T,A,22,s[11]),T=u(T,R,I,C,M,7,s[12]),C=u(C,T,R,I,E,12,s[13]),I=u(I,C,T,R,S,17,s[14]),T=l(T,R=u(R,I,C,T,k,22,s[15]),I,C,h,5,s[16]),C=l(C,T,R,I,v,9,s[17]),I=l(I,C,T,R,A,14,s[18]),R=l(R,I,C,T,a,20,s[19]),T=l(T,R,I,C,g,5,s[20]),C=l(C,T,R,I,w,9,s[21]),I=l(I,C,T,R,k,14,s[22]),R=l(R,I,C,T,m,20,s[23]),T=l(T,R,I,C,_,5,s[24]),C=l(C,T,R,I,S,9,s[25]),I=l(I,C,T,R,p,14,s[26]),R=l(R,I,C,T,b,20,s[27]),T=l(T,R,I,C,E,5,s[28]),C=l(C,T,R,I,c,9,s[29]),I=l(I,C,T,R,y,14,s[30]),T=d(T,R=l(R,I,C,T,M,20,s[31]),I,C,g,4,s[32]),C=d(C,T,R,I,b,11,s[33]),I=d(I,C,T,R,A,16,s[34]),R=d(R,I,C,T,S,23,s[35]),T=d(T,R,I,C,h,4,s[36]),C=d(C,T,R,I,m,11,s[37]),I=d(I,C,T,R,y,16,s[38]),R=d(R,I,C,T,w,23,s[39]),T=d(T,R,I,C,E,4,s[40]),C=d(C,T,R,I,a,11,s[41]),I=d(I,C,T,R,p,16,s[42]),R=d(R,I,C,T,v,23,s[43]),T=d(T,R,I,C,_,4,s[44]),C=d(C,T,R,I,M,11,s[45]),I=d(I,C,T,R,k,16,s[46]),T=f(T,R=d(R,I,C,T,c,23,s[47]),I,C,a,6,s[48]),C=f(C,T,R,I,y,10,s[49]),I=f(I,C,T,R,S,15,s[50]),R=f(R,I,C,T,g,21,s[51]),T=f(T,R,I,C,M,6,s[52]),C=f(C,T,R,I,p,10,s[53]),I=f(I,C,T,R,w,15,s[54]),R=f(R,I,C,T,h,21,s[55]),T=f(T,R,I,C,b,6,s[56]),C=f(C,T,R,I,k,10,s[57]),I=f(I,C,T,R,v,15,s[58]),R=f(R,I,C,T,E,21,s[59]),T=f(T,R,I,C,m,6,s[60]),C=f(C,T,R,I,A,10,s[61]),I=f(I,C,T,R,c,15,s[62]),R=f(R,I,C,T,_,21,s[63]),o[0]=o[0]+T|0,o[1]=o[1]+R|0,o[2]=o[2]+I|0,o[3]=o[3]+C|0},_doFinalize:function(){var e=this._data,i=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;i[n>>>5]|=128<<24-n%32;var o=t.floor(r/4294967296),a=r;i[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),i[14+(n+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(i.length+1),this._process();for(var s=this._hash,h=s.words,u=0;u<4;u++){var l=h[u];h[u]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function u(t,e,i,r,n,o,a){var s=t+(e&i|~e&r)+n+a;return(s<<o|s>>>32-o)+e}function l(t,e,i,r,n,o,a){var s=t+(e&r|i&~r)+n+a;return(s<<o|s>>>32-o)+e}function d(t,e,i,r,n,o,a){var s=t+(e^i^r)+n+a;return(s<<o|s>>>32-o)+e}function f(t,e,i,r,n,o,a){var s=t+(i^(e|~r))+n+a;return(s<<o|s>>>32-o)+e}e.MD5=o._createHelper(h),e.HmacMD5=o._createHmacHelper(h)}(Math),r.MD5)},function(t,e,i){"use strict";var r=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(i,1),i>-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var i=e.length,r=0;r<i;++r)e[r].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),o=e.length,a=0;a<o;++a)e[a].apply(this,n)},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",(function(e){t.push(e)}))},t}();t.exports=r},function(t,e){var i,r=((i={validateDimension:function(t){if(t<=0||t!==(0|t))throw"YUV plane dimensions must be a positive integer"},validateOffset:function(t){if(t<0||t!==(0|t))throw"YUV plane offsets must be a non-negative integer"},format:function(t){var e=t.width,i=t.height,r=t.chromaWidth||e,n=t.chromaHeight||i,o=t.cropLeft||0,a=t.cropTop||0,s=t.cropWidth||e-o,h=t.cropHeight||i-a,u=t.displayWidth||s,l=t.displayHeight||h;return this.validateDimension(e),this.validateDimension(i),this.validateDimension(r),this.validateDimension(n),this.validateOffset(o),this.validateOffset(a),this.validateDimension(s),this.validateDimension(h),this.validateDimension(u),this.validateDimension(l),{width:e,height:i,chromaWidth:r,chromaHeight:n,cropLeft:o,cropTop:a,cropWidth:s,cropHeight:h,displayWidth:u,displayHeight:l}},allocPlane:function(t,e){return r.validateDimension(t),r.validateDimension(e),{bytes:new Uint8Array(t*e),stride:t}},suitableStride:function(t){r.validateDimension(t);var e=t%4;return 0==e?t:t+(4-e)}}).allocPlane=function(t,e,i,r,n){var o,a;if(this.validateDimension(t),this.validateDimension(e),n=n||0,r=r||this.suitableStride(t),this.validateDimension(r),r<t)throw"Invalid input stride for YUV plane; must be larger than width";if(o=r*e,i){if(i.length-n<o)throw"Invalid input buffer for YUV plane; must be large enough for stride times height";a=i.slice(n,n+o)}else a=new Uint8Array(o),r=r||this.suitableStride(t);return{bytes:a,stride:r}},i.lumaPlane=function(t,e,i,r){return this.allocPlane(t.width,t.height,e,i,r)},i.chromaPlane=function(t,e,i,r){return this.allocPlane(t.chromaWidth,t.chromaHeight,e,i,r)},i.frame=function(t,e,i,r){return{format:t,y:e=e||this.lumaPlane(t),u:i=i||this.chromaPlane(t),v:r=r||this.chromaPlane(t)}},i.copyPlane=function(t){return{bytes:t.bytes.slice(),stride:t.stride}},i.copyFrame=function(t){return{format:t.format,y:this.copyPlane(t.y),u:this.copyPlane(t.u),v:this.copyPlane(t.v)}},i.transferables=function(t){return[t.y.bytes.buffer,t.u.bytes.buffer,t.v.bytes.buffer]},i);t.exports=r},function(t,e,i){"use strict";var r=i(3),n=i(52),o=i(55),a=i(56),s=i(17);function h(t){s.call(this,"digest"),this._hash=t}r(h,s),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new n:"rmd160"===t||"ripemd160"===t?new o:new h(a(t))}},function(t,e,i){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=i(9).Buffer.isBuffer},function(t,e,i){(function(e){t.exports=function(t,i){for(var r=Math.min(t.length,i.length),n=new e(r),o=0;o<r;++o)n[o]=t[o]^i[o];return n}}).call(this,i(9).Buffer)},function(t,e,i){"use strict";var r=i(15),n=i(13);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var i=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-i,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),n(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,i=e-(t+this.padLength)%e,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=t>>>24&255,r[n++]=t>>>16&255,r[n++]=t>>>8&255,r[n++]=255&t}else for(r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o<this.padLength;o++)r[n++]=0;return r}},function(t,e,i){"use strict";var r=i(3),n=i(72).Reporter,o=i(70).Buffer;function a(t,e){n.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function s(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return s.isEncoderBuffer(t)||(t=new s(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}r(a,n),e.DecoderBuffer=a,a.isDecoderBuffer=function(t){return t instanceof a||"object"==typeof t&&o.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},a.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},a.prototype.restore=function(t){var e=new a(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,n.prototype.restore.call(this,t.reporter),e},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},a.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var i=new a(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+t,this.offset+=t,i},a.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=s,s.isEncoderBuffer=function(t){return t instanceof s||"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},s.prototype.join=function(t,e){return t||(t=o.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(t,e),e+=i.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},function(t,e,i){"use strict";var r=function(){function t(){this.stopFlag=!1,this.bufferSourcePtr=null}var e=t.prototype;return e.destroy=function(){this.interval&&clearInterval(this.interval),this.samples=null,this.audioCtx.close(),this.audioCtx=null},e.init=function(t){this.option=Object.assign({},{encoding:"16bitInt",channels:1,sampleRate:8e3,flushingTime:1e3},t),this.samples=new Float32Array,this.flush=this.flush.bind(this),this.interval=setInterval(this.flush,this.option.flushingTime),this.maxValue=this.getMaxValue(),this.typedArray=this.getTypedArray(),this.createContext()},e.getMaxValue=function(){var t={"8bitInt":128,"16bitInt":32768,"32bitInt":2147483648,"32bitFloat":1};return t[this.option.encoding]?t[this.option.encoding]:t["16bitInt"]},e.getTypedArray=function(){var t={"8bitInt":Int8Array,"16bitInt":Int16Array,"32bitInt":Int32Array,"32bitFloat":Float32Array};return t[this.option.encoding]?t[this.option.encoding]:t["16bitInt"]},e.createContext=function(){this.audioCtx=new(window.AudioContext||window.webkitAudioContext),this.gainNode=this.audioCtx.createGain(),this.gainNode.gain.value=1,this.gainNode.connect(this.audioCtx.destination),this.startTime=this.audioCtx.currentTime},e.isTypedArray=function(t){return t.byteLength&&t.buffer&&t.buffer.constructor==ArrayBuffer},e.feed=function(t){if(this.isTypedArray(t)){t=this.getFormatedValue(t);var e=new Float32Array(this.samples.length+t.length);e.set(this.samples,0),e.set(t,this.samples.length),this.samples=e}},e.getFormatedValue=function(t){t=new this.typedArray(t.buffer);var e,i=new Float32Array(t.length);for(e=0;e<t.length;e++)i[e]=t[e]/this.maxValue;return i},e.volume=function(t){this.gainNode.gain.value=t},e.flush=function(){if(null!=this.samples&&this.samples.length){var t,e,i,r,n,o=this.audioCtx.createBufferSource(),a=this.samples.length/this.option.channels,s=this.audioCtx.createBuffer(this.option.channels,a,this.option.sampleRate);for(e=0;e<this.option.channels;e++)for(t=s.getChannelData(e),i=e,n=50,r=0;r<a;r++)t[r]=this.samples[i],r<50&&(t[r]=t[r]*r/50),r>=a-51&&(t[r]=t[r]*n--/50),i+=this.option.channels;this.startTime<this.audioCtx.currentTime&&(this.startTime=this.audioCtx.currentTime),o.buffer=s,o.connect(this.gainNode),o.start(this.startTime),this.startTime+=s.duration,this.samples=new Float32Array}},e.getTimestamp=function(){return this.audioCtx?this.audioCtx.currentTime:0},e.play=function(t){if(null!=this.audioCtx)if("running"===this.audioCtx.state){if(this.isTypedArray(t)&&(t=this.getFormatedValue(t)).length){this.stopFlag=!1;var e,i,r,n,o,a,s=this.audioCtx.createBufferSource(),h=t.length/this.option.channels;try{e=this.audioCtx.createBuffer(this.option.channels,h,this.option.sampleRate)}catch(t){}for(r=0;r<this.option.channels;r++)for(i=e.getChannelData(r),n=r,a=50,o=0;o<h;o++)i[o]=t[n],o<50&&(i[o]=i[o]*o/50),o>=h-51&&(i[o]=i[o]*a--/50),n+=this.option.channels;this.startTime<this.audioCtx.currentTime&&(this.startTime=this.audioCtx.currentTime),s.buffer=e,s.connect(this.gainNode),s.start(this.startTime),this.startTime+=e.duration,this.bufferSourcePtr=s}}else this.audioCtx.resume()},e.clearAudioBuffer=function(){this.stopFlag=!0,this.bufferSourcePtr&&this.bufferSourcePtr.stop(0)},e.pause=function(){null!=this.audioCtx&&"running"===this.audioCtx.state&&this.audioCtx.suspend()},e.resume=function(){null!=this.audioCtx&&"suspended"===this.audioCtx.state&&this.audioCtx.resume()},t}();e.a=r},function(t,e,i){"use strict";i.r(e),function(t,r,n,o){i.d(e,"VSSModule",(function(){return d})),i.d(e,"VSSLoadWasmModule",(function(){return f})),i.d(e,"VSSModuleInitialized",(function(){return c}));var a=i(0),s=!1,h="",u=void 0!==u?u:{};function l(){if(!s){var e,a=function(t){return u.locateFile?u.locateFile(t,Ut):Ut+t},l=function t(e){t.shown||(t.shown={}),t.shown[e]||(t.shown[e]=1,Vt(e))},d=function(t,e){var i=[1,0,1,96],r=e.slice(0,1),n=e.slice(1),o={i:127,j:126,f:125,d:124};i.push(n.length);for(var a=0;a<n.length;++a)i.push(o[n[a]]);"v"==r?i.push(0):i=i.concat([1,o[r]]),i[1]=i.length-2;var s=new Uint8Array([0,97,115,109,1,0,0,0].concat(i,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0])),h=new WebAssembly.Module(s);return new WebAssembly.Instance(h,{e:{f:t}}).exports.f},f=function(t,e){var i=$t,r=i.length;try{i.grow(1)}catch(t){if(!t instanceof RangeError)throw t;throw"Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."}try{i.set(r,t)}catch(o){if(!o instanceof TypeError)throw o;p(void 0!==e,"Missing signature argument to addFunction");var n=d(t,e);i.set(r,n)}return r},c=function(t,e){return p(void 0!==t),f(t,e)},p=function(t,e){t||j("Assertion failed: "+e)},m=function(t){var e=u["_"+t];return p(e,"Cannot call unknown function "+t+", make sure it is exported"),e},g=function(t,e,i,r,n){var o={string:function(t){var e=0;if(null!=t&&0!==t){var i=1+(t.length<<2);e=er(i),w(t,e,i)}return e},array:function(t){var e=er(t.length);return M(t,e),e}};var a=m(t),s=[],h=0;if(p("array"!==e,'Return type should not be "array".'),r)for(var u=0;u<r.length;u++){var l=o[i[u]];l?(0===h&&(h=tr()),s[u]=l(r[u])):s[u]=r[u]}var d=a.apply(null,s);return d=function(t){return"string"===e?b(t):"boolean"===e?Boolean(t):t}(d),0!==h&&ir(h),d},v=function(t,e,i,r){return function(){return g(t,e,i,arguments,r)}},y=function(t,e,i){for(var r=e+i,n=e;t[n]&&!(n>=r);)++n;if(n-e>16&&t.subarray&&ee)return ee.decode(t.subarray(e,n));for(var o="";e<n;){var a=t[e++];if(128&a){var s=63&t[e++];if(192!=(224&a)){var h=63&t[e++];if(224==(240&a)?a=(15&a)<<12|s<<6|h:(240!=(248&a)&&l("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),a=(7&a)<<18|s<<12|h<<6|63&t[e++]),a<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o},b=function(t,e){return t?y(Kt,t,e):""},_=function(t,e,i,r){if(!(r>0))return 0;for(var n=i,o=i+r-1,a=0;a<t.length;++a){var s=t.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&t.charCodeAt(++a);if(s<=127){if(i>=o)break;e[i++]=s}else if(s<=2047){if(i+1>=o)break;e[i++]=192|s>>6,e[i++]=128|63&s}else if(s<=65535){if(i+2>=o)break;e[i++]=224|s>>12,e[i++]=128|s>>6&63,e[i++]=128|63&s}else{if(i+3>=o)break;s>=2097152&&l("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),e[i++]=240|s>>18,e[i++]=128|s>>12&63,e[i++]=128|s>>6&63,e[i++]=128|63&s}}return e[i]=0,i-n},w=function(t,e,i){return p("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),_(t,Kt,e,i)},A=function(t){for(var e=0,i=0;i<t.length;++i){var r=t.charCodeAt(i);r>=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&t.charCodeAt(++i)),r<=127?++e:e+=r<=2047?2:r<=65535?3:4}return e},M=function(t,e){p(t.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Zt.set(t,e)},E=function(t,e,i){for(var r=0;r<t.length;++r)p(t.charCodeAt(r)==t.charCodeAt(r)&255),Zt[e++>>0]=t.charCodeAt(r);i||(Zt[e>>0]=0)},S=function(t,e){return t%e>0&&(t+=e-t%e),t},k=function(t){Xt=t,u.HEAP8=Zt=new Int8Array(t),u.HEAP16=Qt=new Int16Array(t),u.HEAP32=Yt=new Int32Array(t),u.HEAPU8=Kt=new Uint8Array(t),u.HEAPU16=new Uint16Array(t),u.HEAPU32=Jt=new Uint32Array(t),u.HEAPF32=new Float32Array(t),u.HEAPF64=new Float64Array(t)},T=function(){p(0==(3&ne)),Jt[1+(ne>>2)]=34821223,Jt[2+(ne>>2)]=2310721022,Yt[0]=1668509029},R=function(){var t=Jt[1+(ne>>2)],e=Jt[2+(ne>>2)];34821223==t&&2310721022==e||j("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+e.toString(16)+" "+t.toString(16)),1668509029!==Yt[0]&&j("Runtime error: The application has corrupted its heap memory area (address zero)!")},I=function(t){j("Stack overflow! Attempted to allocate "+t+" bytes on the stack, but stack has only "+(ne-tr()+t)+" bytes available!")},C=function(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var i=e.func;"number"==typeof i?void 0===e.arg?u.dynCall_v(i):u.dynCall_vi(i,e.arg):i(void 0===e.arg?null:e.arg)}else e()}},P=function(){if(u.preRun)for("function"==typeof u.preRun&&(u.preRun=[u.preRun]);u.preRun.length;)L(u.preRun.shift());C(ue)},x=function(){R(),p(!ce),ce=!0,u.noFSInit||Oe.init.initialized||Oe.init(),Ce.init(),C(le)},D=function(){R(),Oe.ignorePermissions=!1,C(de)},O=function(){R(),pe=!0},B=function(){if(R(),u.postRun)for("function"==typeof u.postRun&&(u.postRun=[u.postRun]);u.postRun.length;)W(u.postRun.shift());C(fe)},L=function(t){ue.unshift(t)},W=function(t){fe.unshift(t)},N=function(t){for(var e=t;;){if(!Ae[t])return t;t=e+Math.random()}return t},F=function(t){be++,u.monitorRunDependencies&&u.monitorRunDependencies(be),t?(p(!Ae[t]),Ae[t]=1,null===_e&&"undefined"!=typeof setInterval&&(_e=setInterval((function(){if(te)return clearInterval(_e),void(_e=null);var t=!1;for(var e in Ae)t||(t=!0,Vt("still waiting on run dependencies:")),Vt("dependency: "+e);t&&Vt("(end of list)")}),1e4))):Vt("warning: run dependency added without ID")},U=function(t){if(be--,u.monitorRunDependencies&&u.monitorRunDependencies(be),t?(p(Ae[t]),delete Ae[t]):Vt("warning: run dependency removed without ID"),0==be&&(null!==_e&&(clearInterval(_e),_e=null),we)){var e=we;we=null,e()}},j=function(t){throw u.onAbort&&u.onAbort(t),jt(t+=""),Vt(t),te=!0,1,t="abort("+t+") at "+K(),new WebAssembly.RuntimeError(t)},V=function(t){return String.prototype.startsWith?t.startsWith(Se):0===t.indexOf(Se)},H=function(){try{if(Ht)return new Uint8Array(Ht);if(Wt)return Wt(ke);throw"both async and sync fetching of the wasm failed"}catch(t){j(t)}},z=function(){return Ht||!Pt&&!xt||"function"!=typeof fetch?new Promise((function(t,e){t(H())})):fetch(ke,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+ke+"'";return t.arrayBuffer()})).catch((function(){return H()}))},G=function(){var t={env:We,wasi_unstable:We};function e(t,e){var i=t.exports;u.asm=i,U("wasm-instantiate")}F("wasm-instantiate");var i=u;function r(t){p(u===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,e(t.instance)}function n(e){return z().then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(t){Vt("failed to asynchronously prepare wasm: "+t),j(t)}))}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(t){return Vt("Module.instantiateWasm callback failed with error: "+t),!1}return function(){if(Ht||"function"!=typeof WebAssembly.instantiateStreaming||V(ke)||"function"!=typeof fetch)return n(r);fetch(ke,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(r,(function(t){Vt("wasm streaming compile failed: "+t),Vt("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),{}},q=function(t){return l("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t},X=function(t){return t.replace(/\b_Z[\w\d_]+/g,(function(t){var e=q(t);return t===e?t:e+" ["+t+"]"}))},Z=function(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()},K=function(){var t=Z();return u.extraStackTrace&&(t+="\n"+u.extraStackTrace()),X(t)},Q=function(t){return Ji(t)},Y=function(t,e,i){throw Te[t]={ptr:t,adjusted:[t],type:e,destructor:i,refcount:0,caught:!1,rethrown:!1},t,"uncaught_exception"in $i?$i.uncaught_exceptions++:$i.uncaught_exceptions=1,t+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."},J=function(){},$=function(t){return u.___errno_location?Yt[u.___errno_location()>>2]=t:Vt("failed to set errno from JS"),t},tt=function(t,e){Be.varargs=e;try{var i=Be.getStreamFromFD();switch(Be.get()){case 0:return(r=Be.get())<0?-28:Oe.open(i.path,i.flags,0,r).fd;case 1:case 2:case 13:case 14:return 0;case 3:return i.flags;case 4:var r=Be.get();return i.flags|=r,0;case 12:r=Be.get();return Qt[r+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return $(28),-1}}catch(t){return void 0!==Oe&&t instanceof Oe.ErrnoError||j(t),-t.errno}},et=function(t,e){Be.varargs=e;try{var i=Be.getStreamFromFD(),r=Be.get(),n=Be.get();return Oe.read(i,Zt,r,n)}catch(t){return void 0!==Oe&&t instanceof Oe.ErrnoError||j(t),-t.errno}},it=function(t,e){Be.varargs=e;try{var i=Be.getStr(),r=Be.get(),n=Be.get();return Oe.open(i,r,n).fd}catch(t){return void 0!==Oe&&t instanceof Oe.ErrnoError||j(t),-t.errno}},rt=function(){},nt=function(){j()},ot=function t(){return void 0===t.start&&(t.start=Date.now()),1e3*(Date.now()-t.start)|0},at=function(){return Zt.length},st=function(t,e,i){Kt.set(Kt.subarray(e,e+i),t)},ht=function(t){try{return Gt.grow(t-Xt.byteLength+65535>>16),k(Gt.buffer),1}catch(t){}},ut=function(t){var e=at();p(t>e);var i=65536,r=2147418112;if(t>r)return Vt("Cannot enlarge memory, asked to go up to "+t+" bytes, but the limit is "+r+" bytes!"),!1;for(var n=Math.max(e,16777216);n<t;)(n=n<=536870912?S(2*n,i):Math.min(S((3*n+2147483648)/4,i),r))===e&&l("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+Zt.length);return!!ht(n)||(Vt("Failed to grow the heap from "+e+" bytes to "+n+" bytes, not enough memory!"),!1)},lt=function t(){if(!t.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:It};for(var i in Le)e[i]=Le[i];var r=[];for(var i in e)r.push(i+"="+e[i]);t.strings=r}return t.strings},dt=function(t,e){var i=lt(),r=0;return i.forEach((function(i,n){var o=e+r;Yt[t+4*n>>2]=o,E(i,o),r+=i.length+1})),0},ft=function(t,e){var i=lt();Yt[t>>2]=i.length;var r=0;return i.forEach((function(t){r+=t.length+1})),Yt[e>>2]=r,0},ct=function(t){try{var e=Be.getStreamFromFD(t);return Oe.close(e),0}catch(t){return void 0!==Oe&&t instanceof Oe.ErrnoError||j(t),t.errno}},pt=function(t,e){try{var i=Be.getStreamFromFD(t),r=i.tty?2:Oe.isDir(i.mode)?3:Oe.isLink(i.mode)?7:4;return Zt[e>>0]=r,0}catch(t){return void 0!==Oe&&t instanceof Oe.ErrnoError||j(t),t.errno}},mt=function(t,e,i,r,n){try{var o=Be.getStreamFromFD(t),a=4294967296*i+(e>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Oe.llseek(o,a,r),Ee=[o.position>>>0,(Me=o.position,+me(Me)>=1?Me>0?(0|ye(+ve(Me/4294967296),4294967295))>>>0:~~+ge((Me-+(~~Me>>>0))/4294967296)>>>0:0)],Yt[n>>2]=Ee[0],Yt[n+4>>2]=Ee[1],o.getdents&&0===a&&0===r&&(o.getdents=null),0)}catch(t){return void 0!==Oe&&t instanceof Oe.ErrnoError||j(t),t.errno}},gt=function(t,e,i,r){try{var n=Be.getStreamFromFD(t),o=Be.doWritev(n,e,i);return Yt[r>>2]=o,0}catch(t){return void 0!==Oe&&t instanceof Oe.ErrnoError||j(t),t.errno}},vt=function(t){var e=Date.now();return Yt[t>>2]=e/1e3|0,Yt[t+4>>2]=e%1e3*1e3|0,0},yt=function(t){return(t=+t)>=0?+ve(t+.5):+ge(t-.5)},bt=function(t){qt(0|t)},_t=function(t){var e=Date.now()/1e3|0;return t&&(Yt[t>>2]=e),e},wt=function(t,e,i){var r=i>0?i:A(t)+1,n=new Array(r),o=_(t,n,0,n.length);return e&&(n.length=o),n},At=function(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t},Mt=function(t){p(0==be,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),p(0==ue.length,"cannot call main when preRun functions remain to be called");var e=u._main;try{var i=e(0,0);kt(i,!0)}catch(t){if(t instanceof At)return;if("SimulateInfiniteLoop"==t)return void(zt=!0);var r=t;t&&"object"==typeof t&&t.stack&&(r=[t,t.stack]),Vt("exception thrown: "+r),Ct(1,t)}finally{!0}},Et=function(t){function e(){Qi||(Qi=!0,te||(x(),D(),u.onRuntimeInitialized&&u.onRuntimeInitialized(),rr&&Mt(t),B()))}t=t||Rt,be>0||(T(),P(),be>0||(u.setStatus?(u.setStatus("Running..."),setTimeout((function(){setTimeout((function(){u.setStatus("")}),1),e()}),1)):e(),R()))},St=function(){var t=jt,e=Vt,i=!1;jt=Vt=function(t){i=!0};try{var r=u._fflush;r&&r(0),["stdout","stderr"].forEach((function(t){var e=Oe.analyzePath("/dev/"+t);if(e){var r=e.object.rdev,n=Ce.ttys[r];n&&n.output&&n.output.length&&(i=!0)}}))}catch(t){}jt=t,Vt=e,i&&l("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")},kt=function(t,e){St(),e&&zt&&0===t||(zt?e||Vt("program exited (with status: "+t+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)"):(te=!0,t,O(),u.onExit&&u.onExit(t)),Ct(t,new At(t)))},Tt={};for(e in u)u.hasOwnProperty(e)&&(Tt[e]=u[e]);var Rt=[],It="./this.program",Ct=function(t,e){throw e},Pt=!1,xt=!1,Dt=!1,Ot=!1,Bt=!1;if(Pt="object"==typeof window,xt="function"==typeof importScripts,Ot="object"==typeof t&&"object"==typeof t.versions&&"string"==typeof t.versions.node,Dt=Ot&&!Pt&&!xt,Bt=!Pt&&!Dt&&!xt,u.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var Lt,Wt,Nt,Ft,Ut="";if(Dt)Ut=r+"/",Lt=function(t,e){var r;return Nt||(Nt=i(146)),Ft||(Ft=i(147)),t=Ft.normalize(t),r=Nt.readFileSync(t),e?r:r.toString()},Wt=function(t){var e=Lt(t,!0);return e.buffer||(e=new Uint8Array(e)),p(e.buffer),e},t.argv.length>1&&(It=t.argv[1].replace(/\\/g,"/")),Rt=t.argv.slice(2),n.exports=u,t.on("uncaughtException",(function(t){if(!(t instanceof At))throw t})),t.on("unhandledRejection",j),Ct=function(e){t.exit(e)},u.inspect=function(){return"[Emscripten Module object]"};else if(Bt)"undefined"!=typeof read&&(Lt=function(t){return read(t)}),Wt=function(t){var e;return"function"==typeof readbuffer?new Uint8Array(readbuffer(t)):(e=read(t,"binary"),p("object"==typeof e),e)},"undefined"!=typeof scriptArgs?Rt=scriptArgs:void 0!==arguments&&(Rt=arguments),"function"==typeof quit&&(Ct=function(t){quit(t)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print);else{if(!Pt&&!xt)throw new Error("environment detection error");xt?Ut=self.location.href:document.currentScript&&(Ut=document.currentScript.src),Ut=0!==Ut.indexOf("blob:")?Ut.substr(0,Ut.lastIndexOf("/")+1):"",Lt=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},xt&&(Wt=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),function(t,e,i){var r=new XMLHttpRequest;r.open("GET",t,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?e(r.response):i()},r.onerror=i,r.send(null)},function(t){document.title=t}}var jt=u.print||void 0,Vt=u.printErr||void 0;for(e in Tt)Tt.hasOwnProperty(e)&&(u[e]=Tt[e]);Tt=null,u.arguments&&(Rt=u.arguments),Object.getOwnPropertyDescriptor(u,"arguments")||Object.defineProperty(u,"arguments",{configurable:!0,get:function(){j("Module.arguments has been replaced with plain arguments_")}}),u.thisProgram&&(It=u.thisProgram),Object.getOwnPropertyDescriptor(u,"thisProgram")||Object.defineProperty(u,"thisProgram",{configurable:!0,get:function(){j("Module.thisProgram has been replaced with plain thisProgram")}}),u.quit&&(Ct=u.quit),Object.getOwnPropertyDescriptor(u,"quit")||Object.defineProperty(u,"quit",{configurable:!0,get:function(){j("Module.quit has been replaced with plain quit_")}}),p(void 0===u.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),p(void 0===u.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),p(void 0===u.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),p(void 0===u.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),p(void 0===u.read,"Module.read option was removed (modify read_ in JS)"),p(void 0===u.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),p(void 0===u.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),p(void 0===u.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(u,"read")||Object.defineProperty(u,"read",{configurable:!0,get:function(){j("Module.read has been replaced with plain read_")}}),Object.getOwnPropertyDescriptor(u,"readAsync")||Object.defineProperty(u,"readAsync",{configurable:!0,get:function(){j("Module.readAsync has been replaced with plain readAsync")}}),Object.getOwnPropertyDescriptor(u,"readBinary")||Object.defineProperty(u,"readBinary",{configurable:!0,get:function(){j("Module.readBinary has been replaced with plain readBinary")}}),tr=ir=er=function(){j("cannot use the stack before compiled code is ready to run, and has provided stack access")};var Ht,zt,Gt,qt=function(t){t};u.wasmBinary&&(Ht=u.wasmBinary),Object.getOwnPropertyDescriptor(u,"wasmBinary")||Object.defineProperty(u,"wasmBinary",{configurable:!0,get:function(){j("Module.wasmBinary has been replaced with plain wasmBinary")}}),u.noExitRuntime&&(zt=u.noExitRuntime),Object.getOwnPropertyDescriptor(u,"noExitRuntime")||Object.defineProperty(u,"noExitRuntime",{configurable:!0,get:function(){j("Module.noExitRuntime has been replaced with plain noExitRuntime")}}),"object"!=typeof WebAssembly&&j("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var Xt,Zt,Kt,Qt,Yt,Jt,$t=new WebAssembly.Table({initial:2542,maximum:2552,element:"anyfunc"}),te=!1,ee="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ie=("undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le"),65536),re=6583696,ne=1340816,oe=6583696,ae=1340656;p(re%16==0,"stack must start aligned"),p(oe%16==0,"heap must start aligned");var se=5242880;u.TOTAL_STACK&&p(se===u.TOTAL_STACK,"the stack size can no longer be determined at runtime");var he=u.TOTAL_MEMORY||67108864;Object.getOwnPropertyDescriptor(u,"TOTAL_MEMORY")||Object.defineProperty(u,"TOTAL_MEMORY",{configurable:!0,get:function(){j("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY")}}),p(he>=se,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+he+"! (TOTAL_STACK="+se+")"),p("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),(Gt=u.wasmMemory?u.wasmMemory:new WebAssembly.Memory({initial:he/ie}))&&(Xt=Gt.buffer),he=Xt.byteLength,p(he%ie==0),k(Xt),Yt[ae>>2]=oe,function(){var t=new Int16Array(1),e=new Int8Array(t.buffer);if(t[0]=25459,115!==e[0]||99!==e[1])throw"Runtime error: expected the system to be little-endian!"}();var ue=[],le=[],de=[],fe=[],ce=!1,pe=!1;p(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),p(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),p(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),p(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var me=Math.abs,ge=Math.ceil,ve=Math.floor,ye=Math.min,be=0,_e=null,we=null,Ae={};u.preloadedImages={},u.preloadedAudios={};var Me,Ee,Se="data:application/octet-stream;base64,",ke=h+"libVSS.wasm";V(ke)||(ke=a(ke)),le.push({func:function(){Yi()}});var Te={},Re={splitPath:function(t){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(t).slice(1)},normalizeArray:function(t,e){for(var i=0,r=t.length-1;r>=0;r--){var n=t[r];"."===n?t.splice(r,1):".."===n?(t.splice(r,1),i++):i&&(t.splice(r,1),i--)}if(e)for(;i;i--)t.unshift("..");return t},normalize:function(t){var e="/"===t.charAt(0),i="/"===t.substr(-1);return(t=Re.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||e||(t="."),t&&i&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=Re.splitPath(t),i=e[0],r=e[1];return i||r?(r&&(r=r.substr(0,r.length-1)),i+r):"."},basename:function(t){if("/"===t)return"/";var e=t.lastIndexOf("/");return-1===e?t:t.substr(e+1)},extname:function(t){return Re.splitPath(t)[3]},join:function(){var t=Array.prototype.slice.call(arguments,0);return Re.normalize(t.join("/"))},join2:function(t,e){return Re.normalize(t+"/"+e)}},Ie={resolve:function(){for(var t="",e=!1,i=arguments.length-1;i>=-1&&!e;i--){var r=i>=0?arguments[i]:Oe.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";t=r+"/"+t,e="/"===r.charAt(0)}return(e?"/":"")+(t=Re.normalizeArray(t.split("/").filter((function(t){return!!t})),!e).join("/"))||"."},relative:function(t,e){function i(t){for(var e=0;e<t.length&&""===t[e];e++);for(var i=t.length-1;i>=0&&""===t[i];i--);return e>i?[]:t.slice(e,i-e+1)}t=Ie.resolve(t).substr(1),e=Ie.resolve(e).substr(1);for(var r=i(t.split("/")),n=i(e.split("/")),o=Math.min(r.length,n.length),a=o,s=0;s<o;s++)if(r[s]!==n[s]){a=s;break}var h=[];for(s=a;s<r.length;s++)h.push("..");return(h=h.concat(n.slice(a))).join("/")}},Ce={ttys:[],init:function(){},shutdown:function(){},register:function(t,e){Ce.ttys[t]={input:[],output:[],ops:e},Oe.registerDevice(t,Ce.stream_ops)},stream_ops:{open:function(t){var e=Ce.ttys[t.node.rdev];if(!e)throw new Oe.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.flush(t.tty)},flush:function(t){t.tty.ops.flush(t.tty)},read:function(t,e,i,r,n){if(!t.tty||!t.tty.ops.get_char)throw new Oe.ErrnoError(60);for(var o=0,a=0;a<r;a++){var s;try{s=t.tty.ops.get_char(t.tty)}catch(t){throw new Oe.ErrnoError(29)}if(void 0===s&&0===o)throw new Oe.ErrnoError(6);if(null==s)break;o++,e[i+a]=s}return o&&(t.node.timestamp=Date.now()),o},write:function(t,e,i,r,n){if(!t.tty||!t.tty.ops.put_char)throw new Oe.ErrnoError(60);try{for(var o=0;o<r;o++)t.tty.ops.put_char(t.tty,e[i+o])}catch(t){throw new Oe.ErrnoError(29)}return r&&(t.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:function(e){if(!e.input.length){var i=null;if(Dt){var r=o.alloc?o.alloc(256):new o(256),n=0;try{n=Nt.readSync(t.stdin.fd,r,0,256,null)}catch(t){if(-1==t.toString().indexOf("EOF"))throw t;n=0}i=n>0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(i=window.prompt("Input: "))&&(i+="\n"):"function"==typeof readline&&null!==(i=readline())&&(i+="\n");if(!i)return null;e.input=wt(i,!0)}return e.input.shift()},put_char:function(t,e){null===e||10===e?(jt(y(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(jt(y(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){null===e||10===e?(Vt(y(t.output,0)),t.output=[]):0!=e&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(Vt(y(t.output,0)),t.output=[])}}},Pe={ops_table:null,mount:function(t){return Pe.createNode(null,"/",16895,0)},createNode:function(t,e,i,r){if(Oe.isBlkdev(i)||Oe.isFIFO(i))throw new Oe.ErrnoError(63);Pe.ops_table||(Pe.ops_table={dir:{node:{getattr:Pe.node_ops.getattr,setattr:Pe.node_ops.setattr,lookup:Pe.node_ops.lookup,mknod:Pe.node_ops.mknod,rename:Pe.node_ops.rename,unlink:Pe.node_ops.unlink,rmdir:Pe.node_ops.rmdir,readdir:Pe.node_ops.readdir,symlink:Pe.node_ops.symlink},stream:{llseek:Pe.stream_ops.llseek}},file:{node:{getattr:Pe.node_ops.getattr,setattr:Pe.node_ops.setattr},stream:{llseek:Pe.stream_ops.llseek,read:Pe.stream_ops.read,write:Pe.stream_ops.write,allocate:Pe.stream_ops.allocate,mmap:Pe.stream_ops.mmap,msync:Pe.stream_ops.msync}},link:{node:{getattr:Pe.node_ops.getattr,setattr:Pe.node_ops.setattr,readlink:Pe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Pe.node_ops.getattr,setattr:Pe.node_ops.setattr},stream:Oe.chrdev_stream_ops}});var n=Oe.createNode(t,e,i,r);return Oe.isDir(n.mode)?(n.node_ops=Pe.ops_table.dir.node,n.stream_ops=Pe.ops_table.dir.stream,n.contents={}):Oe.isFile(n.mode)?(n.node_ops=Pe.ops_table.file.node,n.stream_ops=Pe.ops_table.file.stream,n.usedBytes=0,n.contents=null):Oe.isLink(n.mode)?(n.node_ops=Pe.ops_table.link.node,n.stream_ops=Pe.ops_table.link.stream):Oe.isChrdev(n.mode)&&(n.node_ops=Pe.ops_table.chrdev.node,n.stream_ops=Pe.ops_table.chrdev.stream),n.timestamp=Date.now(),t&&(t.contents[e]=n),n},getFileDataAsRegularArray:function(t){if(t.contents&&t.contents.subarray){for(var e=[],i=0;i<t.usedBytes;++i)e.push(t.contents[i]);return e}return t.contents},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array},expandFileStorage:function(t,e){var i=t.contents?t.contents.length:0;if(!(i>=e)){e=Math.max(e,i*(i<1048576?2:1.125)|0),0!=i&&(e=Math.max(e,256));var r=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(r.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e){if(0==e)return t.contents=null,void(t.usedBytes=0);if(!t.contents||t.contents.subarray){var i=t.contents;return t.contents=new Uint8Array(new ArrayBuffer(e)),i&&t.contents.set(i.subarray(0,Math.min(e,t.usedBytes))),void(t.usedBytes=e)}if(t.contents||(t.contents=[]),t.contents.length>e)t.contents.length=e;else for(;t.contents.length<e;)t.contents.push(0);t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=Oe.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,Oe.isDir(t.mode)?e.size=4096:Oe.isFile(t.mode)?e.size=t.usedBytes:Oe.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){void 0!==e.mode&&(t.mode=e.mode),void 0!==e.timestamp&&(t.timestamp=e.timestamp),void 0!==e.size&&Pe.resizeFileStorage(t,e.size)},lookup:function(t,e){throw Oe.genericErrors[44]},mknod:function(t,e,i,r){return Pe.createNode(t,e,i,r)},rename:function(t,e,i){if(Oe.isDir(t.mode)){var r;try{r=Oe.lookupNode(e,i)}catch(t){}if(r)for(var n in r.contents)throw new Oe.ErrnoError(55)}delete t.parent.contents[t.name],t.name=i,e.contents[i]=t,t.parent=e},unlink:function(t,e){delete t.contents[e]},rmdir:function(t,e){var i=Oe.lookupNode(t,e);for(var r in i.contents)throw new Oe.ErrnoError(55);delete t.contents[e]},readdir:function(t){var e=[".",".."];for(var i in t.contents)t.contents.hasOwnProperty(i)&&e.push(i);return e},symlink:function(t,e,i){var r=Pe.createNode(t,e,41471,0);return r.link=i,r},readlink:function(t){if(!Oe.isLink(t.mode))throw new Oe.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,i,r,n){var o=t.node.contents;if(n>=t.node.usedBytes)return 0;var a=Math.min(t.node.usedBytes-n,r);if(p(a>=0),a>8&&o.subarray)e.set(o.subarray(n,n+a),i);else for(var s=0;s<a;s++)e[i+s]=o[n+s];return a},write:function(t,e,i,r,n,o){if(o&&l("file packager has copied file data into memory, but in memory growth we are forced to copy it again (see --no-heap-copy)"),o=!1,!r)return 0;var a=t.node;if(a.timestamp=Date.now(),e.subarray&&(!a.contents||a.contents.subarray)){if(o)return p(0===n,"canOwn must imply no weird position inside the file"),a.contents=e.subarray(i,i+r),a.usedBytes=r,r;if(0===a.usedBytes&&0===n)return a.contents=new Uint8Array(e.subarray(i,i+r)),a.usedBytes=r,r;if(n+r<=a.usedBytes)return a.contents.set(e.subarray(i,i+r),n),r}if(Pe.expandFileStorage(a,n+r),a.contents.subarray&&e.subarray)a.contents.set(e.subarray(i,i+r),n);else for(var s=0;s<r;s++)a.contents[n+s]=e[i+s];return a.usedBytes=Math.max(a.usedBytes,n+r),r},llseek:function(t,e,i){var r=e;if(1===i?r+=t.position:2===i&&Oe.isFile(t.node.mode)&&(r+=t.node.usedBytes),r<0)throw new Oe.ErrnoError(28);return r},allocate:function(t,e,i){Pe.expandFileStorage(t.node,e+i),t.node.usedBytes=Math.max(t.node.usedBytes,e+i)},mmap:function(t,e,i,r,n,o,a){if(!Oe.isFile(t.node.mode))throw new Oe.ErrnoError(43);var s,h,u=t.node.contents;if(2&a||u.buffer!==e&&u.buffer!==e.buffer){(n>0||n+r<t.node.usedBytes)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),h=!0;var l=e.buffer==Zt.buffer;if(!(s=Ji(r)))throw new Oe.ErrnoError(48);(l?Zt:e).set(u,s)}else h=!1,s=u.byteOffset;return{ptr:s,allocated:h}},msync:function(t,e,i,r,n){if(!Oe.isFile(t.node.mode))throw new Oe.ErrnoError(43);if(2&n)return 0;Pe.stream_ops.write(t,e,0,r,i,!1);return 0}}},xe={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},De={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Oe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(t){if(!(t instanceof Oe.ErrnoError))throw t+" : "+K();return $(t.errno)},lookupPath:function(t,e){if(e=e||{},!(t=Ie.resolve(Oe.cwd(),t)))return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};for(var r in i)void 0===e[r]&&(e[r]=i[r]);if(e.recurse_count>8)throw new Oe.ErrnoError(32);for(var n=Re.normalizeArray(t.split("/").filter((function(t){return!!t})),!1),o=Oe.root,a="/",s=0;s<n.length;s++){var h=s===n.length-1;if(h&&e.parent)break;if(o=Oe.lookupNode(o,n[s]),a=Re.join2(a,n[s]),Oe.isMountpoint(o)&&(!h||h&&e.follow_mount)&&(o=o.mounted.root),!h||e.follow)for(var u=0;Oe.isLink(o.mode);){var l=Oe.readlink(a);if(a=Ie.resolve(Re.dirname(a),l),o=Oe.lookupPath(a,{recurse_count:e.recurse_count}).node,u++>40)throw new Oe.ErrnoError(32)}}return{path:a,node:o}},getPath:function(t){for(var e;;){if(Oe.isRoot(t)){var i=t.mount.mountpoint;return e?"/"!==i[i.length-1]?i+"/"+e:i+e:i}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,e){for(var i=0,r=0;r<e.length;r++)i=(i<<5)-i+e.charCodeAt(r)|0;return(t+i>>>0)%Oe.nameTable.length},hashAddNode:function(t){var e=Oe.hashName(t.parent.id,t.name);t.name_next=Oe.nameTable[e],Oe.nameTable[e]=t},hashRemoveNode:function(t){var e=Oe.hashName(t.parent.id,t.name);if(Oe.nameTable[e]===t)Oe.nameTable[e]=t.name_next;else for(var i=Oe.nameTable[e];i;){if(i.name_next===t){i.name_next=t.name_next;break}i=i.name_next}},lookupNode:function(t,e){var i=Oe.mayLookup(t);if(i)throw new Oe.ErrnoError(i,t);for(var r=Oe.hashName(t.id,e),n=Oe.nameTable[r];n;n=n.name_next){var o=n.name;if(n.parent.id===t.id&&o===e)return n}return Oe.lookup(t,e)},createNode:function(t,e,i,r){if(!Oe.FSNode){Oe.FSNode=function(t,e,i,r){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Oe.nextInode++,this.name=e,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r},Oe.FSNode.prototype={};var n=365,o=146;Object.defineProperties(Oe.FSNode.prototype,{read:{get:function(){return(this.mode&n)===n},set:function(t){t?this.mode|=n:this.mode&=-366}},write:{get:function(){return(this.mode&o)===o},set:function(t){t?this.mode|=o:this.mode&=-147}},isFolder:{get:function(){return Oe.isDir(this.mode)}},isDevice:{get:function(){return Oe.isChrdev(this.mode)}}})}var a=new Oe.FSNode(t,e,i,r);return Oe.hashAddNode(a),a},destroyNode:function(t){Oe.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return 32768==(61440&t)},isDir:function(t){return 16384==(61440&t)},isLink:function(t){return 40960==(61440&t)},isChrdev:function(t){return 8192==(61440&t)},isBlkdev:function(t){return 24576==(61440&t)},isFIFO:function(t){return 4096==(61440&t)},isSocket:function(t){return 49152==(49152&t)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(t){var e=Oe.flagModes[t];if(void 0===e)throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:function(t){var e=["r","w","rw"][3&t];return 512&t&&(e+="w"),e},nodePermissions:function(t,e){return Oe.ignorePermissions||(-1===e.indexOf("r")||292&t.mode)&&(-1===e.indexOf("w")||146&t.mode)&&(-1===e.indexOf("x")||73&t.mode)?0:2},mayLookup:function(t){var e=Oe.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,e){try{Oe.lookupNode(t,e);return 20}catch(t){}return Oe.nodePermissions(t,"wx")},mayDelete:function(t,e,i){var r;try{r=Oe.lookupNode(t,e)}catch(t){return t.errno}var n=Oe.nodePermissions(t,"wx");if(n)return n;if(i){if(!Oe.isDir(r.mode))return 54;if(Oe.isRoot(r)||Oe.getPath(r)===Oe.cwd())return 10}else if(Oe.isDir(r.mode))return 31;return 0},mayOpen:function(t,e){return t?Oe.isLink(t.mode)?32:Oe.isDir(t.mode)&&("r"!==Oe.flagsToPermissionString(e)||512&e)?31:Oe.nodePermissions(t,Oe.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(t,e){t=t||0,e=e||Oe.MAX_OPEN_FDS;for(var i=t;i<=e;i++)if(!Oe.streams[i])return i;throw new Oe.ErrnoError(33)},getStream:function(t){return Oe.streams[t]},createStream:function(t,e,i){Oe.FSStream||(Oe.FSStream=function(){},Oe.FSStream.prototype={},Object.defineProperties(Oe.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var r=new Oe.FSStream;for(var n in t)r[n]=t[n];t=r;var o=Oe.nextfd(e,i);return t.fd=o,Oe.streams[o]=t,t},closeStream:function(t){Oe.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=Oe.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new Oe.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return 255&t},makedev:function(t,e){return t<<8|e},registerDevice:function(t,e){Oe.devices[t]={stream_ops:e}},getDevice:function(t){return Oe.devices[t]},getMounts:function(t){for(var e=[],i=[t];i.length;){var r=i.pop();e.push(r),i.push.apply(i,r.mounts)}return e},syncfs:function(t,e){"function"==typeof t&&(e=t,t=!1),Oe.syncFSRequests++,Oe.syncFSRequests;var i=Oe.getMounts(Oe.root.mount),r=0;function n(t){return p(Oe.syncFSRequests>0),Oe.syncFSRequests--,e(t)}function o(t){if(t)return o.errored?void 0:(o.errored=!0,n(t));++r>=i.length&&n(null)}i.forEach((function(e){if(!e.type.syncfs)return o(null);e.type.syncfs(e,t,o)}))},mount:function(t,e,i){if("string"==typeof t)throw t;var r,n="/"===i,o=!i;if(n&&Oe.root)throw new Oe.ErrnoError(10);if(!n&&!o){var a=Oe.lookupPath(i,{follow_mount:!1});if(i=a.path,r=a.node,Oe.isMountpoint(r))throw new Oe.ErrnoError(10);if(!Oe.isDir(r.mode))throw new Oe.ErrnoError(54)}var s={type:t,opts:e,mountpoint:i,mounts:[]},h=t.mount(s);return h.mount=s,s.root=h,n?Oe.root=h:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),h},unmount:function(t){var e=Oe.lookupPath(t,{follow_mount:!1});if(!Oe.isMountpoint(e.node))throw new Oe.ErrnoError(28);var i=e.node,r=i.mounted,n=Oe.getMounts(r);Object.keys(Oe.nameTable).forEach((function(t){for(var e=Oe.nameTable[t];e;){var i=e.name_next;-1!==n.indexOf(e.mount)&&Oe.destroyNode(e),e=i}})),i.mounted=null;var o=i.mount.mounts.indexOf(r);p(-1!==o),i.mount.mounts.splice(o,1)},lookup:function(t,e){return t.node_ops.lookup(t,e)},mknod:function(t,e,i){var r=Oe.lookupPath(t,{parent:!0}).node,n=Re.basename(t);if(!n||"."===n||".."===n)throw new Oe.ErrnoError(28);var o=Oe.mayCreate(r,n);if(o)throw new Oe.ErrnoError(o);if(!r.node_ops.mknod)throw new Oe.ErrnoError(63);return r.node_ops.mknod(r,n,e,i)},create:function(t,e){return e=void 0!==e?e:438,e&=4095,e|=32768,Oe.mknod(t,e,0)},mkdir:function(t,e){return e=void 0!==e?e:511,e&=1023,e|=16384,Oe.mknod(t,e,0)},mkdirTree:function(t,e){for(var i=t.split("/"),r="",n=0;n<i.length;++n)if(i[n]){r+="/"+i[n];try{Oe.mkdir(r,e)}catch(t){if(20!=t.errno)throw t}}},mkdev:function(t,e,i){return void 0===i&&(i=e,e=438),e|=8192,Oe.mknod(t,e,i)},symlink:function(t,e){if(!Ie.resolve(t))throw new Oe.ErrnoError(44);var i=Oe.lookupPath(e,{parent:!0}).node;if(!i)throw new Oe.ErrnoError(44);var r=Re.basename(e),n=Oe.mayCreate(i,r);if(n)throw new Oe.ErrnoError(n);if(!i.node_ops.symlink)throw new Oe.ErrnoError(63);return i.node_ops.symlink(i,r,t)},rename:function(t,e){var i,r,n=Re.dirname(t),o=Re.dirname(e),a=Re.basename(t),s=Re.basename(e);try{i=Oe.lookupPath(t,{parent:!0}).node,r=Oe.lookupPath(e,{parent:!0}).node}catch(t){throw new Oe.ErrnoError(10)}if(!i||!r)throw new Oe.ErrnoError(44);if(i.mount!==r.mount)throw new Oe.ErrnoError(75);var h,u=Oe.lookupNode(i,a),l=Ie.relative(t,o);if("."!==l.charAt(0))throw new Oe.ErrnoError(28);if("."!==(l=Ie.relative(e,n)).charAt(0))throw new Oe.ErrnoError(55);try{h=Oe.lookupNode(r,s)}catch(t){}if(u!==h){var d=Oe.isDir(u.mode),f=Oe.mayDelete(i,a,d);if(f)throw new Oe.ErrnoError(f);if(f=h?Oe.mayDelete(r,s,d):Oe.mayCreate(r,s))throw new Oe.ErrnoError(f);if(!i.node_ops.rename)throw new Oe.ErrnoError(63);if(Oe.isMountpoint(u)||h&&Oe.isMountpoint(h))throw new Oe.ErrnoError(10);if(r!==i&&(f=Oe.nodePermissions(i,"w")))throw new Oe.ErrnoError(f);try{Oe.trackingDelegate.willMovePath&&Oe.trackingDelegate.willMovePath(t,e)}catch(t){}Oe.hashRemoveNode(u);try{i.node_ops.rename(u,r,s)}catch(t){throw t}finally{Oe.hashAddNode(u)}try{Oe.trackingDelegate.onMovePath&&Oe.trackingDelegate.onMovePath(t,e)}catch(t){}}},rmdir:function(t){var e=Oe.lookupPath(t,{parent:!0}).node,i=Re.basename(t),r=Oe.lookupNode(e,i),n=Oe.mayDelete(e,i,!0);if(n)throw new Oe.ErrnoError(n);if(!e.node_ops.rmdir)throw new Oe.ErrnoError(63);if(Oe.isMountpoint(r))throw new Oe.ErrnoError(10);try{Oe.trackingDelegate.willDeletePath&&Oe.trackingDelegate.willDeletePath(t)}catch(t){}e.node_ops.rmdir(e,i),Oe.destroyNode(r);try{Oe.trackingDelegate.onDeletePath&&Oe.trackingDelegate.onDeletePath(t)}catch(t){}},readdir:function(t){var e=Oe.lookupPath(t,{follow:!0}).node;if(!e.node_ops.readdir)throw new Oe.ErrnoError(54);return e.node_ops.readdir(e)},unlink:function(t){var e=Oe.lookupPath(t,{parent:!0}).node,i=Re.basename(t),r=Oe.lookupNode(e,i),n=Oe.mayDelete(e,i,!1);if(n)throw new Oe.ErrnoError(n);if(!e.node_ops.unlink)throw new Oe.ErrnoError(63);if(Oe.isMountpoint(r))throw new Oe.ErrnoError(10);try{Oe.trackingDelegate.willDeletePath&&Oe.trackingDelegate.willDeletePath(t)}catch(t){}e.node_ops.unlink(e,i),Oe.destroyNode(r);try{Oe.trackingDelegate.onDeletePath&&Oe.trackingDelegate.onDeletePath(t)}catch(t){}},readlink:function(t){var e=Oe.lookupPath(t).node;if(!e)throw new Oe.ErrnoError(44);if(!e.node_ops.readlink)throw new Oe.ErrnoError(28);return Ie.resolve(Oe.getPath(e.parent),e.node_ops.readlink(e))},stat:function(t,e){var i=Oe.lookupPath(t,{follow:!e}).node;if(!i)throw new Oe.ErrnoError(44);if(!i.node_ops.getattr)throw new Oe.ErrnoError(63);return i.node_ops.getattr(i)},lstat:function(t){return Oe.stat(t,!0)},chmod:function(t,e,i){var r;"string"==typeof t?r=Oe.lookupPath(t,{follow:!i}).node:r=t;if(!r.node_ops.setattr)throw new Oe.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&e|-4096&r.mode,timestamp:Date.now()})},lchmod:function(t,e){Oe.chmod(t,e,!0)},fchmod:function(t,e){var i=Oe.getStream(t);if(!i)throw new Oe.ErrnoError(8);Oe.chmod(i.node,e)},chown:function(t,e,i,r){var n;"string"==typeof t?n=Oe.lookupPath(t,{follow:!r}).node:n=t;if(!n.node_ops.setattr)throw new Oe.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:function(t,e,i){Oe.chown(t,e,i,!0)},fchown:function(t,e,i){var r=Oe.getStream(t);if(!r)throw new Oe.ErrnoError(8);Oe.chown(r.node,e,i)},truncate:function(t,e){if(e<0)throw new Oe.ErrnoError(28);var i;"string"==typeof t?i=Oe.lookupPath(t,{follow:!0}).node:i=t;if(!i.node_ops.setattr)throw new Oe.ErrnoError(63);if(Oe.isDir(i.mode))throw new Oe.ErrnoError(31);if(!Oe.isFile(i.mode))throw new Oe.ErrnoError(28);var r=Oe.nodePermissions(i,"w");if(r)throw new Oe.ErrnoError(r);i.node_ops.setattr(i,{size:e,timestamp:Date.now()})},ftruncate:function(t,e){var i=Oe.getStream(t);if(!i)throw new Oe.ErrnoError(8);if(0==(2097155&i.flags))throw new Oe.ErrnoError(28);Oe.truncate(i.node,e)},utime:function(t,e,i){var r=Oe.lookupPath(t,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(e,i)})},open:function(t,e,i,r,n){if(""===t)throw new Oe.ErrnoError(44);var o;if(i=void 0===i?438:i,i=64&(e="string"==typeof e?Oe.modeStringToFlags(e):e)?4095&i|32768:0,"object"==typeof t)o=t;else{t=Re.normalize(t);try{o=Oe.lookupPath(t,{follow:!(131072&e)}).node}catch(t){}}var a=!1;if(64&e)if(o){if(128&e)throw new Oe.ErrnoError(20)}else o=Oe.mknod(t,i,0),a=!0;if(!o)throw new Oe.ErrnoError(44);if(Oe.isChrdev(o.mode)&&(e&=-513),65536&e&&!Oe.isDir(o.mode))throw new Oe.ErrnoError(54);if(!a){var s=Oe.mayOpen(o,e);if(s)throw new Oe.ErrnoError(s)}512&e&&Oe.truncate(o,0),e&=-641;var h=Oe.createStream({node:o,path:Oe.getPath(o),flags:e,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1},r,n);h.stream_ops.open&&h.stream_ops.open(h),!u.logReadFiles||1&e||(Oe.readFiles||(Oe.readFiles={}),t in Oe.readFiles||(Oe.readFiles[t]=1));try{if(Oe.trackingDelegate.onOpenFile){var l=0;1!=(2097155&e)&&(l|=Oe.tracking.openFlags.READ),0!=(2097155&e)&&(l|=Oe.tracking.openFlags.WRITE),Oe.trackingDelegate.onOpenFile(t,l)}}catch(t){}return h},close:function(t){if(Oe.isClosed(t))throw new Oe.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(t){throw t}finally{Oe.closeStream(t.fd)}t.fd=null},isClosed:function(t){return null===t.fd},llseek:function(t,e,i){if(Oe.isClosed(t))throw new Oe.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new Oe.ErrnoError(70);if(0!=i&&1!=i&&2!=i)throw new Oe.ErrnoError(28);return t.position=t.stream_ops.llseek(t,e,i),t.ungotten=[],t.position},read:function(t,e,i,r,n){if(r<0||n<0)throw new Oe.ErrnoError(28);if(Oe.isClosed(t))throw new Oe.ErrnoError(8);if(1==(2097155&t.flags))throw new Oe.ErrnoError(8);if(Oe.isDir(t.node.mode))throw new Oe.ErrnoError(31);if(!t.stream_ops.read)throw new Oe.ErrnoError(28);var o=void 0!==n;if(o){if(!t.seekable)throw new Oe.ErrnoError(70)}else n=t.position;var a=t.stream_ops.read(t,e,i,r,n);return o||(t.position+=a),a},write:function(t,e,i,r,n,o){if(r<0||n<0)throw new Oe.ErrnoError(28);if(Oe.isClosed(t))throw new Oe.ErrnoError(8);if(0==(2097155&t.flags))throw new Oe.ErrnoError(8);if(Oe.isDir(t.node.mode))throw new Oe.ErrnoError(31);if(!t.stream_ops.write)throw new Oe.ErrnoError(28);1024&t.flags&&Oe.llseek(t,0,2);var a=void 0!==n;if(a){if(!t.seekable)throw new Oe.ErrnoError(70)}else n=t.position;var s=t.stream_ops.write(t,e,i,r,n,o);a||(t.position+=s);try{t.path&&Oe.trackingDelegate.onWriteToFile&&Oe.trackingDelegate.onWriteToFile(t.path)}catch(t){}return s},allocate:function(t,e,i){if(Oe.isClosed(t))throw new Oe.ErrnoError(8);if(e<0||i<=0)throw new Oe.ErrnoError(28);if(0==(2097155&t.flags))throw new Oe.ErrnoError(8);if(!Oe.isFile(t.node.mode)&&!Oe.isDir(t.node.mode))throw new Oe.ErrnoError(43);if(!t.stream_ops.allocate)throw new Oe.ErrnoError(138);t.stream_ops.allocate(t,e,i)},mmap:function(t,e,i,r,n,o,a){if(0!=(2&o)&&0==(2&a)&&2!=(2097155&t.flags))throw new Oe.ErrnoError(2);if(1==(2097155&t.flags))throw new Oe.ErrnoError(2);if(!t.stream_ops.mmap)throw new Oe.ErrnoError(43);return t.stream_ops.mmap(t,e,i,r,n,o,a)},msync:function(t,e,i,r,n){return t&&t.stream_ops.msync?t.stream_ops.msync(t,e,i,r,n):0},munmap:function(t){return 0},ioctl:function(t,e,i){if(!t.stream_ops.ioctl)throw new Oe.ErrnoError(59);return t.stream_ops.ioctl(t,e,i)},readFile:function(t,e){if((e=e||{}).flags=e.flags||"r",e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error('Invalid encoding type "'+e.encoding+'"');var i,r=Oe.open(t,e.flags),n=Oe.stat(t).size,o=new Uint8Array(n);return Oe.read(r,o,0,n,0),"utf8"===e.encoding?i=y(o,0):"binary"===e.encoding&&(i=o),Oe.close(r),i},writeFile:function(t,e,i){(i=i||{}).flags=i.flags||"w";var r=Oe.open(t,i.flags,i.mode);if("string"==typeof e){var n=new Uint8Array(A(e)+1),o=_(e,n,0,n.length);Oe.write(r,n,0,o,void 0,i.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Oe.write(r,e,0,e.byteLength,void 0,i.canOwn)}Oe.close(r)},cwd:function(){return Oe.currentPath},chdir:function(t){var e=Oe.lookupPath(t,{follow:!0});if(null===e.node)throw new Oe.ErrnoError(44);if(!Oe.isDir(e.node.mode))throw new Oe.ErrnoError(54);var i=Oe.nodePermissions(e.node,"x");if(i)throw new Oe.ErrnoError(i);Oe.currentPath=e.path},createDefaultDirectories:function(){Oe.mkdir("/tmp"),Oe.mkdir("/home"),Oe.mkdir("/home/web_user")},createDefaultDevices:function(){var t;if(Oe.mkdir("/dev"),Oe.registerDevice(Oe.makedev(1,3),{read:function(){return 0},write:function(t,e,i,r,n){return r}}),Oe.mkdev("/dev/null",Oe.makedev(1,3)),Ce.register(Oe.makedev(5,0),Ce.default_tty_ops),Ce.register(Oe.makedev(6,0),Ce.default_tty1_ops),Oe.mkdev("/dev/tty",Oe.makedev(5,0)),Oe.mkdev("/dev/tty1",Oe.makedev(6,0)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);t=function(){return crypto.getRandomValues(e),e[0]}}else if(Dt)try{var r=i(148);t=function(){return r.randomBytes(1)[0]}}catch(t){}t||(t=function(){j("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}),Oe.createDevice("/dev","random",t),Oe.createDevice("/dev","urandom",t),Oe.mkdir("/dev/shm"),Oe.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Oe.mkdir("/proc"),Oe.mkdir("/proc/self"),Oe.mkdir("/proc/self/fd"),Oe.mount({mount:function(){var t=Oe.createNode("/proc/self","fd",16895,73);return t.node_ops={lookup:function(t,e){var i=+e,r=Oe.getStream(i);if(!r)throw new Oe.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return r.path}}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams:function(){u.stdin?Oe.createDevice("/dev","stdin",u.stdin):Oe.symlink("/dev/tty","/dev/stdin"),u.stdout?Oe.createDevice("/dev","stdout",null,u.stdout):Oe.symlink("/dev/tty","/dev/stdout"),u.stderr?Oe.createDevice("/dev","stderr",null,u.stderr):Oe.symlink("/dev/tty1","/dev/stderr");var t=Oe.open("/dev/stdin","r"),e=Oe.open("/dev/stdout","w"),i=Oe.open("/dev/stderr","w");p(0===t.fd,"invalid handle for stdin ("+t.fd+")"),p(1===e.fd,"invalid handle for stdout ("+e.fd+")"),p(2===i.fd,"invalid handle for stderr ("+i.fd+")")},ensureErrnoError:function(){Oe.ErrnoError||(Oe.ErrnoError=function(t,e){this.node=e,this.setErrno=function(t){for(var e in this.errno=t,De)if(De[e]===t){this.code=e;break}},this.setErrno(t),this.message=xe[t],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=X(this.stack))},Oe.ErrnoError.prototype=new Error,Oe.ErrnoError.prototype.constructor=Oe.ErrnoError,[44].forEach((function(t){Oe.genericErrors[t]=new Oe.ErrnoError(t),Oe.genericErrors[t].stack="<generic error, no stack>"})))},staticInit:function(){Oe.ensureErrnoError(),Oe.nameTable=new Array(4096),Oe.mount(Pe,{},"/"),Oe.createDefaultDirectories(),Oe.createDefaultDevices(),Oe.createSpecialDirectories(),Oe.filesystems={MEMFS:Pe}},init:function(t,e,i){p(!Oe.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Oe.init.initialized=!0,Oe.ensureErrnoError(),u.stdin=t||u.stdin,u.stdout=e||u.stdout,u.stderr=i||u.stderr,Oe.createStandardStreams()},quit:function(){Oe.init.initialized=!1;var t=u._fflush;t&&t(0);for(var e=0;e<Oe.streams.length;e++){var i=Oe.streams[e];i&&Oe.close(i)}},getMode:function(t,e){var i=0;return t&&(i|=365),e&&(i|=146),i},joinPath:function(t,e){var i=Re.join.apply(null,t);return e&&"/"==i[0]&&(i=i.substr(1)),i},absolutePath:function(t,e){return Ie.resolve(e,t)},standardizePath:function(t){return Re.normalize(t)},findObject:function(t,e){var i=Oe.analyzePath(t,e);return i.exists?i.object:($(i.error),null)},analyzePath:function(t,e){try{t=(r=Oe.lookupPath(t,{follow:!e})).path}catch(t){}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=Oe.lookupPath(t,{parent:!0});i.parentExists=!0,i.parentPath=r.path,i.parentObject=r.node,i.name=Re.basename(t),r=Oe.lookupPath(t,{follow:!e}),i.exists=!0,i.path=r.path,i.object=r.node,i.name=r.node.name,i.isRoot="/"===r.path}catch(t){i.error=t.errno}return i},createFolder:function(t,e,i,r){var n=Re.join2("string"==typeof t?t:Oe.getPath(t),e),o=Oe.getMode(i,r);return Oe.mkdir(n,o)},createPath:function(t,e,i,r){t="string"==typeof t?t:Oe.getPath(t);for(var n=e.split("/").reverse();n.length;){var o=n.pop();if(o){var a=Re.join2(t,o);try{Oe.mkdir(a)}catch(t){}t=a}}return a},createFile:function(t,e,i,r,n){var o=Re.join2("string"==typeof t?t:Oe.getPath(t),e),a=Oe.getMode(r,n);return Oe.create(o,a)},createDataFile:function(t,e,i,r,n,o){var a=e?Re.join2("string"==typeof t?t:Oe.getPath(t),e):t,s=Oe.getMode(r,n),h=Oe.create(a,s);if(i){if("string"==typeof i){for(var u=new Array(i.length),l=0,d=i.length;l<d;++l)u[l]=i.charCodeAt(l);i=u}Oe.chmod(h,146|s);var f=Oe.open(h,"w");Oe.write(f,i,0,i.length,0,o),Oe.close(f),Oe.chmod(h,s)}return h},createDevice:function(t,e,i,r){var n=Re.join2("string"==typeof t?t:Oe.getPath(t),e),o=Oe.getMode(!!i,!!r);Oe.createDevice.major||(Oe.createDevice.major=64);var a=Oe.makedev(Oe.createDevice.major++,0);return Oe.registerDevice(a,{open:function(t){t.seekable=!1},close:function(t){r&&r.buffer&&r.buffer.length&&r(10)},read:function(t,e,r,n,o){for(var a=0,s=0;s<n;s++){var h;try{h=i()}catch(t){throw new Oe.ErrnoError(29)}if(void 0===h&&0===a)throw new Oe.ErrnoError(6);if(null==h)break;a++,e[r+s]=h}return a&&(t.node.timestamp=Date.now()),a},write:function(t,e,i,n,o){for(var a=0;a<n;a++)try{r(e[i+a])}catch(t){throw new Oe.ErrnoError(29)}return n&&(t.node.timestamp=Date.now()),a}}),Oe.mkdev(n,o,a)},createLink:function(t,e,i,r,n){var o=Re.join2("string"==typeof t?t:Oe.getPath(t),e);return Oe.symlink(i,o)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;var e=!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!Lt)throw new Error("Cannot load without read() or XMLHttpRequest.");try{t.contents=wt(Lt(t.url),!0),t.usedBytes=t.contents.length}catch(t){e=!1}return e||$(29),e},createLazyFile:function(t,e,i,r,n){function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,i=t/this.chunkSize|0;return this.getter(i)[e]}},o.prototype.setDataGetter=function(t){this.getter=t},o.prototype.cacheLength=function(){var t=new XMLHttpRequest;if(t.open("HEAD",i,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw new Error("Couldn't load "+i+". Status: "+t.status);var e,r=Number(t.getResponseHeader("Content-length")),n=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,o=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;n||(a=r);var s=this;s.setDataGetter((function(t){var e=t*a,n=(t+1)*a-1;if(n=Math.min(n,r-1),void 0===s.chunks[t]&&(s.chunks[t]=function(t,e){if(t>e)throw new Error("invalid range ("+t+", "+e+") or no bytes requested!");if(e>r-1)throw new Error("only "+r+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",i,!1),r!==a&&n.setRequestHeader("Range","bytes="+t+"-"+e),"undefined"!=typeof Uint8Array&&(n.responseType="arraybuffer"),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+i+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):wt(n.responseText||"",!0)}(e,n)),void 0===s.chunks[t])throw new Error("doXHR failed!");return s.chunks[t]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!xt)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new o;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:i};var h=Oe.createFile(t,e,s,r,n);s.contents?h.contents=s.contents:s.url&&(h.contents=null,h.url=s.url),Object.defineProperties(h,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(h.stream_ops).forEach((function(t){var e=h.stream_ops[t];u[t]=function(){if(!Oe.forceLoadFile(h))throw new Oe.ErrnoError(29);return e.apply(null,arguments)}})),u.read=function(t,e,i,r,n){if(!Oe.forceLoadFile(h))throw new Oe.ErrnoError(29);var o=t.node.contents;if(n>=o.length)return 0;var a=Math.min(o.length-n,r);if(p(a>=0),o.slice)for(var s=0;s<a;s++)e[i+s]=o[n+s];else for(s=0;s<a;s++)e[i+s]=o.get(n+s);return a},h.stream_ops=u,h},createPreloadedFile:function(t,e,i,r,n,o,a,s,h,l){Browser.init();var d=e?Ie.resolve(Re.join2(t,e)):t,f=N("cp "+d);function c(i){function c(i){l&&l(),s||Oe.createDataFile(t,e,i,r,n,h),o&&o(),U(f)}var p=!1;u.preloadPlugins.forEach((function(t){p||t.canHandle(d)&&(t.handle(i,d,c,(function(){a&&a(),U(f)})),p=!0)})),p||c(i)}F(f),"string"==typeof i?Browser.asyncLoad(i,(function(t){c(t)}),a):c(i)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(t,e,i){e=e||function(){},i=i||function(){};var r=Oe.indexedDB();try{var n=r.open(Oe.DB_NAME(),Oe.DB_VERSION)}catch(t){return i(t)}n.onupgradeneeded=function(){n.result.createObjectStore(Oe.DB_STORE_NAME)},n.onsuccess=function(){var r=n.result.transaction([Oe.DB_STORE_NAME],"readwrite"),o=r.objectStore(Oe.DB_STORE_NAME),a=0,s=0,h=t.length;function u(){0==s?e():i()}t.forEach((function(t){var e=o.put(Oe.analyzePath(t).object.contents,t);e.onsuccess=function(){++a+s==h&&u()},e.onerror=function(){s++,a+s==h&&u()}})),r.onerror=i},n.onerror=i},loadFilesFromDB:function(t,e,i){e=e||function(){},i=i||function(){};var r=Oe.indexedDB();try{var n=r.open(Oe.DB_NAME(),Oe.DB_VERSION)}catch(t){return i(t)}n.onupgradeneeded=i,n.onsuccess=function(){var r=n.result;try{var o=r.transaction([Oe.DB_STORE_NAME],"readonly")}catch(t){return void i(t)}var a=o.objectStore(Oe.DB_STORE_NAME),s=0,h=0,u=t.length;function l(){0==h?e():i()}t.forEach((function(t){var e=a.get(t);e.onsuccess=function(){Oe.analyzePath(t).exists&&Oe.unlink(t),Oe.createDataFile(Re.dirname(t),Re.basename(t),e.result,!0,!0,!0),++s+h==u&&l()},e.onerror=function(){h++,s+h==u&&l()}})),o.onerror=i},n.onerror=i}},Be={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function(t,e){if("/"!==e[0]){var i;if(-100===t)i=Oe.cwd();else{var r=Oe.getStream(t);if(!r)throw new Oe.ErrnoError(8);i=r.path}e=Re.join2(i,e)}return e},doStat:function(t,e,i){try{var r=t(e)}catch(t){if(t&&t.node&&Re.normalize(e)!==Re.normalize(Oe.getPath(t.node)))return-54;throw t}return Yt[i>>2]=r.dev,Yt[i+4>>2]=0,Yt[i+8>>2]=r.ino,Yt[i+12>>2]=r.mode,Yt[i+16>>2]=r.nlink,Yt[i+20>>2]=r.uid,Yt[i+24>>2]=r.gid,Yt[i+28>>2]=r.rdev,Yt[i+32>>2]=0,Ee=[r.size>>>0,(Me=r.size,+me(Me)>=1?Me>0?(0|ye(+ve(Me/4294967296),4294967295))>>>0:~~+ge((Me-+(~~Me>>>0))/4294967296)>>>0:0)],Yt[i+40>>2]=Ee[0],Yt[i+44>>2]=Ee[1],Yt[i+48>>2]=4096,Yt[i+52>>2]=r.blocks,Yt[i+56>>2]=r.atime.getTime()/1e3|0,Yt[i+60>>2]=0,Yt[i+64>>2]=r.mtime.getTime()/1e3|0,Yt[i+68>>2]=0,Yt[i+72>>2]=r.ctime.getTime()/1e3|0,Yt[i+76>>2]=0,Ee=[r.ino>>>0,(Me=r.ino,+me(Me)>=1?Me>0?(0|ye(+ve(Me/4294967296),4294967295))>>>0:~~+ge((Me-+(~~Me>>>0))/4294967296)>>>0:0)],Yt[i+80>>2]=Ee[0],Yt[i+84>>2]=Ee[1],0},doMsync:function(t,e,i,r){var n=new Uint8Array(Kt.subarray(t,t+i));Oe.msync(e,n,0,i,r)},doMkdir:function(t,e){return"/"===(t=Re.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),Oe.mkdir(t,e,0),0},doMknod:function(t,e,i){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Oe.mknod(t,e,i),0},doReadlink:function(t,e,i){if(i<=0)return-28;var r=Oe.readlink(t),n=Math.min(i,A(r)),o=Zt[e+n];return w(r,e,i+1),Zt[e+n]=o,n},doAccess:function(t,e){if(-8&e)return-28;var i;if(!(i=Oe.lookupPath(t,{follow:!0}).node))return-44;var r="";return 4&e&&(r+="r"),2&e&&(r+="w"),1&e&&(r+="x"),r&&Oe.nodePermissions(i,r)?-2:0},doDup:function(t,e,i){var r=Oe.getStream(i);return r&&Oe.close(r),Oe.open(t,e,0,i,i).fd},doReadv:function(t,e,i,r){for(var n=0,o=0;o<i;o++){var a=Yt[e+8*o>>2],s=Yt[e+(8*o+4)>>2],h=Oe.read(t,Zt,a,s,r);if(h<0)return-1;if(n+=h,h<s)break}return n},doWritev:function(t,e,i,r){for(var n=0,o=0;o<i;o++){var a=Yt[e+8*o>>2],s=Yt[e+(8*o+4)>>2],h=Oe.write(t,Zt,a,s,r);if(h<0)return-1;n+=h}return n},varargs:0,get:function(t){return Be.varargs+=4,Yt[Be.varargs-4>>2]},getStr:function(){return b(Be.get())},getStreamFromFD:function(t){void 0===t&&(t=Be.get());var e=Oe.getStream(t);if(!e)throw new Oe.ErrnoError(8);return e},get64:function(){var t=Be.get(),e=Be.get();return p(t>=0?0===e:-1===e),t},getZero:function(){p(0===Be.get())}},Le={};w("GMT",1340720,4);Oe.staticInit();var We={__cxa_allocate_exception:Q,__cxa_throw:Y,__lock:J,__syscall221:tt,__syscall3:et,__syscall5:it,__unlock:rt,abort:nt,clock:ot,emscripten_memcpy_big:st,emscripten_resize_heap:ut,environ_get:dt,environ_sizes_get:ft,fd_close:ct,fd_fdstat_get:pt,fd_seek:mt,fd_write:gt,gettimeofday:vt,memory:Gt,round:yt,setTempRet0:bt,table:$t,time:_t},Ne=G(),Fe=Ne.__wasm_call_ctors;Ne.__wasm_call_ctors=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Fe.apply(null,arguments)};var Ue=Ne.WasmDecoder_Check;Ne.WasmDecoder_Check=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ue.apply(null,arguments)};var je=Ne.WasmDecoder_Init;Ne.WasmDecoder_Init=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),je.apply(null,arguments)};var Ve=Ne.WasmDecoder_Deinit;Ne.WasmDecoder_Deinit=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ve.apply(null,arguments)};var He=Ne.WasmDecoder_OpenChannel;Ne.WasmDecoder_OpenChannel=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),He.apply(null,arguments)};var ze=Ne.WasmDecoder_InputFlvStream;Ne.WasmDecoder_InputFlvStream=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ze.apply(null,arguments)};var Ge=Ne.WasmDecoder_GetFlvDecodeData;Ne.WasmDecoder_GetFlvDecodeData=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ge.apply(null,arguments)};var qe=Ne.WasmDecoder_InputFlvStreamAndDecode;Ne.WasmDecoder_InputFlvStreamAndDecode=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),qe.apply(null,arguments)};var Xe=Ne.WasmDecoder_OpenVideoDecoder;Ne.WasmDecoder_OpenVideoDecoder=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xe.apply(null,arguments)};var Ze=Ne.WasmDecoder_OpenAudioDecoder;Ne.WasmDecoder_OpenAudioDecoder=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ze.apply(null,arguments)};var Ke=Ne.WasmDecoder_DecodeVideoFrame;Ne.WasmDecoder_DecodeVideoFrame=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ke.apply(null,arguments)};var Qe=Ne.WasmDecoder_DecodeAudioFrame;Ne.WasmDecoder_DecodeAudioFrame=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Qe.apply(null,arguments)};var Ye=Ne.WasmDecoder_CloseChannel;Ne.WasmDecoder_CloseChannel=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ye.apply(null,arguments)};var Je=Ne.WasmDecoder_ConvertFrame2Image;Ne.WasmDecoder_ConvertFrame2Image=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Je.apply(null,arguments)};var $e=Ne.WasmDecoder_ReleaseImageData;Ne.WasmDecoder_ReleaseImageData=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),$e.apply(null,arguments)};var ti=Ne.main;Ne.main=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ti.apply(null,arguments)};var ei=Ne.free;Ne.free=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ei.apply(null,arguments)};var ii=Ne.malloc;Ne.malloc=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ii.apply(null,arguments)};var ri=Ne.__errno_location;Ne.__errno_location=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ri.apply(null,arguments)};var ni=Ne.fflush;Ne.fflush=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ni.apply(null,arguments)};var oi=Ne._get_tzname;Ne._get_tzname=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),oi.apply(null,arguments)};var ai=Ne._get_daylight;Ne._get_daylight=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ai.apply(null,arguments)};var si=Ne._get_timezone;Ne._get_timezone=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),si.apply(null,arguments)};var hi=Ne.setThrew;Ne.setThrew=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),hi.apply(null,arguments)};var ui=Ne._ZSt18uncaught_exceptionv;Ne._ZSt18uncaught_exceptionv=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ui.apply(null,arguments)};var li=Ne.stackSave;Ne.stackSave=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),li.apply(null,arguments)};var di=Ne.stackAlloc;Ne.stackAlloc=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),di.apply(null,arguments)};var fi=Ne.stackRestore;Ne.stackRestore=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),fi.apply(null,arguments)};var ci=Ne.__growWasmMemory;Ne.__growWasmMemory=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ci.apply(null,arguments)};var pi=Ne.dynCall_ii;Ne.dynCall_ii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),pi.apply(null,arguments)};var mi=Ne.dynCall_viiiii;Ne.dynCall_viiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),mi.apply(null,arguments)};var gi=Ne.dynCall_viiiiiifi;Ne.dynCall_viiiiiifi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),gi.apply(null,arguments)};var vi=Ne.dynCall_viiii;Ne.dynCall_viiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),vi.apply(null,arguments)};var yi=Ne.dynCall_viii;Ne.dynCall_viii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),yi.apply(null,arguments)};var bi=Ne.dynCall_iiiiiii;Ne.dynCall_iiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),bi.apply(null,arguments)};var _i=Ne.dynCall_iiiiii;Ne.dynCall_iiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),_i.apply(null,arguments)};var wi=Ne.dynCall_vii;Ne.dynCall_vii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),wi.apply(null,arguments)};var Ai=Ne.dynCall_iii;Ne.dynCall_iii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ai.apply(null,arguments)};var Mi=Ne.dynCall_iiii;Ne.dynCall_iiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Mi.apply(null,arguments)};var Ei=Ne.dynCall_viiiiii;Ne.dynCall_viiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ei.apply(null,arguments)};var Si=Ne.dynCall_viiiiiiiii;Ne.dynCall_viiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Si.apply(null,arguments)};var ki=Ne.dynCall_viiiiiiii;Ne.dynCall_viiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ki.apply(null,arguments)};var Ti=Ne.dynCall_iiiii;Ne.dynCall_iiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ti.apply(null,arguments)};var Ri=Ne.dynCall_viiiiiiiiiiiiii;Ne.dynCall_viiiiiiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ri.apply(null,arguments)};var Ii=Ne.dynCall_viiiiiiiiiii;Ne.dynCall_viiiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ii.apply(null,arguments)};var Ci=Ne.dynCall_viiiiiii;Ne.dynCall_viiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ci.apply(null,arguments)};var Pi=Ne.dynCall_viiiiiiiiiiii;Ne.dynCall_viiiiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Pi.apply(null,arguments)};var xi=Ne.dynCall_vi;Ne.dynCall_vi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),xi.apply(null,arguments)};var Di=Ne.dynCall_iiiiiiiii;Ne.dynCall_iiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Di.apply(null,arguments)};var Oi=Ne.dynCall_viiiifii;Ne.dynCall_viiiifii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Oi.apply(null,arguments)};var Bi=Ne.dynCall_fii;Ne.dynCall_fii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Bi.apply(null,arguments)};var Li=Ne.dynCall_viiiiiiiiii;Ne.dynCall_viiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Li.apply(null,arguments)};var Wi=Ne.dynCall_dd;Ne.dynCall_dd=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Wi.apply(null,arguments)};var Ni=Ne.dynCall_viifi;Ne.dynCall_viifi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ni.apply(null,arguments)};var Fi=Ne.dynCall_fiii;Ne.dynCall_fiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Fi.apply(null,arguments)};var Ui=Ne.dynCall_viidi;Ne.dynCall_viidi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ui.apply(null,arguments)};var ji=Ne.dynCall_iiiiiiii;Ne.dynCall_iiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),ji.apply(null,arguments)};var Vi=Ne.dynCall_did;Ne.dynCall_did=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Vi.apply(null,arguments)};var Hi=Ne.dynCall_v;Ne.dynCall_v=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Hi.apply(null,arguments)};var zi=Ne.dynCall_viiijj;Ne.dynCall_viiijj=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),zi.apply(null,arguments)};var Gi=Ne.dynCall_iiiiiiidiiddii;Ne.dynCall_iiiiiiidiiddii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Gi.apply(null,arguments)};var qi=Ne.dynCall_jij;Ne.dynCall_jij=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),qi.apply(null,arguments)};var Xi=Ne.dynCall_jii;Ne.dynCall_jii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Xi.apply(null,arguments)};var Zi=Ne.dynCall_iidiiii;Ne.dynCall_iidiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Zi.apply(null,arguments)};var Ki=Ne.dynCall_jiji;Ne.dynCall_jiji=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),Ki.apply(null,arguments)},u.asm=Ne;var Qi,Yi=u.___wasm_call_ctors=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.__wasm_call_ctors.apply(null,arguments)},Ji=(u._WasmDecoder_Check=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_Check.apply(null,arguments)},u._WasmDecoder_Init=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_Init.apply(null,arguments)},u._WasmDecoder_Deinit=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_Deinit.apply(null,arguments)},u._WasmDecoder_OpenChannel=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_OpenChannel.apply(null,arguments)},u._WasmDecoder_InputFlvStream=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_InputFlvStream.apply(null,arguments)},u._WasmDecoder_GetFlvDecodeData=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_GetFlvDecodeData.apply(null,arguments)},u._WasmDecoder_InputFlvStreamAndDecode=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_InputFlvStreamAndDecode.apply(null,arguments)},u._WasmDecoder_OpenVideoDecoder=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_OpenVideoDecoder.apply(null,arguments)},u._WasmDecoder_OpenAudioDecoder=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_OpenAudioDecoder.apply(null,arguments)},u._WasmDecoder_DecodeVideoFrame=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_DecodeVideoFrame.apply(null,arguments)},u._WasmDecoder_DecodeAudioFrame=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_DecodeAudioFrame.apply(null,arguments)},u._WasmDecoder_CloseChannel=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_CloseChannel.apply(null,arguments)},u._WasmDecoder_ConvertFrame2Image=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_ConvertFrame2Image.apply(null,arguments)},u._WasmDecoder_ReleaseImageData=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.WasmDecoder_ReleaseImageData.apply(null,arguments)},u._main=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.main.apply(null,arguments)},u._free=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.free.apply(null,arguments)},u._malloc=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.malloc.apply(null,arguments)}),$i=(u.___errno_location=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.__errno_location.apply(null,arguments)},u._fflush=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.fflush.apply(null,arguments)},u.__get_tzname=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm._get_tzname.apply(null,arguments)},u.__get_daylight=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm._get_daylight.apply(null,arguments)},u.__get_timezone=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm._get_timezone.apply(null,arguments)},u._setThrew=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.setThrew.apply(null,arguments)},u.__ZSt18uncaught_exceptionv=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm._ZSt18uncaught_exceptionv.apply(null,arguments)}),tr=u.stackSave=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.stackSave.apply(null,arguments)},er=u.stackAlloc=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.stackAlloc.apply(null,arguments)},ir=u.stackRestore=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.stackRestore.apply(null,arguments)};u.__growWasmMemory=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.__growWasmMemory.apply(null,arguments)},u.dynCall_ii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_ii.apply(null,arguments)},u.dynCall_viiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiii.apply(null,arguments)},u.dynCall_viiiiiifi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiifi.apply(null,arguments)},u.dynCall_viiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiii.apply(null,arguments)},u.dynCall_viii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viii.apply(null,arguments)},u.dynCall_iiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iiiiiii.apply(null,arguments)},u.dynCall_iiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iiiiii.apply(null,arguments)},u.dynCall_vii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_vii.apply(null,arguments)},u.dynCall_iii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iii.apply(null,arguments)},u.dynCall_iiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iiii.apply(null,arguments)},u.dynCall_viiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiii.apply(null,arguments)},u.dynCall_viiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiiiii.apply(null,arguments)},u.dynCall_viiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiiii.apply(null,arguments)},u.dynCall_iiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iiiii.apply(null,arguments)},u.dynCall_viiiiiiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiiiiiiiiii.apply(null,arguments)},u.dynCall_viiiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiiiiiii.apply(null,arguments)},u.dynCall_viiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiii.apply(null,arguments)},u.dynCall_viiiiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiiiiiiii.apply(null,arguments)},u.dynCall_vi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_vi.apply(null,arguments)},u.dynCall_iiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iiiiiiiii.apply(null,arguments)},u.dynCall_viiiifii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiifii.apply(null,arguments)},u.dynCall_fii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_fii.apply(null,arguments)},u.dynCall_viiiiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiiiiiiiii.apply(null,arguments)},u.dynCall_dd=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_dd.apply(null,arguments)},u.dynCall_viifi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viifi.apply(null,arguments)},u.dynCall_fiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_fiii.apply(null,arguments)},u.dynCall_viidi=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viidi.apply(null,arguments)},u.dynCall_iiiiiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iiiiiiii.apply(null,arguments)},u.dynCall_did=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_did.apply(null,arguments)},u.dynCall_v=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_v.apply(null,arguments)},u.dynCall_viiijj=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_viiijj.apply(null,arguments)},u.dynCall_iiiiiiidiiddii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iiiiiiidiiddii.apply(null,arguments)},u.dynCall_jij=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_jij.apply(null,arguments)},u.dynCall_jii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_jii.apply(null,arguments)},u.dynCall_iidiiii=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_iidiiii.apply(null,arguments)},u.dynCall_jiji=function(){return p(ce,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),p(!pe,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),u.asm.dynCall_jiji.apply(null,arguments)};u.asm=Ne,Object.getOwnPropertyDescriptor(u,"intArrayFromString")||(u.intArrayFromString=function(){j("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"intArrayToString")||(u.intArrayToString=function(){j("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),u.ccall=g,u.cwrap=v,Object.getOwnPropertyDescriptor(u,"setValue")||(u.setValue=function(){j("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"getValue")||(u.getValue=function(){j("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"allocate")||(u.allocate=function(){j("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"getMemory")||(u.getMemory=function(){j("'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"AsciiToString")||(u.AsciiToString=function(){j("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stringToAscii")||(u.stringToAscii=function(){j("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"UTF8ArrayToString")||(u.UTF8ArrayToString=function(){j("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"UTF8ToString")||(u.UTF8ToString=function(){j("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stringToUTF8Array")||(u.stringToUTF8Array=function(){j("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stringToUTF8")||(u.stringToUTF8=function(){j("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"lengthBytesUTF8")||(u.lengthBytesUTF8=function(){j("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"UTF16ToString")||(u.UTF16ToString=function(){j("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stringToUTF16")||(u.stringToUTF16=function(){j("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"lengthBytesUTF16")||(u.lengthBytesUTF16=function(){j("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"UTF32ToString")||(u.UTF32ToString=function(){j("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stringToUTF32")||(u.stringToUTF32=function(){j("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"lengthBytesUTF32")||(u.lengthBytesUTF32=function(){j("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"allocateUTF8")||(u.allocateUTF8=function(){j("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stackTrace")||(u.stackTrace=function(){j("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"addOnPreRun")||(u.addOnPreRun=function(){j("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"addOnInit")||(u.addOnInit=function(){j("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"addOnPreMain")||(u.addOnPreMain=function(){j("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"addOnExit")||(u.addOnExit=function(){j("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"addOnPostRun")||(u.addOnPostRun=function(){j("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"writeStringToMemory")||(u.writeStringToMemory=function(){j("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"writeArrayToMemory")||(u.writeArrayToMemory=function(){j("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"writeAsciiToMemory")||(u.writeAsciiToMemory=function(){j("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"addRunDependency")||(u.addRunDependency=function(){j("'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"removeRunDependency")||(u.removeRunDependency=function(){j("'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"ENV")||(u.ENV=function(){j("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"FS")||(u.FS=function(){j("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"FS_createFolder")||(u.FS_createFolder=function(){j("'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"FS_createPath")||(u.FS_createPath=function(){j("'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"FS_createDataFile")||(u.FS_createDataFile=function(){j("'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"FS_createPreloadedFile")||(u.FS_createPreloadedFile=function(){j("'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"FS_createLazyFile")||(u.FS_createLazyFile=function(){j("'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"FS_createLink")||(u.FS_createLink=function(){j("'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"FS_createDevice")||(u.FS_createDevice=function(){j("'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"FS_unlink")||(u.FS_unlink=function(){j("'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}),Object.getOwnPropertyDescriptor(u,"GL")||(u.GL=function(){j("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"dynamicAlloc")||(u.dynamicAlloc=function(){j("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"loadDynamicLibrary")||(u.loadDynamicLibrary=function(){j("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"loadWebAssemblyModule")||(u.loadWebAssemblyModule=function(){j("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"getLEB")||(u.getLEB=function(){j("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"getFunctionTables")||(u.getFunctionTables=function(){j("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"alignFunctionTables")||(u.alignFunctionTables=function(){j("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"registerFunctions")||(u.registerFunctions=function(){j("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),u.addFunction=c,Object.getOwnPropertyDescriptor(u,"removeFunction")||(u.removeFunction=function(){j("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"getFuncWrapper")||(u.getFuncWrapper=function(){j("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"prettyPrint")||(u.prettyPrint=function(){j("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"makeBigInt")||(u.makeBigInt=function(){j("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"dynCall")||(u.dynCall=function(){j("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"getCompilerSetting")||(u.getCompilerSetting=function(){j("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stackSave")||(u.stackSave=function(){j("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stackRestore")||(u.stackRestore=function(){j("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"stackAlloc")||(u.stackAlloc=function(){j("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"establishStackSpace")||(u.establishStackSpace=function(){j("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"print")||(u.print=function(){j("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"printErr")||(u.printErr=function(){j("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"getTempRet0")||(u.getTempRet0=function(){j("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"setTempRet0")||(u.setTempRet0=function(){j("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"callMain")||(u.callMain=function(){j("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"abort")||(u.abort=function(){j("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"Pointer_stringify")||(u.Pointer_stringify=function(){j("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(u,"warnOnce")||(u.warnOnce=function(){j("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}),u.writeStackCookie=T,u.checkStackCookie=R,u.abortStackOverflow=I,Object.getOwnPropertyDescriptor(u,"ALLOC_NORMAL")||Object.defineProperty(u,"ALLOC_NORMAL",{configurable:!0,get:function(){j("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(u,"ALLOC_STACK")||Object.defineProperty(u,"ALLOC_STACK",{configurable:!0,get:function(){j("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(u,"ALLOC_DYNAMIC")||Object.defineProperty(u,"ALLOC_DYNAMIC",{configurable:!0,get:function(){j("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(u,"ALLOC_NONE")||Object.defineProperty(u,"ALLOC_NONE",{configurable:!0,get:function(){j("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(u,"calledRun")||Object.defineProperty(u,"calledRun",{configurable:!0,get:function(){j("'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you")}});if(we=function t(){Qi||Et(),Qi||(we=t)},u.run=Et,u.preInit)for("function"==typeof u.preInit&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();var rr=!0;u.noInitialRun&&(rr=!1),zt=!0,Et()}}e.default=function(t){t.isFlvStream=!0,t.enableAudio=!1,t.pause=!1,t.exitFlag=!1,t.needMoreData=!1,t.wasmDecoderId=-1,t.wasmInitVideoDecoder=!1,t.wasmInitAudioDecoder=!1,t.videoQueue=[],t.audioQueue=[],t.videoFrameNum=0,t.videoRawData=null,t.audioRawData=null,t.videoPacketData=null,t.audioPacketData=null,t.findKeyFrame=!0,t.videoIntervalHandle=-1,t.videoIntervalValue=40,t.audioIntervalHandle=-1,t.audioIntervalValue=80,t.lastPTS=0,t.ptsCount=0,t.maxCacheFrameNum=0,t.calcDelayFlag=!0,t.procVideoFlag=!1,t.procAudioFlag=!1;var e=function(){null==t.videoRawData&&(t.videoRawData=u._malloc(8294400)),null==t.audioRawData&&(t.audioRawData=u._malloc(16384)),null==t.videoPacketData&&(t.videoPacketData=u._malloc(1048576)),null==t.audioPacketData&&(t.audioPacketData=u._malloc(2048)),t.wasmDecoderId<0&&(t.wasmDecoderId=u._WasmDecoder_OpenChannel())},i=function(e,i,r,n,o,s,h,l,d){if(t.procVideoFlag)return-1;t.procVideoFlag=!0,u.HEAPU8.set(l,t.videoPacketData);var f,c=a.tVideoRenderYV12,p=0;if(c==a.tVideoRenderYV12?p=0:c==a.tVideoRenderRGB?p=2:c==a.tVideoRenderRGBA&&(p=26),1==e&&t.videoFrameNum>0&&(t.videoFrameNum-=1),1==e&&!t.wasmInitVideoDecoder&&r)0==u._WasmDecoder_OpenVideoDecoder(t.wasmDecoderId,i,0,0,p)&&(t.wasmInitVideoDecoder=!0);else if(2==e&&!t.wasmInitAudioDecoder){0==u._WasmDecoder_OpenAudioDecoder(t.wasmDecoderId,i,o,h,s)&&(t.wasmInitAudioDecoder=!0)}var m=null;if(1==e&&t.wasmInitVideoDecoder?m=u._WasmDecoder_DecodeVideoFrame(t.wasmDecoderId,t.videoPacketData,d,0,0,t.videoRawData,0):2==e&&t.wasmInitAudioDecoder&&t.enableAudio&&(m=u._WasmDecoder_DecodeAudioFrame(t.wasmDecoderId,t.videoPacketData,d,t.audioRawData,0)),0!=m&&null!=m){var g=u.HEAPU32[m/4],v=(u.HEAPU32[m/4+1],u.HEAPU32[m/4+2]),y=(u.HEAPU32[m/4+3],u.HEAPU32[m/4+4]),b=u.HEAPU32[m/4+5],_=(u.HEAPU32[m/4+6],u.HEAPU32[m/4+7]),w=u.HEAPU32[m/4+8],A=u.HEAPU32[m/4+9],M=u.HEAPU32[m/4+10],E=u.HEAPU32[m/4+11],S=(u.HEAPU32[m/4+12],u.HEAPU32[m/4+13]);if(v<1)return void(t.procVideoFlag=!1);if(1==g){0==p?f=y*b*3/2:2==p?f=y*b*3:(25==p||26==p)&&(f=y*b*4);var k=u.HEAPU8.subarray(t.videoRawData,t.videoRawData+f),T=new Uint8Array(k),R={cmd:a.tFrameData,workerId:a.DECODE_WORKER_ID,mediaType:1,ts:S,width:y,height:b,framesize:d,rawsize:f,fps:_,interval:w,playTimeSec:n,frameNum:t.videoFrameNum,dat:T};if(t.postMessage(R,[R.dat.buffer]),y>=1920&&b>=720)return t.procVideoFlag=!1,1}else if(2==g){k=u.HEAPU8.subarray(t.audioRawData,t.audioRawData+v),T=new Uint8Array(k);var I=0;8==E?I=0:16==E?I=1:32==E&&(I=2);R={cmd:a.tFrameData,workerId:a.DECODE_WORKER_ID,mediaType:2,fmt:I,ch:A,samplerate:M,ts:S,framesize:v,dat:T};t.postMessage(R,[R.dat.buffer])}}return t.procVideoFlag=!1,0},r=function(e,i,r,n,o,s){(u.HEAPU8.set(o,t.audioPacketData),t.wasmInitAudioDecoder)||0==u._WasmDecoder_OpenAudioDecoder(t.wasmDecoderId,e,i,n,r)&&(t.wasmInitAudioDecoder=!0);var h=null;if(t.wasmInitAudioDecoder&&t.enableAudio&&(h=u._WasmDecoder_DecodeAudioFrame(t.wasmDecoderId,t.audioPacketData,s,t.audioRawData,0)),0!=h&&null!=h){u.HEAPU32[h/4],u.HEAPU32[h/4+1];var l=u.HEAPU32[h/4+2],d=(u.HEAPU32[h/4+3],u.HEAPU32[h/4+4],u.HEAPU32[h/4+5],u.HEAPU32[h/4+6],u.HEAPU32[h/4+7],u.HEAPU32[h/4+8],u.HEAPU32[h/4+9]),f=u.HEAPU32[h/4+10],c=u.HEAPU32[h/4+11],p=(u.HEAPU32[h/4+12],u.HEAPU32[h/4+13]);if(l<1)return;var m=u.HEAPU8.subarray(t.audioRawData,t.audioRawData+l),g=new Uint8Array(m),v=0;8==c?v=0:16==c?v=1:32==c&&(v=2);var y={cmd:a.tFrameData,workerId:a.DECODE_WORKER_ID,mediaType:2,fmt:v,ch:d,samplerate:f,ts:p,framesize:l,dat:g};t.postMessage(y,[y.dat.buffer])}},n=function(){if(t.wasmDecoderId<0&&e(),t.wasmDecoderId>0&&t.videoQueue.length>0&&!t.pause){var r=null,n=-1;if(t.isFlvStream){if(t.findKeyFrame)for(;t.videoQueue.length>0;){if((r=t.videoQueue[0]).frameType&&t.videoQueue.length<60){t.findKeyFrame=!1;break}t.videoQueue.shift()}else t.videoQueue.length>60&&(t.findKeyFrame=!0);t.videoQueue.length>0&&(null==r&&(r=t.videoQueue[0]),n=i(r.mediaType,r.codecId,r.frameType,r.playTimeSec,r.samplerate,r.channelNum,r.bitPerSample,r.dat,r.dat.length))}else r=t.videoQueue[0],n=i(r.mediaType,r.codecId,r.frameType,r.playTimeSec,r.samplerate,r.channelNum,r.bitPerSample,r.dat,r.dat.length);n>=0&&t.videoQueue.shift(),t.videoQueue.length>t.maxCacheFrameNum&&t.videoQueue.length}},o=function(){if(!(t.wasmDecoderId<0)&&t.wasmDecoderId>0)for(;t.audioQueue.length>0&&!t.pause;)if(!t.pause){var e=t.audioQueue[0];t.enableAudio&&r(e.codecId,e.samplerate,e.channelNum,e.bitPerSample,e.dat,e.dat.length),t.audioQueue.shift()}};u.onRuntimeInitialized=function(){t.videoIntervalHandle=setInterval(n,t.videoIntervalValue),t.audioIntervalHandle=setInterval(o,t.audioIntervalValue);var e={cmd:a.tDecoderWorkerStartup};t.postMessage(e),s=!0};var d=function(e){if(e>t.lastPTS)if(t.lastPTS>0){if(t.videoQueue.length%5==0){var i=t.ptsCount/5;t.videoQueue.length<=t.maxCacheFrameNum&&function(e){if(s){var i=e;(i<5||i>500)&&(i=40),i!=t.videoIntervalValue&&(t.videoIntervalHandle>=0&&(clearInterval(t.videoIntervalHandle),t.videoIntervalHandle=-1),t.videoIntervalValue=Math.floor(i),t.videoIntervalHandle=setInterval(n,t.videoIntervalValue))}}(i),t.ptsCount=e-t.lastPTS}else t.ptsCount+=e-t.lastPTS;t.lastPTS=e}else t.lastPTS=e,t.ptsCount=40;else t.lastPTS=e,t.ptsCount=40};t.addEventListener("message",(function(i){var r=i.data;switch(r.cmd){case a.tOpenStream:if(h=r.url,t.isFlvStream=r.isFlv,s){var n={cmd:a.tDecoderWorkerStartup};t.postMessage(n)}else l();break;case a.tCloseStream:t.exitFlag=!0,t.wasmDecoderId>0&&(u._WasmDecoder_CloseChannel(t.wasmDecoderId),t.wasmDecoderId=-1),null!=t.videoRawData&&(u._free(t.videoRawData),t.videoRawData=null),null!=t.audioRawData&&(u._free(t.audioRawData),t.audioRawData=null),null!=t.videoPacketData&&(u._free(t.videoPacketData),t.videoPacketData=null),null!=t.audioPacketData&&(u._free(t.audioPacketData),t.audioPacketData=null),t.videoIntervalHandle>=0&&(clearInterval(t.videoIntervalHandle),t.videoIntervalHandle=-1),t.audioIntervalHandle>=0&&(clearInterval(t.audioIntervalHandle),t.audioIntervalHandle=-1),t.videoQueue.clear,t.videoQueue.length=0,t.videoFrameNum=0,t.audioQueue.clear,t.audioQueue.length=0;n={cmd:a.tCloseStream,workerId:a.DECODE_WORKER_ID};t.postMessage(n);break;case a.tOpenAudio:t.enableAudio=!0;break;case a.tCloseAudio:t.enableAudio=!1;break;case a.tPauseStream:t.pause=!0;break;case a.tResumeStream:t.pause=!1;break;case a.tSeekStream:t.videoQueue.clear,t.videoQueue.length=0,t.videoFrameNum=0,t.audioQueue.clear,t.audioQueue.length=0;break;case a.tVidInterval:t.updateIntervalTime(r.interval);break;case a.tFrameData:if(t.exitFlag)break;s?t.isFlvStream?(t.wasmDecoderId<0&&e(),t.wasmDecoderId>0?1==r.mediaType?t.videoIntervalHandle>=0&&(t.videoQueue.push(r),t.maxCacheFrameNum=5):2==r.mediaType&&t.audioIntervalHandle>=0&&!t.findKeyFrame&&t.audioQueue.push(r):t.videoQueue.length<100&&1==r.mediaType&&r.frameType&&t.videoIntervalHandle>=0&&(t.videoQueue.push(r),t.videoQueue.length>=5&&t.videoQueue.shift())):(1==r.mediaType?t.videoIntervalHandle>=0&&(t.videoQueue.push(r),d(r.samplerate),t.videoFrameNum+=1,t.calcDelayFlag&&t.maxCacheFrameNum<t.videoQueue.length?t.maxCacheFrameNum=t.videoQueue.length:t.calcDelayFlag&&(t.calcDelayFlag=!1)):2==r.mediaType&&t.audioIntervalHandle>=0&&t.audioQueue.push(r),t.needMoreData=!1):t.isFlvStream&&t.videoQueue.length<5?1==r.mediaType&&r.frameType&&t.videoIntervalHandle>=0&&(t.videoQueue.push(r),t.videoQueue.length>=5&&t.videoQueue.shift()):!t.isFlvStream&&t.videoQueue.length<1e3&&(1==r.mediaType?t.videoIntervalHandle>=0&&(t.videoQueue.push(r),d(r.samplerate),t.videoFrameNum+=1,t.calcDelayFlag&&t.maxCacheFrameNum<t.videoQueue.length?t.maxCacheFrameNum=t.videoQueue.length:t.calcDelayFlag&&(t.calcDelayFlag=!1)):2==r.mediaType&&t.audioIntervalHandle>=0&&t.audioQueue.push(r))}}))};var d=u,f=l,c=s}.call(this,i(8),"/",i(145)(t),i(9).Buffer)},function(t,e,i){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,i,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,i)}));case 3:return e.nextTick((function(){t.call(null,i,r)}));case 4:return e.nextTick((function(){t.call(null,i,r,n)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,i(8))},function(t,e,i){var r=i(4).Buffer;function n(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,i=new Array(e),n=0;n<e;n++)i[n]=t.readUInt32BE(4*n);return i}function o(t){for(;0<t.length;t++)t[0]=0}function a(t,e,i,r,n){for(var o,a,s,h,u=i[0],l=i[1],d=i[2],f=i[3],c=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],v=4,y=1;y<n;y++)o=u[c>>>24]^l[p>>>16&255]^d[m>>>8&255]^f[255&g]^e[v++],a=u[p>>>24]^l[m>>>16&255]^d[g>>>8&255]^f[255&c]^e[v++],s=u[m>>>24]^l[g>>>16&255]^d[c>>>8&255]^f[255&p]^e[v++],h=u[g>>>24]^l[c>>>16&255]^d[p>>>8&255]^f[255&m]^e[v++],c=o,p=a,m=s,g=h;return o=(r[c>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&c])^e[v++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[c>>>8&255]<<8|r[255&p])^e[v++],h=(r[g>>>24]<<24|r[c>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[o>>>=0,a>>>=0,s>>>=0,h>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,h=0;h<256;++h){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,i[a]=u,r[u]=a;var l=t[a],d=t[l],f=t[d],c=257*t[u]^16843008*u;n[0][a]=c<<24|c>>>8,n[1][a]=c<<16|c>>>16,n[2][a]=c<<8|c>>>24,n[3][a]=c,c=16843009*f^65537*d^257*l^16843008*a,o[0][u]=c<<24|c>>>8,o[1][u]=c<<16|c>>>16,o[2][u]=c<<8|c>>>24,o[3][u]=c,0===a?a=s=1:(a=l^t[t[t[f^l]]],s^=t[t[s]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function u(t){this._key=n(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o<e;o++)n[o]=t[o];for(o=e;o<r;o++){var a=n[o-1];o%e==0?(a=a<<8|a>>>24,a=h.SBOX[a>>>24]<<24|h.SBOX[a>>>16&255]<<16|h.SBOX[a>>>8&255]<<8|h.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=h.SBOX[a>>>24]<<24|h.SBOX[a>>>16&255]<<16|h.SBOX[a>>>8&255]<<8|h.SBOX[255&a]),n[o]=n[o-e]^a}for(var u=[],l=0;l<r;l++){var d=r-l,f=n[d-(l%4?0:4)];u[l]=l<4||d<=4?f:h.INV_SUB_MIX[0][h.SBOX[f>>>24]]^h.INV_SUB_MIX[1][h.SBOX[f>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[f>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&f]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return a(t=n(t),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),i=r.allocUnsafe(16);return i.writeUInt32BE(e[0],0),i.writeUInt32BE(e[1],4),i.writeUInt32BE(e[2],8),i.writeUInt32BE(e[3],12),i},u.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var i=a(t,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(i[0],0),o.writeUInt32BE(i[3],4),o.writeUInt32BE(i[2],8),o.writeUInt32BE(i[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=u},function(t,e,i){var r=i(4).Buffer,n=i(52);t.exports=function(t,e,i,o){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=i/8,s=r.alloc(a),h=r.alloc(o||0),u=r.alloc(0);a>0||o>0;){var l=new n;l.update(u),l.update(t),e&&l.update(e),u=l.digest();var d=0;if(a>0){var f=s.length-a;d=Math.min(a,u.length),u.copy(s,f,0,d),a-=d}if(d<u.length&&o>0){var c=h.length-o,p=Math.min(o,u.length-d);u.copy(h,c,d,d+p),o-=p}}return u.fill(0),{key:s,iv:h}}},function(t,e,i){"use strict";var r=i(16),n=i(14),o=n.getNAF,a=n.getJSF,s=n.assert;function h(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=h,h.prototype.point=function(){throw new Error("Not implemented")},h.prototype.validate=function(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function(t,e){s(t.precomputed);var i=t._getDoubles(),r=o(e,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var a,h,u=[];for(a=0;a<r.length;a+=i.step){h=0;for(var l=a+i.step-1;l>=a;l--)h=(h<<1)+r[l];u.push(h)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),c=n;c>0;c--){for(a=0;a<u.length;a++)(h=u[a])===c?f=f.mixedAdd(i.points[a]):h===-c&&(f=f.mixedAdd(i.points[a].neg()));d=d.add(f)}return d.toP()},h.prototype._wnafMul=function(t,e){var i=4,r=t._getNAFPoints(i);i=r.wnd;for(var n=r.points,a=o(e,i,this._bitLength),h=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(var l=0;u>=0&&0===a[u];u--)l++;if(u>=0&&l++,h=h.dblp(l),u<0)break;var d=a[u];s(0!==d),h="affine"===t.type?d>0?h.mixedAdd(n[d-1>>1]):h.mixedAdd(n[-d-1>>1].neg()):d>0?h.add(n[d-1>>1]):h.add(n[-d-1>>1].neg())}return"affine"===t.type?h.toP():h},h.prototype._wnafMulAdd=function(t,e,i,r,n){var s,h,u,l=this._wnafT1,d=this._wnafT2,f=this._wnafT3,c=0;for(s=0;s<r;s++){var p=(u=e[s])._getNAFPoints(t);l[s]=p.wnd,d[s]=p.points}for(s=r-1;s>=1;s-=2){var m=s-1,g=s;if(1===l[m]&&1===l[g]){var v=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(v[1]=e[m].add(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].add(e[g].neg())):(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=a(i[m],i[g]);for(c=Math.max(b[0].length,c),f[m]=new Array(c),f[g]=new Array(c),h=0;h<c;h++){var _=0|b[0][h],w=0|b[1][h];f[m][h]=y[3*(_+1)+(w+1)],f[g][h]=0,d[m]=v}}else f[m]=o(i[m],l[m],this._bitLength),f[g]=o(i[g],l[g],this._bitLength),c=Math.max(f[m].length,c),c=Math.max(f[g].length,c)}var A=this.jpoint(null,null,null),M=this._wnafT4;for(s=c;s>=0;s--){for(var E=0;s>=0;){var S=!0;for(h=0;h<r;h++)M[h]=0|f[h][s],0!==M[h]&&(S=!1);if(!S)break;E++,s--}if(s>=0&&E++,A=A.dblp(E),s<0)break;for(h=0;h<r;h++){var k=M[h];0!==k&&(k>0?u=d[h][k-1>>1]:k<0&&(u=d[h][-k-1>>1].neg()),A="affine"===u.type?A.mixedAdd(u):A.add(u))}}for(s=0;s<r;s++)d[s]=null;return n?A:A.toP()},h.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},h.prototype.decodePoint=function(t,e){t=n.toArray(t,e);var i=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*i)return 6===t[0]?s(t[t.length-1]%2==0):7===t[0]&&s(t[t.length-1]%2==1),this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));if((2===t[0]||3===t[0])&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),3===t[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(t){return this.encode(t,!0)},u.prototype._encode=function(t){var e=this.curve.p.byteLength(),i=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",e))},u.prototype.encode=function(t,e){return n.encode(this._encode(e),t)},u.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},u.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},u.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<e;n+=t){for(var o=0;o<t;o++)r=r.dbl();i.push(r)}return{step:t,points:i}},u.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],i=(1<<t)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)e[n]=e[n-1].add(r);return{wnd:t,points:e}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(t){for(var e=this,i=0;i<t;i++)e=e.dbl();return e}},function(t,e,i){var r=i(227),n=i(235),o=i(236),a=i(61),s=i(95),h=i(4).Buffer;function u(t){var e;"object"!=typeof t||h.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=h.from(t));var i,u,l=o(t,e),d=l.tag,f=l.data;switch(d){case"CERTIFICATE":u=r.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=r.PublicKey.decode(f,"der")),i=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=r.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":f=function(t,e){var i=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=n[t.algorithm.decrypt.cipher.algo.join(".")],u=t.algorithm.decrypt.cipher.iv,l=t.subjectPrivateKey,d=parseInt(o.split("-")[1],10)/8,f=s.pbkdf2Sync(e,i,r,d,"sha1"),c=a.createDecipheriv(o,f,u),p=[];return p.push(c.update(l)),p.push(c.final()),h.concat(p)}(f=r.EncryptedPrivateKey.decode(f,"der"),e);case"PRIVATE KEY":switch(i=(u=r.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:r.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=r.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=r.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+d)}}t.exports=u,u.signature=r.signature},function(t,e,i){"use strict";var r,n=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),a=[];function s(t){for(var e=-1,i=0;i<a.length;i++)if(a[i].identifier===t){e=i;break}return e}function h(t,e){for(var i={},r=[],n=0;n<t.length;n++){var o=t[n],h=e.base?o[0]+e.base:o[0],u=i[h]||0,l="".concat(h," ").concat(u);i[h]=u+1;var d=s(l),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:l,updater:g(f,e),references:1}),r.push(l)}return r}function u(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var n=i.nc;n&&(r.nonce=n)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var a=o(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var l,d=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function f(t,e,i,r){var n=i?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=d(e,n);else{var o=document.createTextNode(n),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function c(t,e,i){var r=i.css,n=i.media,o=i.sourceMap;if(n?t.setAttribute("media",n):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var p=null,m=0;function g(t,e){var i,r,n;if(e.singleton){var o=m++;i=p||(p=u(e)),r=f.bind(null,i,o,!1),n=f.bind(null,i,o,!0)}else i=u(e),r=c.bind(null,i,e),n=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else n()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=n());var i=h(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<i.length;r++){var n=s(i[r]);a[n].references--}for(var o=h(t,e),u=0;u<i.length;u++){var l=s(i[u]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}i=o}}}},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",r=t[3];if(!r)return i;if(e&&"function"==typeof btoa){var n=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),h="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(h," */")),o=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[i].concat(o).concat([n]).join("\n")}var a,s,h;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,r){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(n[a]=!0)}for(var s=0;s<t.length;s++){var h=[].concat(t[s]);r&&n[h[0]]||(i&&(h[2]?h[2]="".concat(i," and ").concat(h[2]):h[2]=i),e.push(h))}},e}},function(t,e,i){var r;t.exports=(r=i(5),function(t){var e=r,i=e.lib,n=i.Base,o=i.WordArray,a=e.x64={};a.Word=n.extend({init:function(t,e){this.high=t,this.low=e}}),a.WordArray=n.extend({init:function(e,i){e=this.words=e||[],this.sigBytes=i!=t?i:8*e.length},toX32:function(){for(var t=this.words,e=t.length,i=[],r=0;r<e;r++){var n=t[r];i.push(n.high),i.push(n.low)}return o.create(i,this.sigBytes)},clone:function(){for(var t=n.clone.call(this),e=t.words=this.words.slice(0),i=e.length,r=0;r<i;r++)e[r]=e[r].clone();return t}})}(),r)},function(t,e,i){"use strict";var r=i(1);function n(t,e,i){var r=t;if(e+i<r.length){for(;i--;)if(128!=(192&r[++e]))return!1;return!0}return!1}var o,a=function(t){for(var e=[],i=t,r=0,o=t.length;r<o;)if(i[r]<128)e.push(String.fromCharCode(i[r])),++r;else{if(i[r]<192);else if(i[r]<224){if(n(i,r,1)){var a=(31&i[r])<<6|63&i[r+1];if(a>=128){e.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(i[r]<240){if(n(i,r,2)){var s=(15&i[r])<<12|(63&i[r+1])<<6|63&i[r+2];if(s>=2048&&55296!=(63488&s)){e.push(String.fromCharCode(65535&s)),r+=3;continue}}}else if(i[r]<248&&n(i,r,3)){var h=(7&i[r])<<18|(63&i[r+1])<<12|(63&i[r+2])<<6|63&i[r+3];if(h>65536&&h<1114112){h-=65536,e.push(String.fromCharCode(h>>>10|55296)),e.push(String.fromCharCode(1023&h|56320)),r+=4;continue}}e.push(String.fromCharCode(65533)),++r}return e.join("")},s=i(2),h=(o=new ArrayBuffer(2),new DataView(o).setInt16(0,256,!0),256===new Int16Array(o)[0]),u=function(){function t(){}return t.parseScriptData=function(e,i,n){var o={};try{var a=t.parseValue(e,i,n);if(n-a.size<1)return o;var s=t.parseValue(e,i+a.size,n-a.size);o[a.data]=s.data}catch(t){r.a.e("AMF",t.toString())}return o},t.parseObject=function(e,i,r){if(r<3)throw new s.a("Data not enough when parse ScriptDataObject");var n=t.parseString(e,i,r),o=t.parseValue(e,i+n.size,r-n.size),a=o.objectEnd;return{data:{name:n.data,value:o.data},size:n.size+o.size,objectEnd:a}},t.parseVariable=function(e,i,r){return t.parseObject(e,i,r)},t.parseString=function(t,e,i){if(i<2)throw new s.a("Data not enough when parse String");var r=new DataView(t,e,i).getUint16(0,!h);return{data:r>0?a(new Uint8Array(t,e+2,r)):"",size:2+r}},t.parseLongString=function(t,e,i){if(i<4)throw new s.a("Data not enough when parse LongString");var r=new DataView(t,e,i).getUint32(0,!h);return{data:r>0?a(new Uint8Array(t,e+4,r)):"",size:4+r}},t.parseDate=function(t,e,i){if(i<10)throw new s.a("Data size invalid when parse Date");var r=new DataView(t,e,i),n=r.getFloat64(0,!h),o=r.getInt16(8,!h);return{data:new Date(n+=60*o*1e3),size:10}},t.parseValue=function(e,i,n){if(n<1)throw new s.a("Data not enough when parse Value");var o,a=new DataView(e,i,n),u=1,l=a.getUint8(0),d=!1;try{switch(l){case 0:o=a.getFloat64(1,!h),u+=8;break;case 1:o=!!a.getUint8(1),u+=1;break;case 2:var f=t.parseString(e,i+1,n-1);o=f.data,u+=f.size;break;case 3:o={};var c=0;for(9==(16777215&a.getUint32(n-4,!h))&&(c=3);u<n-4;){var p=t.parseObject(e,i+u,n-u-c);if(p.objectEnd)break;o[p.data.name]=p.data.value,u+=p.size}if(u<=n-3)9===(16777215&a.getUint32(u-1,!h))&&(u+=3);break;case 8:o={},u+=4;var m=0;for(9==(16777215&a.getUint32(n-4,!h))&&(m=3);u<n-8;){var g=t.parseVariable(e,i+u,n-u-m);if(g.objectEnd)break;o[g.data.name]=g.data.value,u+=g.size}if(u<=n-3)9===(16777215&a.getUint32(u-1,!h))&&(u+=3);break;case 9:o=void 0,u=1,d=!0;break;case 10:o=[];var v=a.getUint32(1,!h);u+=4;for(var y=0;y<v;y++){var b=t.parseValue(e,i+u,n-u);o.push(b.data),u+=b.size}break;case 11:var _=t.parseDate(e,i+1,n-1);o=_.data,u+=_.size;break;case 12:var w=t.parseString(e,i+1,n-1);o=w.data,u+=w.size;break;default:u=n}}catch(t){r.a.e("AMF",t.toString())}return{data:o,size:u,objectEnd:d}},t}(),l=i(23),d=i(7),f=i(12),c=i(0);function p(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var m=function(){function t(t,e,i,r,n,o){this.TAG="FLVDemuxer",this._config=e,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new f.a,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var t=new ArrayBuffer(2);return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]}(),this.videoCodecId=0,this.audioCodecId=0,this._AVC_SPS=null,this._AVC_PPS=null,this._HEVC_VPS=null,this._HEVC_SPS=null,this._HEVC_PPS=null,this._StartCode=[0,0,0,1],this._SampleRate=8e3,this._ChannelNum=1,this._pause=!1,this._callbackInitFlag=!1,this._callbackMediaDataFunc=i,this._callbackMediaDataUserPtr=r,this._callbackPlaybackTimeUserPtr=n,this.getVideoInfoCallbackFunc=o,this._debugProcCount=0,this._AudioMaxFrameSize=0,this._lastVideoPts=0,this._lastAudioPts=0,this.snapshotCount=0,this.fullFrameData=new Uint8Array(2097152),this.fullFramePos=0,this._DebugBuf=null,this._DebugBufPos=0}var e,i,n,o=t.prototype;return o.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},t.probe=function(t){var e=new Uint8Array(t),i={match:!1};if(70!==e[0]||76!==e[1]||86!==e[2]||1!==e[3])return i;var r,n,o=(4&e[4])>>>2!=0,a=0!=(1&e[4]),s=(r=e)[n=5]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3];return s<9?i:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:o,hasVideoTrack:a}},o.bindDataSource=function(t){return t.onDataArrival=this.parseChunks.bind(this),this},o.resetMediaInfo=function(){this._mediaInfo=new f.a},o.pause=function(){this._pause=!0},o.resume=function(){this._pause=!1},o._onDataAvailableToSoftwareDecodeVideo=function(t,e){var i=e.samples,r=-1;for(i.length>1&&(r=0);i.length;){for(var n=i.shift(),o=0,a=0;a<n.units.length;a++)o+=n.units[a].data.length;for(var s=0,h=new Uint8Array(o);n.units.length;){var u=n.units.shift();27==t&&(u.data[0]=0,u.data[1]=0,u.data[2]=0,u.data[3]=1),h.set(u.data,s),s+=u.data.length}this._callbackMediaDataFunc&&(r>=0&&r++,this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,1,t,n.isKeyframe,h,o,n.pts,0,0))}},o._onDataAvailableToSoftwareDecodeAudio=function(t,e){var i=e.samples,r=-1;for(i.length>1&&(r=0);i.length;){var n=i.shift();this._callbackMediaDataFunc&&(r>=0&&r++,this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,2,t,0,n.unit,n.length,this._SampleRate,this._ChannelNum,this._SampleRate>=44100?32:16))}},o._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},o.parseChunks=function(e,i){if(null!==e){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new s.a("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var n=0,o=this._littleEndian;if(0===i){if(!(e.byteLength>13))return 0;n=t.probe(e).dataOffset}if(this._firstParse)this._firstParse=!1,i+n!==this._dataOffset&&r.a.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(e,n).getUint32(0,!o)&&r.a.w(this.TAG,"PrevTagSize0 !== 0 !!!"),n+=4;for(;n<e.byteLength;){this._dispatch=!0;var a=new DataView(e,n);if(n+11+4>e.byteLength)break;var h=a.getUint8(0),u=16777215&a.getUint32(0,!o);if(n+11+u+4>e.byteLength)break;if(8===h||9===h||18===h){var l=a.getUint8(4),d=a.getUint8(5),f=a.getUint8(6)|d<<8|l<<16|a.getUint8(7)<<24;0!==(16777215&a.getUint32(7,!o))&&r.a.w(this.TAG,"Meet tag which has StreamID != 0!");var c=n+11;if(!this._pause)switch(h){case 8:if(this._lastAudioPts>0)this._lastAudioPts;this._lastAudioPts=f,this.audioCodecId=this._parseAudioData(e,c,u,f);break;case 9:if(this._lastVideoPts>0)this._lastVideoPts;this._lastVideoPts=f,this.videoCodecId=this._parseVideoData(e,c,u,f,i+n);break;case 18:this._parseScriptData(e,c,u)}var p=a.getUint32(11+u,!o);p!==11+u&&r.a.w(this.TAG,"Invalid PrevTagSize "+p),n+=11+u+4}else r.a.w(this.TAG,"Unsupported tag type "+h+", skipped"),n+=11+u+4}return this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&(7==this.videoCodecId||0==this.videoCodecId?"auto"===this._config.decodeType||"hard"===this._config.decodeType?(this._onDataAvailable(this._audioTrack,this._videoTrack),this._callbackInitFlag||(this._callbackInitFlag=!0,this._callbackMediaDataFunc&&this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!1,1,0,0,null,0,0,0,0))):(this._videoTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeVideo(27,this._videoTrack),this._audioTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeAudio(10==this.audioCodecId?86018:0,this._audioTrack)):12==this.videoCodecId&&(this._videoTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeVideo(173,this._videoTrack),this._audioTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeAudio(10==this.audioCodecId?86018:0,this._audioTrack))):(this._debugProcCount++,this._debugProcCount>=60&&(this._debugProcCount=0,this._hasAudio=!1,this._mediaInfo.hasAudio=!1)),n}},o._parseScriptData=function(t,e,i){var n=u.parseScriptData(t,e,i);if(n.hasOwnProperty("onMetaData")){if(null==n.onMetaData||"object"!=typeof n.onMetaData)return void r.a.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&r.a.w(this.TAG,"Found another onMetaData tag!"),this._metadata=n;var o=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},o)),"boolean"==typeof o.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=o.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof o.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=o.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof o.audiodatarate&&(this._mediaInfo.audioDataRate=o.audiodatarate),"number"==typeof o.videodatarate&&(this._mediaInfo.videoDataRate=o.videodatarate),"number"==typeof o.width&&(this._mediaInfo.width=o.width),"number"==typeof o.height&&(this._mediaInfo.height=o.height),"number"==typeof o.duration){if(!this._durationOverrided){var a=Math.floor(o.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof o.framerate){var s=Math.floor(1e3*o.framerate);if(s>0){var h=s/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=h,this._referenceFrameRate.fps_num=s,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=h}}if("object"==typeof o.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var l=o.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(l),o.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=o,r.a.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(n).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},n))},o._parseKeyframesIndex=function(t){for(var e=[],i=[],r=1;r<t.times.length;r++){var n=this._timestampBase+Math.floor(1e3*t.times[r]);e.push(n),i.push(t.filepositions[r])}return{times:e,filepositions:i}},o._parseAudioData=function(t,e,i,n){if(i<=1)return r.a.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!"),0;if(!0===this._hasAudioFlagOverrided&&!1===this._hasAudio)return 0;this._littleEndian;var o=new DataView(t,e,i).getUint8(0),a=o>>>4;if(2!==a&&10!==a)return this._onError(d.a.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a),0;var s=0,h=(12&o)>>>2;if(!(h>=0&&h<=4))return this._onError(d.a.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+h),0;s=this._flvSoundRateTable[h];var u=1&o,l=this._audioMetadata,f=this._audioTrack;if(l||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(l=this._audioMetadata={}).type="audio",l.id=f.id,l.timescale=this._timescale,l.duration=this._duration,l.audioSampleRate=s,l.channelCount=0===u?1:2),10===a){var c=this._parseAACAudioData(t,e+1,i-1);if(null==c)return 0;if(0===c.packetType){l.config&&r.a.w(this.TAG,"Found another AudioSpecificConfig!");var p=c.data;l.audioSampleRate=p.samplingRate,l.channelCount=p.channelCount,l.codec=p.codec,l.originalCodec=p.originalCodec,l.config=p.config,l.refSampleDuration=1024/l.audioSampleRate*l.timescale,this._SampleRate=p.samplingRate,this._ChannelNum=p.channelCount,this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",l);var m=this._mediaInfo;m.audioCodec=l.originalCodec,m.audioSampleRate=l.audioSampleRate,m.audioChannelCount=l.channelCount,m.hasVideo?null!=m.videoCodec&&(m.mimeType='video/x-flv; codecs="'+m.videoCodec+","+m.audioCodec+'"'):m.mimeType='video/x-flv; codecs="'+m.audioCodec+'"',m.isComplete()&&this._onMediaInfo(m)}else if(1===c.packetType){var g=this._timestampBase+n,v={unit:c.data,length:c.data.byteLength,dts:g,pts:g};f.samples.push(v),f.length+=c.data.length,c.data.length>this._AudioMaxFrameSize&&(this._AudioMaxFrameSize=c.data.length)}else r.a.e(this.TAG,"Flv: Unsupported AAC data type "+c.packetType)}else if(2===a){if(!l.codec){var y=this._parseMP3AudioData(t,e+1,i-1,!0);if(null==y)return 0;l.audioSampleRate=y.samplingRate,l.channelCount=y.channelCount,l.codec=y.codec,l.originalCodec=y.originalCodec,l.refSampleDuration=1152/l.audioSampleRate*l.timescale,r.a.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",l);var b=this._mediaInfo;b.audioCodec=l.codec,b.audioSampleRate=l.audioSampleRate,b.audioChannelCount=l.channelCount,b.audioDataRate=y.bitRate,b.hasVideo?null!=b.videoCodec&&(b.mimeType='video/x-flv; codecs="'+b.videoCodec+","+b.audioCodec+'"'):b.mimeType='video/x-flv; codecs="'+b.audioCodec+'"',b.isComplete()&&this._onMediaInfo(b)}var _=this._parseMP3AudioData(t,e+1,i-1,!1);if(null==_)return 0;var w=this._timestampBase+n,A={unit:_,length:_.byteLength,dts:w,pts:w};f.samples.push(A),f.length+=_.length}return a},o._parseAACAudioData=function(t,e,i){if(!(i<=1)){var n={},o=new Uint8Array(t,e,i);return n.packetType=o[0],0===o[0]?n.data=this._parseAACAudioSpecificConfig(t,e+1,i-1):n.data=o.subarray(1),n}r.a.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},o._parseAACAudioSpecificConfig=function(t,e,i){var r,n,o=new Uint8Array(t,e,i),a=null,s=0,h=null;if(s=r=o[0]>>>3,(n=(7&o[0])<<1|o[1]>>>7)<0||n>=this._mpegSamplingRates.length)this._onError(d.a.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var u=this._mpegSamplingRates[n],l=(120&o[1])>>>3;if(!(l<0||l>=8)){5===s&&(h=(7&o[1])<<1|o[2]>>>7,(124&o[2])>>>2);var f=self.navigator.userAgent.toLowerCase();return-1!==f.indexOf("firefox")?n>=6?(s=5,a=new Array(4),h=n-3):(s=2,a=new Array(2),h=n):-1!==f.indexOf("android")?(s=2,a=new Array(2),h=n):(s=5,h=n,a=new Array(4),n>=6?h=n-3:1===l&&(s=2,a=new Array(2),h=n)),a[0]=s<<3,a[0]|=(15&n)>>>1,a[1]=(15&n)<<7,a[1]|=(15&l)<<3,5===s&&(a[1]|=(15&h)>>>1,a[2]=(1&h)<<7,a[2]|=8,a[3]=0),{config:a,samplingRate:u,channelCount:l,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}this._onError(d.a.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},o._parseMP3AudioData=function(t,e,i,n){if(!(i<4)){this._littleEndian;var o=new Uint8Array(t,e,i),a=null;if(n){if(255!==o[0])return;var s=o[1]>>>3&3,h=(6&o[1])>>1,u=(240&o[2])>>>4,l=(12&o[2])>>>2,d=3!==(o[3]>>>6&3)?2:1,f=0,c=0;switch(s){case 0:f=this._mpegAudioV25SampleRateTable[l];break;case 2:f=this._mpegAudioV20SampleRateTable[l];break;case 3:f=this._mpegAudioV10SampleRateTable[l]}switch(h){case 1:34,u<this._mpegAudioL3BitRateTable.length&&(c=this._mpegAudioL3BitRateTable[u]);break;case 2:33,u<this._mpegAudioL2BitRateTable.length&&(c=this._mpegAudioL2BitRateTable[u]);break;case 3:32,u<this._mpegAudioL1BitRateTable.length&&(c=this._mpegAudioL1BitRateTable[u])}a={bitRate:c,samplingRate:f,channelCount:d,codec:"mp3",originalCodec:"mp3"}}else a=o;return a}r.a.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},o._parseVideoData=function(t,e,i,n,o){if(i<=1)r.a.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var a=new Uint8Array(t,e,i)[0],s=(240&a)>>>4,h=15&a;if(7===h||12===h)return this._parseAVCAndHEVCVideoPacket(h,t,e+1,i-1,n,o,s),h;this._onError(d.a.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+h)}},o._parseAVCAndHEVCVideoPacket=function(t,e,i,n,o,a,s){if(n<4)r.a.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var h=this._littleEndian,u=new DataView(e,i,n),l=u.getUint8(0),f=(16777215&u.getUint32(0,!h))<<8>>8;if(0===l)7==t?(c.setCodecTypeStr("H264"),this._parseAVCDecoderConfigurationRecord(e,i+4,n-4)):(c.setCodecTypeStr("H265"),this._parseHEVCDecoderConfigurationRecord(e,i+4,n-4));else if(1===l)7==t?this._parseAVCVideoData(e,i+4,n-4,o,a,s,f):this._parseHEVCVideoData(e,i+4,n-4,o,a,s,f);else if(2!==l)return void this._onError(d.a.FORMAT_ERROR,"Flv: Invalid video packet type "+l)}},o._parseAVCDecoderConfigurationRecord=function(t,e,i){if(i<7)r.a.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,o=this._videoTrack,a=this._littleEndian,s=new DataView(t,e,i);n?void 0!==n.avcc&&r.a.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=o.id,n.timescale=this._timescale,n.duration=this._duration);var h=s.getUint8(0),u=s.getUint8(1);s.getUint8(2),s.getUint8(3);if(1===h&&0!==u)if(this._naluLengthSize=1+(3&s.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var f=31&s.getUint8(5);if(0!==f){f>1&&r.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+f);for(var c=6,p=0;p<f;p++){var m=s.getUint16(c,!a);if(c+=2,0!==m){var g=new Uint8Array(t,e+c,m);this._AVC_SPS=new Uint8Array(m+4),c+=m,this._AVC_SPS.set(this._StartCode,0),this._AVC_SPS.set(g,4);var v=l.a.parseSPS(g);if(0===p){n.codecWidth=v.codec_size.width,n.codecHeight=v.codec_size.height,n.presentWidth=v.present_size.width,n.presentHeight=v.present_size.height,n.profile=v.profile_string,n.level=v.level_string,n.bitDepth=v.bit_depth,n.chromaFormat=v.chroma_format,n.sarRatio=v.sar_ratio,n.frameRate=v.frame_rate,!1!==v.frame_rate.fixed&&0!==v.frame_rate.fps_num&&0!==v.frame_rate.fps_den||(n.frameRate=this._referenceFrameRate);var y=n.frameRate.fps_den,b=n.frameRate.fps_num;n.refSampleDuration=n.timescale*(y/b);for(var _=g.subarray(1,4),w="avc1.",A=0;A<3;A++){var M=_[A].toString(16);M.length<2&&(M="0"+M),w+=M}n.codec=w;var E=this._mediaInfo;E.width=n.codecWidth,E.height=n.codecHeight,E.fps=n.frameRate.fps,E.profile=n.profile,E.level=n.level,E.refFrames=v.ref_frames,E.chromaFormat=v.chroma_format_string,E.sarNum=n.sarRatio.width,E.sarDen=n.sarRatio.height,E.videoCodec=w,E.hasAudio?null!=E.audioCodec&&(E.mimeType='video/x-flv; codecs="'+E.videoCodec+","+E.audioCodec+'"'):E.mimeType='video/x-flv; codecs="'+E.videoCodec+'"',E.isComplete()&&this._onMediaInfo(E)}}}var S=s.getUint8(c);if(0!==S){S>1&&r.a.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+S),c++;for(var k=0;k<S;k++){var T=s.getUint16(c,!a);if(c+=2,0!==T){var R=new Uint8Array(t,e+c,T);this._AVC_PPS=new Uint8Array(T+4),this._AVC_PPS.set(this._StartCode,0),this._AVC_PPS.set(R,4),c+=T}}n.avcc=new Uint8Array(i),n.avcc.set(new Uint8Array(t,e,i),0),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",n),this.getVideoInfoCallbackFunc&&null!=this.getVideoInfoCallbackFunc&&this.getVideoInfoCallbackFunc(this._callbackPlaybackTimeUserPtr,"H264",n.codecWidth,n.codecHeight)}else this._onError(d.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(d.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(d.a.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(d.a.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},o.uint8arrayToBase64=function(t){for(var e,i=0,r=t.length,n="";i<r;)e=t.subarray(i,Math.min(i+32768,r)),n+=String.fromCharCode.apply(null,e),i+=32768;return btoa(n)},o._parseAVCVideoData=function(t,e,i,n,o,a,s){var h=this._littleEndian,u=new DataView(t,e,i),l=[],d=0,f=0,c=this._naluLengthSize,p=this._timestampBase+n,m=1===a,g=!0;for(7==this.videoCodecId&&("auto"!==this._config.decodeType&&"hard"!==this._config.decodeType||(g=!1));f<i;){if(f+4>=i){r.a.w(this.TAG,"Malformed Nalu near timestamp "+p+", offset = "+f+", dataSize = "+i);break}var v=u.getUint32(f,!h);if(3===c&&(v>>>=8),v>i-c)return void r.a.w(this.TAG,"Malformed Nalus near timestamp "+p+", NaluSize > DataSize!");var y=31&u.getUint8(f+c);if(5===y&&(m=!0,l.length<1&&this._AVC_SPS&&this._AVC_SPS.length>0)){if(g){var b={type:7,data:this._AVC_SPS};l.push(b),d+=b.data.length;var _={type:8,data:this._AVC_PPS};l.push(_),d+=_.data.length}else{var w=this._AVC_SPS.subarray(0,this._AVC_SPS.length),A=w.length-4;w[0]=A>>24,w[1]=A>>16,w[2]=A>>8,w[3]=255&A;var M={type:7,data:w};l.push(M),d+=M.data.length;var E=this._AVC_PPS.subarray(0,this._AVC_PPS.length),S=E.length-4;E[0]=S>>24,E[1]=S>>16,E[2]=S>>8,E[3]=255&S;var k={type:8,data:E};l.push(k),d+=k.data.length}this.snapshotCount>0&&this.fullFrameData&&null!=this.fullFrameData&&(this.fullFrameData.set(this._AVC_SPS,0),this.fullFrameData[0]=0,this.fullFrameData[1]=0,this.fullFrameData[2]=0,this.fullFrameData[3]=1,this.fullFramePos=this._AVC_SPS.length,this.fullFrameData.set(this._AVC_PPS,this.fullFramePos),this.fullFramePos+=this._AVC_PPS.length,this.fullFrameData[this._AVC_SPS.length+0]=0,this.fullFrameData[this._AVC_SPS.length+1]=0,this.fullFrameData[this._AVC_SPS.length+2]=0,this.fullFrameData[this._AVC_SPS.length+3]=1)}var T=new Uint8Array(t,e+f,c+v),R={type:y,data:T};if(l.push(R),d+=T.byteLength,f+=c+v,m&&this.snapshotCount>0&&this.fullFrameData&&null!=this.fullFrameData&&this.fullFramePos>0&&window.vssModuleInitialized){this.snapshotCount--,this.fullFrameData.set(T,this.fullFramePos),this.fullFrameData[this.fullFramePos]=0,this.fullFrameData[this.fullFramePos+1]=0,this.fullFrameData[this.fullFramePos+2]=0,this.fullFrameData[this.fullFramePos+3]=1,this.fullFramePos+=T.length;var I=window.vssPlayerModule,C=window.VssPlayerWasmKits;if(I&&null!=I&&C&&null!=C){var P=new Uint8Array(this.fullFrameData);if(P.length>0){var x=I._malloc(P.length);I.HEAP8.set(P,x);var D=C.convertFrame2Image(0,x,this.fullFramePos,C.yuvData,0);if(D<1);else{var O=I.HEAPU8.subarray(C.yuvData,C.yuvData+D),B=this.uint8arrayToBase64(O),L=document.createElement("a");document.body.append(L),L.href="data:image/jpeg;base64,"+B,L.download="snapshot.jpg",L.rel="noopener noreferrer",L.click(),document.body.removeChild(L)}I._free(x)}}this.fullFramePos=0}}if(l.length){var W=this._videoTrack,N={units:l,length:d,isKeyframe:m,dts:p,cts:s,pts:p+s};m&&(N.fileposition=o),W.samples.push(N),W.length+=d}},o._parseHEVCDecoderConfigurationRecord=function(t,e,i){if(i<7)r.a.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var n=this._videoMetadata,o=this._videoTrack,a=this._littleEndian,s=new DataView(t,e,i);n?void 0!==n.avcc&&r.a.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(n=this._videoMetadata={}).type="video",n.id=o.id,n.timescale=this._timescale,n.duration=this._duration);var h=s.getUint8(0),u=s.getUint8(1),l=s.getUint8(2),d=s.getUint8(3);if(0===h&&0===u&&0===l&&1===d);else{var f=22,c=s.getUint8(f);f+=1;for(var p=0;p<c;p++){var m=s.getUint8(f);f+=1;s.getUint16(f,!a);f+=2;var g=s.getUint16(f,!a);if(f+=2,32===m||160==m){var v=new Uint8Array(t,e+f,g);this._HEVC_VPS=new Uint8Array(g+4),this._HEVC_VPS.set(this._StartCode,0),this._HEVC_VPS.set(v,4)}else if(33===m||161==m){var y=new Uint8Array(t,e+f,g);this._HEVC_SPS=new Uint8Array(g+4),this._HEVC_SPS.set(this._StartCode,0),this._HEVC_SPS.set(y,4)}else if(34===m||162==m){var b=new Uint8Array(t,e+f,g);this._HEVC_PPS=new Uint8Array(g+4),this._HEVC_PPS.set(this._StartCode,0),this._HEVC_PPS.set(b,4)}f+=g}}this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1}},o.snapshot=function(){this.snapshotCount++},o._makeH265Header=function(t){var e=2;switch(t){case 78:case 80:case 64:case 66:case 32:case 34:case 36:case 38:case 40:case 42:e=1}return e},o._parseHEVCVideoData=function(t,e,i,n,o,a,s){for(var h=this._littleEndian,u=new DataView(t,e,i),l=this._timestampBase+n,d=1===a,f=[],c=0,p=0;p<i;){if(p+4>=i){r.a.w(this.TAG,"Malformed Nalu near timestamp "+l+", offset = "+p+", dataSize = "+i);break}var m=u.getUint8(p),g=u.getUint8(p+1),v=u.getUint8(p+2),y=u.getUint8(p+3);if(0===m&&0===g&&0===v&&1===y);else{var b=u.getUint32(p,!h);p+=4;u.getUint8(p);if(p+=1,b>i-4)return void r.a.w(this.TAG,"Malformed Nalus near timestamp "+l+", NaluSize > DataSize!");if(b+p-1>i)break;var _=u.getUint8(p-1),w=this._makeH265Header(_);if(78==_){if(f.length<1){if(this._HEVC_VPS){var A={type:5,data:this._HEVC_VPS};f.push(A),c+=this._HEVC_VPS.length}if(this._HEVC_SPS){var M={type:6,data:this._HEVC_SPS};f.push(M),c+=this._HEVC_SPS.length}if(this._HEVC_PPS){var E={type:7,data:this._HEVC_PPS};f.push(E),c+=this._HEVC_PPS.length}}if(e+p-1-4>=0&&b>0){var S=new Uint8Array(t,e+p-1-4,b+4);S[0]=0,S[1]=0,S[2]=0,S[3]=1;var k={type:5,data:S};f.push(k),c+=S.length}p+=b-1;continue}if((32===_||34===_||36===_||38===_||40===_||42===_)&&f.length<1){if(this._HEVC_VPS){var T={type:5,data:this._HEVC_VPS};f.push(T),c+=this._HEVC_VPS.length}if(this._HEVC_SPS){var R={type:6,data:this._HEVC_SPS};f.push(R),c+=this._HEVC_SPS.length}if(this._HEVC_PPS){var I={type:7,data:this._HEVC_PPS};f.push(I),c+=this._HEVC_PPS.length}}if(1===w&&this._HEVC_VPS&&this._HEVC_VPS[0],e+p-1-4>=0&&b>0){var C=new Uint8Array(t,e+p-1-4,b+4);C[0]=0,C[1]=0,C[2]=0,C[3]=1;var P={type:5,data:C};f.push(P),c+=C.length}p+=b-1}}if(this._DebugBuf&&(this._DebugBufPos<1048576?(this._DebugBuf.set(data2,this._DebugBufPos),this._DebugBufPos+=data2.length):this._DebugBufPos=0),f.length){var x=this._videoTrack,D={units:f,length:c,isKeyframe:d,dts:l,cts:s,pts:l+s};d&&(D.fileposition=o),x.samples.push(D),x.length+=c}},e=t,(i=[{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(t){this._onTrackMetadata=t}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(t){this._onMediaInfo=t}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(t){this._onMetaDataArrived=t}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(t){this._onScriptDataArrived=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(t){this._onDataAvailable=t}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(t){this._timestampBase=t}},{key:"overridedDuration",get:function(){return this._duration},set:function(t){this._durationOverrided=!0,this._duration=t,this._mediaInfo.duration=t}},{key:"overridedHasAudio",set:function(t){this._hasAudioFlagOverrided=!0,this._hasAudio=t,this._mediaInfo.hasAudio=t}},{key:"overridedHasVideo",set:function(t){this._hasVideoFlagOverrided=!0,this._hasVideo=t,this._mediaInfo.hasVideo=t}}])&&p(e.prototype,i),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.a=m},function(t,e){!function(){"use strict";function e(t,e){throw new Error("abstract")}e.prototype.drawFrame=function(t){throw new Error("abstract")},e.prototype.clear=function(){throw new Error("abstract")},t.exports=e}()},function(t,e,i){"use strict";var r=i(3),n=i(79),o=i(4).Buffer,a=new Array(16);function s(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function h(t,e){return t<<e|t>>>32-e}function u(t,e,i,r,n,o,a){return h(t+(e&i|~e&r)+n+o|0,a)+e|0}function l(t,e,i,r,n,o,a){return h(t+(e&r|i&~r)+n+o|0,a)+e|0}function d(t,e,i,r,n,o,a){return h(t+(e^i^r)+n+o|0,a)+e|0}function f(t,e,i,r,n,o,a){return h(t+(i^(e|~r))+n+o|0,a)+e|0}r(s,n),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var i=this._a,r=this._b,n=this._c,o=this._d;i=u(i,r,n,o,t[0],3614090360,7),o=u(o,i,r,n,t[1],3905402710,12),n=u(n,o,i,r,t[2],606105819,17),r=u(r,n,o,i,t[3],3250441966,22),i=u(i,r,n,o,t[4],4118548399,7),o=u(o,i,r,n,t[5],1200080426,12),n=u(n,o,i,r,t[6],2821735955,17),r=u(r,n,o,i,t[7],4249261313,22),i=u(i,r,n,o,t[8],1770035416,7),o=u(o,i,r,n,t[9],2336552879,12),n=u(n,o,i,r,t[10],4294925233,17),r=u(r,n,o,i,t[11],2304563134,22),i=u(i,r,n,o,t[12],1804603682,7),o=u(o,i,r,n,t[13],4254626195,12),n=u(n,o,i,r,t[14],2792965006,17),i=l(i,r=u(r,n,o,i,t[15],1236535329,22),n,o,t[1],4129170786,5),o=l(o,i,r,n,t[6],3225465664,9),n=l(n,o,i,r,t[11],643717713,14),r=l(r,n,o,i,t[0],3921069994,20),i=l(i,r,n,o,t[5],3593408605,5),o=l(o,i,r,n,t[10],38016083,9),n=l(n,o,i,r,t[15],3634488961,14),r=l(r,n,o,i,t[4],3889429448,20),i=l(i,r,n,o,t[9],568446438,5),o=l(o,i,r,n,t[14],3275163606,9),n=l(n,o,i,r,t[3],4107603335,14),r=l(r,n,o,i,t[8],1163531501,20),i=l(i,r,n,o,t[13],2850285829,5),o=l(o,i,r,n,t[2],4243563512,9),n=l(n,o,i,r,t[7],1735328473,14),i=d(i,r=l(r,n,o,i,t[12],2368359562,20),n,o,t[5],4294588738,4),o=d(o,i,r,n,t[8],2272392833,11),n=d(n,o,i,r,t[11],1839030562,16),r=d(r,n,o,i,t[14],4259657740,23),i=d(i,r,n,o,t[1],2763975236,4),o=d(o,i,r,n,t[4],1272893353,11),n=d(n,o,i,r,t[7],4139469664,16),r=d(r,n,o,i,t[10],3200236656,23),i=d(i,r,n,o,t[13],681279174,4),o=d(o,i,r,n,t[0],3936430074,11),n=d(n,o,i,r,t[3],3572445317,16),r=d(r,n,o,i,t[6],76029189,23),i=d(i,r,n,o,t[9],3654602809,4),o=d(o,i,r,n,t[12],3873151461,11),n=d(n,o,i,r,t[15],530742520,16),i=f(i,r=d(r,n,o,i,t[2],3299628645,23),n,o,t[0],4096336452,6),o=f(o,i,r,n,t[7],1126891415,10),n=f(n,o,i,r,t[14],2878612391,15),r=f(r,n,o,i,t[5],4237533241,21),i=f(i,r,n,o,t[12],1700485571,6),o=f(o,i,r,n,t[3],2399980690,10),n=f(n,o,i,r,t[10],4293915773,15),r=f(r,n,o,i,t[1],2240044497,21),i=f(i,r,n,o,t[8],1873313359,6),o=f(o,i,r,n,t[15],4264355552,10),n=f(n,o,i,r,t[6],2734768916,15),r=f(r,n,o,i,t[13],1309151649,21),i=f(i,r,n,o,t[4],4149444226,6),o=f(o,i,r,n,t[11],3174756917,10),n=f(n,o,i,r,t[2],718787259,15),r=f(r,n,o,i,t[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,i){(function(e){function i(t){try{if(!e.localStorage)return!1}catch(t){return!1}var i=e.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(t,e){if(i("noDeprecation"))return t;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation"),r=!0}return t.apply(this,arguments)}}}).call(this,i(10))},function(t,e,i){"use strict";var r=i(26).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function t(e,i,o){if("function"==typeof i)return t(e,null,i);i||(i={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}}(o||n);var a=i.readable||!1!==i.readable&&e.readable,s=i.writable||!1!==i.writable&&e.writable,h=function(){e.writable||l()},u=e._writableState&&e._writableState.finished,l=function(){s=!1,u=!0,a||o.call(e)},d=e._readableState&&e._readableState.endEmitted,f=function(){a=!1,d=!0,s||o.call(e)},c=function(t){o.call(e,t)},p=function(){var t;return a&&!d?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):s&&!u?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?s&&!e._writableState&&(e.on("end",h),e.on("close",h)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",f),e.on("finish",l),!1!==i.error&&e.on("error",c),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",c),e.removeListener("close",p)}}},function(t,e,i){"use strict";var r=i(9).Buffer,n=i(3),o=i(79),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function c(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,i,r,n,o,a,s){return p(t+(e^i^r)+o+a|0,s)+n|0}function g(t,e,i,r,n,o,a,s){return p(t+(e&i|~e&r)+o+a|0,s)+n|0}function v(t,e,i,r,n,o,a,s){return p(t+((e|~i)^r)+o+a|0,s)+n|0}function y(t,e,i,r,n,o,a,s){return p(t+(e&r|i&~r)+o+a|0,s)+n|0}function b(t,e,i,r,n,o,a,s){return p(t+(e^(i|~r))+o+a|0,s)+n|0}n(c,o),c.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,c=0|this._e,_=0|this._a,w=0|this._b,A=0|this._c,M=0|this._d,E=0|this._e,S=0;S<80;S+=1){var k,T;S<16?(k=m(i,r,n,o,c,t[s[S]],d[0],u[S]),T=b(_,w,A,M,E,t[h[S]],f[0],l[S])):S<32?(k=g(i,r,n,o,c,t[s[S]],d[1],u[S]),T=y(_,w,A,M,E,t[h[S]],f[1],l[S])):S<48?(k=v(i,r,n,o,c,t[s[S]],d[2],u[S]),T=v(_,w,A,M,E,t[h[S]],f[2],l[S])):S<64?(k=y(i,r,n,o,c,t[s[S]],d[3],u[S]),T=g(_,w,A,M,E,t[h[S]],f[3],l[S])):(k=b(i,r,n,o,c,t[s[S]],d[4],u[S]),T=m(_,w,A,M,E,t[h[S]],f[4],l[S])),i=c,c=o,o=p(n,10),n=r,r=k,_=E,E=M,M=p(A,10),A=w,w=T}var R=this._b+n+M|0;this._b=this._c+o+E|0,this._c=this._d+c+_|0,this._d=this._e+i+w|0,this._e=this._a+r+A|0,this._a=R},c.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=c},function(t,e,i){(e=t.exports=function(t){t=t.toLowerCase();var i=e[t];if(!i)throw new Error(t+" is not supported (we accept pull requests)");return new i}).sha=i(157),e.sha1=i(158),e.sha224=i(159),e.sha256=i(86),e.sha384=i(160),e.sha512=i(87)},function(t,e,i){(e=t.exports=i(88)).Stream=e,e.Readable=e,e.Writable=i(59),e.Duplex=i(19),e.Transform=i(91),e.PassThrough=i(167)},function(t,e,i){var r=i(9),n=r.Buffer;function o(t,e){for(var i in t)e[i]=t[i]}function a(t,e,i){return n(t,e,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(n,a),a.from=function(t,e,i){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,i)},a.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=n(t);return void 0!==e?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,i){"use strict";(function(e,r,n){var o=i(42);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,i){var r=t.entry;t.entry=null;for(;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var s,h=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=v;var u=Object.create(i(36));u.inherits=i(3);var l={deprecate:i(53)},d=i(89),f=i(58).Buffer,c=n.Uint8Array||function(){};var p,m=i(90);function g(){}function v(t,e){s=s||i(19),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,u=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,r=i.sync,n=i.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,r,n){--e.pendingcb,i?(o.nextTick(n,r),o.nextTick(E,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(n(r),t._writableState.errorEmitted=!0,t.emit("error",r),E(t,e))}(t,i,r,e,n);else{var a=A(i);a||i.corked||i.bufferProcessing||!i.bufferedRequest||w(t,i),r?h(_,t,i,a,n):_(t,i,a,n)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(t){if(s=s||i(19),!(p.call(y,this)||this instanceof s))return new y(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),d.call(this)}function b(t,e,i,r,n,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function _(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),E(t,e)}function w(t,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(t._writev&&i&&i.next){var r=e.bufferedRequestCount,n=new Array(r),o=e.corkedRequestsFree;o.entry=i;for(var s=0,h=!0;i;)n[s]=i,i.isBuf||(h=!1),i=i.next,s+=1;n.allBuffers=h,b(t,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,l=i.encoding,d=i.callback;if(b(t,e,!1,e.objectMode?1:u.length,u,l,d),i=i.next,e.bufferedRequestCount--,e.writing)break}null===i&&(e.lastBufferedRequest=null)}e.bufferedRequest=i,e.bufferProcessing=!1}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(i){e.pendingcb--,i&&t.emit("error",i),e.prefinished=!0,t.emit("prefinish"),E(t,e)}))}function E(t,e){var i=A(e);return i&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(M,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),i}u.inherits(y,d),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,i){var r,n=this._writableState,a=!1,s=!n.objectMode&&(r=t,f.isBuffer(r)||r instanceof c);return s&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(i=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof i&&(i=g),n.ended?function(t,e){var i=new Error("write after end");t.emit("error",i),o.nextTick(e,i)}(this,i):(s||function(t,e,i,r){var n=!0,a=!1;return null===i?a=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(r,a),n=!1),n}(this,n,t,i))&&(n.pendingcb++,a=function(t,e,i,r,n,o){if(!i){var a=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,i));return e}(e,r,n);r!==a&&(i=!0,n="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var h=e.length<e.highWaterMark;h||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:o,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,s,r,n,o);return h}(this,n,s,t,e,i)),a},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,i){i(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,i){var r=this._writableState;"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,i){e.ending=!0,E(t,e),i&&(e.finished?o.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,r,i)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,i(8),i(165).setImmediate,i(10))},function(t,e,i){"use strict";var r=i(13);function n(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=n,n.prototype._init=function(){},n.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},n.prototype._buffer=function(t,e){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<i;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=i,i},n.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(t){var e=0,i=0,r=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,n,i),i+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},n.prototype._updateDecrypt=function(t){for(var e=0,i=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},n.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},n.prototype._unpad=function(t){return t},n.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,i){var r=i(180),n=i(188),o=i(104);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,i){var r={ECB:i(181),CBC:i(182),CFB:i(183),CFB8:i(184),CFB1:i(185),OFB:i(186),CTR:i(102),GCM:i(102)},n=i(104);for(var o in n)n[o].module=r[n[o].mode];t.exports=n},function(t,e,i){var r;function n(t){this.rand=t}if(t.exports=function(t){return r||(r=new n(null)),r.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),i=0;i<e.length;i++)e[i]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=i(194);if("function"!=typeof o.randomBytes)throw new Error("Not supported");n.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},function(t,e,i){"use strict";var r=i(29).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function t(e,i,o){if("function"==typeof i)return t(e,null,i);i||(i={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}}(o||n);var a=i.readable||!1!==i.readable&&e.readable,s=i.writable||!1!==i.writable&&e.writable,h=function(){e.writable||l()},u=e._writableState&&e._writableState.finished,l=function(){s=!1,u=!0,a||o.call(e)},d=e._readableState&&e._readableState.endEmitted,f=function(){a=!1,d=!0,s||o.call(e)},c=function(t){o.call(e,t)},p=function(){var t;return a&&!d?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):s&&!u?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?s&&!e._writableState&&(e.on("end",h),e.on("close",h)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",f),e.on("finish",l),!1!==i.error&&e.on("error",c),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",c),e.removeListener("close",p)}}},function(t,e,i){(function(e){var r=i(66),n=i(25);function o(t){var e,i=t.modulus.byteLength();do{e=new r(n(i))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,i){var n=function(t){var e=o(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(i),a=i.modulus.byteLength(),s=new r(t).mul(n.blinder).umod(i.modulus),h=s.toRed(r.mont(i.prime1)),u=s.toRed(r.mont(i.prime2)),l=i.coefficient,d=i.prime1,f=i.prime2,c=h.redPow(i.exponent1).fromRed(),p=u.redPow(i.exponent2).fromRed(),m=c.isub(p).imul(l).umod(d).imul(f);return p.iadd(m).imul(n.unblinder).umod(i.modulus).toArrayLike(e,"be",a)}a.getr=o,t.exports=a}).call(this,i(9).Buffer)},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(207).Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+t)}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function u(t,e,i,n){for(var o=0,a=0,s=Math.min(t.length,i),h=e;h<s;h++){var u=t.charCodeAt(h)-48;o*=n,a=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a<n,"Invalid character"),o+=a}return o}function l(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},o.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,a=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,a=o%r,s=Math.min(o,o-a)+i,h=0,l=i;l<s;l+=r)h=u(t,l,l+r,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==a){var d=1;for(h=u(t,l,t.length,e),l=0;l<a;l++)d*=e;this.imuln(d),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){l(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(t){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],h=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||a!==this.length-1?f[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=c[t],l=p[t];i="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(l).toString(t);i=(d=d.idivn(l)).isZero()?m+i:f[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,h=a/67108864|0;i.words[0]=s;for(var u=1;u<r;u++){for(var l=h>>>26,d=67108863&h,f=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=f;c++){var p=u-c|0;l+=(a=(n=0|t.words[p])*(o=0|e.words[c])+d)/67108864|0,d=67108863&a}i.words[u]=0|d,h=0|l}return 0!==h?i.words[u]=0|h:i.length--,i._strip()}o.prototype.toArrayLike=function(t,e,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,n),a},o.prototype._toArrayLikeLE=function(t,e){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|r;t[i++]=255&a,i<t.length&&(t[i++]=a>>8&255),i<t.length&&(t[i++]=a>>16&255),6===o?(i<t.length&&(t[i++]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(i<t.length)for(t[i++]=r;i<t.length;)t[i++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var i=t.length-1,r=0,n=0,o=0;n<this.length;n++){var a=this.words[n]<<o|r;t[i--]=255&a,i>=0&&(t[i--]=a>>8&255),i>=0&&(t[i--]=a>>16&255),6===o?(i>=0&&(t[i--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(i>=0)for(t[i--]=r;i>=0;)t[i--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this._strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|i.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<i.length;a++)o=(e=(0|i.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<i.length&&i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this.length=Math.max(this.length,a),i!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,i){var r,n,o,a=t.words,s=e.words,h=i.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,c=0|a[1],p=8191&c,m=c>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],_=8191&b,w=b>>>13,A=0|a[4],M=8191&A,E=A>>>13,S=0|a[5],k=8191&S,T=S>>>13,R=0|a[6],I=8191&R,C=R>>>13,P=0|a[7],x=8191&P,D=P>>>13,O=0|a[8],B=8191&O,L=O>>>13,W=0|a[9],N=8191&W,F=W>>>13,U=0|s[0],j=8191&U,V=U>>>13,H=0|s[1],z=8191&H,G=H>>>13,q=0|s[2],X=8191&q,Z=q>>>13,K=0|s[3],Q=8191&K,Y=K>>>13,J=0|s[4],$=8191&J,tt=J>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ht=8191&st,ut=st>>>13,lt=0|s[8],dt=8191<,ft=lt>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(d,j))|0)+((8191&(n=(n=Math.imul(d,V))+Math.imul(f,j)|0))<<13)|0;u=((o=Math.imul(f,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,j),n=(n=Math.imul(p,V))+Math.imul(m,j)|0,o=Math.imul(m,V);var vt=(u+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(f,z)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,j),n=(n=Math.imul(v,V))+Math.imul(y,j)|0,o=Math.imul(y,V),r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,j),n=(n=Math.imul(_,V))+Math.imul(w,j)|0,o=Math.imul(w,V),r=r+Math.imul(v,z)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Z)|0;var bt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,Y)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,j),n=(n=Math.imul(M,V))+Math.imul(E,j)|0,o=Math.imul(E,V),r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var _t=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,tt)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,V))+Math.imul(T,j)|0,o=Math.imul(T,V),r=r+Math.imul(M,z)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(r=r+Math.imul(d,it)|0)|0)+((8191&(n=(n=n+Math.imul(d,rt)|0)+Math.imul(f,it)|0))<<13)|0;u=((o=o+Math.imul(f,rt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,j),n=(n=Math.imul(I,V))+Math.imul(C,j)|0,o=Math.imul(C,V),r=r+Math.imul(k,z)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var At=(u+(r=r+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,at)|0)+Math.imul(f,ot)|0))<<13)|0;u=((o=o+Math.imul(f,at)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(x,j),n=(n=Math.imul(x,V))+Math.imul(D,j)|0,o=Math.imul(D,V),r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(u+(r=r+Math.imul(d,ht)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(f,ht)|0))<<13)|0;u=((o=o+Math.imul(f,ut)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,j),n=(n=Math.imul(B,V))+Math.imul(L,j)|0,o=Math.imul(L,V),r=r+Math.imul(x,z)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,it)|0,n=(n=n+Math.imul(_,rt)|0)+Math.imul(w,it)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((o=o+Math.imul(f,ft)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),n=(n=Math.imul(N,V))+Math.imul(F,j)|0,o=Math.imul(F,V),r=r+Math.imul(B,z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(L,z)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(M,it)|0,n=(n=n+Math.imul(M,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,n=(n=n+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ut)|0,r=r+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,o=o+Math.imul(m,ft)|0;var St=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((o=o+Math.imul(f,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,G))+Math.imul(F,z)|0,o=Math.imul(F,G),r=r+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(M,ot)|0,n=(n=n+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,ht)|0,n=(n=n+Math.imul(_,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,r=r+Math.imul(v,dt)|0,n=(n=n+Math.imul(v,ft)|0)+Math.imul(y,dt)|0,o=o+Math.imul(y,ft)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),r=r+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(C,it)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(M,ht)|0,n=(n=n+Math.imul(M,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(_,dt)|0,n=(n=n+Math.imul(_,ft)|0)+Math.imul(w,dt)|0,o=o+Math.imul(w,ft)|0;var Tt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,it)|0,n=(n=n+Math.imul(x,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(k,ht)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(M,dt)|0,n=(n=n+Math.imul(M,ft)|0)+Math.imul(E,dt)|0,o=o+Math.imul(E,ft)|0;var Rt=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(n=(n=n+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ut)|0,r=r+Math.imul(k,dt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(T,dt)|0,o=o+Math.imul(T,ft)|0;var It=(u+(r=r+Math.imul(M,pt)|0)|0)+((8191&(n=(n=n+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,dt)|0,n=(n=n+Math.imul(I,ft)|0)+Math.imul(C,dt)|0,o=o+Math.imul(C,ft)|0;var Ct=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(x,dt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(D,dt)|0,o=o+Math.imul(D,ft)|0;var Pt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(N,ht),n=(n=Math.imul(N,ut))+Math.imul(F,ht)|0,o=Math.imul(F,ut),r=r+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(L,dt)|0,o=o+Math.imul(L,ft)|0;var xt=(u+(r=r+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,dt),n=(n=Math.imul(N,ft))+Math.imul(F,dt)|0,o=Math.imul(F,ft);var Dt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ot=(u+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,h[0]=gt,h[1]=vt,h[2]=yt,h[3]=bt,h[4]=_t,h[5]=wt,h[6]=At,h[7]=Mt,h[8]=Et,h[9]=St,h[10]=kt,h[11]=Tt,h[12]=Rt,h[13]=It,h[14]=Ct,h[15]=Pt,h[16]=xt,h[17]=Dt,h[18]=Ot,0!==u&&(h[19]=u,i.length++),i};function v(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var a=n;n=0;for(var s=67108863&r,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var l=o-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function y(t,e,i){return v(t,e,i)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):i<63?m(this,t,e):i<1024?v(this,t,e):y(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},b.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},b.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a<o;a++)r[a]=e[t[a]],n[a]=i[t[a]]},b.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,h=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var d=h,f=u,c=0;c<a;c++){var p=i[l+c],m=r[l+c],g=i[l+c+a],v=r[l+c+a],y=d*g-f*v;v=d*v+f*g,g=y,i[l+c]=p+g,r[l+c]=m+v,i[l+c+a]=p-g,r[l+c+a]=m-v,c!==s&&(y=h*d-u*f,f=h*f+u*d,d=y)}},b.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},b.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},b.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},b.prototype.convert13b=function(t,e,i,n){for(var o=0,a=0;a<e;a++)o+=0|t[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},b.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),h=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=i.words;f.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,u,r),this.transform(a,o,s,h,r,n),this.transform(u,o,l,d,r,n);for(var c=0;c<r;c++){var p=s[c]*l[c]-h[c]*d[c];h[c]=s[c]*d[c]+h[c]*l[c],s[c]=p}return this.conjugate(s,h,r),this.transform(s,h,f,o,r,n),this.conjugate(f,o,r),this.normalize13b(f,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),y(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n<this.length;n++){var o=(0|this.words[n])*t,a=(67108863&o)+(67108863&i);i>>=26,i+=o/67108864|0,i+=a>>>26,this.words[n]=67108863&a}return 0!==i&&(this.words[n]=i,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=t.words[r]>>>n&1}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,h=(0|this.words[e])-s<<i;this.words[e]=h|a,a=s>>>26-i}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,h=i;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=n);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return h&&0!==l&&(h.words[h.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,i){var n,o,a=t.length+i;this._expand(a);var s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+s;var h=(0|t.words[n])*e;s=((o-=67108863&h)>>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)s=(o=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,a=0|n.words[n.length-1];0!==(i=26-this._countBits(a))&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var s,h=r.length-n.length;if("mod"!==e){(s=new o(null)).length=h+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(n,1,h);0===l.negative&&(r=l,s&&(s.words[h]=1));for(var d=h-1;d>=0;d--){var f=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(n,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%t;return e?-n:n},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/t|0,i=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),h=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var l=i.clone(),d=e.clone();!e.isZero();){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(l),a.isub(d)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||h.isOdd())&&(s.iadd(l),h.isub(d)),s.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(s),a.isub(h)):(i.isub(e),s.isub(n),h.isub(a))}return{a:s,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var d=0,f=1;0==(i.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);e.cmp(i)>=0?(e.isub(i),a.isub(s)):(i.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var _={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function T(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},n(A,w),A.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(a&i)<<4|o>>>22,o=a}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(M,w),n(E,w),n(S,w),S.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(_[t])return _[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new M;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return _[t]=e,e},k.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},k.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var s=new o(1).toRed(this),h=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(h);)l.redIAdd(h);for(var d=this.pow(l,n),f=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=a;0!==c.cmp(s);){for(var m=c,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),c=c.redMul(d),p=g}return f},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var n=i[0],a=0,s=0,h=e.bitLength()%26;for(0===h&&(h=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=h-1;l>=0;l--){var d=u>>l&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(n=this.mul(n,i[a]),s=0,a=0)):s=0}h=26}return n},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new T(t)},n(T,k),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},T.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,i(20)(t))},function(t,e,i){"use strict";var r=e;r.version=i(208).version,r.utils=i(14),r.rand=i(63),r.curve=i(117),r.curves=i(68),r.ec=i(220),r.eddsa=i(224)},function(t,e,i){"use strict";var r,n=e,o=i(69),a=i(117),s=i(14).assert;function h(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(t,e){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var i=new h(e);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=h,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=i(219)}catch(t){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,i){var r=e;r.utils=i(15),r.common=i(38),r.sha=i(213),r.ripemd=i(217),r.hmac=i(218),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,i){"use strict";(function(e){var r,n=i(9),o=n.Buffer,a={};for(r in n)n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=n[r]);var s=a.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(s[r]=o[r]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,i){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return o(t,e,i)}),s.alloc||(s.alloc=function(t,e,i){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=o(t);return e&&0!==e.length?"string"==typeof i?r.fill(e,i):r.fill(e):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(t){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,i(8))},function(t,e,i){"use strict";var r=i(72).Reporter,n=i(39).EncoderBuffer,o=i(39).DecoderBuffer,a=i(13),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function u(t,e,i){var r={};this._baseState=r,r.name=i,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=u;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};l.forEach((function(i){e[i]=t[i]}));var i=new this.constructor(e.parent);return i._baseState=e,i},u.prototype._wrap=function(){var t=this._baseState;h.forEach((function(e){this[e]=function(){var i=new this.constructor(this);return t.children.push(i),i[e].apply(i,arguments)}}),this)},u.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,i=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==i.length&&(a(null===e.children),e.children=i,i.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(i){i==(0|i)&&(i|=0);var r=t[i];e[r]=i})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){u.prototype[t]=function(){var e=this._baseState,i=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(i),this}})),u.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},u.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var i=this._baseState;if(null===i.parent)return t.wrapResult(i.children[0]._decode(t,e));var r,n=i.default,a=!0,s=null;if(null!==i.key&&(s=t.enterKey(i.key)),i.optional){var h=null;if(null!==i.explicit?h=i.explicit:null!==i.implicit?h=i.implicit:null!==i.tag&&(h=i.tag),null!==h||i.any){if(a=this._peekTag(t,h,i.any),t.isError(a))return a}else{var u=t.save();try{null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(u)}}if(i.obj&&a&&(r=t.enterObject()),a){if(null!==i.explicit){var l=this._decodeTag(t,i.explicit);if(t.isError(l))return l;t=l}var d=t.offset;if(null===i.use&&null===i.choice){var f;i.any&&(f=t.save());var c=this._decodeTag(t,null!==i.implicit?i.implicit:i.tag,i.any);if(t.isError(c))return c;i.any?n=t.raw(f):t=c}if(e&&e.track&&null!==i.tag&&e.track(t.path(),d,t.length,"tagged"),e&&e.track&&null!==i.tag&&e.track(t.path(),t.offset,t.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(t,e)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){var p=new o(n);n=this._getUse(i.contains,t._reporterState.obj)._decode(p,e)}}return i.obj&&a&&(n=t.leaveObject(r)),null===i.key||null===n&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,i.key,n),n},u.prototype._decodeGeneric=function(t,e,i){var r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],i):/str$/.test(t)?this._decodeStr(e,t,i):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],i):"objid"===t?this._decodeObjid(e,null,null,i):"gentime"===t||"utctime"===t?this._decodeTime(e,t,i):"null_"===t?this._decodeNull(e,i):"bool"===t?this._decodeBool(e,i):"objDesc"===t?this._decodeStr(e,t,i):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,i):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var i=this._baseState;return i.useDecoder=this._use(t,e),a(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},u.prototype._decodeChoice=function(t,e){var i=this._baseState,r=null,n=!1;return Object.keys(i.choice).some((function(o){var a=t.save(),s=i.choice[o];try{var h=s._decode(t,e);if(t.isError(h))return!1;r={type:o,value:h},n=!0}catch(e){return t.restore(a),!1}return!0}),this),n?r:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new n(t,this.reporter)},u.prototype._encode=function(t,e,i){var r=this._baseState;if(null===r.default||r.default!==t){var n=this._encodeValue(t,e,i);if(void 0!==n&&!this._skipDefault(n,e,i))return n}},u.prototype._encodeValue=function(t,e,i){var n=this._baseState;if(null===n.parent)return n.children[0]._encode(t,e||new r);var o=null;if(this.reporter=e,n.optional&&void 0===t){if(null===n.default)return;t=n.default}var a=null,s=!1;if(n.any)o=this._createEncoderBuffer(t);else if(n.choice)o=this._encodeChoice(t,e);else if(n.contains)a=this._getUse(n.contains,i)._encode(t,e),s=!0;else if(n.children)a=n.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,e,t);if(null===i._baseState.key)return e.error("Child should have a key");var r=e.enterKey(i._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var n=i._encode(t[i._baseState.key],e,t);return e.leaveKey(r),n}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return e.error("Too many args for : "+n.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var h=this.clone();h._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(i){var r=this._baseState;return this._getUse(r.args[0],t)._encode(i,e)}),h))}else null!==n.use?o=this._getUse(n.use,i)._encode(t,e):(a=this._encodePrimitive(n.tag,t),s=!0);if(!n.any&&null===n.choice){var u=null!==n.implicit?n.implicit:n.tag,l=null===n.implicit?"universal":"context";null===u?null===n.use&&e.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(u,s,l,a))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},u.prototype._encodeChoice=function(t,e){var i=this._baseState,r=i.choice[t.type];return r||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var i=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&i.args)return this._encodeObjid(e,i.reverseArgs[0],i.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,i.args&&i.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,i){"use strict";var r=i(3);function n(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=n,n.prototype.isError=function(t){return t instanceof o},n.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},n.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},n.prototype.enterKey=function(t){return this._reporterState.path.push(t)},n.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},n.prototype.leaveKey=function(t,e,i){var r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},n.prototype.leaveObject=function(t){var e=this._reporterState,i=e.obj;return e.obj=t,i},n.prototype.error=function(t){var e,i=this._reporterState,r=t instanceof o;if(e=r?t:new o(i.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!i.options.partial)throw e;return r||i.errors.push(e),e},n.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,i){"use strict";function r(t){var e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);var r=t[i];e[r]=i})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r(e.tag)},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(243).Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),a=e;a<o;a++){var s=t.charCodeAt(a)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},o.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,a=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,a=o%r,s=Math.min(o,o-a)+i,h=0,l=i;l<s;l+=r)h=u(t,l,l+r,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==a){var d=1;for(h=u(t,l,t.length,e),l=0;l<a;l++)d*=e;this.imuln(d),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,h=a/67108864|0;i.words[0]=s;for(var u=1;u<r;u++){for(var l=h>>>26,d=67108863&h,f=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=f;c++){var p=u-c|0;l+=(a=(n=0|t.words[p])*(o=0|e.words[c])+d)/67108864|0,d=67108863&a}i.words[u]=0|d,h=0|l}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],h=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||a!==this.length-1?l[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],c=f[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);i=(p=p.idivn(c)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,h="le"===e,u=new t(o),l=this.clone();if(h){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-n;s++)u[s]=0;for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|i.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<i.length;a++)o=(e=(0|i.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<i.length&&i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this.length=Math.max(this.length,a),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,i){var r,n,o,a=t.words,s=e.words,h=i.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,c=0|a[1],p=8191&c,m=c>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],_=8191&b,w=b>>>13,A=0|a[4],M=8191&A,E=A>>>13,S=0|a[5],k=8191&S,T=S>>>13,R=0|a[6],I=8191&R,C=R>>>13,P=0|a[7],x=8191&P,D=P>>>13,O=0|a[8],B=8191&O,L=O>>>13,W=0|a[9],N=8191&W,F=W>>>13,U=0|s[0],j=8191&U,V=U>>>13,H=0|s[1],z=8191&H,G=H>>>13,q=0|s[2],X=8191&q,Z=q>>>13,K=0|s[3],Q=8191&K,Y=K>>>13,J=0|s[4],$=8191&J,tt=J>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ht=8191&st,ut=st>>>13,lt=0|s[8],dt=8191<,ft=lt>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(d,j))|0)+((8191&(n=(n=Math.imul(d,V))+Math.imul(f,j)|0))<<13)|0;u=((o=Math.imul(f,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,j),n=(n=Math.imul(p,V))+Math.imul(m,j)|0,o=Math.imul(m,V);var vt=(u+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(f,z)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,j),n=(n=Math.imul(v,V))+Math.imul(y,j)|0,o=Math.imul(y,V),r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,j),n=(n=Math.imul(_,V))+Math.imul(w,j)|0,o=Math.imul(w,V),r=r+Math.imul(v,z)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Z)|0;var bt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,Y)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,j),n=(n=Math.imul(M,V))+Math.imul(E,j)|0,o=Math.imul(E,V),r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var _t=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,tt)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,V))+Math.imul(T,j)|0,o=Math.imul(T,V),r=r+Math.imul(M,z)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(r=r+Math.imul(d,it)|0)|0)+((8191&(n=(n=n+Math.imul(d,rt)|0)+Math.imul(f,it)|0))<<13)|0;u=((o=o+Math.imul(f,rt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,j),n=(n=Math.imul(I,V))+Math.imul(C,j)|0,o=Math.imul(C,V),r=r+Math.imul(k,z)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var At=(u+(r=r+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,at)|0)+Math.imul(f,ot)|0))<<13)|0;u=((o=o+Math.imul(f,at)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(x,j),n=(n=Math.imul(x,V))+Math.imul(D,j)|0,o=Math.imul(D,V),r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(u+(r=r+Math.imul(d,ht)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(f,ht)|0))<<13)|0;u=((o=o+Math.imul(f,ut)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,j),n=(n=Math.imul(B,V))+Math.imul(L,j)|0,o=Math.imul(L,V),r=r+Math.imul(x,z)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,it)|0,n=(n=n+Math.imul(_,rt)|0)+Math.imul(w,it)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((o=o+Math.imul(f,ft)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),n=(n=Math.imul(N,V))+Math.imul(F,j)|0,o=Math.imul(F,V),r=r+Math.imul(B,z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(L,z)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(M,it)|0,n=(n=n+Math.imul(M,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,n=(n=n+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ut)|0,r=r+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,o=o+Math.imul(m,ft)|0;var St=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((o=o+Math.imul(f,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,G))+Math.imul(F,z)|0,o=Math.imul(F,G),r=r+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(M,ot)|0,n=(n=n+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,ht)|0,n=(n=n+Math.imul(_,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,r=r+Math.imul(v,dt)|0,n=(n=n+Math.imul(v,ft)|0)+Math.imul(y,dt)|0,o=o+Math.imul(y,ft)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),r=r+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(C,it)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(M,ht)|0,n=(n=n+Math.imul(M,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(_,dt)|0,n=(n=n+Math.imul(_,ft)|0)+Math.imul(w,dt)|0,o=o+Math.imul(w,ft)|0;var Tt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,it)|0,n=(n=n+Math.imul(x,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(k,ht)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(M,dt)|0,n=(n=n+Math.imul(M,ft)|0)+Math.imul(E,dt)|0,o=o+Math.imul(E,ft)|0;var Rt=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(n=(n=n+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ut)|0,r=r+Math.imul(k,dt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(T,dt)|0,o=o+Math.imul(T,ft)|0;var It=(u+(r=r+Math.imul(M,pt)|0)|0)+((8191&(n=(n=n+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,dt)|0,n=(n=n+Math.imul(I,ft)|0)+Math.imul(C,dt)|0,o=o+Math.imul(C,ft)|0;var Ct=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(x,dt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(D,dt)|0,o=o+Math.imul(D,ft)|0;var Pt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(N,ht),n=(n=Math.imul(N,ut))+Math.imul(F,ht)|0,o=Math.imul(F,ut),r=r+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(L,dt)|0,o=o+Math.imul(L,ft)|0;var xt=(u+(r=r+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,dt),n=(n=Math.imul(N,ft))+Math.imul(F,dt)|0,o=Math.imul(F,ft);var Dt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ot=(u+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,h[0]=gt,h[1]=vt,h[2]=yt,h[3]=bt,h[4]=_t,h[5]=wt,h[6]=At,h[7]=Mt,h[8]=Et,h[9]=St,h[10]=kt,h[11]=Tt,h[12]=Rt,h[13]=It,h[14]=Ct,h[15]=Pt,h[16]=xt,h[17]=Dt,h[18]=Ot,0!==u&&(h[19]=u,i.length++),i};function m(t,e,i){return(new g).mulp(t,e,i)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=c),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?p(this,t,e):r<63?c(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var a=n;n=0;for(var s=67108863&r,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var l=o-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):m(this,t,e),i},g.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},g.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},g.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a<o;a++)r[a]=e[t[a]],n[a]=i[t[a]]},g.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,h=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var d=h,f=u,c=0;c<a;c++){var p=i[l+c],m=r[l+c],g=i[l+c+a],v=r[l+c+a],y=d*g-f*v;v=d*v+f*g,g=y,i[l+c]=p+g,r[l+c]=m+v,i[l+c+a]=p-g,r[l+c+a]=m-v,c!==s&&(y=h*d-u*f,f=h*f+u*d,d=y)}},g.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},g.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,i,n){for(var o=0,a=0;a<e;a++)o+=0|t[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},g.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),h=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=i.words;f.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,u,r),this.transform(a,o,s,h,r,n),this.transform(u,o,l,d,r,n);for(var c=0;c<r;c++){var p=s[c]*l[c]-h[c]*d[c];h[c]=s[c]*d[c]+h[c]*l[c],s[c]=p}return this.conjugate(s,h,r),this.transform(s,h,f,o,r,n),this.conjugate(f,o,r),this.normalize13b(f,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,i=0;i<this.length;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,h=(0|this.words[e])-s<<i;this.words[e]=h|a,a=s>>>26-i}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,h=i;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=n);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return h&&0!==l&&(h.words[h.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,i){var n,o,a=t.length+i;this._expand(a);var s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+s;var h=(0|t.words[n])*e;s=((o-=67108863&h)>>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)s=(o=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,a=0|n.words[n.length-1];0!==(i=26-this._countBits(a))&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var s,h=r.length-n.length;if("mod"!==e){(s=new o(null)).length=h+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(n,1,h);0===l.negative&&(r=l,s&&(s.words[h]=1));for(var d=h-1;d>=0;d--){var f=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(n,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),h=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var l=i.clone(),d=e.clone();!e.isZero();){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(l),a.isub(d)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||h.isOdd())&&(s.iadd(l),h.isub(d)),s.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(s),a.isub(h)):(i.isub(e),s.isub(n),h.isub(a))}return{a:s,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var d=0,f=1;0==(i.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);e.cmp(i)>=0?(e.isub(i),a.isub(s)):(i.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(a&i)<<4|o>>>22,o=a}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(w,y),n(A,y),A.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var s=new o(1).toRed(this),h=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(h);)l.redIAdd(h);for(var d=this.pow(l,n),f=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=a;0!==c.cmp(s);){for(var m=c,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),c=c.redMul(d),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var n=i[0],a=0,s=0,h=e.bitLength()%26;for(0===h&&(h=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=h-1;l>=0;l--){var d=u>>l&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(n=this.mul(n,i[a]),s=0,a=0)):s=0}h=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,i(20)(t))},function(t,e,i){var r,n,o,a,s,h,u,l;t.exports=(l=i(5),n=(r=l).lib,o=n.WordArray,a=n.Hasher,s=r.algo,h=[],u=s.SHA1=a.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=this._hash.words,r=i[0],n=i[1],o=i[2],a=i[3],s=i[4],u=0;u<80;u++){if(u<16)h[u]=0|t[e+u];else{var l=h[u-3]^h[u-8]^h[u-14]^h[u-16];h[u]=l<<1|l>>>31}var d=(r<<5|r>>>27)+s+h[u];d+=u<20?1518500249+(n&o|~n&a):u<40?1859775393+(n^o^a):u<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,s=a,a=o,o=n<<30|n>>>2,n=r,r=d}i[0]=i[0]+r|0,i[1]=i[1]+n|0,i[2]=i[2]+o|0,i[3]=i[3]+a|0,i[4]=i[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(i/4294967296),e[15+(r+64>>>9<<4)]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=a.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=a._createHelper(u),r.HmacSHA1=a._createHmacHelper(u),l.SHA1)},function(t,e,i){var r,n,o,a;t.exports=(r=i(5),o=(n=r).lib.Base,a=n.enc.Utf8,void(n.algo.HMAC=o.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=a.parse(e));var i=t.blockSize,r=4*i;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,h=o.words,u=0;u<i;u++)s[u]^=1549556828,h[u]^=909522486;n.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,i=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(i))}})))},function(t,e,r){"use strict";var n=r(0);function o(t,e,i){var r,n,o,a,s,h=navigator.userAgent.toLowerCase(),u=i,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(r=1+((192&t[e+2])>>>6),!((n=(60&t[e+2])>>>2)>l.length-1))return a=(1&t[e+2])<<2,a|=(192&t[e+3])>>>6,/firefox/i.test(h)?n>=6?(r=5,s=new Array(4),o=n-3):(r=2,s=new Array(2),o=n):-1!==h.indexOf("android")?(r=2,s=new Array(2),o=n):(r=5,s=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&n>=6?o=n-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(n>=6&&1===a||/vivaldi/i.test(h))||!i&&1===a)&&(r=2,s=new Array(2)),o=n)),s[0]=r<<3,s[0]|=(14&n)>>1,s[1]|=(1&n)<<7,s[1]|=a<<3,5===r&&(s[1]|=(14&o)>>1,s[2]=(1&o)<<7,s[2]|=8,s[3]=0),{config:s,samplerate:l[n],channelCount:a,codec:"mp4a.40."+r,manifestCodec:u}}function a(t,e){return 255===t[e]&&240==(246&t[e+1])}function s(t,e){return 1&t[e+1]?7:9}function h(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function u(t,e){return!!(e+1<t.length&&a(t,e))}function l(t,e,i){return o(t,e,i)}function d(t){return 9216e4/t}function f(t,e,i,r,n){var o=function(t,e,i,r,n){var o,a,u=t.length;if(o=s(t,e),a=h(t,e),(a-=o)>0&&e+o+a<=u)return{headerLength:o,frameLength:a,stamp:i+r*n}}(e,i,r,n,d(t));if(o){var a=o.stamp,u=o.headerLength,l=o.frameLength;return{sample:{unit:e.subarray(i+u,i+u+l),pts:a,dts:a},length:l+u}}}var c=function(){function t(t){this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}var e=t.prototype;return e.loadWord=function(){var t=this.data,e=this.bytesAvailable,i=t.byteLength-e,r=new Uint8Array(4),n=Math.min(4,e);if(0===n)throw new Error("no bytes available");r.set(t.subarray(i,i+n)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n},e.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),i=this.word>>>32-e;return t>32&&logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?i<<e|this.readBits(e):i},e.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){var e,i=8,r=8;for(e=0;e<t;e++)0!==r&&(r=(i+this.readEG()+256)%256),i=0===r?i:r},e.readSPS=function(){var t,e,i,r,n,o,a,s=0,h=0,u=0,l=0,d=this.readUByte.bind(this),f=this.readBits.bind(this),c=this.readUEG.bind(this),p=this.readBoolean.bind(this),m=this.skipBits.bind(this),g=this.skipEG.bind(this),v=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(d(),t=d(),f(5),m(3),d(),v(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var b=c();if(3===b&&m(1),v(),v(),m(1),p())for(o=3!==b?8:12,a=0;a<o;a++)p()&&y(a<6?16:64)}v();var _=c();if(0===_)c();else if(1===_)for(m(1),g(),g(),e=c(),a=0;a<e;a++)g();v(),m(1),i=c(),r=c(),0===(n=f(1))&&m(1),m(1),p()&&(s=c(),h=c(),u=c(),l=c());var w=[1,1];if(p()&&p())switch(d()){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:w=[d()<<8|d(),d()<<8|d()]}return{width:Math.ceil(16*(i+1)-2*s-2*h),height:(2-n)*(r+1)*16-(n?2:4)*(u+l),pixelRatio:w}},e.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),p=r(23),m=r(12);r(50);function g(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var v=function(){function t(t,e,i){this.TAG="TSDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._hasAudio=!1,this._hasVideo=!1,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._initVideoMetadata=!1,this._initAudioMetadata=!1,this._mediaInfo=new m.a,this._mediaInfo.hasAudio=!1,this._mediaInfo.hasVideo=!1,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this.tagPosition=0,this.filePosition=0,this.isHEVC=0,this.isAAC=0,this.avcTrackPid=-1,this.audioTrackPid=-1,this.id3TrackPid=-1,this.audioSampleRate=0,this.audioChannel=2,this.audioBitPerSample=16,this.avcTrackPesData=null,this.audioTrackPesData=null,this.id3TrackPesData=null,this.findKeyframe=!0,this.syncVideoPts=0,this.syncAudioPts=0,this.startVideoPts=0,this.startAudioPts=0,this.accurateTimeOffset=0,this.lastVideoPts=0,this.currentVideoPts=0,this.seekVideoHistoryPts=0,this.currentAudioPts=0,this.audioFrameNum=0,this.reset=0,this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._AVC_SPS=null,this._AVC_PPS=null,this._HEVC_VPS=null,this._HEVC_SPS=null,this._HEVC_PPS=null,this._StartCode=[0,0,0,1],this._AVC_Config=null,this._callbackInitFlag=!1,this._callbackMediaDataFunc=e,this._callbackMediaDataUserPtr=i}var e,r,o,a=t.prototype;return a.bindDataSource=function(t){return t.onDataArrival=this.append.bind(this),this},a.resetMediaInfo=function(){this._mediaInfo=new m.a},a.resetMediaPts=function(t){this.reset=t,this.syncVideoPts=0,this.syncAudioPts=0,this.findKeyframe=!0,this._videoTrack.samples=[],this._audioTrack.samples=[]},a._onDataAvailableToSoftwareDecodeVideo=function(t,e){var i=e.samples;if(!(t<1&&i.length>0)){var r=-1;for(i.length>1&&(r=0);i.length;){for(var n=i.shift(),o=0,a=0;a<n.units.length;a++)o+=n.units[a].data.length;for(var s=0,h=new Uint8Array(o);n.units.length;){var u=n.units.shift();27==t&&(u.data[0]=0,u.data[1]=0,u.data[2]=0,u.data[3]=1),h.set(u.data,s),s+=u.data.length}this._callbackMediaDataFunc&&(r>=0&&r++,this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,1,t,n.isKeyframe,h,o,n.pts,0,0))}}},a._onDataAvailableToSoftwareDecodeAudio=function(t,e){var i=e.samples,r=-1;for(i.length>1&&(r=0);i.length;){var n=i.shift();this._callbackMediaDataFunc&&(r>=0&&r++,this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,2,t,0,n.unit,n.length,this._SampleRate,this._ChannelNum,this._SampleRate>=44100?32:16))}},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:RemuxerTrackIdConfig[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===t?0:void 0,isAAC:"audio"===t||void 0,duration:"audio"===t?e:void 0,isHEVC:0}},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),i=0;i<e;){if(71===t[i]&&71===t[i+188]&&71===t[i+376])return i;i++}return-1},a.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},a.parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},a.parsePMT=function(t,e,i,r){var o,a,s={audio:-1,avc:-1,hevc:-1,id3:-1,isAAC:!0};for(o=e+3+((15&t[e+1])<<8|t[e+2])-4,e+=12+((15&t[e+10])<<8|t[e+11]);e<o;){switch(a=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!r)break;case 15:-1===s.audio&&(s.audio=a);break;case 21:-1===s.id3&&(s.id3=a);break;case 219:if(!r){logger.log("unknown stream type:"+t[e]);break}case 27:-1===s.avc&&(s.avc=a),n.setCodecTypeStr("H264");break;case 36:-1===s.avc&&(s.avc=a,s.hevc=a),n.setCodecTypeStr("H265");break;case 3:case 4:i?-1===s.audio&&(s.audio=a,s.isAAC=!1):logger.log("MPEG audio found, not supported in this browser for now")}e+=5+((15&t[e+3])<<8|t[e+4])}return s},a.parsePES=function(t){if(1!==this.reset){var e,i,r,n,o,a,s,h,u=0,l=t.data;if(!t||0===t.size)return null;for(;l[0].length<19&&l.length>1;){var d=new Uint8Array(l[0].length+l[1].length);d.set(l[0]),d.set(l[1],l[0].length),l[0]=d,l.splice(1,1)}if(1===((e=l[0])[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;if(192&(i=e[7])&&((a=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2)>4294967295&&(a-=4294967295),64&i?((s=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>4294967295&&(s-=4294967295),a-s>54e5&&(a=s)):s=a),h=(n=e[8])+9,t.size<=h)return null;t.size-=h,o=new Uint8Array(t.size);for(var f=0,c=l.length;f<c;f++){var p=(e=l[f]).byteLength;if(h){if(h>p){h-=p;continue}e=e.subarray(h),p-=h,h=0}o.set(e,u),u+=p}return r&&(r-=n+3),{data:o,pts:a,dts:s,len:r}}return null}},a.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var i=e.samples,r=i.length;if(isNaN(t.pts)){if(!r)return void e.dropped++;var n=i[r-1];t.pts=n.pts,t.dts=n.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(r||this.contiguous)?(t.id=r,i.push(t)):e.dropped++}t.debug.length&&logger.log(t.pts+"/"+t.dts+":"+t.debug)},a.parseAVCPES=function(t,e,r){var n=this,o=0;(0===this.startVideoPts||t.pts<this.startVideoPts)&&(this.startVideoPts=t.pts,o=1),this.audioFrameNum=0;var a=this._parseAVCNALu(t.data),s=[],h=0;t.data=null;var u=!1,l=!1;a.forEach((function(e){var r=e.data.length,o=new Uint8Array(4+r);o[0]=r>>24&255,o[1]=r>>16&255,o[2]=r>>8&255,o[3]=255&r,o.set(e.data,4);var a={type:e.type,data:o};switch(h+=o.length,s.push(a),e.type){case 1:!0;var d=e.data;if(l&&d.length>4)new c(d).readSliceType();break;case 5:!0,n.findKeyframe=!1,u=!0;break;case 6:!0;var f=new c(n.discardEPB(e.data));f.readUByte();for(var m=0,g=0,v=!1,y=0;!v&&f.bytesAvailable>1;){m=0;do{m+=y=f.readUByte()}while(255===y);g=0;do{g+=y=f.readUByte()}while(255===y);if(4===m&&0!==f.bytesAvailable){if(v=!0,181===f.readUByte())if(49===f.readUShort())if(1195456820===f.readUInt())if(3===f.readUByte()){var b=f.readUByte(),_=31&b,w=[b,f.readUByte()];for(i=0;i<_;i++)w.push(f.readUByte()),w.push(f.readUByte()),w.push(f.readUByte());n._insertSampleInOrder(n._txtTrack.samples,{type:3,pts:t.pts,bytes:w})}}else if(5===m&&0!==f.bytesAvailable){if(v=!0,g>16){var A=[];for(i=0;i<16;i++)A.push(f.readUByte().toString(16)),3!==i&&5!==i&&7!==i&&9!==i||A.push("-");var M=g-16,E=new Uint8Array(M);for(i=0;i<M;i++)E[i]=f.readUByte()}}else if(g<f.bytesAvailable)for(i=0;i<g;i++)f.readUByte()}break;case 7:!0,l=!0,n.findKeyframe=!1,n.tagPosition=n.filePosition,n._AVC_Config=p.a.parseSPS(e.data);var S=n._AVC_Config,k="avc1.";if(S)for(var T=e.data.subarray(1,4),R=0;R<3;R++){var I=T[R].toString(16);I.length<2&&(I="0"+I),k+=I}if(!n._initVideoMetadata){null==n._AVC_SPS&&(n._AVC_SPS=new Uint8Array(e.data.length+4),n._AVC_SPS.set(n._StartCode,0),n._AVC_SPS.set(e.data,4));var C=n._videoMetadata,P=n._videoTrack;if(C?void 0!==C.avcc&&Log.w(n.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===n._hasVideo&&!1===n._hasVideoFlagOverrided&&(n._hasVideo=!0,n._mediaInfo.hasVideo=!0),(C=n._videoMetadata={}).type="video",C.id=P.id,C.timescale=n._timescale,C.duration=n._duration),C.codecWidth=S.codec_size.width,C.codecHeight=S.codec_size.height,C.presentWidth=S.present_size.width,C.presentHeight=S.present_size.height,C.profile=S.profile_string,C.level=S.level_string,C.bitDepth=S.bit_depth,C.chromaFormat=S.chroma_format,C.sarRatio=S.sar_ratio,C.frameRate=S.frame_rate,!1!==S.frame_rate.fixed&&0!==S.frame_rate.fps_num&&0!==S.frame_rate.fps_den||(C.frameRate=n._referenceFrameRate),void 0!==C.frameRate){var x=C.frameRate.fps_den,D=C.frameRate.fps_num;C.refSampleDuration=C.timescale*(x/D)}C.codec=k;var O=n._mediaInfo;O.width=C.codecWidth,O.height=C.codecHeight,void 0!==C.frameRate&&(O.fps=C.frameRate.fps),O.profile=C.profile,O.level=C.level,O.refFrames=S.ref_frames,O.chromaFormat=S.chroma_format_string,O.sarNum=C.sarRatio.width,O.sarDen=C.sarRatio.height,O.videoCodec=k,O.hasAudio?null!=O.audioCodec&&(O.mimeType='video/x-flv; codecs="'+O.videoCodec+","+O.audioCodec+'"'):O.mimeType='video/x-flv; codecs="'+O.videoCodec+'"',O.isComplete()&&n._onMediaInfo(O)}break;case 8:if(!0,n.findKeyframe=!1,null==n._AVC_PPS&&(n._AVC_PPS=new Uint8Array(e.data.length+4),n._AVC_PPS.set(n._StartCode,0),n._AVC_PPS.set(e.data,4)),!n._initVideoMetadata){n._initVideoMetadata=!0;var B=n._videoMetadata;if(null==B.avcc){var L=0,W=n._AVC_SPS.length-4+8+1+2+(n._AVC_PPS.length-4);B.avcc=new Uint8Array(W+1),B.avcc[0]=1,B.avcc[1]=n._AVC_SPS[5],B.avcc[2]=n._AVC_SPS[6],B.avcc[3]=n._AVC_SPS[7],B.avcc[4]=255,B.avcc[5]=225,L=6;new Uint8Array;B.avcc[L++]=n._AVC_SPS.length-4>>8,B.avcc[L++]=n._AVC_SPS.length-4&255;var N=n._AVC_SPS.subarray(4,n._AVC_SPS.length);B.avcc.set(N,L),L+=N.length,B.avcc[L++]=1,B.avcc[L++]=n._AVC_PPS.length-4>>8,B.avcc[L++]=n._AVC_PPS.length-4&255;var F=n._AVC_PPS.subarray(4,n._AVC_PPS.length);B.avcc.set(F,L),L+=F.length,B.avcc[W]=1}n._onTrackMetadata("video",B)}break;default:!1}}));var d=(t.pts-this.startVideoPts)/90;u&&this.syncVideoPts<1&&(this.syncVideoPts=this.startVideoPts);var f=this._videoTrack,m={units:s,length:h,isKeyframe:u,dts:d,cts:0,pts:d};u&&(m.fileposition=this.tagPosition),0!==this.reset||this.findKeyframe||(f.samples.push(m),f.length+=h),this.filePosition+=h,this.accurateTimeOffset=m.pts,this.lastVideoPts=t.pts,1===o&&(this.seekVideoHistoryPts=d),e&&0===this.reset&&("auto"===this._config.decodeType||"hard"===this._config.decodeType?this._onDataAvailable(this._audioTrack,this._videoTrack):(this._videoTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeVideo(27,this._videoTrack),this._audioTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeAudio(86018,this._audioTrack)))},a.parseHEVCPES=function(t,e,i){(0===this.startVideoPts||t.pts<this.startVideoPts)&&(this.startVideoPts=t.pts);var r=[],n=0,o={type:1,data:t.data},a=0;if((n+=t.data.length)>32){var s=0;for(s=0;s<32;s++)if(0===t.data[s]&&0===t.data[s+1]&&0===t.data[s+2]&&1===t.data[s+3]&&64===t.data[s+4]){a=1,this.findKeyframe=!1;break}}r.push(o);var h=(t.pts-this.startVideoPts)/90;a&&this.syncVideoPts<1&&(this.syncVideoPts=this.startVideoPts);var u=this._videoTrack,l={units:r,length:n,isKeyframe:a,dts:h,cts:0,pts:h};a&&(l.fileposition=this.tagPosition),u.samples.push(l),u.length+=n,this._videoTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeVideo(173,this._videoTrack),this._audioTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeAudio(86018,this._audioTrack)},a._insertSampleInOrder=function(t,e){var i=t.length;if(i>0){if(e.pts>=t[i-1].pts)t.push(e);else for(var r=i-1;r>=0;r--)if(e.pts<t[r].pts){t.splice(r,0,e);break}}else t.push(e)},a._getLastNalUnit=function(){var t,e=this.avcSample;if(!e||0===e.units.length){var i=this._avcTrack.samples;e=i[i.length-1]}if(e){var r=e.units;t=r[r.length-1]}return t},a._parseAVCNALu=function(t){var e,i,r,n=0,o=t.byteLength,a=0,s=[],h=-1;for(-1===a&&(h=0,r=31&t[0],a=0,n=1);n<o;)if(e=t[n++],a)if(1!==a)if(e)if(1===e){if(h>=0)9!=(i={data:t.subarray(h,n-a-1),type:r}).type&&s.push(i);else;n<o?(h=n,r=31&t[n],a=0):a=-1}else a=0;else a=3;else a=e?0:2;else a=e?0:1;if(h>=0&&a>=0&&(i={data:t.subarray(h,o),type:r,state:a},s.push(i)),0===s.length){var u=this._getLastNalUnit();if(u){var l=new Uint8Array(u.data.byteLength+t.byteLength);l.set(u.data,0),l.set(t,u.data.byteLength),u.data=l}}return s},a.discardEPB=function(t){for(var e,i,r=t.byteLength,n=[],o=1;o<r-2;)0===t[o]&&0===t[o+1]&&3===t[o+2]?(n.push(o+2),o+=2):o++;if(0===n.length)return t;e=r-n.length,i=new Uint8Array(e);var a=0;for(o=0;o<e;a++,o++)a===n[0]&&(a++,n.shift()),i[o]=t[a];return i},a.parseAACPES=function(t,e){0===this.startAudioPts&&(this.startAudioPts=t.pts);var i,r,n,o,a,s,h,c=this._audioTrack,p=t.data,m=t.pts,g=this.aacOverFlow,v=this.aacLastPTS;if(g){var y=new Uint8Array(g.byteLength+p.byteLength);y.set(g,0),y.set(p,g.byteLength),p=y}for(n=0,a=p.length;n<a-1&&!u(p,n);n++);if(n&&(n<a-1?(s="AAC PES did not start with ADTS header,offset:"+n,h=!1):(s="no ADTS header found in AAC PES",h=!0),logger.warn("parsing error:"+s),this.observer.trigger(Event.ERROR,{type:ErrorTypes.MEDIA_ERROR,details:ErrorDetails.FRAG_PARSING_ERROR,fatal:h,reason:s}),h))return;if(this.audioSampleRate<1){var b=l(p,n,this.audioCodec);if(b&&(this.audioSampleRate=b.samplerate,this.audioChannel=b.channelCount,this.audioBitPerSample=16,!this._initAudioMetadata)){this._initAudioMetadata=!0;var _=this._audioMetadata,w=this._audioTrack;_||((_=this._audioMetadata={}).type="audio",_.id=w.id,_.timescale=1e3,_.duration=0,_.audioSampleRate=this.audioSampleRate,_.channelCount=this.audioChannel),_.config&&Log.w(this.TAG,"Found another AudioSpecificConfig!");b.config;_.audioSampleRate=b.samplerate,_.channelCount=b.channelCount,_.codec=b.codec,_.originalCodec=b.originalCodec,_.config=b.config,_.refSampleDuration=1024/_.audioSampleRate*_.timescale,this._SampleRate=b.samplerate,this._ChannelNum=b.channelCount,this._onDataAvailable(this._audioTrack,this._videoTrack),this._onTrackMetadata("audio",_);var A=this._mediaInfo;A.audioCodec=_.originalCodec,A.audioSampleRate=_.audioSampleRate,A.audioChannelCount=_.channelCount,A.hasVideo?null!=A.videoCodec&&(A.mimeType='video/x-flv; codecs="'+A.videoCodec+","+A.audioCodec+'"'):A.mimeType='video/x-flv; codecs="'+A.audioCodec+'"',A.isComplete()&&this._onMediaInfo(A)}}if(r=0,i=d(this.audioSampleRate),g&&v){var M=v+i;Math.abs(M-m)>1&&(m=M)}for(;n<a;)if(u(p,n)&&n+5<a){var E=f(this.audioSampleRate,p,n,m,r);if(!E)break;var S=Math.round((E.sample.pts-this.startAudioPts)/90),k={unit:E.sample.unit,length:E.length,dts:S,pts:S};0!==this.reset||this.findKeyframe||(this.syncAudioPts<1&&this.syncVideoPts>0&&(this.syncAudioPts=this.syncVideoPts),this.syncAudioPts>0&&(c.samples.push(k),c.length+=E.length)),n+=E.length,o=E.sample.pts,r++}else n++;g=n<a?p.subarray(n,a):null,this.aacOverFlow=g,this.aacLastPTS=o},a.parseMPEGPES=function(t){for(var e=t.data,i=e.length,r=0,n=0,o=t.pts;n<i;)if(MpegAudio.isHeader(e,n)){var a=MpegAudio.appendFrame(this._audioTrack,e,n,o,r);if(!a)break;n+=a.length,r++}else n++},a.append=function(e,i,r){if(null!=e&&(i=e.length,1!==this.reset)){var n,o,a,s,h,u,l=i,d=!1,f=-1,c=-1,p=-1,m=this.avcTrackPesData,g=this.audioTrackPesData,v=this.id3TrackPesData,y=!1,b=t._syncOffset(e);for(l-=(l+b)%188,n=b;n<l;n+=188)if(71===e[n]){if(o=!!(64&e[n+1]),a=((31&e[n+1])<<8)+e[n+2],(48&e[n+3])>>4>1){if((s=n+5+e[n+4])===n+188)continue}else s=n+4;switch(a){case f:o&&(m&&(h=this.parsePES(m))&&(1==this.isHEVC?this.parseHEVCPES(h,!1,r):this.parseAVCPES(h,!1,r)),m={data:[],size:0}),m&&(m.data.push(e.subarray(s,n+188)),m.size+=n+188-s);break;case c:o&&(g&&(h=this.parsePES(g))&&(this.isAAC?this.parseAACPES(h,!1):this.parseMPEGPES(h)),g={data:[],size:0}),g&&(g.data.push(e.subarray(s,n+188)),g.size+=n+188-s);break;case p:o&&(v&&(h=this.parsePES(v))&&parseID3PES(h),v={data:[],size:0}),v&&(v.data.push(e.subarray(s,n+188)),v.size+=n+188-s);break;case 0:o&&(s+=e[s]+1),u=this.parsePAT(e,s);break;case u:o&&(s+=e[s]+1);var _=this.parsePMT(e,s,!1,!1);f=_.avc,_.hevc>0&&(f=_.hevc,this.isHEVC=1),f>0&&(this.avcTrackPid=f),!this._callbackInitFlag&&this._callbackMediaDataFunc&&(this._callbackInitFlag=!0,1===this.isHEVC||"auto"!==this._config.decodeType&&"hard"!==this._config.decodeType||this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!1,1,0,0,null,0,0,0,0)),(c=_.audio)>0&&(this.audioTrackPid=c,this.isAAC=_.isAAC),(p=_.id3)>0&&(this.id3TrackPid=p),d&&!y&&(d=!1,n=b-188),y=!0;break;case 17:case 8191:break;default:d=!0}}m&&(h=this.parsePES(m))?(1==this.isHEVC?this.parseHEVCPES(h,!0,r):this.parseAVCPES(h,!0,r),this.avcTrackPesData=null):this.avcTrackPesData=m,g&&(h=this.parsePES(g))?(this.isAAC?this.parseAACPES(h,!0):this.parseMPEGPES(h),this.audioTrackPesData=null):(g&&g.size&&logger.log("last AAC PES packet truncated,might overlap between fragments"),this.audioTrackPesData=g),v&&(h=this.parsePES(v))?(parseID3PES(h),this.id3TrackPesData=null):this.id3TrackPesData=v}},e=t,(r=[{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(t){this._onTrackMetadata=t}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(t){this._onMediaInfo=t}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(t){this._onMetaDataArrived=t}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(t){this._onScriptDataArrived=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(t){this._onDataAvailable=t}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(t){this._timestampBase=t}},{key:"overridedDuration",get:function(){return this._duration},set:function(t){this._durationOverrided=!0,this._duration=t,this._mediaInfo.duration=t}},{key:"overridedHasAudio",set:function(t){this._hasAudioFlagOverrided=!0,this._hasAudio=t,this._mediaInfo.hasAudio=t}},{key:"overridedHasVideo",set:function(t){this._hasVideoFlagOverrided=!0,this._hasVideo=t,this._mediaInfo.hasVideo=t}}])&&g(e.prototype,r),o&&g(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.a=v},function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},function(t,e,i){"use strict";var r=i(4).Buffer,n=i(149).Transform;function o(t){n.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}i(3)(o,n),o.prototype._transform=function(t,e,i){var r=null;try{this.update(t,e)}catch(t){r=t}i(r)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var i=this._block,n=0;this._blockOffset+t.length-n>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)i[o++]=t[n++];this._update(),this._blockOffset=0}for(;n<t.length;)i[this._blockOffset++]=t[n++];for(var a=0,s=8*t.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,i){"use strict";(function(e,r){var n;t.exports=S,S.ReadableState=E;i(6).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=i(81),s=i(9).Buffer,h=e.Uint8Array||function(){};var u,l=i(150);u=l&&l.debuglog?l.debuglog("stream"):function(){};var d,f,c,p=i(151),m=i(82),g=i(83).getHighWaterMark,v=i(26).codes,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(3)(S,a);var A=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function E(t,e,r){n=n||i(27),t=t||{},"boolean"!=typeof r&&(r=e instanceof n),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=i(18).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function S(t){if(n=n||i(27),!(this instanceof S))return new S(t);var e=this instanceof n;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function k(t,e,i,r,n){u("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(u("onEofChunk"),e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,P(t)))}(t,a);else if(n||(o=function(t,e){var i;r=e,s.isBuffer(r)||r instanceof h||"string"==typeof e||void 0===e||t.objectMode||(i=new y("chunk",["string","Buffer","Uint8Array"],e));var r;return i}(a,e)),o)A(t,o);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)a.endEmitted?A(t,new w):T(t,a,e,!0);else if(a.ended)A(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!i?(e=a.decoder.write(e),a.objectMode||0!==e.length?T(t,a,e,!1):x(t,a)):T(t,a,e,!1)}else r||(a.reading=!1,x(t,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function T(t,e,i,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",i)):(e.length+=e.objectMode?1:i.length,r?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&C(t)),x(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var i,r=this._readableState;return r.objectMode?i=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=s.from(t,e),e=""),i=!0),k(this,t,e,!1,i)},S.prototype.unshift=function(t){return k(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){d||(d=i(18).StringDecoder);var e=new d(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var R=1073741824;function I(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=R?t=R:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;u("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(P,t))}function P(t){var e=t._readableState;u("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,W(t)}function x(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(D,t,e))}function D(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var i=e.length;if(u("maybeReadMore read 0"),t.read(0),i===e.length)break}e.readingMore=!1}function O(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){u("readable nexttick read 0"),t.read(0)}function L(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),W(t),e.flowing&&!e.reading&&t.read(0)}function W(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function F(t){var e=t._readableState;u("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(U,e,t))}function U(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function j(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}S.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):C(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&F(this),null;var r,n=e.needReadable;return u("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",n=!0),e.ended||e.reading?u("reading or ended",n=!1):n&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=I(i,e))),null===(r=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&F(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){A(this,new _("_read()"))},S.prototype.pipe=function(t,e){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,e);var a=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?h:g;function s(e,r){u("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",s),i.removeListener("end",h),i.removeListener("end",g),i.removeListener("data",f),d=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function h(){u("onend"),t.end()}n.endEmitted?r.nextTick(a):i.once("end",a),t.on("unpipe",s);var l=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,W(t))}}(i);t.on("drain",l);var d=!1;function f(e){u("ondata");var r=t.write(e);u("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==j(n.pipes,t))&&!d&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function c(e){u("onerror",e),g(),t.removeListener("error",c),0===o(t,"error")&&A(t,e)}function p(){t.removeListener("finish",m),g()}function m(){u("onfinish"),t.removeListener("close",p),g()}function g(){u("unpipe"),i.unpipe(t)}return i.on("data",f),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",c),t.once("close",p),t.once("finish",m),t.emit("pipe",i),n.flowing||(u("pipe resume"),i.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=j(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,i)),this},S.prototype.on=function(t,e){var i=a.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?C(this):n.reading||r.nextTick(B,this))),i},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var i=a.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(O,this),i},S.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(O,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(L,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(u("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(u("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o<M.length;o++)t.on(M[o],this.emit.bind(this,M[o]));return this._read=function(e){u("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=i(153)),f(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===c&&(c=i(154)),c(S,t,e)})}).call(this,i(10),i(8))},function(t,e,i){t.exports=i(6).EventEmitter},function(t,e,i){"use strict";(function(e){function i(t,e){n(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return s||h?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(n,this,t)):e.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(r,a):(a._writableState.errorEmitted=!0,e.nextTick(i,a,t)):e.nextTick(i,a,t):o?(e.nextTick(r,a),o(t)):e.nextTick(r,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,i(8))},function(t,e,i){"use strict";var r=i(26).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,i,n){var o=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,n,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(n?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,i){"use strict";(function(e,r){function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,i){var r=t.entry;t.entry=null;for(;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=S,S.WritableState=E;var a={deprecate:i(53)},s=i(81),h=i(9).Buffer,u=e.Uint8Array||function(){};var l,d=i(82),f=i(83).getHighWaterMark,c=i(26).codes,p=c.ERR_INVALID_ARG_TYPE,m=c.ERR_METHOD_NOT_IMPLEMENTED,g=c.ERR_MULTIPLE_CALLBACK,v=c.ERR_STREAM_CANNOT_PIPE,y=c.ERR_STREAM_DESTROYED,b=c.ERR_STREAM_NULL_VALUES,_=c.ERR_STREAM_WRITE_AFTER_END,w=c.ERR_UNKNOWN_ENCODING,A=d.errorOrDestroy;function M(){}function E(t,e,a){o=o||i(27),t=t||{},"boolean"!=typeof a&&(a=e instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,n=i.sync,o=i.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,n,o){--e.pendingcb,i?(r.nextTick(o,n),r.nextTick(P,t,e),t._writableState.errorEmitted=!0,A(t,n)):(o(n),t._writableState.errorEmitted=!0,A(t,n),P(t,e))}(t,i,n,e,o);else{var a=I(i)||t.destroyed;a||i.corked||i.bufferProcessing||!i.bufferedRequest||R(t,i),n?r.nextTick(T,t,i,a,o):T(t,i,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function S(t){var e=this instanceof(o=o||i(27));if(!e&&!l.call(S,this))return new S(t);this._writableState=new E(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function k(t,e,i,r,n,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function T(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),P(t,e)}function R(t,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(t._writev&&i&&i.next){var r=e.bufferedRequestCount,o=new Array(r),a=e.corkedRequestsFree;a.entry=i;for(var s=0,h=!0;i;)o[s]=i,i.isBuf||(h=!1),i=i.next,s+=1;o.allBuffers=h,k(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,l=i.encoding,d=i.callback;if(k(t,e,!1,e.objectMode?1:u.length,u,l,d),i=i.next,e.bufferedRequestCount--,e.writing)break}null===i&&(e.lastBufferedRequest=null)}e.bufferedRequest=i,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final((function(i){e.pendingcb--,i&&A(t,i),e.prefinished=!0,t.emit("prefinish"),P(t,e)}))}function P(t,e){var i=I(e);if(i&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(C,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return i}i(3)(S,s),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===S&&(t&&t._writableState instanceof E)}})):l=function(t){return t instanceof this},S.prototype.pipe=function(){A(this,new v)},S.prototype.write=function(t,e,i){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=t,h.isBuffer(n)||n instanceof u);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(i=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof i&&(i=M),o.ending?function(t,e){var i=new _;A(t,i),r.nextTick(e,i)}(this,i):(s||function(t,e,i,n){var o;return null===i?o=new b:"string"==typeof i||e.objectMode||(o=new p("chunk",["string","Buffer"],i)),!o||(A(t,o),r.nextTick(n,o),!1)}(this,o,t,i))&&(o.pendingcb++,a=function(t,e,i,r,n,o){if(!i){var a=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,i));return e}(e,r,n);r!==a&&(i=!0,n="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,s,r,n,o);return u}(this,o,s,t,e,i)),a},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},S.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,i){i(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,i){var n=this._writableState;return"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,i){e.ending=!0,P(t,e),i&&(e.finished?r.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,n,i),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,i(10),i(8))},function(t,e,i){"use strict";t.exports=l;var r=i(26).codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,h=i(27);function u(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new o);i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);h.call(this,t),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",d)}function d(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,i){f(t,e,i)}))}function f(t,e,i){if(e)return t.emit("error",e);if(null!=i&&t.push(i),t._writableState.length)throw new s;if(t._transformState.transforming)throw new a;return t.push(null)}i(3)(l,h),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,i){i(new n("_transform()"))},l.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){h.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,i){var r=i(3),n=i(28),o=i(4).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function h(){this.init(),this._w=s,n.call(this,64,56)}function u(t,e,i){return i^t&(e^i)}function l(t,e,i){return t&e|i&(t|e)}function d(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function f(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function c(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(h,n),h.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},h.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)i[v]=t.readInt32BE(4*v);for(;v<64;++v)i[v]=0|(((e=i[v-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+i[v-7]+c(i[v-15])+i[v-16];for(var y=0;y<64;++y){var b=g+f(h)+u(h,p,m)+a[y]+i[y]|0,_=d(r)+l(r,n,o)|0;g=m,m=p,p=h,h=s+b|0,s=o,o=n,n=r,r=b+_|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},h.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=h},function(t,e,i){var r=i(3),n=i(28),o=i(4).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function h(){this.init(),this._w=s,n.call(this,128,112)}function u(t,e,i){return i^t&(e^i)}function l(t,e,i){return t&e|i&(t|e)}function d(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function f(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function c(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0<e>>>0?1:0}r(h,n),h.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},h.prototype._update=function(t){for(var e=this._w,i=0|this._ah,r=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,h=0|this._fh,y=0|this._gh,b=0|this._hh,_=0|this._al,w=0|this._bl,A=0|this._cl,M=0|this._dl,E=0|this._el,S=0|this._fl,k=0|this._gl,T=0|this._hl,R=0;R<32;R+=2)e[R]=t.readInt32BE(4*R),e[R+1]=t.readInt32BE(4*R+4);for(;R<160;R+=2){var I=e[R-30],C=e[R-30+1],P=c(I,C),x=p(C,I),D=m(I=e[R-4],C=e[R-4+1]),O=g(C,I),B=e[R-14],L=e[R-14+1],W=e[R-32],N=e[R-32+1],F=x+L|0,U=P+B+v(F,x)|0;U=(U=U+D+v(F=F+O|0,O)|0)+W+v(F=F+N|0,N)|0,e[R]=U,e[R+1]=F}for(var j=0;j<160;j+=2){U=e[j],F=e[j+1];var V=l(i,r,n),H=l(_,w,A),z=d(i,_),G=d(_,i),q=f(s,E),X=f(E,s),Z=a[j],K=a[j+1],Q=u(s,h,y),Y=u(E,S,k),J=T+X|0,$=b+q+v(J,T)|0;$=($=($=$+Q+v(J=J+Y|0,Y)|0)+Z+v(J=J+K|0,K)|0)+U+v(J=J+F|0,F)|0;var tt=G+H|0,et=z+V+v(tt,G)|0;b=y,T=k,y=h,k=S,h=s,S=E,s=o+$+v(E=M+J|0,M)|0,o=n,M=A,n=r,A=w,r=i,w=_,i=$+et+v(_=J+tt|0,J)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+A|0,this._dl=this._dl+M|0,this._el=this._el+E|0,this._fl=this._fl+S|0,this._gl=this._gl+k|0,this._hl=this._hl+T|0,this._ah=this._ah+i+v(this._al,_)|0,this._bh=this._bh+r+v(this._bl,w)|0,this._ch=this._ch+n+v(this._cl,A)|0,this._dh=this._dh+o+v(this._dl,M)|0,this._eh=this._eh+s+v(this._el,E)|0,this._fh=this._fh+h+v(this._fl,S)|0,this._gh=this._gh+y+v(this._gl,k)|0,this._hh=this._hh+b+v(this._hl,T)|0},h.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=h},function(t,e,i){"use strict";(function(e,r){var n=i(42);t.exports=b;var o,a=i(78);b.ReadableState=y;i(6).EventEmitter;var s=function(t,e){return t.listeners(e).length},h=i(89),u=i(58).Buffer,l=e.Uint8Array||function(){};var d=Object.create(i(36));d.inherits=i(3);var f=i(162),c=void 0;c=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=i(163),g=i(90);d.inherits(b,h);var v=["error","close","destroy","pause","resume"];function y(t,e){t=t||{};var r=e instanceof(o=o||i(19));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=i(18).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||i(19),!(this instanceof b))return new b(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),h.call(this)}function _(t,e,i,r,n){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,E(t)}(t,a)):(n||(o=function(t,e){var i;r=e,u.isBuffer(r)||r instanceof l||"string"==typeof e||void 0===e||t.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));var r;return i}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!i?(e=a.decoder.write(e),a.objectMode||0!==e.length?w(t,a,e,!1):k(t,a)):w(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function w(t,e,i,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",i),t.read(0)):(e.length+=e.objectMode?1:i.length,r?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&E(t)),k(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var i,r=this._readableState;return r.objectMode?i=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=u.from(t,e),e=""),i=!0),_(this,t,e,!1,i)},b.prototype.unshift=function(t){return _(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return p||(p=i(18).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var A=8388608;function M(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=A?t=A:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(S,t):S(t))}function S(t){c("emit readable"),t.emit("readable"),C(t)}function k(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(T,t,e))}function T(t,e){for(var i=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(c("maybeReadMore read 0"),t.read(0),i!==e.length);)i=e.length;e.readingMore=!1}function R(t){c("readable nexttick read 0"),t.read(0)}function I(t,e){e.reading||(c("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),C(t),e.flowing&&!e.reading&&t.read(0)}function C(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):i=function(t,e,i){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():i?function(t,e){var i=e.head,r=1,n=i.data;t-=n.length;for(;i=i.next;){var o=i.data,a=t>o.length?o.length:t;if(a===o.length?n+=o:n+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(a));break}++r}return e.length-=r,n}(t,e):function(t,e){var i=u.allocUnsafe(t),r=e.head,n=1;r.data.copy(i),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(i,i.length-t,0,a),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e);return r}(t,e.buffer,e.decoder),i);var i}function x(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,n.nextTick(D,e,t))}function D(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function O(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}b.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?x(this):E(this),null;if(0===(t=M(t,e))&&e.ended)return 0===e.length&&x(this),null;var r,n=e.needReadable;return c("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",n=!0),e.ended||e.reading?c("reading or ended",n=!1):n&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=M(i,e))),null===(r=t>0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&x(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,c("pipe count=%d opts=%j",o.pipesCount,e);var h=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:b;function u(e,r){c("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",d),t.removeListener("error",g),t.removeListener("unpipe",u),i.removeListener("end",l),i.removeListener("end",b),i.removeListener("data",m),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||d())}function l(){c("onend"),t.end()}o.endEmitted?n.nextTick(h):i.once("end",h),t.on("unpipe",u);var d=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,C(t))}}(i);t.on("drain",d);var f=!1;var p=!1;function m(e){c("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==O(o.pipes,t))&&!f&&(c("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,p=!0),i.pause())}function g(e){c("onerror",e),b(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),b()}function y(){c("onfinish"),t.removeListener("close",v),b()}function b(){c("unpipe"),i.unpipe(t)}return i.on("data",m),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",g),t.once("close",v),t.once("finish",y),t.emit("pipe",i),o.flowing||(c("pipe resume"),i.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this,i);return this}var a=O(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,i)),this},b.prototype.on=function(t,e){var i=h.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&E(this):n.nextTick(R,this))}return i},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(I,t,e))}(this,t)),this},b.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(c("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(c("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o<v.length;o++)t.on(v[o],this.emit.bind(this,v[o]));return this._read=function(e){c("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=P}).call(this,i(10),i(8))},function(t,e,i){t.exports=i(6).EventEmitter},function(t,e,i){"use strict";var r=i(42);function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var i=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(n,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(n,i,t),i._writableState&&(i._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,i){"use strict";t.exports=a;var r=i(19),n=Object.create(i(36));function o(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function a(t){if(!(this instanceof a))return new a(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush((function(e,i){h(t,e,i)})):h(this,null,null)}function h(t,e,i){if(e)return t.emit("error",e);if(null!=i&&t.push(i),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}n.inherits=i(3),n.inherits(a,r),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,i){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var i=this;r.prototype._destroy.call(this,t,(function(t){e(t),i.emit("close")}))}},function(t,e,i){"use strict";var r=i(3),n=i(172),o=i(17),a=i(4).Buffer,s=i(93),h=i(55),u=i(56),l=a.alloc(128);function d(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var i="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>i)?e=("rmd160"===t?new h:u(t)).update(e).digest():e.length<i&&(e=a.concat([e,l],i));for(var r=this._ipad=a.allocUnsafe(i),n=this._opad=a.allocUnsafe(i),s=0;s<i;s++)r[s]=54^e[s],n[s]=92^e[s];this._hash="rmd160"===t?new h:u(t),this._hash.update(r)}r(d,o),d.prototype._update=function(t){this._hash.update(t)},d.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new h:u(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new d("rmd160",e):"md5"===t?new n(s,e):new d(t,e)}},function(t,e,i){var r=i(52);t.exports=function(t){return(new r).update(t).digest()}},function(t){t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(t,e,i){e.pbkdf2=i(174),e.pbkdf2Sync=i(98)},function(t,e){var i=Math.pow(2,30)-1;t.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>i||e!=e)throw new TypeError("Bad key length")}},function(t,e,i){(function(e,i){var r;if(e.process&&e.process.browser)r="utf-8";else if(e.process&&e.process.version){r=parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";t.exports=r}).call(this,i(10),i(8))},function(t,e,i){var r=i(93),n=i(55),o=i(56),a=i(4).Buffer,s=i(96),h=i(97),u=i(99),l=a.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(t,e,i){var s=function(t){function e(e){return o(t).update(e).digest()}function i(t){return(new n).update(t).digest()}return"rmd160"===t||"ripemd160"===t?i:"md5"===t?r:e}(t),h="sha512"===t||"sha384"===t?128:64;e.length>h?e=s(e):e.length<h&&(e=a.concat([e,l],h));for(var u=a.allocUnsafe(h+d[t]),f=a.allocUnsafe(h+d[t]),c=0;c<h;c++)u[c]=54^e[c],f[c]=92^e[c];var p=a.allocUnsafe(h+i+4);u.copy(p,0,0,h),this.ipad1=p,this.ipad2=u,this.opad=f,this.alg=t,this.blocksize=h,this.hash=s,this.size=d[t]}f.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,i,r,n){s(i,r);var o=new f(n=n||"sha1",t=u(t,h,"Password"),(e=u(e,h,"Salt")).length),l=a.allocUnsafe(r),c=a.allocUnsafe(e.length+4);e.copy(c,0,0,e.length);for(var p=0,m=d[n],g=Math.ceil(r/m),v=1;v<=g;v++){c.writeUInt32BE(v,e.length);for(var y=o.run(c,o.ipad1),b=y,_=1;_<i;_++){b=o.run(b,o.ipad2);for(var w=0;w<m;w++)y[w]^=b[w]}y.copy(l,p),p+=m}return l}},function(t,e,i){var r=i(4).Buffer;t.exports=function(t,e,i){if(r.isBuffer(t))return t;if("string"==typeof t)return r.from(t,e);if(ArrayBuffer.isView(t))return r.from(t.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView")}},function(t,e,i){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},e.ip=function(t,e,i,r){for(var n=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}i[r+0]=n>>>0,i[r+1]=o>>>0},e.rip=function(t,e,i,r){for(var n=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)n<<=1,n|=e>>>s+a&1,n<<=1,n|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.pc1=function(t,e,i,r){for(var n=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1}for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,i,n){for(var o=0,a=0,s=r.length>>>1,h=0;h<s;h++)o<<=1,o|=t>>>r[h]&1;for(h=s;h<r.length;h++)a<<=1,a|=e>>>r[h]&1;i[n+0]=o>>>0,i[n+1]=a>>>0},e.expand=function(t,e,i){var r=0,n=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var i=0,r=0;r<4;r++){i<<=4,i|=n[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){i<<=4,i|=n[256+64*r+(e>>>18-6*r&63)]}return i>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,i=0;i<o.length;i++)e<<=1,e|=t>>>o[i]&1;return e>>>0},e.padSplit=function(t,e,i){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var n=[],o=0;o<e;o+=i)n.push(r.slice(o,o+i));return n.join(" ")}},function(t,e,i){"use strict";var r=i(13),n=i(3),o=i(100),a=i(60);function s(){this.tmp=new Array(2),this.keys=null}function h(t){a.call(this,t);var e=new s;this._desState=e,this.deriveKeys(e,t.key)}n(h,a),t.exports=h,h.create=function(t){return new h(t)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];h.prototype.deriveKeys=function(t,e){t.keys=new Array(32),r.equal(e.length,this.blockSize,"Invalid key length");var i=o.readUInt32BE(e,0),n=o.readUInt32BE(e,4);o.pc1(i,n,t.tmp,0),i=t.tmp[0],n=t.tmp[1];for(var a=0;a<t.keys.length;a+=2){var s=u[a>>>1];i=o.r28shl(i,s),n=o.r28shl(n,s),o.pc2(i,n,t.keys,a)}},h.prototype._update=function(t,e,i,r){var n=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,a,s,n.tmp,0):this._decrypt(n,a,s,n.tmp,0),a=n.tmp[0],s=n.tmp[1],o.writeUInt32BE(i,a,r),o.writeUInt32BE(i,s,r+4)},h.prototype._pad=function(t,e){for(var i=t.length-e,r=e;r<t.length;r++)t[r]=i;return!0},h.prototype._unpad=function(t){for(var e=t[t.length-1],i=t.length-e;i<t.length;i++)r.equal(t[i],e);return t.slice(0,t.length-e)},h.prototype._encrypt=function(t,e,i,r,n){for(var a=e,s=i,h=0;h<t.keys.length;h+=2){var u=t.keys[h],l=t.keys[h+1];o.expand(s,t.tmp,0),u^=t.tmp[0],l^=t.tmp[1];var d=o.substitute(u,l),f=s;s=(a^o.permute(d))>>>0,a=f}o.rip(s,a,r,n)},h.prototype._decrypt=function(t,e,i,r,n){for(var a=i,s=e,h=t.keys.length-2;h>=0;h-=2){var u=t.keys[h],l=t.keys[h+1];o.expand(a,t.tmp,0),u^=t.tmp[0],l^=t.tmp[1];var d=o.substitute(u,l),f=a;a=(s^o.permute(d))>>>0,s=f}o.rip(a,s,r,n)}},function(t,e,i){var r=i(37),n=i(4).Buffer,o=i(103);function a(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var i=Math.ceil(e.length/16),o=t._cache.length;t._cache=n.concat([t._cache,n.allocUnsafe(16*i)]);for(var s=0;s<i;s++){var h=a(t),u=o+16*s;t._cache.writeUInt32BE(h[0],u+0),t._cache.writeUInt32BE(h[1],u+4),t._cache.writeUInt32BE(h[2],u+8),t._cache.writeUInt32BE(h[3],u+12)}var l=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),r(e,l)}},function(t,e){t.exports=function(t){for(var e,i=t.length;i--;){if(255!==(e=t.readUInt8(i))){e++,t.writeUInt8(e,i);break}t.writeUInt8(0,i)}}},function(t){t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(t,e,i){var r=i(43),n=i(4).Buffer,o=i(17),a=i(3),s=i(187),h=i(37),u=i(103);function l(t,e,i,a){o.call(this);var h=n.alloc(4,0);this._cipher=new r.AES(e);var l=this._cipher.encryptBlock(h);this._ghash=new s(l),i=function(t,e,i){if(12===e.length)return t._finID=n.concat([e,n.from([0,0,0,1])]),n.concat([e,n.from([0,0,0,2])]);var r=new s(i),o=e.length,a=o%16;r.update(e),a&&(a=16-a,r.update(n.alloc(a,0))),r.update(n.alloc(8,0));var h=8*o,l=n.alloc(8);l.writeUIntBE(h,0,8),r.update(l),t._finID=r.state;var d=n.from(t._finID);return u(d),d}(this,i,l),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=n.alloc(e,0),this._ghash.update(e))}this._called=!0;var i=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(i),this._len+=t.length,i},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=h(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var i=0;t.length!==e.length&&i++;for(var r=Math.min(t.length,e.length),n=0;n<r;++n)i+=t[n]^e[n];return i}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},l.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},l.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=l},function(t,e,i){var r=i(43),n=i(4).Buffer,o=i(17);function a(t,e,i,a){o.call(this),this._cipher=new r.AES(e),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=a,this._mode=t}i(3)(a,o),a.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},t.exports=a},function(t,e,i){var r=i(25);t.exports=y,y.simpleSieve=g,y.fermatTest=v;var n=i(108),o=new n(24),a=new(i(109)),s=new n(1),h=new n(2),u=new n(5),l=(new n(16),new n(8),new n(10)),d=new n(3),f=(new n(7),new n(11)),c=new n(4),p=(new n(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,i=3;i<1048576;i+=2){for(var r=Math.ceil(Math.sqrt(i)),n=0;n<e&&t[n]<=r&&i%t[n]!=0;n++);e!==n&&t[n]<=r||(t[e++]=i)}return p=t,t}function g(t){for(var e=m(),i=0;i<e.length;i++)if(0===t.modn(e[i]))return 0===t.cmpn(e[i]);return!0}function v(t){var e=n.mont(t);return 0===h.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function y(t,e){if(t<16)return new n(2===e||5===e?[140,123]:[140,39]);var i,p;for(e=new n(e);;){for(i=new n(r(Math.ceil(t/8)));i.bitLength()>t;)i.ishrn(1);if(i.isEven()&&i.iadd(s),i.testn(1)||i.iadd(h),e.cmp(h)){if(!e.cmp(u))for(;i.mod(l).cmp(d);)i.iadd(c)}else for(;i.mod(o).cmp(f);)i.iadd(c);if(g(p=i.shrn(1))&&g(i)&&v(p)&&v(i)&&a.test(p)&&a.test(i))return i}}},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(191).Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),a=e;a<o;a++){var s=t.charCodeAt(a)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},o.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,a=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,a=o%r,s=Math.min(o,o-a)+i,h=0,l=i;l<s;l+=r)h=u(t,l,l+r,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==a){var d=1;for(h=u(t,l,t.length,e),l=0;l<a;l++)d*=e;this.imuln(d),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,h=a/67108864|0;i.words[0]=s;for(var u=1;u<r;u++){for(var l=h>>>26,d=67108863&h,f=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=f;c++){var p=u-c|0;l+=(a=(n=0|t.words[p])*(o=0|e.words[c])+d)/67108864|0,d=67108863&a}i.words[u]=0|d,h=0|l}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],h=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||a!==this.length-1?l[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],c=f[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);i=(p=p.idivn(c)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,h="le"===e,u=new t(o),l=this.clone();if(h){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-n;s++)u[s]=0;for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|i.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<i.length;a++)o=(e=(0|i.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<i.length&&i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this.length=Math.max(this.length,a),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,i){var r,n,o,a=t.words,s=e.words,h=i.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,c=0|a[1],p=8191&c,m=c>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],_=8191&b,w=b>>>13,A=0|a[4],M=8191&A,E=A>>>13,S=0|a[5],k=8191&S,T=S>>>13,R=0|a[6],I=8191&R,C=R>>>13,P=0|a[7],x=8191&P,D=P>>>13,O=0|a[8],B=8191&O,L=O>>>13,W=0|a[9],N=8191&W,F=W>>>13,U=0|s[0],j=8191&U,V=U>>>13,H=0|s[1],z=8191&H,G=H>>>13,q=0|s[2],X=8191&q,Z=q>>>13,K=0|s[3],Q=8191&K,Y=K>>>13,J=0|s[4],$=8191&J,tt=J>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ht=8191&st,ut=st>>>13,lt=0|s[8],dt=8191<,ft=lt>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(d,j))|0)+((8191&(n=(n=Math.imul(d,V))+Math.imul(f,j)|0))<<13)|0;u=((o=Math.imul(f,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,j),n=(n=Math.imul(p,V))+Math.imul(m,j)|0,o=Math.imul(m,V);var vt=(u+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(f,z)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,j),n=(n=Math.imul(v,V))+Math.imul(y,j)|0,o=Math.imul(y,V),r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,j),n=(n=Math.imul(_,V))+Math.imul(w,j)|0,o=Math.imul(w,V),r=r+Math.imul(v,z)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Z)|0;var bt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,Y)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,j),n=(n=Math.imul(M,V))+Math.imul(E,j)|0,o=Math.imul(E,V),r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var _t=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,tt)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,V))+Math.imul(T,j)|0,o=Math.imul(T,V),r=r+Math.imul(M,z)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(r=r+Math.imul(d,it)|0)|0)+((8191&(n=(n=n+Math.imul(d,rt)|0)+Math.imul(f,it)|0))<<13)|0;u=((o=o+Math.imul(f,rt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,j),n=(n=Math.imul(I,V))+Math.imul(C,j)|0,o=Math.imul(C,V),r=r+Math.imul(k,z)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var At=(u+(r=r+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,at)|0)+Math.imul(f,ot)|0))<<13)|0;u=((o=o+Math.imul(f,at)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(x,j),n=(n=Math.imul(x,V))+Math.imul(D,j)|0,o=Math.imul(D,V),r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(u+(r=r+Math.imul(d,ht)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(f,ht)|0))<<13)|0;u=((o=o+Math.imul(f,ut)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,j),n=(n=Math.imul(B,V))+Math.imul(L,j)|0,o=Math.imul(L,V),r=r+Math.imul(x,z)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,it)|0,n=(n=n+Math.imul(_,rt)|0)+Math.imul(w,it)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((o=o+Math.imul(f,ft)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),n=(n=Math.imul(N,V))+Math.imul(F,j)|0,o=Math.imul(F,V),r=r+Math.imul(B,z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(L,z)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(M,it)|0,n=(n=n+Math.imul(M,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,n=(n=n+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ut)|0,r=r+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,o=o+Math.imul(m,ft)|0;var St=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((o=o+Math.imul(f,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,G))+Math.imul(F,z)|0,o=Math.imul(F,G),r=r+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(M,ot)|0,n=(n=n+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,ht)|0,n=(n=n+Math.imul(_,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,r=r+Math.imul(v,dt)|0,n=(n=n+Math.imul(v,ft)|0)+Math.imul(y,dt)|0,o=o+Math.imul(y,ft)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),r=r+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(C,it)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(M,ht)|0,n=(n=n+Math.imul(M,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(_,dt)|0,n=(n=n+Math.imul(_,ft)|0)+Math.imul(w,dt)|0,o=o+Math.imul(w,ft)|0;var Tt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,it)|0,n=(n=n+Math.imul(x,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(k,ht)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(M,dt)|0,n=(n=n+Math.imul(M,ft)|0)+Math.imul(E,dt)|0,o=o+Math.imul(E,ft)|0;var Rt=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(n=(n=n+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ut)|0,r=r+Math.imul(k,dt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(T,dt)|0,o=o+Math.imul(T,ft)|0;var It=(u+(r=r+Math.imul(M,pt)|0)|0)+((8191&(n=(n=n+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,dt)|0,n=(n=n+Math.imul(I,ft)|0)+Math.imul(C,dt)|0,o=o+Math.imul(C,ft)|0;var Ct=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(x,dt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(D,dt)|0,o=o+Math.imul(D,ft)|0;var Pt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(N,ht),n=(n=Math.imul(N,ut))+Math.imul(F,ht)|0,o=Math.imul(F,ut),r=r+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(L,dt)|0,o=o+Math.imul(L,ft)|0;var xt=(u+(r=r+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,dt),n=(n=Math.imul(N,ft))+Math.imul(F,dt)|0,o=Math.imul(F,ft);var Dt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ot=(u+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,h[0]=gt,h[1]=vt,h[2]=yt,h[3]=bt,h[4]=_t,h[5]=wt,h[6]=At,h[7]=Mt,h[8]=Et,h[9]=St,h[10]=kt,h[11]=Tt,h[12]=Rt,h[13]=It,h[14]=Ct,h[15]=Pt,h[16]=xt,h[17]=Dt,h[18]=Ot,0!==u&&(h[19]=u,i.length++),i};function m(t,e,i){return(new g).mulp(t,e,i)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=c),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?p(this,t,e):r<63?c(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var a=n;n=0;for(var s=67108863&r,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var l=o-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):m(this,t,e),i},g.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},g.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},g.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a<o;a++)r[a]=e[t[a]],n[a]=i[t[a]]},g.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,h=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var d=h,f=u,c=0;c<a;c++){var p=i[l+c],m=r[l+c],g=i[l+c+a],v=r[l+c+a],y=d*g-f*v;v=d*v+f*g,g=y,i[l+c]=p+g,r[l+c]=m+v,i[l+c+a]=p-g,r[l+c+a]=m-v,c!==s&&(y=h*d-u*f,f=h*f+u*d,d=y)}},g.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},g.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,i,n){for(var o=0,a=0;a<e;a++)o+=0|t[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},g.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),h=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=i.words;f.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,u,r),this.transform(a,o,s,h,r,n),this.transform(u,o,l,d,r,n);for(var c=0;c<r;c++){var p=s[c]*l[c]-h[c]*d[c];h[c]=s[c]*d[c]+h[c]*l[c],s[c]=p}return this.conjugate(s,h,r),this.transform(s,h,f,o,r,n),this.conjugate(f,o,r),this.normalize13b(f,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,i=0;i<this.length;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,h=(0|this.words[e])-s<<i;this.words[e]=h|a,a=s>>>26-i}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,h=i;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=n);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return h&&0!==l&&(h.words[h.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,i){var n,o,a=t.length+i;this._expand(a);var s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+s;var h=(0|t.words[n])*e;s=((o-=67108863&h)>>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)s=(o=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,a=0|n.words[n.length-1];0!==(i=26-this._countBits(a))&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var s,h=r.length-n.length;if("mod"!==e){(s=new o(null)).length=h+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(n,1,h);0===l.negative&&(r=l,s&&(s.words[h]=1));for(var d=h-1;d>=0;d--){var f=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(n,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),h=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var l=i.clone(),d=e.clone();!e.isZero();){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(l),a.isub(d)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||h.isOdd())&&(s.iadd(l),h.isub(d)),s.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(s),a.isub(h)):(i.isub(e),s.isub(n),h.isub(a))}return{a:s,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var d=0,f=1;0==(i.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);e.cmp(i)>=0?(e.isub(i),a.isub(s)):(i.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(a&i)<<4|o>>>22,o=a}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(w,y),n(A,y),A.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var s=new o(1).toRed(this),h=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(h);)l.redIAdd(h);for(var d=this.pow(l,n),f=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=a;0!==c.cmp(s);){for(var m=c,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),c=c.redMul(d),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var n=i[0],a=0,s=0,h=e.bitLength()%26;for(0===h&&(h=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=h-1;l>=0;l--){var d=u>>l&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(n=this.mul(n,i[a]),s=0,a=0)):s=0}h=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,i(20)(t))},function(t,e,i){var r=i(192),n=i(63);function o(t){this.rand=t||new n.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),i=Math.ceil(e/8);do{var n=new r(this.rand.generate(i))}while(n.cmp(t)>=0);return n},o.prototype._randrange=function(t,e){var i=e.sub(t);return t.add(this._randbelow(i))},o.prototype.test=function(t,e,i){var n=t.bitLength(),o=r.mont(t),a=new r(1).toRed(o);e||(e=Math.max(1,n/48|0));for(var s=t.subn(1),h=0;!s.testn(h);h++);for(var u=t.shrn(h),l=s.toRed(o);e>0;e--){var d=this._randrange(new r(2),s);i&&i(d);var f=d.toRed(o).redPow(u);if(0!==f.cmp(a)&&0!==f.cmp(l)){for(var c=1;c<h;c++){if(0===(f=f.redSqr()).cmp(a))return!1;if(0===f.cmp(l))break}if(c===h)return!1}}return!0},o.prototype.getDivisor=function(t,e){var i=t.bitLength(),n=r.mont(t),o=new r(1).toRed(n);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),s=0;!a.testn(s);s++);for(var h=t.shrn(s),u=a.toRed(n);e>0;e--){var l=this._randrange(new r(2),a),d=t.gcd(l);if(0!==d.cmpn(1))return d;var f=l.toRed(n).redPow(h);if(0!==f.cmp(o)&&0!==f.cmp(u)){for(var c=1;c<s;c++){if(0===(f=f.redSqr()).cmp(o))return f.fromRed().subn(1).gcd(t);if(0===f.cmp(u))break}if(c===s)return(f=f.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,i){"use strict";(function(e,r){var n;t.exports=S,S.ReadableState=E;i(6).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=i(111),s=i(9).Buffer,h=e.Uint8Array||function(){};var u,l=i(199);u=l&&l.debuglog?l.debuglog("stream"):function(){};var d,f,c,p=i(200),m=i(112),g=i(113).getHighWaterMark,v=i(29).codes,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,_=v.ERR_METHOD_NOT_IMPLEMENTED,w=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(3)(S,a);var A=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function E(t,e,r){n=n||i(30),t=t||{},"boolean"!=typeof r&&(r=e instanceof n),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=i(18).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function S(t){if(n=n||i(30),!(this instanceof S))return new S(t);var e=this instanceof n;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function k(t,e,i,r,n){u("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(u("onEofChunk"),e.ended)return;if(e.decoder){var i=e.decoder.end();i&&i.length&&(e.buffer.push(i),e.length+=e.objectMode?1:i.length)}e.ended=!0,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,P(t)))}(t,a);else if(n||(o=function(t,e){var i;r=e,s.isBuffer(r)||r instanceof h||"string"==typeof e||void 0===e||t.objectMode||(i=new y("chunk",["string","Buffer","Uint8Array"],e));var r;return i}(a,e)),o)A(t,o);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)a.endEmitted?A(t,new w):T(t,a,e,!0);else if(a.ended)A(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!i?(e=a.decoder.write(e),a.objectMode||0!==e.length?T(t,a,e,!1):x(t,a)):T(t,a,e,!1)}else r||(a.reading=!1,x(t,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function T(t,e,i,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",i)):(e.length+=e.objectMode?1:i.length,r?e.buffer.unshift(i):e.buffer.push(i),e.needReadable&&C(t)),x(t,e)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),S.prototype.destroy=m.destroy,S.prototype._undestroy=m.undestroy,S.prototype._destroy=function(t,e){e(t)},S.prototype.push=function(t,e){var i,r=this._readableState;return r.objectMode?i=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=s.from(t,e),e=""),i=!0),k(this,t,e,!1,i)},S.prototype.unshift=function(t){return k(this,t,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(t){d||(d=i(18).StringDecoder);var e=new d(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var R=1073741824;function I(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=R?t=R:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;u("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(P,t))}function P(t){var e=t._readableState;u("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,W(t)}function x(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(D,t,e))}function D(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var i=e.length;if(u("maybeReadMore read 0"),t.read(0),i===e.length)break}e.readingMore=!1}function O(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){u("readable nexttick read 0"),t.read(0)}function L(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),W(t),e.flowing&&!e.reading&&t.read(0)}function W(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?i=e.buffer.shift():!t||t>=e.length?(i=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):i=e.buffer.consume(t,e.decoder),i);var i}function F(t){var e=t._readableState;u("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(U,e,t))}function U(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var i=e._writableState;(!i||i.autoDestroy&&i.finished)&&e.destroy()}}function j(t,e){for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return-1}S.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,i=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):C(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&F(this),null;var r,n=e.needReadable;return u("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",n=!0),e.ended||e.reading?u("reading or ended",n=!1):n&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=I(i,e))),null===(r=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),i!==t&&e.ended&&F(this)),null!==r&&this.emit("data",r),r},S.prototype._read=function(t){A(this,new _("_read()"))},S.prototype.pipe=function(t,e){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,e);var a=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?h:g;function s(e,r){u("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",s),i.removeListener("end",h),i.removeListener("end",g),i.removeListener("data",f),d=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function h(){u("onend"),t.end()}n.endEmitted?r.nextTick(a):i.once("end",a),t.on("unpipe",s);var l=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,W(t))}}(i);t.on("drain",l);var d=!1;function f(e){u("ondata");var r=t.write(e);u("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==j(n.pipes,t))&&!d&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function c(e){u("onerror",e),g(),t.removeListener("error",c),0===o(t,"error")&&A(t,e)}function p(){t.removeListener("finish",m),g()}function m(){u("onfinish"),t.removeListener("close",p),g()}function g(){u("unpipe"),i.unpipe(t)}return i.on("data",f),function(t,e,i){if("function"==typeof t.prependListener)return t.prependListener(e,i);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(i):t._events[e]=[i,t._events[e]]:t.on(e,i)}(t,"error",c),t.once("close",p),t.once("finish",m),t.emit("pipe",i),n.flowing||(u("pipe resume"),i.resume()),t},S.prototype.unpipe=function(t){var e=this._readableState,i={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=j(e.pipes,t);return-1===a||(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,i)),this},S.prototype.on=function(t,e){var i=a.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?C(this):n.reading||r.nextTick(B,this))),i},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,e){var i=a.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(O,this),i},S.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(O,this),e},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(L,t,e))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var e=this,i=this._readableState,r=!1;for(var n in t.on("end",(function(){if(u("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(u("wrapped data"),i.decoder&&(n=i.decoder.write(n)),i.objectMode&&null==n)||(i.objectMode||n&&n.length)&&(e.push(n)||(r=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o<M.length;o++)t.on(M[o],this.emit.bind(this,M[o]));return this._read=function(e){u("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=i(202)),f(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(t,e){return void 0===c&&(c=i(203)),c(S,t,e)})}).call(this,i(10),i(8))},function(t,e,i){t.exports=i(6).EventEmitter},function(t,e,i){"use strict";(function(e){function i(t,e){n(t,e),r(t)}function r(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function n(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return s||h?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(n,this,t)):e.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(r,a):(a._writableState.errorEmitted=!0,e.nextTick(i,a,t)):e.nextTick(i,a,t):o?(e.nextTick(r,a),o(t)):e.nextTick(r,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var i=t._readableState,r=t._writableState;i&&i.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,i(8))},function(t,e,i){"use strict";var r=i(29).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,i,n){var o=function(t,e,i){return null!=t.highWaterMark?t.highWaterMark:e?t[i]:null}(e,n,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(n?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,i){"use strict";(function(e,r){function n(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,i){var r=t.entry;t.entry=null;for(;r;){var n=r.callback;e.pendingcb--,n(i),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=S,S.WritableState=E;var a={deprecate:i(53)},s=i(111),h=i(9).Buffer,u=e.Uint8Array||function(){};var l,d=i(112),f=i(113).getHighWaterMark,c=i(29).codes,p=c.ERR_INVALID_ARG_TYPE,m=c.ERR_METHOD_NOT_IMPLEMENTED,g=c.ERR_MULTIPLE_CALLBACK,v=c.ERR_STREAM_CANNOT_PIPE,y=c.ERR_STREAM_DESTROYED,b=c.ERR_STREAM_NULL_VALUES,_=c.ERR_STREAM_WRITE_AFTER_END,w=c.ERR_UNKNOWN_ENCODING,A=d.errorOrDestroy;function M(){}function E(t,e,a){o=o||i(30),t=t||{},"boolean"!=typeof a&&(a=e instanceof o),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var i=t._writableState,n=i.sync,o=i.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(i),e)!function(t,e,i,n,o){--e.pendingcb,i?(r.nextTick(o,n),r.nextTick(P,t,e),t._writableState.errorEmitted=!0,A(t,n)):(o(n),t._writableState.errorEmitted=!0,A(t,n),P(t,e))}(t,i,n,e,o);else{var a=I(i)||t.destroyed;a||i.corked||i.bufferProcessing||!i.bufferedRequest||R(t,i),n?r.nextTick(T,t,i,a,o):T(t,i,a,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function S(t){var e=this instanceof(o=o||i(30));if(!e&&!l.call(S,this))return new S(t);this._writableState=new E(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),s.call(this)}function k(t,e,i,r,n,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):i?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function T(t,e,i,r){i||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),P(t,e)}function R(t,e){e.bufferProcessing=!0;var i=e.bufferedRequest;if(t._writev&&i&&i.next){var r=e.bufferedRequestCount,o=new Array(r),a=e.corkedRequestsFree;a.entry=i;for(var s=0,h=!0;i;)o[s]=i,i.isBuf||(h=!1),i=i.next,s+=1;o.allBuffers=h,k(t,e,!0,e.length,o,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new n(e),e.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,l=i.encoding,d=i.callback;if(k(t,e,!1,e.objectMode?1:u.length,u,l,d),i=i.next,e.bufferedRequestCount--,e.writing)break}null===i&&(e.lastBufferedRequest=null)}e.bufferedRequest=i,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final((function(i){e.pendingcb--,i&&A(t,i),e.prefinished=!0,t.emit("prefinish"),P(t,e)}))}function P(t,e){var i=I(e);if(i&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,r.nextTick(C,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return i}i(3)(S,s),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===S&&(t&&t._writableState instanceof E)}})):l=function(t){return t instanceof this},S.prototype.pipe=function(){A(this,new v)},S.prototype.write=function(t,e,i){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=t,h.isBuffer(n)||n instanceof u);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(i=e,e=null),s?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof i&&(i=M),o.ending?function(t,e){var i=new _;A(t,i),r.nextTick(e,i)}(this,i):(s||function(t,e,i,n){var o;return null===i?o=new b:"string"==typeof i||e.objectMode||(o=new p("chunk",["string","Buffer"],i)),!o||(A(t,o),r.nextTick(n,o),!1)}(this,o,t,i))&&(o.pendingcb++,a=function(t,e,i,r,n,o){if(!i){var a=function(t,e,i){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,i));return e}(e,r,n);r!==a&&(i=!0,n="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,s,r,n,o);return u}(this,o,s,t,e,i)),a},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},S.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,e,i){i(new m("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,e,i){var n=this._writableState;return"function"==typeof t?(i=t,t=null,e=null):"function"==typeof e&&(i=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,i){e.ending=!0,P(t,e),i&&(e.finished?r.nextTick(i):t.once("finish",i));e.ended=!0,t.writable=!1}(this,n,i),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(t,e){e(t)}}).call(this,i(10),i(8))},function(t,e,i){"use strict";t.exports=l;var r=i(29).codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,h=i(30);function u(t,e){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new o);i.writechunk=null,i.writecb=null,null!=e&&this.push(e),r(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);h.call(this,t),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",d)}function d(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,i){f(t,e,i)}))}function f(t,e,i){if(e)return t.emit("error",e);if(null!=i&&t.push(i),t._writableState.length)throw new s;if(t._transformState.transforming)throw new a;return t.push(null)}i(3)(l,h),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,i){i(new n("_transform()"))},l.prototype._write=function(t,e,i){var r=this._transformState;if(r.writecb=i,r.writechunk=t,r.writeencoding=e,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){h.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,i){"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",i=0;i<t.length;i++)e+=n(t[i].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var i=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)i[r]=0|t[r];return i}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)i.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var n=t.charCodeAt(r),o=n>>8,a=255&n;o?i.push(o,a):i.push(a)}return i},r.zero2=n,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,i){"use strict";var r=e;r.base=i(45),r.short=i(210),r.mont=i(211),r.edwards=i(212)},function(t,e,i){"use strict";var r=i(15).rotr32;function n(t,e,i){return t&e^~t&i}function o(t,e,i){return t&e^t&i^e&i}function a(t,e,i){return t^e^i}e.ft_1=function(t,e,i,r){return 0===t?n(e,i,r):1===t||3===t?a(e,i,r):2===t?o(e,i,r):void 0},e.ch32=n,e.maj32=o,e.p32=a,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,i){"use strict";var r=i(15),n=i(38),o=i(118),a=i(13),s=r.sum32,h=r.sum32_4,u=r.sum32_5,l=o.ch32,d=o.maj32,f=o.s0_256,c=o.s1_256,p=o.g0_256,m=o.g1_256,g=n.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(y,g),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=h(m(i[r-2]),i[r-7],p(i[r-15]),i[r-16]);var n=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],y=this.h[4],b=this.h[5],_=this.h[6],w=this.h[7];for(a(this.k.length===i.length),r=0;r<i.length;r++){var A=u(w,c(y),l(y,b,_),this.k[r],i[r]),M=s(f(n),d(n,o,g));w=_,_=b,b=y,y=s(v,A),v=g,g=o,o=n,n=s(A,M)}this.h[0]=s(this.h[0],n),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],_),this.h[7]=s(this.h[7],w)},y.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,i){"use strict";var r=i(15),n=i(38),o=i(13),a=r.rotr64_hi,s=r.rotr64_lo,h=r.shr64_hi,u=r.shr64_lo,l=r.sum64,d=r.sum64_hi,f=r.sum64_lo,c=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,v=n.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function _(t,e,i,r,n){var o=t&i^~t&n;return o<0&&(o+=4294967296),o}function w(t,e,i,r,n,o){var a=e&r^~e&o;return a<0&&(a+=4294967296),a}function A(t,e,i,r,n){var o=t&i^t&n^i&n;return o<0&&(o+=4294967296),o}function M(t,e,i,r,n,o){var a=e&r^e&o^r&o;return a<0&&(a+=4294967296),a}function E(t,e){var i=a(t,e,28)^a(e,t,2)^a(e,t,7);return i<0&&(i+=4294967296),i}function S(t,e){var i=s(t,e,28)^s(e,t,2)^s(e,t,7);return i<0&&(i+=4294967296),i}function k(t,e){var i=a(t,e,14)^a(t,e,18)^a(e,t,9);return i<0&&(i+=4294967296),i}function T(t,e){var i=s(t,e,14)^s(t,e,18)^s(e,t,9);return i<0&&(i+=4294967296),i}function R(t,e){var i=a(t,e,1)^a(t,e,8)^h(t,e,7);return i<0&&(i+=4294967296),i}function I(t,e){var i=s(t,e,1)^s(t,e,8)^u(t,e,7);return i<0&&(i+=4294967296),i}function C(t,e){var i=a(t,e,19)^a(e,t,29)^h(t,e,6);return i<0&&(i+=4294967296),i}function P(t,e){var i=s(t,e,19)^s(e,t,29)^u(t,e,6);return i<0&&(i+=4294967296),i}r.inherits(b,v),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,e){for(var i=this.W,r=0;r<32;r++)i[r]=t[e+r];for(;r<i.length;r+=2){var n=C(i[r-4],i[r-3]),o=P(i[r-4],i[r-3]),a=i[r-14],s=i[r-13],h=R(i[r-30],i[r-29]),u=I(i[r-30],i[r-29]),l=i[r-32],d=i[r-31];i[r]=c(n,o,a,s,h,u,l,d),i[r+1]=p(n,o,a,s,h,u,l,d)}},b.prototype._update=function(t,e){this._prepareBlock(t,e);var i=this.W,r=this.h[0],n=this.h[1],a=this.h[2],s=this.h[3],h=this.h[4],u=this.h[5],c=this.h[6],p=this.h[7],v=this.h[8],y=this.h[9],b=this.h[10],R=this.h[11],I=this.h[12],C=this.h[13],P=this.h[14],x=this.h[15];o(this.k.length===i.length);for(var D=0;D<i.length;D+=2){var O=P,B=x,L=k(v,y),W=T(v,y),N=_(v,y,b,R,I),F=w(v,y,b,R,I,C),U=this.k[D],j=this.k[D+1],V=i[D],H=i[D+1],z=m(O,B,L,W,N,F,U,j,V,H),G=g(O,B,L,W,N,F,U,j,V,H);O=E(r,n),B=S(r,n),L=A(r,n,a,s,h),W=M(r,n,a,s,h,u);var q=d(O,B,L,W),X=f(O,B,L,W);P=I,x=C,I=b,C=R,b=v,R=y,v=d(c,p,z,G),y=f(p,p,z,G),c=h,p=u,h=a,u=s,a=r,s=n,r=d(z,G,q,X),n=f(z,G,q,X)}l(this.h,0,r,n),l(this.h,2,a,s),l(this.h,4,h,u),l(this.h,6,c,p),l(this.h,8,v,y),l(this.h,10,b,R),l(this.h,12,I,C),l(this.h,14,P,x)},b.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,i){"use strict";var r=e;r.bignum=i(122),r.define=i(229).define,r.base=i(232),r.constants=i(233),r.decoders=i(125),r.encoders=i(123)},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(228).Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),a=e;a<o;a++){var s=t.charCodeAt(a)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},o.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,a=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,a=o%r,s=Math.min(o,o-a)+i,h=0,l=i;l<s;l+=r)h=u(t,l,l+r,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==a){var d=1;for(h=u(t,l,t.length,e),l=0;l<a;l++)d*=e;this.imuln(d),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,h=a/67108864|0;i.words[0]=s;for(var u=1;u<r;u++){for(var l=h>>>26,d=67108863&h,f=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=f;c++){var p=u-c|0;l+=(a=(n=0|t.words[p])*(o=0|e.words[c])+d)/67108864|0,d=67108863&a}i.words[u]=0|d,h=0|l}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],h=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||a!==this.length-1?l[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],c=f[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);i=(p=p.idivn(c)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,h="le"===e,u=new t(o),l=this.clone();if(h){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-n;s++)u[s]=0;for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|i.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<i.length;a++)o=(e=(0|i.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<i.length&&i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this.length=Math.max(this.length,a),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,i){var r,n,o,a=t.words,s=e.words,h=i.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,c=0|a[1],p=8191&c,m=c>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],_=8191&b,w=b>>>13,A=0|a[4],M=8191&A,E=A>>>13,S=0|a[5],k=8191&S,T=S>>>13,R=0|a[6],I=8191&R,C=R>>>13,P=0|a[7],x=8191&P,D=P>>>13,O=0|a[8],B=8191&O,L=O>>>13,W=0|a[9],N=8191&W,F=W>>>13,U=0|s[0],j=8191&U,V=U>>>13,H=0|s[1],z=8191&H,G=H>>>13,q=0|s[2],X=8191&q,Z=q>>>13,K=0|s[3],Q=8191&K,Y=K>>>13,J=0|s[4],$=8191&J,tt=J>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ht=8191&st,ut=st>>>13,lt=0|s[8],dt=8191<,ft=lt>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(d,j))|0)+((8191&(n=(n=Math.imul(d,V))+Math.imul(f,j)|0))<<13)|0;u=((o=Math.imul(f,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,j),n=(n=Math.imul(p,V))+Math.imul(m,j)|0,o=Math.imul(m,V);var vt=(u+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(f,z)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,j),n=(n=Math.imul(v,V))+Math.imul(y,j)|0,o=Math.imul(y,V),r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,j),n=(n=Math.imul(_,V))+Math.imul(w,j)|0,o=Math.imul(w,V),r=r+Math.imul(v,z)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Z)|0;var bt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,Y)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,j),n=(n=Math.imul(M,V))+Math.imul(E,j)|0,o=Math.imul(E,V),r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var _t=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,tt)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,V))+Math.imul(T,j)|0,o=Math.imul(T,V),r=r+Math.imul(M,z)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(r=r+Math.imul(d,it)|0)|0)+((8191&(n=(n=n+Math.imul(d,rt)|0)+Math.imul(f,it)|0))<<13)|0;u=((o=o+Math.imul(f,rt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,j),n=(n=Math.imul(I,V))+Math.imul(C,j)|0,o=Math.imul(C,V),r=r+Math.imul(k,z)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var At=(u+(r=r+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,at)|0)+Math.imul(f,ot)|0))<<13)|0;u=((o=o+Math.imul(f,at)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(x,j),n=(n=Math.imul(x,V))+Math.imul(D,j)|0,o=Math.imul(D,V),r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(u+(r=r+Math.imul(d,ht)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(f,ht)|0))<<13)|0;u=((o=o+Math.imul(f,ut)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,j),n=(n=Math.imul(B,V))+Math.imul(L,j)|0,o=Math.imul(L,V),r=r+Math.imul(x,z)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,it)|0,n=(n=n+Math.imul(_,rt)|0)+Math.imul(w,it)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((o=o+Math.imul(f,ft)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),n=(n=Math.imul(N,V))+Math.imul(F,j)|0,o=Math.imul(F,V),r=r+Math.imul(B,z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(L,z)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(M,it)|0,n=(n=n+Math.imul(M,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,n=(n=n+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ut)|0,r=r+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,o=o+Math.imul(m,ft)|0;var St=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((o=o+Math.imul(f,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,G))+Math.imul(F,z)|0,o=Math.imul(F,G),r=r+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(M,ot)|0,n=(n=n+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,ht)|0,n=(n=n+Math.imul(_,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,r=r+Math.imul(v,dt)|0,n=(n=n+Math.imul(v,ft)|0)+Math.imul(y,dt)|0,o=o+Math.imul(y,ft)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),r=r+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(C,it)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(M,ht)|0,n=(n=n+Math.imul(M,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(_,dt)|0,n=(n=n+Math.imul(_,ft)|0)+Math.imul(w,dt)|0,o=o+Math.imul(w,ft)|0;var Tt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,it)|0,n=(n=n+Math.imul(x,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(k,ht)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(M,dt)|0,n=(n=n+Math.imul(M,ft)|0)+Math.imul(E,dt)|0,o=o+Math.imul(E,ft)|0;var Rt=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(n=(n=n+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ut)|0,r=r+Math.imul(k,dt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(T,dt)|0,o=o+Math.imul(T,ft)|0;var It=(u+(r=r+Math.imul(M,pt)|0)|0)+((8191&(n=(n=n+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,dt)|0,n=(n=n+Math.imul(I,ft)|0)+Math.imul(C,dt)|0,o=o+Math.imul(C,ft)|0;var Ct=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(x,dt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(D,dt)|0,o=o+Math.imul(D,ft)|0;var Pt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(N,ht),n=(n=Math.imul(N,ut))+Math.imul(F,ht)|0,o=Math.imul(F,ut),r=r+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(L,dt)|0,o=o+Math.imul(L,ft)|0;var xt=(u+(r=r+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,dt),n=(n=Math.imul(N,ft))+Math.imul(F,dt)|0,o=Math.imul(F,ft);var Dt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ot=(u+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,h[0]=gt,h[1]=vt,h[2]=yt,h[3]=bt,h[4]=_t,h[5]=wt,h[6]=At,h[7]=Mt,h[8]=Et,h[9]=St,h[10]=kt,h[11]=Tt,h[12]=Rt,h[13]=It,h[14]=Ct,h[15]=Pt,h[16]=xt,h[17]=Dt,h[18]=Ot,0!==u&&(h[19]=u,i.length++),i};function m(t,e,i){return(new g).mulp(t,e,i)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=c),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?p(this,t,e):r<63?c(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var a=n;n=0;for(var s=67108863&r,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var l=o-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):m(this,t,e),i},g.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},g.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},g.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a<o;a++)r[a]=e[t[a]],n[a]=i[t[a]]},g.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,h=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var d=h,f=u,c=0;c<a;c++){var p=i[l+c],m=r[l+c],g=i[l+c+a],v=r[l+c+a],y=d*g-f*v;v=d*v+f*g,g=y,i[l+c]=p+g,r[l+c]=m+v,i[l+c+a]=p-g,r[l+c+a]=m-v,c!==s&&(y=h*d-u*f,f=h*f+u*d,d=y)}},g.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},g.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,i,n){for(var o=0,a=0;a<e;a++)o+=0|t[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},g.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),h=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=i.words;f.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,u,r),this.transform(a,o,s,h,r,n),this.transform(u,o,l,d,r,n);for(var c=0;c<r;c++){var p=s[c]*l[c]-h[c]*d[c];h[c]=s[c]*d[c]+h[c]*l[c],s[c]=p}return this.conjugate(s,h,r),this.transform(s,h,f,o,r,n),this.conjugate(f,o,r),this.normalize13b(f,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,i=0;i<this.length;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,h=(0|this.words[e])-s<<i;this.words[e]=h|a,a=s>>>26-i}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,h=i;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=n);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return h&&0!==l&&(h.words[h.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,i){var n,o,a=t.length+i;this._expand(a);var s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+s;var h=(0|t.words[n])*e;s=((o-=67108863&h)>>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)s=(o=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,a=0|n.words[n.length-1];0!==(i=26-this._countBits(a))&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var s,h=r.length-n.length;if("mod"!==e){(s=new o(null)).length=h+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(n,1,h);0===l.negative&&(r=l,s&&(s.words[h]=1));for(var d=h-1;d>=0;d--){var f=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(n,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),h=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var l=i.clone(),d=e.clone();!e.isZero();){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(l),a.isub(d)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||h.isOdd())&&(s.iadd(l),h.isub(d)),s.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(s),a.isub(h)):(i.isub(e),s.isub(n),h.isub(a))}return{a:s,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var d=0,f=1;0==(i.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);e.cmp(i)>=0?(e.isub(i),a.isub(s)):(i.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(a&i)<<4|o>>>22,o=a}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(w,y),n(A,y),A.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var s=new o(1).toRed(this),h=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(h);)l.redIAdd(h);for(var d=this.pow(l,n),f=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=a;0!==c.cmp(s);){for(var m=c,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),c=c.redMul(d),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var n=i[0],a=0,s=0,h=e.bitLength()%26;for(0===h&&(h=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=h-1;l>=0;l--){var d=u>>l&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(n=this.mul(n,i[a]),s=0,a=0)):s=0}h=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,i(20)(t))},function(t,e,i){"use strict";var r=e;r.der=i(124),r.pem=i(230)},function(t,e,i){"use strict";var r=i(3),n=i(70).Buffer,o=i(71),a=i(73);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new h,this.tree._init(t.body)}function h(t){o.call(this,"der",t)}function u(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(h,o),h.prototype._encodeComposite=function(t,e,i,r){var o=function(t,e,i,r){var n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))n=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);n=t}if(n>=31)return r.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=a.tagClassByName[i||"universal"]<<6}(t,e,i,this.reporter);if(r.length<128){var s=n.alloc(2);return s[0]=o,s[1]=r.length,this._createEncoderBuffer([s,r])}for(var h=1,u=r.length;u>=256;u>>=8)h++;var l=n.alloc(2+h);l[0]=o,l[1]=128|h;for(var d=1+h,f=r.length;f>0;d--,f>>=8)l[d]=255&f;return this._createEncoderBuffer([l,r])},h.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var i=n.alloc(2*t.length),r=0;r<t.length;r++)i.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(i)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},h.prototype._encodeObjid=function(t,e,i){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(var r=0;r<t.length;r++)t[r]|=0}else if(Array.isArray(t)){t=t.slice();for(var o=0;o<t.length;o++)t[o]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!i){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var a=0,s=0;s<t.length;s++){var h=t[s];for(a++;h>=128;h>>=7)a++}for(var u=n.alloc(a),l=u.length-1,d=t.length-1;d>=0;d--){var f=t[d];for(u[l--]=127&f;(f>>=7)>0;)u[l--]=128|127&f}return this._createEncoderBuffer(u)},h.prototype._encodeTime=function(t,e){var i,r=new Date(t);return"gentime"===e?i=[u(r.getUTCFullYear()),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?i=[u(r.getUTCFullYear()%100),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(i,"octstr")},h.prototype._encodeNull=function(){return this._createEncoderBuffer("")},h.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!n.isBuffer(t)){var i=t.toArray();!t.sign&&128&i[0]&&i.unshift(0),t=n.from(i)}if(n.isBuffer(t)){var r=t.length;0===t.length&&r++;var o=n.alloc(r);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var a=1,s=t;s>=256;s>>=8)a++;for(var h=new Array(a),u=h.length-1;u>=0;u--)h[u]=255&t,t>>=8;return 128&h[0]&&h.unshift(0),this._createEncoderBuffer(n.from(h))},h.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},h.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},h.prototype._skipDefault=function(t,e,i){var r,n=this._baseState;if(null===n.default)return!1;var o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,i).join()),o.length!==n.defaultBuffer.length)return!1;for(r=0;r<o.length;r++)if(o[r]!==n.defaultBuffer[r])return!1;return!0}},function(t,e,i){"use strict";var r=e;r.der=i(126),r.pem=i(231)},function(t,e,i){"use strict";var r=i(3),n=i(122),o=i(39).DecoderBuffer,a=i(71),s=i(73);function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){a.call(this,"der",t)}function l(t,e){var i=t.readUInt8(e);if(t.isError(i))return i;var r=s.tagClass[i>>6],n=0==(32&i);if(31==(31&i)){var o=i;for(i=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;i<<=7,i|=127&o}}else i&=31;return{cls:r,primitive:n,tag:i,tagStr:s.tag[i]}}function d(t,e,i){var r=t.readUInt8(i);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;var n=127&r;if(n>4)return t.error("length octect is too long");r=0;for(var o=0;o<n;o++){r<<=8;var a=t.readUInt8(i);if(t.isError(a))return a;r|=a}return r}t.exports=h,h.prototype.decode=function(t,e){return o.isDecoderBuffer(t)||(t=new o(t,e)),this.tree._decode(t,e)},r(u,a),u.prototype._peekTag=function(t,e,i){if(t.isEmpty())return!1;var r=t.save(),n=l(t,'Failed to peek tag: "'+e+'"');return t.isError(n)?n:(t.restore(r),n.tag===e||n.tagStr===e||n.tagStr+"of"===e||i)},u.prototype._decodeTag=function(t,e,i){var r=l(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;var n=d(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(n))return n;if(!i&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==n)return t.skip(n,'Failed to match body of: "'+e+'"');var o=t.save(),a=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(a)?a:(n=t.offset-o.offset,t.restore(o),t.skip(n,'Failed to match body of: "'+e+'"'))},u.prototype._skipUntilEnd=function(t,e){for(;;){var i=l(t,e);if(t.isError(i))return i;var r=d(t,i.primitive,e);if(t.isError(r))return r;var n=void 0;if(n=i.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===i.tagStr)break}},u.prototype._decodeList=function(t,e,i,r){for(var n=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var a=i.decode(t,"der",r);if(t.isError(a)&&o)break;n.push(a)}return n},u.prototype._decodeStr=function(t,e){if("bitstr"===e){var i=t.readUInt8();return t.isError(i)?i:{unused:i,data:t.raw()}}if("bmpstr"===e){var r=t.raw();if(r.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var n="",o=0;o<r.length/2;o++)n+=String.fromCharCode(r.readUInt16BE(2*o));return n}if("numstr"===e){var a=t.raw().toString("ascii");return this._isNumstr(a)?a:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var s=t.raw().toString("ascii");return this._isPrintstr(s)?s:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},u.prototype._decodeObjid=function(t,e,i){for(var r,n=[],o=0,a=0;!t.isEmpty();)o<<=7,o|=127&(a=t.readUInt8()),0==(128&a)&&(n.push(o),o=0);128&a&&n.push(o);var s=n[0]/40|0,h=n[0]%40;if(r=i?n:[s,h].concat(n.slice(1)),e){var u=e[r.join(" ")];void 0===u&&(u=e[r.join(".")]),void 0!==u&&(r=u)}return r},u.prototype._decodeTime=function(t,e){var i,r,n,o,a,s,h=t.raw().toString();if("gentime"===e)i=0|h.slice(0,4),r=0|h.slice(4,6),n=0|h.slice(6,8),o=0|h.slice(8,10),a=0|h.slice(10,12),s=0|h.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");i=0|h.slice(0,2),r=0|h.slice(2,4),n=0|h.slice(4,6),o=0|h.slice(6,8),a=0|h.slice(8,10),s=0|h.slice(10,12),i=i<70?2e3+i:1900+i}return Date.UTC(i,r-1,n,o,a,s,0)},u.prototype._decodeNull=function(){return null},u.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},u.prototype._decodeInt=function(t,e){var i=t.raw(),r=new n(i);return e&&(r=e[r.toString(10)]||r),r},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t){t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(t,e,i){var r=i(35),n=i(4).Buffer;function o(t){var e=n.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var i,a=n.alloc(0),s=0;a.length<e;)i=o(s++),a=n.concat([a,r("sha1").update(t).update(i).digest()]);return a.slice(0,e)}},function(t,e){t.exports=function(t,e){for(var i=t.length,r=-1;++r<i;)t[r]^=e[r];return t}},function(t,e,i){var r=i(74),n=i(4).Buffer;t.exports=function(t,e){return n.from(t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed().toArray())}},function(t,e,i){var r;t.exports=(r=i(5),function(t){var e=r,i=e.lib,n=i.WordArray,o=i.Hasher,a=e.algo,s=[],h=[];!function(){function e(e){for(var i=t.sqrt(e),r=2;r<=i;r++)if(!(e%r))return!1;return!0}function i(t){return 4294967296*(t-(0|t))|0}for(var r=2,n=0;n<64;)e(r)&&(n<8&&(s[n]=i(t.pow(r,.5))),h[n]=i(t.pow(r,1/3)),n++),r++}();var u=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new n.init(s.slice(0))},_doProcessBlock:function(t,e){for(var i=this._hash.words,r=i[0],n=i[1],o=i[2],a=i[3],s=i[4],l=i[5],d=i[6],f=i[7],c=0;c<64;c++){if(c<16)u[c]=0|t[e+c];else{var p=u[c-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=u[c-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[c]=m+u[c-7]+v+u[c-16]}var y=r&n^r&o^n&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&d)+h[c]+u[c];f=d,d=l,l=s,s=a+_|0,a=o,o=n,n=r,r=_+(b+y)|0}i[0]=i[0]+r|0,i[1]=i[1]+n|0,i[2]=i[2]+o|0,i[3]=i[3]+a|0,i[4]=i[4]+s|0,i[5]=i[5]+l|0,i[6]=i[6]+d|0,i[7]=i[7]+f|0},_doFinalize:function(){var e=this._data,i=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return i[n>>>5]|=128<<24-n%32,i[14+(n+64>>>9<<4)]=t.floor(r/4294967296),i[15+(n+64>>>9<<4)]=r,e.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)},function(t,e,i){var r;t.exports=(r=i(5),i(49),function(){var t=r,e=t.lib.Hasher,i=t.x64,n=i.Word,o=i.WordArray,a=t.algo;function s(){return n.create.apply(n,arguments)}var h=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var t=0;t<80;t++)u[t]=s()}();var l=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var i=this._hash.words,r=i[0],n=i[1],o=i[2],a=i[3],s=i[4],l=i[5],d=i[6],f=i[7],c=r.high,p=r.low,m=n.high,g=n.low,v=o.high,y=o.low,b=a.high,_=a.low,w=s.high,A=s.low,M=l.high,E=l.low,S=d.high,k=d.low,T=f.high,R=f.low,I=c,C=p,P=m,x=g,D=v,O=y,B=b,L=_,W=w,N=A,F=M,U=E,j=S,V=k,H=T,z=R,G=0;G<80;G++){var q,X,Z=u[G];if(G<16)X=Z.high=0|t[e+2*G],q=Z.low=0|t[e+2*G+1];else{var K=u[G-15],Q=K.high,Y=K.low,J=(Q>>>1|Y<<31)^(Q>>>8|Y<<24)^Q>>>7,$=(Y>>>1|Q<<31)^(Y>>>8|Q<<24)^(Y>>>7|Q<<25),tt=u[G-2],et=tt.high,it=tt.low,rt=(et>>>19|it<<13)^(et<<3|it>>>29)^et>>>6,nt=(it>>>19|et<<13)^(it<<3|et>>>29)^(it>>>6|et<<26),ot=u[G-7],at=ot.high,st=ot.low,ht=u[G-16],ut=ht.high,lt=ht.low;X=(X=(X=J+at+((q=$+st)>>>0<$>>>0?1:0))+rt+((q+=nt)>>>0<nt>>>0?1:0))+ut+((q+=lt)>>>0<lt>>>0?1:0),Z.high=X,Z.low=q}var dt,ft=W&F^~W&j,ct=N&U^~N&V,pt=I&P^I&D^P&D,mt=C&x^C&O^x&O,gt=(I>>>28|C<<4)^(I<<30|C>>>2)^(I<<25|C>>>7),vt=(C>>>28|I<<4)^(C<<30|I>>>2)^(C<<25|I>>>7),yt=(W>>>14|N<<18)^(W>>>18|N<<14)^(W<<23|N>>>9),bt=(N>>>14|W<<18)^(N>>>18|W<<14)^(N<<23|W>>>9),_t=h[G],wt=_t.high,At=_t.low,Mt=H+yt+((dt=z+bt)>>>0<z>>>0?1:0),Et=vt+mt;H=j,z=V,j=F,V=U,F=W,U=N,W=B+(Mt=(Mt=(Mt=Mt+ft+((dt+=ct)>>>0<ct>>>0?1:0))+wt+((dt+=At)>>>0<At>>>0?1:0))+X+((dt+=q)>>>0<q>>>0?1:0))+((N=L+dt|0)>>>0<L>>>0?1:0)|0,B=D,L=O,D=P,O=x,P=I,x=C,I=Mt+(gt+pt+(Et>>>0<vt>>>0?1:0))+((C=dt+Et|0)>>>0<dt>>>0?1:0)|0}p=r.low=p+C,r.high=c+I+(p>>>0<C>>>0?1:0),g=n.low=g+x,n.high=m+P+(g>>>0<x>>>0?1:0),y=o.low=y+O,o.high=v+D+(y>>>0<O>>>0?1:0),_=a.low=_+L,a.high=b+B+(_>>>0<L>>>0?1:0),A=s.low=A+N,s.high=w+W+(A>>>0<N>>>0?1:0),E=l.low=E+U,l.high=M+F+(E>>>0<U>>>0?1:0),k=d.low=k+V,d.high=S+j+(k>>>0<V>>>0?1:0),R=f.low=R+z,f.high=T+H+(R>>>0<z>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(i/4294967296),e[31+(r+128>>>10<<5)]=i,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(l),t.HmacSHA512=e._createHmacHelper(l)}(),r.SHA512)},function(t,e,i){!function(){"use strict";var e=i(51),r=i(135),n=i(138),o={FrameSink:e,SoftwareFrameSink:r,WebGLFrameSink:n,attach:function(t,e){return("webGL"in(e=e||{})?e.webGL:n.isAvailable())?new n(t,e):new r(t,e)}};t.exports=o}()},function(t,e,i){"use strict";(function(e){var r,n=(r=i(142))&&"object"==typeof r&&"default"in r?r.default:r;t.exports=function(t){for(var i,r=(i=t,n.atob?n.atob(i):e.from(i,"base64").toString("binary")),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return o}}).call(this,i(9).Buffer)},function(t,e,i){!function(){"use strict";var e=i(51),r=i(136);function n(t){var e=this,i=t.getContext("2d"),n=null,o=null,a=null;return e.drawFrame=function(e){var s=e.format;t.width===s.displayWidth&&t.height===s.displayHeight||(t.width=s.displayWidth,t.height=s.displayHeight),null!==n&&n.width==s.width&&n.height==s.height||function(t,e){for(var r=(n=i.createImageData(t,e)).data,o=t*e*4,a=0;a<o;a+=4)r[a+3]=255}(s.width,s.height),r.convertYCbCr(e,n.data);var h,u,l,d=s.cropWidth!=s.displayWidth||s.cropHeight!=s.displayHeight;d?(o||(u=s.cropWidth,l=s.cropHeight,(o=document.createElement("canvas")).width=u,o.height=l,a=o.getContext("2d")),h=a):h=i,h.putImageData(n,-s.cropLeft,-s.cropTop,s.cropLeft,s.cropTop,s.cropWidth,s.cropHeight),d&&i.drawImage(o,0,0,s.displayWidth,s.displayHeight)},e.clear=function(){i.clearRect(0,0,t.width,t.height)},e}n.prototype=Object.create(e.prototype),t.exports=n}()},function(t,e,i){!function(){"use strict";var e=i(137);t.exports={convertYCbCr:function(t,i){var r=0|t.format.width,n=0|t.format.height,o=0|e(t.format.width/t.format.chromaWidth),a=0|e(t.format.height/t.format.chromaHeight),s=t.y.bytes,h=t.u.bytes,u=t.v.bytes,l=0|t.y.stride,d=0|t.u.stride,f=0|t.v.stride,c=r<<2,p=0,m=0,g=0,v=0,y=0,b=0,_=0,w=0,A=0,M=0,E=0,S=0,k=0,T=0,R=0,I=0,C=0,P=0;if(1==o&&1==a)for(_=0,w=c,P=0,I=0;I<n;I+=2){for(g=(m=I*l|0)+l|0,v=P*d|0,y=P*f|0,R=0;R<r;R+=2)A=0|h[v++],S=(409*(M=0|u[y++])|0)-57088|0,k=(100*A|0)+(208*M|0)-34816|0,T=(516*A|0)-70912|0,E=298*s[m++]|0,i[_]=E+S>>8,i[_+1]=E-k>>8,i[_+2]=E+T>>8,_+=4,E=298*s[m++]|0,i[_]=E+S>>8,i[_+1]=E-k>>8,i[_+2]=E+T>>8,_+=4,E=298*s[g++]|0,i[w]=E+S>>8,i[w+1]=E-k>>8,i[w+2]=E+T>>8,w+=4,E=298*s[g++]|0,i[w]=E+S>>8,i[w+1]=E-k>>8,i[w+2]=E+T>>8,w+=4;_+=c,w+=c,P++}else for(b=0,I=0;I<n;I++)for(C=0,p=I*l|0,v=(P=I>>a)*d|0,y=P*f|0,R=0;R<r;R++)A=0|h[v+(C=R>>o)],S=(409*(M=0|u[y+C])|0)-57088|0,k=(100*A|0)+(208*M|0)-34816|0,T=(516*A|0)-70912|0,E=298*s[p++]|0,i[b]=E+S>>8,i[b+1]=E-k>>8,i[b+2]=E+T>>8,b+=4}}}()},function(t,e){!function(){"use strict";t.exports=function(t){for(var e=0,i=t>>1;0!=i;)i>>=1,e++;if(t!==1<<e)throw"chroma plane dimensions must be power of 2 ratio to luma plane dimensions; got "+t;return e}}()},function(t,e,i){!function(){"use strict";var e=i(51),r=i(139);function n(t){var e,i,o=this,a=n.contextForCanvas(t);if(null===a)throw new Error("WebGL unavailable");function s(t,e){var i=a.createShader(t);if(a.shaderSource(i,e),a.compileShader(i),!a.getShaderParameter(i,a.COMPILE_STATUS)){var r=a.getShaderInfoLog(i);throw a.deleteShader(i),new Error("GL shader compilation for "+t+" failed: "+r)}return i}var h,u,l,d,f,c,p,m,g,v,y=new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),b={},_={},w={};function A(t,e){return b[t]&&!e||(b[t]=a.createTexture()),b[t]}function M(t,e,i,r,o){var s=!b[t]||e,h=A(t,e);if(a.activeTexture(a.TEXTURE0),n.stripe){var u=!b[t+"_temp"]||e,l=A(t+"_temp",e);a.bindTexture(a.TEXTURE_2D,l),u?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,i/4,r,0,a.RGBA,a.UNSIGNED_BYTE,o)):a.texSubImage2D(a.TEXTURE_2D,0,0,0,i/4,r,a.RGBA,a.UNSIGNED_BYTE,o);var d=b[t+"_stripe"],f=!d||e;f&&(d=A(t+"_stripe",e)),a.bindTexture(a.TEXTURE_2D,d),f&&(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,i,1,0,a.RGBA,a.UNSIGNED_BYTE,function(t){if(w[t])return w[t];for(var e=t,i=new Uint32Array(e),r=0;r<e;r+=4)i[r]=255,i[r+1]=65280,i[r+2]=16711680,i[r+3]=4278190080;return w[t]=new Uint8Array(i.buffer)}(i)))}else a.bindTexture(a.TEXTURE_2D,h),s?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.ALPHA,i,r,0,a.ALPHA,a.UNSIGNED_BYTE,o)):a.texSubImage2D(a.TEXTURE_2D,0,0,0,i,r,a.ALPHA,a.UNSIGNED_BYTE,o)}function E(t,e,r,n){var o=b[t];a.useProgram(i);var s=_[t];s&&!e||(a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,o),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,r,n,0,a.RGBA,a.UNSIGNED_BYTE,null),s=_[t]=a.createFramebuffer()),a.bindFramebuffer(a.FRAMEBUFFER,s),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,o,0);var p=b[t+"_temp"];a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,p),a.uniform1i(c,1);var m=b[t+"_stripe"];a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,m),a.uniform1i(f,2),a.bindBuffer(a.ARRAY_BUFFER,h),a.enableVertexAttribArray(u),a.vertexAttribPointer(u,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,l),a.enableVertexAttribArray(d),a.vertexAttribPointer(d,2,a.FLOAT,!1,0,0),a.viewport(0,0,r,n),a.drawArrays(a.TRIANGLES,0,y.length/2),a.bindFramebuffer(a.FRAMEBUFFER,null)}function S(t,i,r){a.activeTexture(i),a.bindTexture(a.TEXTURE_2D,b[t]),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.uniform1i(a.getUniformLocation(e,t),r)}function k(t,e){var i=s(a.VERTEX_SHADER,t),r=s(a.FRAGMENT_SHADER,e),n=a.createProgram();if(a.attachShader(n,i),a.attachShader(n,r),a.linkProgram(n),!a.getProgramParameter(n,a.LINK_STATUS)){var o=a.getProgramInfoLog(n);throw a.deleteProgram(n),new Error("GL program linking failed: "+o)}return n}return o.drawFrame=function(s){var b=s.format,_=!e||t.width!==b.displayWidth||t.height!==b.displayHeight;if(_&&(t.width=b.displayWidth,t.height=b.displayHeight,o.clear()),e||function(){if(n.stripe){i=k(r.vertexStripe,r.fragmentStripe),a.getAttribLocation(i,"aPosition"),l=a.createBuffer();var t=new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]);a.bindBuffer(a.ARRAY_BUFFER,l),a.bufferData(a.ARRAY_BUFFER,t,a.STATIC_DRAW),d=a.getAttribLocation(i,"aTexturePosition"),f=a.getUniformLocation(i,"uStripe"),c=a.getUniformLocation(i,"uTexture")}e=k(r.vertex,r.fragment),h=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,h),a.bufferData(a.ARRAY_BUFFER,y,a.STATIC_DRAW),u=a.getAttribLocation(e,"aPosition"),p=a.createBuffer(),m=a.getAttribLocation(e,"aLumaPosition"),g=a.createBuffer(),v=a.getAttribLocation(e,"aChromaPosition")}(),_){var w=function(t,e,i){var r=b.cropLeft/i,n=(b.cropLeft+b.cropWidth)/i,o=(b.cropTop+b.cropHeight)/b.height,s=b.cropTop/b.height,h=new Float32Array([r,o,n,o,r,s,r,s,n,o,n,s]);a.bindBuffer(a.ARRAY_BUFFER,t),a.bufferData(a.ARRAY_BUFFER,h,a.STATIC_DRAW)};w(p,0,s.y.stride),w(g,0,s.u.stride*b.width/b.chromaWidth)}M("uTextureY",_,s.y.stride,b.height,s.y.bytes),M("uTextureCb",_,s.u.stride,b.chromaHeight,s.u.bytes),M("uTextureCr",_,s.v.stride,b.chromaHeight,s.v.bytes),n.stripe&&(E("uTextureY",_,s.y.stride,b.height),E("uTextureCb",_,s.u.stride,b.chromaHeight),E("uTextureCr",_,s.v.stride,b.chromaHeight)),a.useProgram(e),a.viewport(0,0,t.width,t.height),S("uTextureY",a.TEXTURE0,0),S("uTextureCb",a.TEXTURE1,1),S("uTextureCr",a.TEXTURE2,2),a.bindBuffer(a.ARRAY_BUFFER,h),a.enableVertexAttribArray(u),a.vertexAttribPointer(u,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,p),a.enableVertexAttribArray(m),a.vertexAttribPointer(m,2,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,g),a.enableVertexAttribArray(v),a.vertexAttribPointer(v,2,a.FLOAT,!1,0,0),a.drawArrays(a.TRIANGLES,0,y.length/2)},o.clear=function(){a.viewport(0,0,t.width,t.height),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT)},o.clear(),o}n.stripe=!1,n.contextForCanvas=function(t){var e={preferLowPowerToHighPerformance:!0,powerPreference:"low-power",failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!0};return t.getContext("webgl",e)||t.getContext("experimental-webgl",e)},n.isAvailable=function(){var t,e=document.createElement("canvas");e.width=1,e.height=1;try{t=n.contextForCanvas(e)}catch(t){return!1}if(t){var i=t.TEXTURE0,r=t.createTexture(),o=new Uint8Array(16),a=n.stripe?1:4,s=n.stripe?t.RGBA:t.ALPHA,h=n.stripe?t.NEAREST:t.LINEAR;return t.activeTexture(i),t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,h),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,h),t.texImage2D(t.TEXTURE_2D,0,s,a,4,0,s,t.UNSIGNED_BYTE,o),!t.getError()}return!1},n.prototype=Object.create(e.prototype),t.exports=n}()},function(t,e){t.exports={vertex:"precision mediump float;\n\nattribute vec2 aPosition;\nattribute vec2 aLumaPosition;\nattribute vec2 aChromaPosition;\nvarying vec2 vLumaPosition;\nvarying vec2 vChromaPosition;\nvoid main() {\n gl_Position = vec4(aPosition, 0, 1);\n vLumaPosition = aLumaPosition;\n vChromaPosition = aChromaPosition;\n}\n",fragment:"// inspired by https://github.com/mbebenita/Broadway/blob/master/Player/canvas.js\n\nprecision mediump float;\n\nuniform sampler2D uTextureY;\nuniform sampler2D uTextureCb;\nuniform sampler2D uTextureCr;\nvarying vec2 vLumaPosition;\nvarying vec2 vChromaPosition;\nvoid main() {\n // Y, Cb, and Cr planes are uploaded as ALPHA textures.\n float fY = texture2D(uTextureY, vLumaPosition).w;\n float fCb = texture2D(uTextureCb, vChromaPosition).w;\n float fCr = texture2D(uTextureCr, vChromaPosition).w;\n\n // Premultipy the Y...\n float fYmul = fY * 1.1643828125;\n\n // And convert that to RGB!\n gl_FragColor = vec4(\n fYmul + 1.59602734375 * fCr - 0.87078515625,\n fYmul - 0.39176171875 * fCb - 0.81296875 * fCr + 0.52959375,\n fYmul + 2.017234375 * fCb - 1.081390625,\n 1\n );\n}\n",vertexStripe:"precision mediump float;\n\nattribute vec2 aPosition;\nattribute vec2 aTexturePosition;\nvarying vec2 vTexturePosition;\n\nvoid main() {\n gl_Position = vec4(aPosition, 0, 1);\n vTexturePosition = aTexturePosition;\n}\n",fragmentStripe:"// extra 'stripe' texture fiddling to work around IE 11's poor performance on gl.LUMINANCE and gl.ALPHA textures\n\nprecision mediump float;\n\nuniform sampler2D uStripe;\nuniform sampler2D uTexture;\nvarying vec2 vTexturePosition;\nvoid main() {\n // Y, Cb, and Cr planes are mapped into a pseudo-RGBA texture\n // so we can upload them without expanding the bytes on IE 11\n // which doesn't allow LUMINANCE or ALPHA textures\n // The stripe textures mark which channel to keep for each pixel.\n // Each texture extraction will contain the relevant value in one\n // channel only.\n\n float fLuminance = dot(\n texture2D(uStripe, vTexturePosition),\n texture2D(uTexture, vTexturePosition)\n );\n\n gl_FragColor = vec4(0, 0, 0, fLuminance);\n}\n"}},function(t,e,i){"use strict";e.byteLength=function(t){var e=u(t),i=e[0],r=e[1];return 3*(i+r)/4-r},e.toByteArray=function(t){var e,i,r=u(t),a=r[0],s=r[1],h=new o(function(t,e,i){return 3*(e+i)/4-i}(0,a,s)),l=0,d=s>0?a-4:a;for(i=0;i<d;i+=4)e=n[t.charCodeAt(i)]<<18|n[t.charCodeAt(i+1)]<<12|n[t.charCodeAt(i+2)]<<6|n[t.charCodeAt(i+3)],h[l++]=e>>16&255,h[l++]=e>>8&255,h[l++]=255&e;2===s&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,h[l++]=255&e);1===s&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,h[l++]=e>>8&255,h[l++]=255&e);return h},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,o=[],a=16383,s=0,h=i-n;s<h;s+=a)o.push(l(t,s,s+a>h?h:s+a));1===n?(e=t[i-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,h=a.length;s<h;++s)r[s]=a[s],n[a.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function l(t,e,i){for(var n,o,a=[],s=e;s<i;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=n)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,i,r,n){var o,a,s=8*n-r-1,h=(1<<s)-1,u=h>>1,l=-7,d=i?n-1:0,f=i?-1:1,c=t[e+d];for(d+=f,o=c&(1<<-l)-1,c>>=-l,l+=s;l>0;o=256*o+t[e+d],d+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+d],d+=f,l-=8);if(0===o)o=1-u;else{if(o===h)return a?NaN:1/0*(c?-1:1);a+=Math.pow(2,r),o-=u}return(c?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,i,r,n,o){var a,s,h,u=8*o-n-1,l=(1<<u)-1,d=l>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:o-1,p=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-a))<1&&(a--,h*=2),(e+=a+d>=1?f/h:f*Math.pow(2,1-d))*h>=2&&(a++,h/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(e*h-1)*Math.pow(2,n),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,n),a=0));n>=8;t[i+c]=255&s,c+=p,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[i+c]=255&a,c+=p,a/=256,u-=8);t[i+c-p]|=128*m}},function(t,e,i){(function(e){var i;i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=i}).call(this,i(10))},function(t,e,i){(function(e,i){var r;r=function(){"use strict";function t(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},n=0,o=void 0,a=void 0,s=function(t,e){p[n]=t,p[n+1]=e,2===(n+=2)&&(a?a(m):v())},h="undefined"!=typeof window?window:void 0,u=h||{},l=u.MutationObserver||u.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function c(){var t=setTimeout;return function(){return t(m,1)}}var p=new Array(1e3);function m(){for(var t=0;t<n;t+=2)(0,p[t])(p[t+1]),p[t]=void 0,p[t+1]=void 0;n=0}var g,v=void 0;function y(t,e){var i=this,r=new this.constructor(w);void 0===r[_]&&x(r);var n=i._state;if(n){var o=arguments[n-1];s((function(){return C(n,r,o,i._result)}))}else R(i,r,t,e);return r}function b(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(w);return E(e,t),e}d?v=function(){return e.nextTick(m)}:l?v=function(){var t=0,e=new l(m),i=document.createTextNode("");return e.observe(i,{characterData:!0}),function(){i.data=t=++t%2}}():f?((g=new MessageChannel).port1.onmessage=m,v=function(){return g.port2.postMessage(0)}):v=void 0===h?function(){try{var t=Function("return this")().require("vertx");return void 0!==(o=t.runOnLoop||t.runOnContext)?function(){o(m)}:c()}catch(t){return c()}}():c();var _=Math.random().toString(36).substring(2);function w(){}var A=void 0;function M(e,i,r){i.constructor===e.constructor&&r===y&&i.constructor.resolve===b?function(t,e){1===e._state?k(t,e._result):2===e._state?T(t,e._result):R(e,void 0,(function(e){return E(t,e)}),(function(e){return T(t,e)}))}(e,i):void 0===r?k(e,i):t(r)?function(t,e,i){s((function(t){var r=!1,n=function(t,e,i,r){try{t.call(e,i,r)}catch(t){return t}}(i,e,(function(i){r||(r=!0,e!==i?E(t,i):k(t,i))}),(function(e){r||(r=!0,T(t,e))}),t._label);!r&&n&&(r=!0,T(t,n))}),t)}(e,i,r):k(e,i)}function E(t,e){if(t===e)T(t,new TypeError("You cannot resolve a promise with itself"));else if(n=typeof(r=e),null===r||"object"!==n&&"function"!==n)k(t,e);else{var i=void 0;try{i=e.then}catch(e){return void T(t,e)}M(t,e,i)}var r,n}function S(t){t._onerror&&t._onerror(t._result),I(t)}function k(t,e){t._state===A&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(I,t))}function T(t,e){t._state===A&&(t._state=2,t._result=e,s(S,t))}function R(t,e,i,r){var n=t._subscribers,o=n.length;t._onerror=null,n[o]=e,n[o+1]=i,n[o+2]=r,0===o&&t._state&&s(I,t)}function I(t){var e=t._subscribers,i=t._state;if(0!==e.length){for(var r=void 0,n=void 0,o=t._result,a=0;a<e.length;a+=3)r=e[a],n=e[a+i],r?C(i,r,n,o):n(o);t._subscribers.length=0}}function C(e,i,r,n){var o=t(r),a=void 0,s=void 0,h=!0;if(o){try{a=r(n)}catch(t){h=!1,s=t}if(i===a)return void T(i,new TypeError("A promises callback cannot return that same promise."))}else a=n;i._state!==A||(o&&h?E(i,a):!1===h?T(i,s):1===e?k(i,a):2===e&&T(i,a))}var P=0;function x(t){t[_]=P++,t._state=void 0,t._result=void 0,t._subscribers=[]}var D=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(w),this.promise[_]||x(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?k(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&k(this.promise,this._result))):T(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===A&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,r=i.resolve;if(r===b){var n=void 0,o=void 0,a=!1;try{n=t.then}catch(t){a=!0,o=t}if(n===y&&t._state!==A)this._settledAt(t._state,e,t._result);else if("function"!=typeof n)this._remaining--,this._result[e]=t;else if(i===O){var s=new i(w);a?T(s,o):M(s,t,n),this._willSettleAt(s,e)}else this._willSettleAt(new i((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,i){var r=this.promise;r._state===A&&(this._remaining--,2===t?T(r,i):this._result[e]=i),0===this._remaining&&k(r,this._result)},t.prototype._willSettleAt=function(t,e){var i=this;R(t,void 0,(function(t){return i._settledAt(1,e,t)}),(function(t){return i._settledAt(2,e,t)}))},t}(),O=function(){function e(t){this[_]=P++,this._result=this._state=void 0,this._subscribers=[],w!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){E(t,e)}),(function(e){T(t,e)}))}catch(e){T(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var i=this,r=i.constructor;return t(e)?i.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):i.then(e,e)},e}();return O.prototype.then=y,O.all=function(t){return new D(this,t).promise},O.race=function(t){var e=this;return r(t)?new e((function(i,r){for(var n=t.length,o=0;o<n;o++)e.resolve(t[o]).then(i,r)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))},O.resolve=b,O.reject=function(t){var e=new this(w);return T(e,t),e},O._setScheduler=function(t){a=t},O._setAsap=function(t){s=t},O._asap=s,O.polyfill=function(){var t=void 0;if(void 0!==i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=O},O.Promise=O,O},t.exports=r()}).call(this,i(8),i(10))},function(t,e){var i=arguments[3],r=arguments[4],n=arguments[5],o=JSON.stringify;t.exports=function(t,e){for(var a,s=Object.keys(n),h=0,u=s.length;h<u;h++){var l=s[h],d=n[l].exports;if(d===t||d&&d.default===t){a=l;break}}if(!a){a=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var f={};for(h=0,u=s.length;h<u;h++){f[l=s[h]]=l}r[a]=["function(require,module,exports){"+t+"(self); }",f]}var c=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[a]=a,r[c]=["function(require,module,exports){var f = require("+o(a)+");(f.default ? f.default : f)(self);}",p];var m={};!function t(e){for(var i in m[e]=!0,r[e][1]){var n=r[e][1][i];m[n]||t(n)}}(c);var g="("+i+")({"+Object.keys(m).map((function(t){return o(t)+":["+r[t][0]+","+o(r[t][1])+"]"})).join(",")+"},{},["+o(c)+"])",v=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([g],{type:"text/javascript"});if(e&&e.bare)return y;var b=v.createObjectURL(y),_=new Worker(b);return _.objectURL=b,_}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e){},function(t,e,i){(function(t){function i(t,e){for(var i=0,r=t.length-1;r>=0;r--){var n=t[r];"."===n?t.splice(r,1):".."===n?(t.splice(r,1),i++):i&&(t.splice(r,1),i--)}if(e)for(;i--;i)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var i=[],r=0;r<t.length;r++)e(t[r],r,t)&&i.push(t[r]);return i}e.resolve=function(){for(var e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,n="/"===a.charAt(0))}return(n?"/":"")+(e=i(r(e.split("/"),(function(t){return!!t})),!n).join("/"))||"."},e.normalize=function(t){var o=e.isAbsolute(t),a="/"===n(t,-1);return(t=i(r(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,i){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var i=t.length-1;i>=0&&""===t[i];i--);return e>i?[]:t.slice(e,i-e+1)}t=e.resolve(t).substr(1),i=e.resolve(i).substr(1);for(var n=r(t.split("/")),o=r(i.split("/")),a=Math.min(n.length,o.length),s=a,h=0;h<a;h++)if(n[h]!==o[h]){s=h;break}var u=[];for(h=s;h<n.length;h++)u.push("..");return(u=u.concat(o.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),i=47===e,r=-1,n=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!n){r=o;break}}else n=!1;return-1===r?i?"/":".":i&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var i=function(t){"string"!=typeof t&&(t+="");var e,i=0,r=-1,n=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!n){i=e+1;break}}else-1===r&&(n=!1,r=e+1);return-1===r?"":t.slice(i,r)}(t);return e&&i.substr(-1*e.length)===e&&(i=i.substr(0,i.length-e.length)),i},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,i=0,r=-1,n=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===r&&(n=!1,r=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!n){i=a+1;break}}return-1===e||-1===r||0===o||1===o&&e===r-1&&e===i+1?"":t.slice(e,r)};var n="b"==="ab".substr(-1)?function(t,e,i){return t.substr(e,i)}:function(t,e,i){return e<0&&(e=t.length+e),t.substr(e,i)}}).call(this,i(8))},function(t,e,i){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=i(25),e.createHash=e.Hash=i(35),e.createHmac=e.Hmac=i(92);var r=i(173),n=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);e.getHashes=function(){return o};var a=i(95);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync;var s=i(175);e.Cipher=s.Cipher,e.createCipher=s.createCipher,e.Cipheriv=s.Cipheriv,e.createCipheriv=s.createCipheriv,e.Decipher=s.Decipher,e.createDecipher=s.createDecipher,e.Decipheriv=s.Decipheriv,e.createDecipheriv=s.createDecipheriv,e.getCiphers=s.getCiphers,e.listCiphers=s.listCiphers;var h=i(190);e.DiffieHellmanGroup=h.DiffieHellmanGroup,e.createDiffieHellmanGroup=h.createDiffieHellmanGroup,e.getDiffieHellman=h.getDiffieHellman,e.createDiffieHellman=h.createDiffieHellman,e.DiffieHellman=h.DiffieHellman;var u=i(197);e.createSign=u.createSign,e.Sign=u.Sign,e.createVerify=u.createVerify,e.Verify=u.Verify,e.createECDH=i(238);var l=i(241);e.publicEncrypt=l.publicEncrypt,e.privateEncrypt=l.privateEncrypt,e.publicDecrypt=l.publicDecrypt,e.privateDecrypt=l.privateDecrypt;var d=i(245);e.randomFill=d.randomFill,e.randomFillSync=d.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,i){(e=t.exports=i(80)).Stream=e,e.Readable=e,e.Writable=i(84),e.Duplex=i(27),e.Transform=i(85),e.PassThrough=i(155),e.finished=i(54),e.pipeline=i(156)},function(t,e){},function(t,e,i){"use strict";function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a=i(9).Buffer,s=i(152).inspect,h=s&&s.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,i,u;return e=t,i=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,i,r,n=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,i=n,r=s,a.prototype.copy.call(e,i,r),s+=o.data.length,o=o.next;return n}},{key:"consume",value:function(t,e){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,i=1,r=e.data;for(t-=r.length;e=e.next;){var n=e.data,o=t>n.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0==(t-=o)){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(o));break}++r}return this.length-=r,e}},{key:h,value:function(t,e){return s(this,function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],i&&o(e.prototype,i),u&&o(e,u),t}()},function(t,e){},function(t,e,i){"use strict";(function(e){var r;function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var o=i(54),a=Symbol("lastResolve"),s=Symbol("lastReject"),h=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function c(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var i=t[f].read();null!==i&&(t[l]=null,t[a]=null,t[s]=null,e(c(i,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((n(r={get stream(){return this[f]},next:function(){var t=this,i=this[h];if(null!==i)return Promise.reject(i);if(this[u])return Promise.resolve(c(void 0,!0));if(this[f].destroyed)return new Promise((function(i,r){e.nextTick((function(){t[h]?r(t[h]):i(c(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(t,e){return function(i,r){t.then((function(){e[u]?i(c(void 0,!0)):e[d](i,r)}),r)}}(n,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(c(o,!1));r=new Promise(this[d])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var t=this;return new Promise((function(e,i){t[f].destroy(null,(function(t){t?i(t):e(c(void 0,!0))}))}))})),r),g);t.exports=function(t){var e,i=Object.create(v,(n(e={},f,{value:t,writable:!0}),n(e,a,{value:null,writable:!0}),n(e,s,{value:null,writable:!0}),n(e,h,{value:null,writable:!0}),n(e,u,{value:t._readableState.endEmitted,writable:!0}),n(e,d,{value:function(t,e){var r=i[f].read();r?(i[l]=null,i[a]=null,i[s]=null,t(c(r,!1))):(i[a]=t,i[s]=e)},writable:!0}),e));return i[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=i[s];return null!==e&&(i[l]=null,i[a]=null,i[s]=null,e(t)),void(i[h]=t)}var r=i[a];null!==r&&(i[l]=null,i[a]=null,i[s]=null,r(c(void 0,!0))),i[u]=!0})),t.on("readable",m.bind(null,i)),i}}).call(this,i(8))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,i){"use strict";t.exports=n;var r=i(85);function n(t){if(!(this instanceof n))return new n(t);r.call(this,t)}i(3)(n,r),n.prototype._transform=function(t,e,i){i(null,t)}},function(t,e,i){"use strict";var r;var n=i(26).codes,o=n.ERR_MISSING_ARGS,a=n.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function h(t,e,n,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=i(54)),r(t,{readable:e,writable:n},(function(t){if(t)return o(t);s=!0,o()}));var h=!1;return function(e){if(!s&&!h)return h=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function u(t){t()}function l(t,e){return t.pipe(e)}function d(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r,n=d(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,i){var o=i<e.length-1;return h(t,o,i>0,(function(t){r||(r=t),t&&a.forEach(u),o||(a.forEach(u),n(r))}))}));return e.reduce(l)}},function(t,e,i){var r=i(3),n=i(28),o=i(4).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function h(){this.init(),this._w=s,n.call(this,64,56)}function u(t){return t<<30|t>>>2}function l(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}r(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,d=0;d<16;++d)i[d]=t.readInt32BE(4*d);for(;d<80;++d)i[d]=i[d-3]^i[d-8]^i[d-14]^i[d-16];for(var f=0;f<80;++f){var c=~~(f/20),p=0|((e=r)<<5|e>>>27)+l(c,n,o,s)+h+i[f]+a[c];h=s,s=o,o=u(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},function(t,e,i){var r=i(3),n=i(28),o=i(4).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function h(){this.init(),this._w=s,n.call(this,64,56)}function u(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function d(t,e,i,r){return 0===t?e&i|~e&r:2===t?e&i|e&r|i&r:e^i^r}r(h,n),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e,i=this._w,r=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,h=0|this._e,f=0;f<16;++f)i[f]=t.readInt32BE(4*f);for(;f<80;++f)i[f]=(e=i[f-3]^i[f-8]^i[f-14]^i[f-16])<<1|e>>>31;for(var c=0;c<80;++c){var p=~~(c/20),m=u(r)+d(p,n,o,s)+h+i[c]+a[p]|0;h=s,s=o,o=l(n),n=r,r=m}this._a=r+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=h+this._e|0},h.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},function(t,e,i){var r=i(3),n=i(86),o=i(28),a=i(4).Buffer,s=new Array(64);function h(){this.init(),this._w=s,o.call(this,64,56)}r(h,n),h.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},h.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=h},function(t,e,i){var r=i(3),n=i(87),o=i(28),a=i(4).Buffer,s=new Array(160);function h(){this.init(),this._w=s,o.call(this,128,112)}r(h,n),h.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},h.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,i,r){t.writeInt32BE(e,r),t.writeInt32BE(i,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=h},function(t,e,i){t.exports=n;var r=i(6).EventEmitter;function n(){r.call(this)}i(3)(n,r),n.Readable=i(57),n.Writable=i(168),n.Duplex=i(169),n.Transform=i(170),n.PassThrough=i(171),n.Stream=n,n.prototype.pipe=function(t,e){var i=this;function n(e){t.writable&&!1===t.write(e)&&i.pause&&i.pause()}function o(){i.readable&&i.resume&&i.resume()}i.on("data",n),t.on("drain",o),t._isStdio||e&&!1===e.end||(i.on("end",s),i.on("close",h));var a=!1;function s(){a||(a=!0,t.end())}function h(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(l(),0===r.listenerCount(this,"error"))throw t}function l(){i.removeListener("data",n),t.removeListener("drain",o),i.removeListener("end",s),i.removeListener("close",h),i.removeListener("error",u),t.removeListener("error",u),i.removeListener("end",l),i.removeListener("close",l),t.removeListener("close",l)}return i.on("error",u),t.on("error",u),i.on("end",l),i.on("close",l),t.on("close",l),t.emit("pipe",i),t}},function(t,e){},function(t,e,i){"use strict";var r=i(58).Buffer,n=i(164);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,i,n,o=r.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,i=o,n=s,e.copy(i,n),s+=a.data.length,a=a.next;return o},t}(),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var t=n.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,i){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,n=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(n.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(n.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},i(166),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,i(10))},function(t,e,i){(function(t,e){!function(t,i){"use strict";if(!t.setImmediate){var r,n,o,a,s,h=1,u={},l=!1,d=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,i=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=i,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(n=d.documentElement,r=function(t){var e=d.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),r=function(e){t.postMessage(a+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i<e.length;i++)e[i]=arguments[i+1];var n={callback:t,args:e};return u[h]=n,r(h),h++},f.clearImmediate=c}function c(t){delete u[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=u[t];if(e){l=!0;try{!function(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(void 0,i)}}(e)}finally{c(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,i(10),i(8))},function(t,e,i){"use strict";t.exports=o;var r=i(91),n=Object.create(i(36));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}n.inherits=i(3),n.inherits(o,r),o.prototype._transform=function(t,e,i){i(null,t)}},function(t,e,i){t.exports=i(59)},function(t,e,i){t.exports=i(19)},function(t,e,i){t.exports=i(57).Transform},function(t,e,i){t.exports=i(57).PassThrough},function(t,e,i){"use strict";var r=i(3),n=i(4).Buffer,o=i(17),a=n.alloc(128),s=64;function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=n.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length<s&&(e=n.concat([e,a],s));for(var i=this._ipad=n.allocUnsafe(s),r=this._opad=n.allocUnsafe(s),h=0;h<s;h++)i[h]=54^e[h],r[h]=92^e[h];this._hash=[i]}r(h,o),h.prototype._update=function(t){this._hash.push(t)},h.prototype._final=function(){var t=this._alg(n.concat(this._hash));return this._alg(n.concat([this._opad,t]))},t.exports=h},function(t,e,i){t.exports=i(94)},function(t,e,i){(function(e){var r,n,o=i(4).Buffer,a=i(96),s=i(97),h=i(98),u=i(99),l=e.crypto&&e.crypto.subtle,d={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},f=[];function c(){return n||(n=e.process&&e.process.nextTick?e.process.nextTick:e.queueMicrotask?e.queueMicrotask:e.setImmediate?e.setImmediate:e.setTimeout)}function p(t,e,i,r,n){return l.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return l.deriveBits({name:"PBKDF2",salt:e,iterations:i,hash:{name:n}},t,r<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,i,n,m,g,v){"function"==typeof g&&(v=g,g=void 0);var y=d[(g=g||"sha1").toLowerCase()];if(y&&"function"==typeof e.Promise){if(a(n,m),t=u(t,s,"Password"),i=u(i,s,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){c()((function(){e(null,t)}))}),(function(t){c()((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==f[t])return f[t];var i=p(r=r||o.alloc(8),r,10,128,t).then((function(){return!0})).catch((function(){return!1}));return f[t]=i,i}(y).then((function(e){return e?p(t,i,n,m,y):h(t,i,n,m,g)})),v)}else c()((function(){var e;try{e=h(t,i,n,m,g)}catch(t){return v(t)}v(null,e)}))}}).call(this,i(10))},function(t,e,i){var r=i(176),n=i(61),o=i(62),a=i(189),s=i(44);function h(t,e,i){if(t=t.toLowerCase(),o[t])return n.createCipheriv(t,e,i);if(a[t])return new r({key:e,iv:i,mode:t});throw new TypeError("invalid suite type")}function u(t,e,i){if(t=t.toLowerCase(),o[t])return n.createDecipheriv(t,e,i);if(a[t])return new r({key:e,iv:i,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var i,r;if(t=t.toLowerCase(),o[t])i=o[t].key,r=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");i=8*a[t].key,r=a[t].iv}var n=s(e,!1,i,r);return h(t,n.key,n.iv)},e.createCipheriv=e.Cipheriv=h,e.createDecipher=e.Decipher=function(t,e){var i,r;if(t=t.toLowerCase(),o[t])i=o[t].key,r=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");i=8*a[t].key,r=a[t].iv}var n=s(e,!1,i,r);return u(t,n.key,n.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(a).concat(n.getCiphers())}},function(t,e,i){var r=i(17),n=i(177),o=i(3),a=i(4).Buffer,s={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function h(t){r.call(this);var e,i=t.mode.toLowerCase(),n=s[i];e=t.decrypt?"decrypt":"encrypt";var o=t.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==i&&"des-ede-cbc"!==i||(o=a.concat([o,o.slice(0,8)]));var h=t.iv;a.isBuffer(h)||(h=a.from(h)),this._des=n.create({key:o,iv:h,type:e})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],t.exports=h,o(h,r),h.prototype._update=function(t){return a.from(this._des.update(t))},h.prototype._final=function(){return a.from(this._des.final())}},function(t,e,i){"use strict";e.utils=i(100),e.Cipher=i(60),e.DES=i(101),e.CBC=i(178),e.EDE=i(179)},function(t,e,i){"use strict";var r=i(13),n=i(3),o={};function a(t){r.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}n(e,t);for(var i=Object.keys(o),r=0;r<i.length;r++){var a=i[r];e.prototype[a]=o[a]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new a(this.options.iv);this._cbcState=t},o._update=function(t,e,i,r){var n=this._cbcState,o=this.constructor.super_.prototype,a=n.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=t[e+s];o._update.call(this,a,0,i,r);for(s=0;s<this.blockSize;s++)a[s]=i[r+s]}else{o._update.call(this,t,e,i,r);for(s=0;s<this.blockSize;s++)i[r+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=t[e+s]}}},function(t,e,i){"use strict";var r=i(13),n=i(3),o=i(60),a=i(101);function s(t,e){r.equal(e.length,24,"Invalid key length");var i=e.slice(0,8),n=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:n}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:i})]}function h(t){o.call(this,t);var e=new s(this.type,this.options.key);this._edeState=e}n(h,o),t.exports=h,h.create=function(t){return new h(t)},h.prototype._update=function(t,e,i,r){var n=this._edeState;n.ciphers[0]._update(t,e,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},h.prototype._pad=a.prototype._pad,h.prototype._unpad=a.prototype._unpad},function(t,e,i){var r=i(62),n=i(105),o=i(4).Buffer,a=i(106),s=i(17),h=i(43),u=i(44);function l(t,e,i){s.call(this),this._cache=new f,this._cipher=new h.AES(e),this._prev=o.from(i),this._mode=t,this._autopadding=!0}i(3)(l,s),l.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get();)i=this._mode.encrypt(this,e),r.push(i);return o.concat(r)};var d=o.alloc(16,16);function f(){this.cache=o.allocUnsafe(0)}function c(t,e,i){var s=r[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof i&&(i=o.from(i)),"GCM"!==s.mode&&i.length!==s.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===s.type?new a(s.module,e,i):"auth"===s.type?new n(s.module,e,i):new l(s.module,e,i)}l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(d))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=o.concat([this.cache,t])},f.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},f.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),i=-1;++i<t;)e.writeUInt8(t,i);return o.concat([this.cache,e])},e.createCipheriv=c,e.createCipher=function(t,e){var i=r[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var n=u(e,!1,i.key,i.iv);return c(t,n.key,n.iv)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,i){var r=i(37);e.encrypt=function(t,e){var i=r(e,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},e.decrypt=function(t,e){var i=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return r(n,i)}},function(t,e,i){var r=i(4).Buffer,n=i(37);function o(t,e,i){var o=e.length,a=n(e,t._cache);return t._cache=t._cache.slice(o),t._prev=r.concat([t._prev,i?e:a]),a}e.encrypt=function(t,e,i){for(var n,a=r.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){a=r.concat([a,o(t,e,i)]);break}n=t._cache.length,a=r.concat([a,o(t,e.slice(0,n),i)]),e=e.slice(n)}return a}},function(t,e,i){var r=i(4).Buffer;function n(t,e,i){var n=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=r.concat([t._prev.slice(1),r.from([i?e:n])]),n}e.encrypt=function(t,e,i){for(var o=e.length,a=r.allocUnsafe(o),s=-1;++s<o;)a[s]=n(t,e[s],i);return a}},function(t,e,i){var r=i(4).Buffer;function n(t,e,i){for(var r,n,a=-1,s=0;++a<8;)r=e&1<<7-a?128:0,s+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^r))>>a%8,t._prev=o(t._prev,i?r:n);return s}function o(t,e){var i=t.length,n=-1,o=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++n<i;)o[n]=t[n]<<1|t[n+1]>>7;return o}e.encrypt=function(t,e,i){for(var o=e.length,a=r.allocUnsafe(o),s=-1;++s<o;)a[s]=n(t,e[s],i);return a}},function(t,e,i){(function(t){var r=i(37);function n(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,i){for(;e._cache.length<i.length;)e._cache=t.concat([e._cache,n(e)]);var o=e._cache.slice(0,i.length);return e._cache=e._cache.slice(i.length),r(i,o)}}).call(this,i(9).Buffer)},function(t,e,i){var r=i(4).Buffer,n=r.alloc(16,0);function o(t){var e=r.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},a.prototype._multiply=function(){for(var t,e,i,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],n=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),i=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=o(n)},a.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},function(t,e,i){var r=i(105),n=i(4).Buffer,o=i(62),a=i(106),s=i(17),h=i(43),u=i(44);function l(t,e,i){s.call(this),this._cache=new d,this._last=void 0,this._cipher=new h.AES(e),this._prev=n.from(i),this._mode=t,this._autopadding=!0}function d(){this.cache=n.allocUnsafe(0)}function f(t,e,i){var s=o[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=n.from(i)),"GCM"!==s.mode&&i.length!==s.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof e&&(e=n.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===s.type?new a(s.module,e,i,!0):"auth"===s.type?new r(s.module,e,i,!0):new l(s.module,e,i)}i(3)(l,s),l.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,e),r.push(i);return n.concat(r)},l.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<e;)if(t[i+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},d.prototype.add=function(t){this.cache=n.concat([this.cache,t])},d.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},d.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var i=o[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=u(e,!1,i.key,i.iv);return f(t,r.key,r.iv)},e.createDecipheriv=f},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,i){(function(t){var r=i(107),n=i(195),o=i(196);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var i=new t(n[e].prime,"hex"),r=new t(n[e].gen,"hex");return new o(i,r)},e.createDiffieHellman=e.DiffieHellman=function e(i,n,s,h){return t.isBuffer(n)||void 0===a[n]?e(i,"binary",n,s):(n=n||"binary",h=h||"binary",s=s||new t([2]),t.isBuffer(s)||(s=new t(s,h)),"number"==typeof i?new o(r(i,s),s,!0):(t.isBuffer(i)||(i=new t(i,n)),new o(i,s,!0)))}}).call(this,i(9).Buffer)},function(t,e){},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(193).Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),a=e;a<o;a++){var s=t.charCodeAt(a)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},o.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,a=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,a=o%r,s=Math.min(o,o-a)+i,h=0,l=i;l<s;l+=r)h=u(t,l,l+r,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==a){var d=1;for(h=u(t,l,t.length,e),l=0;l<a;l++)d*=e;this.imuln(d),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,h=a/67108864|0;i.words[0]=s;for(var u=1;u<r;u++){for(var l=h>>>26,d=67108863&h,f=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=f;c++){var p=u-c|0;l+=(a=(n=0|t.words[p])*(o=0|e.words[c])+d)/67108864|0,d=67108863&a}i.words[u]=0|d,h=0|l}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],h=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||a!==this.length-1?l[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],c=f[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);i=(p=p.idivn(c)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,h="le"===e,u=new t(o),l=this.clone();if(h){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-n;s++)u[s]=0;for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|i.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<i.length;a++)o=(e=(0|i.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<i.length&&i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this.length=Math.max(this.length,a),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,i){var r,n,o,a=t.words,s=e.words,h=i.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,c=0|a[1],p=8191&c,m=c>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],_=8191&b,w=b>>>13,A=0|a[4],M=8191&A,E=A>>>13,S=0|a[5],k=8191&S,T=S>>>13,R=0|a[6],I=8191&R,C=R>>>13,P=0|a[7],x=8191&P,D=P>>>13,O=0|a[8],B=8191&O,L=O>>>13,W=0|a[9],N=8191&W,F=W>>>13,U=0|s[0],j=8191&U,V=U>>>13,H=0|s[1],z=8191&H,G=H>>>13,q=0|s[2],X=8191&q,Z=q>>>13,K=0|s[3],Q=8191&K,Y=K>>>13,J=0|s[4],$=8191&J,tt=J>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ht=8191&st,ut=st>>>13,lt=0|s[8],dt=8191<,ft=lt>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(d,j))|0)+((8191&(n=(n=Math.imul(d,V))+Math.imul(f,j)|0))<<13)|0;u=((o=Math.imul(f,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,j),n=(n=Math.imul(p,V))+Math.imul(m,j)|0,o=Math.imul(m,V);var vt=(u+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(f,z)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,j),n=(n=Math.imul(v,V))+Math.imul(y,j)|0,o=Math.imul(y,V),r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,j),n=(n=Math.imul(_,V))+Math.imul(w,j)|0,o=Math.imul(w,V),r=r+Math.imul(v,z)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Z)|0;var bt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,Y)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,j),n=(n=Math.imul(M,V))+Math.imul(E,j)|0,o=Math.imul(E,V),r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var _t=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,tt)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,V))+Math.imul(T,j)|0,o=Math.imul(T,V),r=r+Math.imul(M,z)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(r=r+Math.imul(d,it)|0)|0)+((8191&(n=(n=n+Math.imul(d,rt)|0)+Math.imul(f,it)|0))<<13)|0;u=((o=o+Math.imul(f,rt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,j),n=(n=Math.imul(I,V))+Math.imul(C,j)|0,o=Math.imul(C,V),r=r+Math.imul(k,z)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var At=(u+(r=r+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,at)|0)+Math.imul(f,ot)|0))<<13)|0;u=((o=o+Math.imul(f,at)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(x,j),n=(n=Math.imul(x,V))+Math.imul(D,j)|0,o=Math.imul(D,V),r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(u+(r=r+Math.imul(d,ht)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(f,ht)|0))<<13)|0;u=((o=o+Math.imul(f,ut)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,j),n=(n=Math.imul(B,V))+Math.imul(L,j)|0,o=Math.imul(L,V),r=r+Math.imul(x,z)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,it)|0,n=(n=n+Math.imul(_,rt)|0)+Math.imul(w,it)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((o=o+Math.imul(f,ft)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),n=(n=Math.imul(N,V))+Math.imul(F,j)|0,o=Math.imul(F,V),r=r+Math.imul(B,z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(L,z)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(M,it)|0,n=(n=n+Math.imul(M,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,n=(n=n+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ut)|0,r=r+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,o=o+Math.imul(m,ft)|0;var St=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((o=o+Math.imul(f,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,G))+Math.imul(F,z)|0,o=Math.imul(F,G),r=r+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(M,ot)|0,n=(n=n+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,ht)|0,n=(n=n+Math.imul(_,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,r=r+Math.imul(v,dt)|0,n=(n=n+Math.imul(v,ft)|0)+Math.imul(y,dt)|0,o=o+Math.imul(y,ft)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),r=r+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(C,it)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(M,ht)|0,n=(n=n+Math.imul(M,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(_,dt)|0,n=(n=n+Math.imul(_,ft)|0)+Math.imul(w,dt)|0,o=o+Math.imul(w,ft)|0;var Tt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,it)|0,n=(n=n+Math.imul(x,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(k,ht)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(M,dt)|0,n=(n=n+Math.imul(M,ft)|0)+Math.imul(E,dt)|0,o=o+Math.imul(E,ft)|0;var Rt=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(n=(n=n+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ut)|0,r=r+Math.imul(k,dt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(T,dt)|0,o=o+Math.imul(T,ft)|0;var It=(u+(r=r+Math.imul(M,pt)|0)|0)+((8191&(n=(n=n+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,dt)|0,n=(n=n+Math.imul(I,ft)|0)+Math.imul(C,dt)|0,o=o+Math.imul(C,ft)|0;var Ct=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(x,dt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(D,dt)|0,o=o+Math.imul(D,ft)|0;var Pt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(N,ht),n=(n=Math.imul(N,ut))+Math.imul(F,ht)|0,o=Math.imul(F,ut),r=r+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(L,dt)|0,o=o+Math.imul(L,ft)|0;var xt=(u+(r=r+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,dt),n=(n=Math.imul(N,ft))+Math.imul(F,dt)|0,o=Math.imul(F,ft);var Dt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ot=(u+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,h[0]=gt,h[1]=vt,h[2]=yt,h[3]=bt,h[4]=_t,h[5]=wt,h[6]=At,h[7]=Mt,h[8]=Et,h[9]=St,h[10]=kt,h[11]=Tt,h[12]=Rt,h[13]=It,h[14]=Ct,h[15]=Pt,h[16]=xt,h[17]=Dt,h[18]=Ot,0!==u&&(h[19]=u,i.length++),i};function m(t,e,i){return(new g).mulp(t,e,i)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=c),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?p(this,t,e):r<63?c(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var a=n;n=0;for(var s=67108863&r,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var l=o-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):m(this,t,e),i},g.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},g.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},g.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a<o;a++)r[a]=e[t[a]],n[a]=i[t[a]]},g.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,h=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var d=h,f=u,c=0;c<a;c++){var p=i[l+c],m=r[l+c],g=i[l+c+a],v=r[l+c+a],y=d*g-f*v;v=d*v+f*g,g=y,i[l+c]=p+g,r[l+c]=m+v,i[l+c+a]=p-g,r[l+c+a]=m-v,c!==s&&(y=h*d-u*f,f=h*f+u*d,d=y)}},g.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},g.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,i,n){for(var o=0,a=0;a<e;a++)o+=0|t[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},g.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),h=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=i.words;f.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,u,r),this.transform(a,o,s,h,r,n),this.transform(u,o,l,d,r,n);for(var c=0;c<r;c++){var p=s[c]*l[c]-h[c]*d[c];h[c]=s[c]*d[c]+h[c]*l[c],s[c]=p}return this.conjugate(s,h,r),this.transform(s,h,f,o,r,n),this.conjugate(f,o,r),this.normalize13b(f,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,i=0;i<this.length;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,h=(0|this.words[e])-s<<i;this.words[e]=h|a,a=s>>>26-i}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,h=i;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=n);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return h&&0!==l&&(h.words[h.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,i){var n,o,a=t.length+i;this._expand(a);var s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+s;var h=(0|t.words[n])*e;s=((o-=67108863&h)>>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)s=(o=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,a=0|n.words[n.length-1];0!==(i=26-this._countBits(a))&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var s,h=r.length-n.length;if("mod"!==e){(s=new o(null)).length=h+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(n,1,h);0===l.negative&&(r=l,s&&(s.words[h]=1));for(var d=h-1;d>=0;d--){var f=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(n,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),h=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var l=i.clone(),d=e.clone();!e.isZero();){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(l),a.isub(d)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||h.isOdd())&&(s.iadd(l),h.isub(d)),s.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(s),a.isub(h)):(i.isub(e),s.isub(n),h.isub(a))}return{a:s,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var d=0,f=1;0==(i.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);e.cmp(i)>=0?(e.isub(i),a.isub(s)):(i.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(a&i)<<4|o>>>22,o=a}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(w,y),n(A,y),A.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var s=new o(1).toRed(this),h=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(h);)l.redIAdd(h);for(var d=this.pow(l,n),f=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=a;0!==c.cmp(s);){for(var m=c,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),c=c.redMul(d),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var n=i[0],a=0,s=0,h=e.bitLength()%26;for(0===h&&(h=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=h-1;l>=0;l--){var d=u>>l&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(n=this.mul(n,i[a]),s=0,a=0)):s=0}h=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,i(20)(t))},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(t,e,i){(function(e){var r=i(108),n=new(i(109)),o=new r(24),a=new r(11),s=new r(10),h=new r(3),u=new r(7),l=i(107),d=i(25);function f(t,i){return i=i||"utf8",e.isBuffer(t)||(t=new e(t,i)),this._pub=new r(t),this}function c(t,i){return i=i||"utf8",e.isBuffer(t)||(t=new e(t,i)),this._priv=new r(t),this}t.exports=m;var p={};function m(t,e,i){this.setGenerator(e),this.__prime=new r(t),this._prime=r.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=f,this.setPrivateKey=c):this._primeCode=8}function g(t,i){var r=new e(t.toArray());return i?r.toString(i):r}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var i=e.toString("hex"),r=[i,t.toString(16)].join("_");if(r in p)return p[r];var d,f=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!n.test(t))return f+=1,f+="02"===i||"05"===i?8:4,p[r]=f,f;switch(n.test(t.shrn(1))||(f+=2),i){case"02":t.mod(o).cmp(a)&&(f+=8);break;case"05":(d=t.mod(s)).cmp(h)&&d.cmp(u)&&(f+=8);break;default:f+=4}return p[r]=f,f}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(t){var i=(t=(t=new r(t)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new e(i.toArray()),o=this.getPrime();if(n.length<o.length){var a=new e(o.length-n.length);a.fill(0),n=e.concat([a,n])}return n},m.prototype.getPublicKey=function(t){return g(this._pub,t)},m.prototype.getPrivateKey=function(t){return g(this._priv,t)},m.prototype.getPrime=function(t){return g(this.__prime,t)},m.prototype.getGenerator=function(t){return g(this._gen,t)},m.prototype.setGenerator=function(t,i){return i=i||"utf8",e.isBuffer(t)||(t=new e(t,i)),this.__gen=t,this._gen=new r(t),this}}).call(this,i(9).Buffer)},function(t,e,i){var r=i(4).Buffer,n=i(35),o=i(198),a=i(3),s=i(206),h=i(237),u=i(94);function l(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function d(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function f(t){return new l(t)}function c(t){return new d(t)}Object.keys(u).forEach((function(t){u[t].id=r.from(u[t].id,"hex"),u[t.toLowerCase()]=u[t]})),a(l,o.Writable),l.prototype._write=function(t,e,i){this._hash.update(t),i()},l.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},l.prototype.sign=function(t,e){this.end();var i=this._hash.digest(),r=s(i,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},a(d,o.Writable),d.prototype._write=function(t,e,i){this._hash.update(t),i()},d.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},d.prototype.verify=function(t,e,i){"string"==typeof e&&(e=r.from(e,i)),this.end();var n=this._hash.digest();return h(e,n,t,this._signType,this._tag)},t.exports={Sign:f,Verify:c,createSign:f,createVerify:c}},function(t,e,i){(e=t.exports=i(110)).Stream=e,e.Readable=e,e.Writable=i(114),e.Duplex=i(30),e.Transform=i(115),e.PassThrough=i(204),e.finished=i(64),e.pipeline=i(205)},function(t,e){},function(t,e,i){"use strict";function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a=i(9).Buffer,s=i(201).inspect,h=s&&s.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,i,u;return e=t,i=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,i=""+e.data;e=e.next;)i+=t+e.data;return i}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,i,r,n=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,i=n,r=s,a.prototype.copy.call(e,i,r),s+=o.data.length,o=o.next;return n}},{key:"consume",value:function(t,e){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,i=1,r=e.data;for(t-=r.length;e=e.next;){var n=e.data,o=t>n.length?n.length:t;if(o===n.length?r+=n:r+=n.slice(0,t),0==(t-=o)){o===n.length?(++i,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++i}return this.length-=i,r}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),i=this.head,r=1;for(i.data.copy(e),t-=i.data.length;i=i.next;){var n=i.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0==(t-=o)){o===n.length?(++r,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=n.slice(o));break}++r}return this.length-=r,e}},{key:h,value:function(t,e){return s(this,function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],i&&o(e.prototype,i),u&&o(e,u),t}()},function(t,e){},function(t,e,i){"use strict";(function(e){var r;function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var o=i(64),a=Symbol("lastResolve"),s=Symbol("lastReject"),h=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function c(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var i=t[f].read();null!==i&&(t[l]=null,t[a]=null,t[s]=null,e(c(i,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((n(r={get stream(){return this[f]},next:function(){var t=this,i=this[h];if(null!==i)return Promise.reject(i);if(this[u])return Promise.resolve(c(void 0,!0));if(this[f].destroyed)return new Promise((function(i,r){e.nextTick((function(){t[h]?r(t[h]):i(c(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(t,e){return function(i,r){t.then((function(){e[u]?i(c(void 0,!0)):e[d](i,r)}),r)}}(n,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(c(o,!1));r=new Promise(this[d])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var t=this;return new Promise((function(e,i){t[f].destroy(null,(function(t){t?i(t):e(c(void 0,!0))}))}))})),r),g);t.exports=function(t){var e,i=Object.create(v,(n(e={},f,{value:t,writable:!0}),n(e,a,{value:null,writable:!0}),n(e,s,{value:null,writable:!0}),n(e,h,{value:null,writable:!0}),n(e,u,{value:t._readableState.endEmitted,writable:!0}),n(e,d,{value:function(t,e){var r=i[f].read();r?(i[l]=null,i[a]=null,i[s]=null,t(c(r,!1))):(i[a]=t,i[s]=e)},writable:!0}),e));return i[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=i[s];return null!==e&&(i[l]=null,i[a]=null,i[s]=null,e(t)),void(i[h]=t)}var r=i[a];null!==r&&(i[l]=null,i[a]=null,i[s]=null,r(c(void 0,!0))),i[u]=!0})),t.on("readable",m.bind(null,i)),i}}).call(this,i(8))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,i){"use strict";t.exports=n;var r=i(115);function n(t){if(!(this instanceof n))return new n(t);r.call(this,t)}i(3)(n,r),n.prototype._transform=function(t,e,i){i(null,t)}},function(t,e,i){"use strict";var r;var n=i(29).codes,o=n.ERR_MISSING_ARGS,a=n.ERR_STREAM_DESTROYED;function s(t){if(t)throw t}function h(t,e,n,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===r&&(r=i(64)),r(t,{readable:e,writable:n},(function(t){if(t)return o(t);s=!0,o()}));var h=!1;return function(e){if(!s&&!h)return h=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new a("pipe"))}}function u(t){t()}function l(t,e){return t.pipe(e)}function d(t){return t.length?"function"!=typeof t[t.length-1]?s:t.pop():s}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r,n=d(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var a=e.map((function(t,i){var o=i<e.length-1;return h(t,o,i>0,(function(t){r||(r=t),t&&a.forEach(u),o||(a.forEach(u),n(r))}))}));return e.reduce(l)}},function(t,e,i){var r=i(4).Buffer,n=i(92),o=i(65),a=i(67).ec,s=i(66),h=i(46),u=i(127);function l(t,e,i,o){if((t=r.from(t.toArray())).length<e.byteLength()){var a=r.alloc(e.byteLength()-t.length);t=r.concat([a,t])}var s=i.length,h=function(t,e){t=(t=d(t,e)).mod(e);var i=r.from(t.toArray());if(i.length<e.byteLength()){var n=r.alloc(e.byteLength()-i.length);i=r.concat([n,i])}return i}(i,e),u=r.alloc(s);u.fill(1);var l=r.alloc(s);return l=n(o,l).update(u).update(r.from([0])).update(t).update(h).digest(),u=n(o,l).update(u).digest(),{k:l=n(o,l).update(u).update(r.from([1])).update(t).update(h).digest(),v:u=n(o,l).update(u).digest()}}function d(t,e){var i=new s(t),r=(t.length<<3)-e.bitLength();return r>0&&i.ishrn(r),i}function f(t,e,i){var o,a;do{for(o=r.alloc(0);8*o.length<t.bitLength();)e.v=n(i,e.k).update(e.v).digest(),o=r.concat([o,e.v]);a=d(o,t),e.k=n(i,e.k).update(e.v).update(r.from([0])).digest(),e.v=n(i,e.k).update(e.v).digest()}while(-1!==a.cmp(t));return a}function c(t,e,i,r){return t.toRed(s.mont(i)).redPow(e).fromRed().mod(r)}t.exports=function(t,e,i,n,p){var m=h(e);if(m.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return function(t,e){var i=u[e.curve.join(".")];if(!i)throw new Error("unknown curve "+e.curve.join("."));var n=new a(i).keyFromPrivate(e.privateKey).sign(t);return r.from(n.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==n)throw new Error("wrong private key type");return function(t,e,i){var n,o=e.params.priv_key,a=e.params.p,h=e.params.q,u=e.params.g,p=new s(0),m=d(t,h).mod(h),g=!1,v=l(o,h,t,i);for(;!1===g;)p=c(u,n=f(h,v,i),a,h),0===(g=n.invm(h).imul(m.add(o.mul(p))).mod(h)).cmpn(0)&&(g=!1,p=new s(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t));128&e[0]&&(e=[0].concat(e));var i=[48,t.length+e.length+4,2,t.length];return i=i.concat(t,[2,e.length],e),r.from(i)}(p,g)}(t,m,i)}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");t=r.concat([p,t]);for(var g=m.modulus.byteLength(),v=[0,1];t.length+v.length+1<g;)v.push(255);v.push(0);for(var y=-1;++y<t.length;)v.push(t[y]);return o(v,m)},t.exports.getKey=l,t.exports.makeKey=f},function(t,e){},function(t){t.exports=JSON.parse('{"_args":[["elliptic@6.5.4","G:\\\\yolin\\\\SkeyeWebPlayerSourceCode"]],"_from":"elliptic@6.5.4","_id":"elliptic@6.5.4","_inBundle":false,"_integrity":"sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.4","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.4","saveSpec":null,"fetchSpec":"6.5.4"},"_requiredBy":["/browserify-sign","/create-ecdh"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz","_spec":"6.5.4","_where":"G:\\\\yolin\\\\SkeyeWebPlayerSourceCode","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},"description":"EC cryptography","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.4"}')},function(t,e){},function(t,e,i){"use strict";var r=i(14),n=i(16),o=i(3),a=i(45),s=r.assert;function h(t){a.call(this,"short",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(t,e,i,r){a.BasePoint.call(this,t,"affine"),null===e&&null===i?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(e,16),this.y=new n(i,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(t,e,i,r){a.BasePoint.call(this,t,"jacobian"),null===e&&null===i&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(e,16),this.y=new n(i,16),this.z=new n(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(h,a),t.exports=h,h.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,i;if(t.beta)e=new n(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)i=new n(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?i=o[0]:(i=o[1],s(0===this.g.mul(i).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:i,basis:t.basis?t.basis.map((function(t){return{a:new n(t.a,16),b:new n(t.b,16)}})):this._getEndoBasis(i)}}},h.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:n.mont(t),i=new n(2).toRed(e).redInvm(),r=i.redNeg(),o=new n(3).toRed(e).redNeg().redSqrt().redMul(i);return[r.redAdd(o).fromRed(),r.redSub(o).fromRed()]},h.prototype._getEndoBasis=function(t){for(var e,i,r,o,a,s,h,u,l,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=t,c=this.n.clone(),p=new n(1),m=new n(0),g=new n(0),v=new n(1),y=0;0!==f.cmpn(0);){var b=c.div(f);u=c.sub(b.mul(f)),l=g.sub(b.mul(p));var _=v.sub(b.mul(m));if(!r&&u.cmp(d)<0)e=h.neg(),i=p,r=u.neg(),o=l;else if(r&&2==++y)break;h=u,c=f,f=u,g=p,p=l,v=m,m=_}a=u.neg(),s=l;var w=r.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(w)>=0&&(a=e,s=i),r.negative&&(r=r.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:r,b:o},{a:a,b:s}]},h.prototype._endoSplit=function(t){var e=this.endo.basis,i=e[0],r=e[1],n=r.b.mul(t).divRound(this.n),o=i.b.neg().mul(t).divRound(this.n),a=n.mul(i.a),s=o.mul(r.a),h=n.mul(i.b),u=o.mul(r.b);return{k1:t.sub(a).sub(s),k2:h.add(u).neg()}},h.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=i.redSqrt();if(0!==r.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(e&&!o||!e&&o)&&(r=r.redNeg()),this.point(t,r)},h.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,i=t.y,r=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===i.redSqr().redISub(n).cmpn(0)},h.prototype._endoWnafMulAdd=function(t,e,i){for(var r=this._endoWnafT1,n=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),s=t[o],h=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),h=h.neg(!0)),r[2*o]=s,r[2*o+1]=h,n[2*o]=a.k1,n[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,r,n,2*o,i),l=0;l<2*o;l++)r[l]=null,n[l]=null;return u},o(u,a.BasePoint),h.prototype.point=function(t,e,i){return new u(this,t,e,i)},h.prototype.pointFromJSON=function(t,e){return u.fromJSON(this,t,e)},u.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,r=function(t){return i.point(t.x.redMul(i.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},u.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},u.fromJSON=function(t,e,i){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],i);if(!e[2])return r;function n(e){return t.point(e[0],e[1],i)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(n))}},r},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var i=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,r)},u.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,i=this.x.redSqr(),r=t.redInvm(),n=i.redAdd(i).redIAdd(i).redIAdd(e).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),a=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(t){return t=new n(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},u.prototype.jmulAdd=function(t,e,i){var r=[this,e],n=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},u.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},u.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(r)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(r)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),h.prototype.jpoint=function(t,e,i){return new l(this,t,e,i)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),i=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(i,r)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),i=this.z.redSqr(),r=this.x.redMul(e),n=t.x.redMul(i),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(i.redMul(this.z)),s=r.redSub(n),h=o.redSub(a);if(0===s.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),d=r.redMul(u),f=h.redSqr().redIAdd(l).redISub(d).redISub(d),c=h.redMul(d.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(f,c,p)},l.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),i=this.x,r=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),a=i.redSub(r),s=n.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=a.redSqr(),u=h.redMul(a),l=i.redMul(h),d=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(d)).redISub(n.redMul(u)),c=this.z.redMul(a);return this.curve.jpoint(d,f,c)},l.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var i=this;for(e=0;e<t;e++)i=i.dbl();return i}var r=this.curve.a,n=this.curve.tinv,o=this.x,a=this.y,s=this.z,h=s.redSqr().redSqr(),u=a.redAdd(a);for(e=0;e<t;e++){var l=o.redSqr(),d=u.redSqr(),f=d.redSqr(),c=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(h)),p=o.redMul(d),m=c.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=c.redMul(g);v=v.redIAdd(v).redISub(f);var y=u.redMul(s);e+1<t&&(h=h.redMul(f)),o=m,s=y,u=v}return this.curve.jpoint(o,u.redMul(n),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r),h=s.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=h,e=s.redMul(a.redISub(h)).redISub(u),i=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),c=this.x.redAdd(d).redSqr().redISub(l).redISub(f);c=c.redIAdd(c);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),g=f.redIAdd(f);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(c).redISub(c),e=p.redMul(c.redISub(t)).redISub(g),i=(i=this.y.redMul(this.z)).redIAdd(i)}return this.curve.jpoint(t,e,i)},l.prototype._threeDbl=function(){var t,e,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),o=n.redSqr(),a=this.x.redAdd(n).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),h=s.redSqr().redISub(a).redISub(a);t=h;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=s.redMul(a.redISub(h)).redISub(u),i=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),c=this.x.redSub(l).redMul(this.x.redAdd(l));c=c.redAdd(c).redIAdd(c);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);t=c.redSqr().redISub(m),i=this.y.redAdd(this.z).redSqr().redISub(d).redISub(l);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=c.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,i)},l.prototype._dbl=function(){var t=this.curve.a,e=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),o=e.redSqr(),a=i.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)),h=e.redAdd(e),u=(h=h.redIAdd(h)).redMul(a),l=s.redSqr().redISub(u.redAdd(u)),d=u.redISub(l),f=a.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var c=s.redMul(d).redISub(f),p=i.redAdd(i).redMul(r);return this.curve.jpoint(l,c,p)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr(),r=e.redSqr(),n=t.redAdd(t).redIAdd(t),o=n.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(r),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),h=r.redIAdd(r);h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var u=n.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(h),l=e.redMul(u);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.x.redMul(s).redISub(l);d=(d=d.redIAdd(d)).redIAdd(d);var f=this.y.redMul(u.redMul(h.redISub(u)).redISub(a.redMul(s)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var c=this.z.redAdd(a).redSqr().redISub(i).redISub(s);return this.curve.jpoint(d,f,c)},l.prototype.mul=function(t,e){return t=new n(t,e),this.curve._wnafMul(this,t)},l.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),i=t.z.redSqr();if(0!==this.x.redMul(i).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),n=i.redMul(t.z);return 0===this.y.redMul(n).redISub(t.y.redMul(r)).cmpn(0)},l.prototype.eqXToP=function(t){var e=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(i))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,i){"use strict";var r=i(16),n=i(3),o=i(45),a=i(14);function s(t){o.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function h(t,e,i){o.BasePoint.call(this,t,"projective"),null===e&&null===i?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(s,o),t.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,i=e.redSqr(),r=i.redMul(e).redAdd(i.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},n(h,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new h(this,t,e)},s.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},h.fromJSON=function(t,e){return new h(t,e[0],e[1]||t.one)},h.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},h.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),i=t.redSub(e),r=t.redMul(e),n=i.redMul(e.redAdd(this.curve.a24.redMul(i)));return this.curve.point(r,n)},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.diffAdd=function(t,e){var i=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(i),a=n.redMul(r),s=e.z.redMul(o.redAdd(a).redSqr()),h=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,h)},h.prototype.mul=function(t){for(var e=t.clone(),i=this,r=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(i=i.diffAdd(r,this),r=r.dbl()):(r=i.diffAdd(r,this),i=i.dbl());return r},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,i){"use strict";var r=i(14),n=i(16),o=i(3),a=i(45),s=r.assert;function h(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new n(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function u(t,e,i,r,o){a.BasePoint.call(this,t,"projective"),null===e&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(e,16),this.y=new n(i,16),this.z=r?new n(r,16):this.curve.one,this.t=o&&new n(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(h,a),t.exports=h,h.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},h.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},h.prototype.jpoint=function(t,e,i,r){return this.point(t,e,i,r)},h.prototype.pointFromX=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=this.c2.redSub(this.a.redMul(i)),o=this.one.redSub(this.c2.redMul(this.d).redMul(i)),a=r.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var h=s.fromRed().isOdd();return(e&&!h||!e&&h)&&(s=s.redNeg()),this.point(t,s)},h.prototype.pointFromY=function(t,e){(t=new n(t,16)).red||(t=t.toRed(this.red));var i=t.redSqr(),r=i.redSub(this.c2),o=i.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},h.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),i=t.y.redSqr(),r=e.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(i)));return 0===r.cmp(n)},o(u,a.BasePoint),h.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},h.prototype.point=function(t,e,i,r){return new u(this,t,e,i,r)},u.fromJSON=function(t,e){return new u(t,e[0],e[1],e[2])},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var r=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),a=o.redSub(i),s=r.redSub(e),h=n.redMul(a),u=o.redMul(s),l=n.redMul(s),d=a.redMul(o);return this.curve.point(h,u,d,l)},u.prototype._projDbl=function(){var t,e,i,r,n,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),h=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(s)).redAdd(h);this.zOne?(t=a.redSub(s).redSub(h).redMul(u.redSub(this.curve.two)),e=u.redMul(r.redSub(h)),i=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=a.redSub(s).redISub(h).redMul(o),e=u.redMul(r.redSub(h)),i=u.redMul(o))}else r=s.redAdd(h),n=this.curve._mulC(this.z).redSqr(),o=r.redSub(n).redSub(n),t=this.curve._mulC(a.redISub(r)).redMul(o),e=this.curve._mulC(r).redMul(s.redISub(h)),i=r.redMul(o);return this.curve.point(t,e,i)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=i.redSub(e),a=n.redSub(r),s=n.redAdd(r),h=i.redAdd(e),u=o.redMul(a),l=s.redMul(h),d=o.redMul(h),f=a.redMul(s);return this.curve.point(u,l,f,d)},u.prototype._projAdd=function(t){var e,i,r=this.z.redMul(t.z),n=r.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),h=n.redSub(s),u=n.redAdd(s),l=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),d=r.redMul(h).redMul(l);return this.curve.twisted?(e=r.redMul(u).redMul(a.redSub(this.curve._mulA(o))),i=h.redMul(u)):(e=r.redMul(u).redMul(a.redSub(o)),i=this.curve._mulC(h).redMul(u)),this.curve.point(d,e,i)},u.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},u.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},u.prototype.mulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!1)},u.prototype.jmulAdd=function(t,e,i){return this.curve._wnafMulAdd(1,[this,e],[t,i],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},u.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var i=t.clone(),r=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},function(t,e,i){"use strict";e.sha1=i(214),e.sha224=i(215),e.sha256=i(119),e.sha384=i(216),e.sha512=i(120)},function(t,e,i){"use strict";var r=i(15),n=i(38),o=i(118),a=r.rotl32,s=r.sum32,h=r.sum32_5,u=o.ft_1,l=n.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(f,l),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(t,e){for(var i=this.W,r=0;r<16;r++)i[r]=t[e+r];for(;r<i.length;r++)i[r]=a(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);var n=this.h[0],o=this.h[1],l=this.h[2],f=this.h[3],c=this.h[4];for(r=0;r<i.length;r++){var p=~~(r/20),m=h(a(n,5),u(p,o,l,f),c,i[r],d[p]);c=f,f=l,l=a(o,30),o=n,n=m}this.h[0]=s(this.h[0],n),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],l),this.h[3]=s(this.h[3],f),this.h[4]=s(this.h[4],c)},f.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,i){"use strict";var r=i(15),n=i(119);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,n),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(t,e,i){"use strict";var r=i(15),n=i(120);function o(){if(!(this instanceof o))return new o;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,n),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(t,e,i){"use strict";var r=i(15),n=i(38),o=r.rotl32,a=r.sum32,s=r.sum32_3,h=r.sum32_4,u=n.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(t,e,i,r){return t<=15?e^i^r:t<=31?e&i|~e&r:t<=47?(e|~i)^r:t<=63?e&r|i&~r:e^(i|~r)}function f(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function c(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}r.inherits(l,u),e.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(t,e){for(var i=this.h[0],r=this.h[1],n=this.h[2],u=this.h[3],l=this.h[4],y=i,b=r,_=n,w=u,A=l,M=0;M<80;M++){var E=a(o(h(i,d(M,r,n,u),t[p[M]+e],f(M)),g[M]),l);i=l,l=u,u=o(n,10),n=r,r=E,E=a(o(h(y,d(79-M,b,_,w),t[m[M]+e],c(M)),v[M]),A),y=A,A=w,w=o(_,10),_=b,b=E}E=s(this.h[1],n,w),this.h[1]=s(this.h[2],u,A),this.h[2]=s(this.h[3],l,y),this.h[3]=s(this.h[4],i,b),this.h[4]=s(this.h[0],r,_),this.h[0]=E},l.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,i){"use strict";var r=i(15),n=i(13);function o(t,e,i){if(!(this instanceof o))return new o(t,e,i);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,i))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),n(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,i){"use strict";var r=i(16),n=i(221),o=i(14),a=i(68),s=i(63),h=o.assert,u=i(222),l=i(223);function d(t){if(!(this instanceof d))return new d(t);"string"==typeof t&&(h(Object.prototype.hasOwnProperty.call(a,t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=d,d.prototype.keyPair=function(t){return new u(this,t)},d.prototype.keyFromPrivate=function(t,e){return u.fromPrivate(this,t,e)},d.prototype.keyFromPublic=function(t,e){return u.fromPublic(this,t,e)},d.prototype.genKeyPair=function(t){t||(t={});for(var e=new n({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||s(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),o=this.n.sub(new r(2));;){var a=new r(e.generate(i));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(t,e){var i=8*t.byteLength()-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},d.prototype.sign=function(t,e,i,o){"object"==typeof i&&(o=i,i=null),o||(o={}),e=this.keyFromPrivate(e,i),t=this._truncateToN(new r(t,16));for(var a=this.n.byteLength(),s=e.getPrivate().toArray("be",a),h=t.toArray("be",a),u=new n({hash:this.hash,entropy:s,nonce:h,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new r(1)),f=0;;f++){var c=o.k?o.k(f):new r(u.generate(this.n.byteLength()));if(!((c=this._truncateToN(c,!0)).cmpn(1)<=0||c.cmp(d)>=0)){var p=this.g.mul(c);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=c.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new l({r:g,s:v,recoveryParam:y})}}}}}},d.prototype.verify=function(t,e,i,n){t=this._truncateToN(new r(t,16)),i=this.keyFromPublic(i,n);var o=(e=new l(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,h=a.invm(this.n),u=h.mul(t).umod(this.n),d=h.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(u,i.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(u,i.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(t,e,i,n){h((3&i)===i,"The recovery param is more than two bits"),e=new l(e,n);var o=this.n,a=new r(t),s=e.r,u=e.s,d=1&i,f=i>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var c=e.r.invm(o),p=o.sub(a).mul(c).umod(o),m=u.mul(c).umod(o);return this.g.mulAdd(p,s,m)},d.prototype.getKeyRecoveryParam=function(t,e,i,r){if(null!==(e=new l(e,r)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(i))return n}throw new Error("Unable to find valid recovery factor")}},function(t,e,i){"use strict";var r=i(69),n=i(116),o=i(13);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(t.entropy,t.entropyEnc||"hex"),i=n.toArray(t.nonce,t.nonceEnc||"hex"),r=n.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,i,r)}t.exports=a,a.prototype._init=function(t,e,i){var r=t.concat(e).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n<this.V.length;n++)this.K[n]=0,this.V[n]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},a.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(t,e,i,r){"string"!=typeof e&&(r=i,i=e,e=null),t=n.toArray(t,e),i=n.toArray(i,r),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1},a.prototype.generate=function(t,e,i,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=i,i=e,e=null),i&&(i=n.toArray(i,r||"hex"),this._update(i));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,t);return this._update(i),this._reseed++,n.encode(a,e)}},function(t,e,i){"use strict";var r=i(16),n=i(14).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,i){return e instanceof o?e:new o(t,{pub:e,pubEnc:i})},o.fromPrivate=function(t,e,i){return e instanceof o?e:new o(t,{priv:e,privEnc:i})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new r(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?n(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||n(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,i){return this.ec.sign(t,this,e,i)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,i){"use strict";var r=i(16),n=i(14),o=n.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function h(t,e){var i=t[e.place++];if(!(128&i))return i;var r=15&i;if(0===r||r>4)return!1;for(var n=0,o=0,a=e.place;o<r;o++,a++)n<<=8,n|=t[a],n>>>=0;return!(n<=127)&&(e.place=a,n)}function u(t){for(var e=0,i=t.length-1;!t[e]&&!(128&t[e+1])&&e<i;)e++;return 0===e?t:t.slice(e)}function l(t,e){if(e<128)t.push(e);else{var i=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|i);--i;)t.push(e>>>(i<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=n.toArray(t,e);var i=new s;if(48!==t[i.place++])return!1;var o=h(t,i);if(!1===o)return!1;if(o+i.place!==t.length)return!1;if(2!==t[i.place++])return!1;var a=h(t,i);if(!1===a)return!1;var u=t.slice(i.place,a+i.place);if(i.place+=a,2!==t[i.place++])return!1;var l=h(t,i);if(!1===l)return!1;if(t.length!==l+i.place)return!1;var d=t.slice(i.place,l+i.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new r(u),this.s=new r(d),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),i=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&i[0]&&(i=[0].concat(i)),e=u(e),i=u(i);!(i[0]||128&i[1]);)i=i.slice(1);var r=[2];l(r,e.length),(r=r.concat(e)).push(2),l(r,i.length);var o=r.concat(i),a=[48];return l(a,o.length),a=a.concat(o),n.encode(a,t)}},function(t,e,i){"use strict";var r=i(69),n=i(68),o=i(14),a=o.assert,s=o.parseBytes,h=i(225),u=i(226);function l(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof l))return new l(t);t=n[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}t.exports=l,l.prototype.sign=function(t,e){t=s(t);var i=this.keyFromSecret(e),r=this.hashInt(i.messagePrefix(),t),n=this.g.mul(r),o=this.encodePoint(n),a=this.hashInt(o,i.pubBytes(),t).mul(i.priv()),h=r.add(a).umod(this.curve.n);return this.makeSignature({R:n,S:h,Rencoded:o})},l.prototype.verify=function(t,e,i){t=s(t),e=this.makeSignature(e);var r=this.keyFromPublic(i),n=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(n)).eq(o)},l.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(t){return h.fromPublic(this,t)},l.prototype.keyFromSecret=function(t){return h.fromSecret(this,t)},l.prototype.makeSignature=function(t){return t instanceof u?t:new u(this,t)},l.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},l.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,i=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),n=o.intFromLE(i);return this.curve.pointFromY(n,r)},l.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(t){return o.intFromLE(t)},l.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,i){"use strict";var r=i(14),n=r.assert,o=r.parseBytes,a=r.cachedProperty;function s(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}s.fromPublic=function(t,e){return e instanceof s?e:new s(t,{pub:e})},s.fromSecret=function(t,e){return e instanceof s?e:new s(t,{secret:e})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var t=this.eddsa,e=this.hash(),i=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(t){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},s.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},s.prototype.getSecret=function(t){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),t)},s.prototype.getPublic=function(t){return r.encode(this.pubBytes(),t)},t.exports=s},function(t,e,i){"use strict";var r=i(16),n=i(14),o=n.assert,a=n.cachedProperty,s=n.parseBytes;function h(t,e){this.eddsa=t,"object"!=typeof e&&(e=s(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof r&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}a(h,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(h,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(h,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(h,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),h.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},h.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},t.exports=h},function(t,e,i){"use strict";var r=i(121);e.certificate=i(234);var n=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=n;var o=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));e.PublicKey=a;var s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),h=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=h;var u=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=u;var l=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=l,e.DSAparam=r.define("DSAparam",(function(){this.int()}));var d=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=d;var f=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(t,e){},function(t,e,i){"use strict";var r=i(123),n=i(125),o=i(3);function a(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new a(t,e)},a.prototype._createNamed=function(t){var e=this.name;function i(t){this._initNamed(t,e)}return o(i,t),i.prototype._initNamed=function(e,i){t.call(this,e,i)},new i(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n[t])),this.decoders[t]},a.prototype.decode=function(t,e,i){return this._getDecoder(e).decode(t,i)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(r[t])),this.encoders[t]},a.prototype.encode=function(t,e,i){return this._getEncoder(e).encode(t,i)}},function(t,e,i){"use strict";var r=i(3),n=i(124);function o(t){n.call(this,t),this.enc="pem"}r(o,n),t.exports=o,o.prototype.encode=function(t,e){for(var i=n.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"],o=0;o<i.length;o+=64)r.push(i.slice(o,o+64));return r.push("-----END "+e.label+"-----"),r.join("\n")}},function(t,e,i){"use strict";var r=i(3),n=i(70).Buffer,o=i(126);function a(t){o.call(this,t),this.enc="pem"}r(a,o),t.exports=a,a.prototype.decode=function(t,e){for(var i=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,h=-1,u=0;u<i.length;u++){var l=i[u].match(a);if(null!==l&&l[2]===r){if(-1!==s){if("END"!==l[1])break;h=u;break}if("BEGIN"!==l[1])break;s=u}}if(-1===s||-1===h)throw new Error("PEM section not found for: "+r);var d=i.slice(s+1,h).join("");d.replace(/[^a-z0-9+/=]+/gi,"");var f=n.from(d,"base64");return o.prototype.decode.call(this,f,e)}},function(t,e,i){"use strict";var r=e;r.Reporter=i(72).Reporter,r.DecoderBuffer=i(39).DecoderBuffer,r.EncoderBuffer=i(39).EncoderBuffer,r.Node=i(71)},function(t,e,i){"use strict";var r=e;r._reverse=function(t){var e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);var r=t[i];e[r]=i})),e},r.der=i(73)},function(t,e,i){"use strict";var r=i(121),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),h=r.define("RelativeDistinguishedName",(function(){this.setof(o)})),u=r.define("RDNSequence",(function(){this.seqof(h)})),l=r.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),d=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),f=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),c=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(l),this.key("validity").use(d),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())})),p=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(c),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));t.exports=p},function(t){t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(t,e,i){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=i(44),s=i(61),h=i(4).Buffer;t.exports=function(t,e){var i,u=t.toString(),l=u.match(r);if(l){var d="aes"+l[1],f=h.from(l[2],"hex"),c=h.from(l[3].replace(/[\r\n]/g,""),"base64"),p=a(e,f.slice(0,8),parseInt(l[1],10)).key,m=[],g=s.createDecipheriv(d,p,f);m.push(g.update(c)),m.push(g.final()),i=h.concat(m)}else{var v=u.match(o);i=h.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(n)[1],data:i}}},function(t,e,i){var r=i(4).Buffer,n=i(66),o=i(67).ec,a=i(46),s=i(127);function h(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,e,i,u,l){var d=a(i);if("ec"===d.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,i){var r=s[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new o(r),a=i.data.subjectPrivateKey.data;return n.verify(e,t,a)}(t,e,d)}if("dsa"===d.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,e,i){var r=i.data.p,o=i.data.q,s=i.data.g,u=i.data.pub_key,l=a.signature.decode(t,"der"),d=l.s,f=l.r;h(d,o),h(f,o);var c=n.mont(r),p=d.invm(o);return 0===s.toRed(c).redPow(new n(e).mul(p).mod(o)).fromRed().mul(u.toRed(c).redPow(f.mul(p).mod(o)).fromRed()).mod(r).mod(o).cmp(f)}(t,e,d)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");e=r.concat([l,e]);for(var f=d.modulus.byteLength(),c=[1],p=0;e.length+c.length+2<f;)c.push(255),p++;c.push(0);for(var m=-1;++m<e.length;)c.push(e[m]);c=r.from(c);var g=n.mont(d.modulus);t=(t=new n(t).toRed(g)).redPow(new n(d.publicExponent)),t=r.from(t.fromRed().toArray());var v=p<8?1:0;for(f=Math.min(t.length,c.length),t.length!==c.length&&(v=1),m=-1;++m<f;)v|=t[m]^c[m];return 0===v}},function(t,e,i){(function(e){var r=i(67),n=i(239);t.exports=function(t){return new a(t)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function s(t,i,r){Array.isArray(t)||(t=t.toArray());var n=new e(t);if(r&&n.length<r){var o=new e(r-n.length);o.fill(0),n=e.concat([o,n])}return i?n.toString(i):n}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,i,r){return i=i||"utf8",e.isBuffer(t)||(t=new e(t,i)),s(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var i=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(i[i.length-1]%2?i[0]=7:i[0]=6),s(i,t)},a.prototype.getPrivateKey=function(t){return s(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,i){return i=i||"utf8",e.isBuffer(t)||(t=new e(t,i)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,i){i=i||"utf8",e.isBuffer(t)||(t=new e(t,i));var r=new n(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,i(9).Buffer)},function(t,e,i){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(240).Buffer}catch(t){}function s(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function h(t,e,i){var r=s(t,i);return i-1>=e&&(r|=s(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),a=e;a<o;a++){var s=t.charCodeAt(a)-48;n*=r,n+=s>=49?s-49+10:s>=17?s-17+10:s}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,i):(this._parseBase(t,e,n),"le"===i&&this._initArray(this.toArray(),e,i)))},o.prototype._initNumber=function(t,e,i){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,a,s=0;if("be"===i)for(n=t.length-1,o=0;n>=0;n-=3)a=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===i)for(n=0,o=0;n<t.length;n+=3)a=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,a=0;if("be"===i)for(r=t.length-1;r>=e;r-=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)n=h(t,e,r)<<o,this.words[a]|=67108863&n,o>=18?(o-=18,a+=1,this.words[a]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,a=o%r,s=Math.min(o,o-a)+i,h=0,l=i;l<s;l+=r)h=u(t,l,l+r,e),this.imuln(n),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==a){var d=1;for(h=u(t,l,t.length,e),l=0;l<a;l++)d*=e;this.imuln(d),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],a=n*o,s=67108863&a,h=a/67108864|0;i.words[0]=s;for(var u=1;u<r;u++){for(var l=h>>>26,d=67108863&h,f=Math.min(u,e.length-1),c=Math.max(0,u-t.length+1);c<=f;c++){var p=u-c|0;l+=(a=(n=0|t.words[p])*(o=0|e.words[c])+d)/67108864|0,d=67108863&a}i.words[u]=0|d,h=0|l}return 0!==h?i.words[u]=0|h:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,a=0;a<this.length;a++){var s=this.words[a],h=(16777215&(s<<n|o)).toString(16);i=0!==(o=s>>>24-n&16777215)||a!==this.length-1?l[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],c=f[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(c).toString(t);i=(p=p.idivn(c)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,h="le"===e,u=new t(o),l=this.clone();if(h){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-n;s++)u[s]=0;for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),u[o-s-1]=a}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var i=this._zeroBits(this.words[e]);if(t+=i,26!==i)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,i,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|i.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<i.length;a++)o=(e=(0|i.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<i.length&&i!==this)for(;a<i.length;a++)this.words[a]=i.words[a];return this.length=Math.max(this.length,a),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,i){var r,n,o,a=t.words,s=e.words,h=i.words,u=0,l=0|a[0],d=8191&l,f=l>>>13,c=0|a[1],p=8191&c,m=c>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],_=8191&b,w=b>>>13,A=0|a[4],M=8191&A,E=A>>>13,S=0|a[5],k=8191&S,T=S>>>13,R=0|a[6],I=8191&R,C=R>>>13,P=0|a[7],x=8191&P,D=P>>>13,O=0|a[8],B=8191&O,L=O>>>13,W=0|a[9],N=8191&W,F=W>>>13,U=0|s[0],j=8191&U,V=U>>>13,H=0|s[1],z=8191&H,G=H>>>13,q=0|s[2],X=8191&q,Z=q>>>13,K=0|s[3],Q=8191&K,Y=K>>>13,J=0|s[4],$=8191&J,tt=J>>>13,et=0|s[5],it=8191&et,rt=et>>>13,nt=0|s[6],ot=8191&nt,at=nt>>>13,st=0|s[7],ht=8191&st,ut=st>>>13,lt=0|s[8],dt=8191<,ft=lt>>>13,ct=0|s[9],pt=8191&ct,mt=ct>>>13;i.negative=t.negative^e.negative,i.length=19;var gt=(u+(r=Math.imul(d,j))|0)+((8191&(n=(n=Math.imul(d,V))+Math.imul(f,j)|0))<<13)|0;u=((o=Math.imul(f,V))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,j),n=(n=Math.imul(p,V))+Math.imul(m,j)|0,o=Math.imul(m,V);var vt=(u+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(f,z)|0))<<13)|0;u=((o=o+Math.imul(f,G)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,j),n=(n=Math.imul(v,V))+Math.imul(y,j)|0,o=Math.imul(y,V),r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(f,X)|0))<<13)|0;u=((o=o+Math.imul(f,Z)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(_,j),n=(n=Math.imul(_,V))+Math.imul(w,j)|0,o=Math.imul(w,V),r=r+Math.imul(v,z)|0,n=(n=n+Math.imul(v,G)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Z)|0;var bt=(u+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,Y)|0)+Math.imul(f,Q)|0))<<13)|0;u=((o=o+Math.imul(f,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,j),n=(n=Math.imul(M,V))+Math.imul(E,j)|0,o=Math.imul(E,V),r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,G)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(v,X)|0,n=(n=n+Math.imul(v,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Y)|0;var _t=(u+(r=r+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(f,$)|0))<<13)|0;u=((o=o+Math.imul(f,tt)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,V))+Math.imul(T,j)|0,o=Math.imul(T,V),r=r+Math.imul(M,z)|0,n=(n=n+Math.imul(M,G)|0)+Math.imul(E,z)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,X)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,X)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,Q)|0,n=(n=n+Math.imul(v,Y)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var wt=(u+(r=r+Math.imul(d,it)|0)|0)+((8191&(n=(n=n+Math.imul(d,rt)|0)+Math.imul(f,it)|0))<<13)|0;u=((o=o+Math.imul(f,rt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(I,j),n=(n=Math.imul(I,V))+Math.imul(C,j)|0,o=Math.imul(C,V),r=r+Math.imul(k,z)|0,n=(n=n+Math.imul(k,G)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(M,X)|0,n=(n=n+Math.imul(M,Z)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,Y)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,$)|0,n=(n=n+Math.imul(v,tt)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var At=(u+(r=r+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,at)|0)+Math.imul(f,ot)|0))<<13)|0;u=((o=o+Math.imul(f,at)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(x,j),n=(n=Math.imul(x,V))+Math.imul(D,j)|0,o=Math.imul(D,V),r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,G)|0,r=r+Math.imul(k,X)|0,n=(n=n+Math.imul(k,Z)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(M,Q)|0,n=(n=n+Math.imul(M,Y)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(_,$)|0,n=(n=n+Math.imul(_,tt)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(v,it)|0,n=(n=n+Math.imul(v,rt)|0)+Math.imul(y,it)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(u+(r=r+Math.imul(d,ht)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(f,ht)|0))<<13)|0;u=((o=o+Math.imul(f,ut)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,j),n=(n=Math.imul(B,V))+Math.imul(L,j)|0,o=Math.imul(L,V),r=r+Math.imul(x,z)|0,n=(n=n+Math.imul(x,G)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(k,Q)|0,n=(n=n+Math.imul(k,Y)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,it)|0,n=(n=n+Math.imul(_,rt)|0)+Math.imul(w,it)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(v,ot)|0,n=(n=n+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(r=r+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ft)|0)+Math.imul(f,dt)|0))<<13)|0;u=((o=o+Math.imul(f,ft)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,j),n=(n=Math.imul(N,V))+Math.imul(F,j)|0,o=Math.imul(F,V),r=r+Math.imul(B,z)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(L,z)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(x,X)|0,n=(n=n+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(M,it)|0,n=(n=n+Math.imul(M,rt)|0)+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,n=(n=n+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(v,ht)|0,n=(n=n+Math.imul(v,ut)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ut)|0,r=r+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(m,dt)|0,o=o+Math.imul(m,ft)|0;var St=(u+(r=r+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,mt)|0)+Math.imul(f,pt)|0))<<13)|0;u=((o=o+Math.imul(f,mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=(n=Math.imul(N,G))+Math.imul(F,z)|0,o=Math.imul(F,G),r=r+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Z)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Z)|0,r=r+Math.imul(x,Q)|0,n=(n=n+Math.imul(x,Y)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(C,$)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(k,it)|0,n=(n=n+Math.imul(k,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(M,ot)|0,n=(n=n+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,ht)|0,n=(n=n+Math.imul(_,ut)|0)+Math.imul(w,ht)|0,o=o+Math.imul(w,ut)|0,r=r+Math.imul(v,dt)|0,n=(n=n+Math.imul(v,ft)|0)+Math.imul(y,dt)|0,o=o+Math.imul(y,ft)|0;var kt=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(N,X),n=(n=Math.imul(N,Z))+Math.imul(F,X)|0,o=Math.imul(F,Z),r=r+Math.imul(B,Q)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,Y)|0,r=r+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(D,$)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=(n=n+Math.imul(I,rt)|0)+Math.imul(C,it)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(k,ot)|0,n=(n=n+Math.imul(k,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(M,ht)|0,n=(n=n+Math.imul(M,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(_,dt)|0,n=(n=n+Math.imul(_,ft)|0)+Math.imul(w,dt)|0,o=o+Math.imul(w,ft)|0;var Tt=(u+(r=r+Math.imul(v,pt)|0)|0)+((8191&(n=(n=n+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;u=((o=o+Math.imul(y,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(N,Q),n=(n=Math.imul(N,Y))+Math.imul(F,Q)|0,o=Math.imul(F,Y),r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,it)|0,n=(n=n+Math.imul(x,rt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,r=r+Math.imul(k,ht)|0,n=(n=n+Math.imul(k,ut)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(M,dt)|0,n=(n=n+Math.imul(M,ft)|0)+Math.imul(E,dt)|0,o=o+Math.imul(E,ft)|0;var Rt=(u+(r=r+Math.imul(_,pt)|0)|0)+((8191&(n=(n=n+Math.imul(_,mt)|0)+Math.imul(w,pt)|0))<<13)|0;u=((o=o+Math.imul(w,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(F,$)|0,o=Math.imul(F,tt),r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,n=(n=n+Math.imul(x,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ut)|0,r=r+Math.imul(k,dt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(T,dt)|0,o=o+Math.imul(T,ft)|0;var It=(u+(r=r+Math.imul(M,pt)|0)|0)+((8191&(n=(n=n+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(N,it),n=(n=Math.imul(N,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(x,ht)|0,n=(n=n+Math.imul(x,ut)|0)+Math.imul(D,ht)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,dt)|0,n=(n=n+Math.imul(I,ft)|0)+Math.imul(C,dt)|0,o=o+Math.imul(C,ft)|0;var Ct=(u+(r=r+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(N,ot),n=(n=Math.imul(N,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(x,dt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(D,dt)|0,o=o+Math.imul(D,ft)|0;var Pt=(u+(r=r+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(C,pt)|0))<<13)|0;u=((o=o+Math.imul(C,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(N,ht),n=(n=Math.imul(N,ut))+Math.imul(F,ht)|0,o=Math.imul(F,ut),r=r+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(L,dt)|0,o=o+Math.imul(L,ft)|0;var xt=(u+(r=r+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,mt)|0)+Math.imul(D,pt)|0))<<13)|0;u=((o=o+Math.imul(D,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,dt),n=(n=Math.imul(N,ft))+Math.imul(F,dt)|0,o=Math.imul(F,ft);var Dt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ot=(u+(r=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,h[0]=gt,h[1]=vt,h[2]=yt,h[3]=bt,h[4]=_t,h[5]=wt,h[6]=At,h[7]=Mt,h[8]=Et,h[9]=St,h[10]=kt,h[11]=Tt,h[12]=Rt,h[13]=It,h[14]=Ct,h[15]=Pt,h[16]=xt,h[17]=Dt,h[18]=Ot,0!==u&&(h[19]=u,i.length++),i};function m(t,e,i){return(new g).mulp(t,e,i)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=c),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?p(this,t,e):r<63?c(this,t,e):r<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var a=n;n=0;for(var s=67108863&r,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var l=o-u,d=(0|t.words[l])*(0|e.words[u]),f=67108863&d;s=67108863&(f=f+s|0),n+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}i.words[o]=s,r=a,a=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):m(this,t,e),i},g.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},g.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},g.prototype.permute=function(t,e,i,r,n,o){for(var a=0;a<o;a++)r[a]=e[t[a]],n[a]=i[t[a]]},g.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var a=1;a<n;a<<=1)for(var s=a<<1,h=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),l=0;l<n;l+=s)for(var d=h,f=u,c=0;c<a;c++){var p=i[l+c],m=r[l+c],g=i[l+c+a],v=r[l+c+a],y=d*g-f*v;v=d*v+f*g,g=y,i[l+c]=p+g,r[l+c]=m+v,i[l+c+a]=p-g,r[l+c+a]=m-v,c!==s&&(y=h*d-u*f,f=h*f+u*d,d=y)}},g.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},g.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,i,n){for(var o=0,a=0;a<e;a++)o+=0|t[a],i[2*a]=8191&o,o>>>=13,i[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<n;++a)i[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},g.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),h=new Array(r),u=new Array(r),l=new Array(r),d=new Array(r),f=i.words;f.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,u,r),this.transform(a,o,s,h,r,n),this.transform(u,o,l,d,r,n);for(var c=0;c<r;c++){var p=s[c]*l[c]-h[c]*d[c];h[c]=s[c]*d[c]+h[c]*l[c],s[c]=p}return this.conjugate(s,h,r),this.transform(s,h,f,o,r,n),this.conjugate(f,o,r),this.normalize13b(f,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,i=0;i<this.length;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length&&0===e[r];r++,i=i.sqr());if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,h=(0|this.words[e])-s<<i;this.words[e]=h|a,a=s>>>26-i}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,h=i;if(n-=a,n=Math.max(0,n),h){for(var u=0;u<a;u++)h.words[u]=this.words[u];h.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var l=0;for(u=this.length-1;u>=0&&(0!==l||u>=n);u--){var d=0|this.words[u];this.words[u]=l<<26-o|d>>>o,l=d&s}return h&&0!==l&&(h.words[h.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;return!(this.length<=i)&&!!(this.words[i]&n)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,i){var n,o,a=t.length+i;this._expand(a);var s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+s;var h=(0|t.words[n])*e;s=((o-=67108863&h)>>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)s=(o=(0|this.words[n+i])+s)>>26,this.words[n+i]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,a=0|n.words[n.length-1];0!==(i=26-this._countBits(a))&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var s,h=r.length-n.length;if("mod"!==e){(s=new o(null)).length=h+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var l=r.clone()._ishlnsubmul(n,1,h);0===l.negative&&(r=l,s&&(s.words[h]=1));for(var d=h-1;d>=0;d--){var f=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(n,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.iadd(t)),{div:n,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),i&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),a=new o(0),s=new o(0),h=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var l=i.clone(),d=e.clone();!e.isZero();){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(n.isOdd()||a.isOdd())&&(n.iadd(l),a.isub(d)),n.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(s.isOdd()||h.isOdd())&&(s.iadd(l),h.isub(d)),s.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(s),a.isub(h)):(i.isub(e),s.isub(n),h.isub(a))}return{a:s,b:h,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,a=new o(1),s=new o(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,l=1;0==(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);for(var d=0,f=1;0==(i.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(i.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);e.cmp(i)>=0?(e.isub(i),a.isub(s)):(i.isub(e),s.isub(a))}return(n=0===e.cmpn(1)?a:s).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,a=i;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var a=0|t.words[n];t.words[n-10]=(a&i)<<4|o>>>22,o=a}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(w,y),n(A,y),A.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return v[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var s=new o(1).toRed(this),h=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,u).cmp(h);)l.redIAdd(h);for(var d=this.pow(l,n),f=this.pow(t,n.addn(1).iushrn(1)),c=this.pow(t,n),p=a;0!==c.cmp(s);){for(var m=c,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),c=c.redMul(d),p=g}return f},M.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=t;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],t);var n=i[0],a=0,s=0,h=e.bitLength()%26;for(0===h&&(h=26),r=e.length-1;r>=0;r--){for(var u=e.words[r],l=h-1;l>=0;l--){var d=u>>l&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===l)&&(n=this.mul(n,i[a]),s=0,a=0)):s=0}h=26}return n},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},n(E,M),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,i(20)(t))},function(t,e){},function(t,e,i){e.publicEncrypt=i(242),e.privateDecrypt=i(244),e.privateEncrypt=function(t,i){return e.publicEncrypt(t,i,!0)},e.publicDecrypt=function(t,i){return e.privateDecrypt(t,i,!0)}},function(t,e,i){var r=i(46),n=i(25),o=i(35),a=i(128),s=i(129),h=i(74),u=i(130),l=i(65),d=i(4).Buffer;t.exports=function(t,e,i){var f;f=t.padding?t.padding:i?1:4;var c,p=r(t);if(4===f)c=function(t,e){var i=t.modulus.byteLength(),r=e.length,u=o("sha1").update(d.alloc(0)).digest(),l=u.length,f=2*l;if(r>i-f-2)throw new Error("message too long");var c=d.alloc(i-r-f-2),p=i-l-1,m=n(l),g=s(d.concat([u,c,d.alloc(1,1),e],p),a(m,p)),v=s(m,a(g,l));return new h(d.concat([d.alloc(1),v,g],i))}(p,e);else if(1===f)c=function(t,e,i){var r,o=e.length,a=t.modulus.byteLength();if(o>a-11)throw new Error("message too long");r=i?d.alloc(a-o-3,255):function(t){var e,i=d.allocUnsafe(t),r=0,o=n(2*t),a=0;for(;r<t;)a===o.length&&(o=n(2*t),a=0),(e=o[a++])&&(i[r++]=e);return i}(a-o-3);return new h(d.concat([d.from([0,i?1:2]),r,d.alloc(1),e],a))}(p,e,i);else{if(3!==f)throw new Error("unknown padding");if((c=new h(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return i?l(c,p):u(c,p)}},function(t,e){},function(t,e,i){var r=i(46),n=i(128),o=i(129),a=i(74),s=i(65),h=i(35),u=i(130),l=i(4).Buffer;t.exports=function(t,e,i){var d;d=t.padding?t.padding:i?1:4;var f,c=r(t),p=c.modulus.byteLength();if(e.length>p||new a(e).cmp(c.modulus)>=0)throw new Error("decryption error");f=i?u(new a(e),c):s(e,c);var m=l.alloc(p-f.length);if(f=l.concat([m,f],p),4===d)return function(t,e){var i=t.modulus.byteLength(),r=h("sha1").update(l.alloc(0)).digest(),a=r.length;if(0!==e[0])throw new Error("decryption error");var s=e.slice(1,a+1),u=e.slice(a+1),d=o(s,n(u,a)),f=o(u,n(d,i-a-1));if(function(t,e){t=l.from(t),e=l.from(e);var i=0,r=t.length;t.length!==e.length&&(i++,r=Math.min(t.length,e.length));var n=-1;for(;++n<r;)i+=t[n]^e[n];return i}(r,f.slice(0,a)))throw new Error("decryption error");var c=a;for(;0===f[c];)c++;if(1!==f[c++])throw new Error("decryption error");return f.slice(c)}(c,f);if(1===d)return function(t,e,i){var r=e.slice(0,2),n=2,o=0;for(;0!==e[n++];)if(n>=e.length){o++;break}var a=e.slice(2,n-1);("0002"!==r.toString("hex")&&!i||"0001"!==r.toString("hex")&&i)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,f,i);if(3===d)return f;throw new Error("unknown padding")}},function(t,e,i){"use strict";(function(t,r){function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=i(4),a=i(25),s=o.Buffer,h=o.kMaxLength,u=t.crypto||t.msCrypto,l=Math.pow(2,32)-1;function d(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>l||t<0)throw new TypeError("offset must be a uint32");if(t>h||t>e)throw new RangeError("offset out of range")}function f(t,e,i){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>l||t<0)throw new TypeError("size must be a uint32");if(t+e>i||t>h)throw new RangeError("buffer too small")}function c(t,e,i,n){if(r.browser){var o=t.buffer,s=new Uint8Array(o,e,i);return u.getRandomValues(s),n?void r.nextTick((function(){n(null,t)})):t}if(!n)return a(i).copy(t,e),t;a(i,(function(i,r){if(i)return n(i);r.copy(t,e),n(null,t)}))}u&&u.getRandomValues||!r.browser?(e.randomFill=function(e,i,r,n){if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof i)n=i,i=0,r=e.length;else if("function"==typeof r)n=r,r=e.length-i;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return d(i,e.length),f(r,i,e.length),c(e,i,r,n)},e.randomFillSync=function(e,i,r){void 0===i&&(i=0);if(!(s.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');d(i,e.length),void 0===r&&(r=e.length-i);return f(r,i,e.length),c(e,i,r)}):(e.randomFill=n,e.randomFillSync=n)}).call(this,i(10),i(8))},function(t,e,i){"use strict";i.r(e);var r=i(0),n=i(40);e.default=function(t){t._requestAbort=!1,t.soundPlayer=null,t.audioSampleQueue=[];t.addEventListener("message",(function(e){switch(e.data.cmd){case r.tOpenStream:!function(e,i,r){if(null==t.soundPlayer){var o="16bitInt";switch(e){case 0:o="8bitInt";break;case 1:o="16bitInt";break;case 2:o="32bitInt";break;case 3:o="32bitFloat";break;default:this.logger.logError("Unsupported audio sampleFmt "+e+"!")}t.soundPlayer=new n.a,t.soundPlayer.init({encoding:o,channels:i,sampleRate:r,flushingTime:5e3})}}(1,2,8e3);break;case r.tFrameData:break;case r.tCloseStream:t._requestAbort=!0}}))}},function(t,e,i){var r=i(47),n=i(248);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={insert:"head",singleton:!1};r(n,o);t.exports=n.locals||{}},function(t,e,i){var r=i(48),n=i(249),o=i(250),a=i(251);e=r(!1);var s=n(o),h=n(a);e.push([t.i,'@font-face{font-family:"vssfont";src:url("data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAgQAAsAAAAAELgAAAfCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACEfgqRSI5lATYCJAM8CyAABCAFhFsHgUwbcw4RVaxdIPviwNgWnjbqvmJTkA+H96NG0n3Oh8dNe///YAkWqkeVzoR2ogpjJkI2DxMzwkwEOYPzzP1IgAC7GiDwe6eapHvgQ2WeMLSLb6zIX15aT3fOAAyUoCJswpj6gpz/uVZPPCHeTNYIiUctJ/a3ncnH/BQ+5p6JpA2X5iESopRCiJTa8cOf05cofNkmrGOsE8McX6XPAQHAIxfVQOvUa+KCeWC3kYNhBwc1mwBJVTKwX59u0NsmcBW+BHqt1vRSTkcWQgPQOfQWgAX08+QZShE9QKFhUHdp0btuT5xT8VRm3rgX2O/wZd21EIdTABoADEDxiVnIleq0c2ARKE4Ez9XlsBSAHdbCm1SonMqropqttla7qcMetX7c8mnNp3I8DvApZHZEZRHYdfLMf+ABGvCgEGCECWbowcDBAC0IdADRAoRRco+5zYAKFwMNoHLR4AEVAwqoIgYCoGZiYATULAxMgJot645sDQP0ILvBAAZyGDDggEetMTAAj1tioAWe1jSAECmjHnQAAIt/SSaA0gD9CJsJpRkp07TQSKlOoyBHDwmozGZWa6ISJmmFnMHEcQGFNTEpKdFo0lmsOMNiS0ixG0ymRGt2Ymqqc6cu1OsXLL4AYZLCm+Wdg6h3KYHlWbCCsy/zABILJdJynpeXF0MEn5/T7QRYwcdf4Vs2nkgBsKxhHi8vRQOiU4pUPoYB3mVlu4AnAiyeiOdExIwKHSyc2YO4tvyAEBHee3xJDaLx3Qd4AmgET5TSQ2EQNbJuRmoa8pysaagp0sXi84OOFpgn4WZSoBM/F9kIcf/o06Xl7RcgT0nGi+8cKTluDtK5yCaNBxpoO2dkS5HV+VBl3PjlUsCXNG6Zd6fcebm805vkD6W790bCbaTthV1u0lNwb9tBSG9ePmWZTo/4fOB9dyhYwx2JtAkP4DYyTSGazTP6ewxNcOMCgSKNMuF4KFih57HwhVTBxUjFMZ3vHyy81Ov3pZyNhLsTV7sMSgiD5Gmk7d2+KBdyh1xBlw1JxNMPOoEn0hne+KUWxjSi7yxh0pmxsjL9U/zenb3kcFiKRHyhUFDdtb18bZ93/23fzYvShRsTLL7r+8F5911bR8ONA33AgzcnXJaeuDzqwdCHAGeQN0LoSDIMriwohxjlcBUSmWCUg8EXGgoJJl8kkofh8FAjw0/YNodCiGupaWqKh29A9jg3kgnlAJ4VHZkSXd2123wgfc0GMqBbdG/Frcnx5DKugtAhSVtpaVoGCtRe0Gk4H02M8sPTiggmx/Wyr2RuvnJktJV2VsMbtyH2jk3R1U0fPWua6V/c6SwAnPt45EiHIwXcBY6UeYgTy5F8lNHB1oG35xy+pnwGtrdB/LMmnmzOwBrlcH3FwKRbWkH09TxTOTc3VX/SelI/NSeL4I4/9D9tcvOWJTWelgK6dKv3kSh3Ln8eswaye2efoM902fWyQLTAy9vWpv/Vrz/P0MfR7c7JtBc1h7XatCk25uuUa8uavUh9kL+wJ62M/X97matPXxa8XTA6O6VRcoPEFXtq1arS0nE9o0tmDyjvn64m6O8qxMiGWSkpSiPv/r9KRgNNpURLKvXpjrzpeTuCixTsc0YLnywcPWFrZGt4MrZHsyeIU8wx3Fol2d12anfZJdRrHkuT7LHW5Str1Kie7ElyJ7l8U40audJo1SpjaPogLRY0qPD3kA0tHC8c1VykxQbHS0csBOlQx37L5b7eIPZ2aOrm6+qMrF17pFx7xIjaspNdZwTmZCR0y1GOIZ9qfuxaa4iupm4IhGllF2YUv5DhZV0onhHVRMXuD7aJs23b3TjiNttYcXvtI623lW3YsOz2MoKmsGuKODvfbLGV7UVhm+wqXKZRwzLby4Iazi3Jb53NS5Zs7nyT+0hvXtKZ8ct947xVxt1N1jFkozjaMcZabeHCkzljck4GB1YTR+f0/dJho3WWuKncv/rCRV9dtLC62CenD5wHC7bR29n+l/Z/3mSdadsojnGMEVt09M7pQ3YN1QvlDAe+CL/UB1P+ByAeZ/vpfSAeEmDFgLhqNbPTBQA7Rh8D8XvOslwTdjHXA31YySrfq/RN+BsxZgm/6TAr6/h1EisIxzV+lgIYoWTlN8vD8NK1dF8XS5UPeuH/54rYrDNvyRC/1qxOWQB6UKg0Atwa99aR6wcAXJKdD1i4v/sucnv0S2QdRVowDFoHBcDrEcD9MMuG2HCaBGOpD3QZucWkXDuTcR1Mjls4WgMBTqDluJWieRRDzasFJGAgGAhnAFAQUxBNYMY2JuUeZDLueSbHvRutOfDoDxyC+x996qf57c489fucoAQNrXbU6+CNkytr5qDyB9rJqpRR4KgfJO6DpyovC953eKT6Z/C6rUUMmRQcvdlPg7WBYgoDtOSdSFwWheHOyHVws2cJKOLHb5CVXdKeFnjGIdZYKzPf9wFaE0tJfBtw/IBks/vdkUqurGa+E96kzQkAfsNWLR3CIFeMyoFD3ppBsNoVkMgfNABN5LoGjmipEH0ZUyJfmsad7g0APHUPSyGVphum5ZZ19nZcz3dx3yBkW6/ufcrqzEzWsk6AT1qy5Cl2mN7a8+efyap9NwkOopoY+9Gq3WmI8Nk69BrH7FXkLsg+S4j7LjS40cpr2KyHHqcwzmYA") format("woff2"),url('+s+') format("woff"),url('+h+') format("truetype")}.vssfont{font-family:"vssfont" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vss-video-ratio-1:before{content:"\\ea41"}.vss-fullscreen1:before{content:"\\e60a"}.vss-video-ratio:before{content:"\\e661"}.vss-video-fill:before{content:"\\e671"}.vss-video-fill-1:before{content:"\\e600"}.vss-mute:before{content:"\\e851"}.vss-pause:before{content:"\\ea8a"}.vss-play:before{content:"\\e653"}.vss-open-voice:before{content:"\\e753"}.vss-snapshot:before{content:"\\e604"}.vss-stop:before{content:"\\e611"}.vss-mode:before{content:"\\e61e"}.vss-cancel-fullscreen:before{content:"\\e61f"}.vss-fullscreen:before{content:"\\e620"}\n',""]),t.exports=e},function(t,e,i){"use strict";t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},function(t,e,i){"use strict";i.r(e),e.default="data:font/woff;base64,d09GRgABAAAAAAo0AAsAAAAAELgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA8FU1hY21hcAAAAYgAAADEAAACfh3D25tnbHlmAAACTAAABXcAAAjIHpOf3WhlYWQAAAfEAAAALwAAADYgQ8HeaGhlYQAAB/QAAAAeAAAAJAfzA/lobXR4AAAIFAAAABEAAAA8PGkAAGxvY2EAAAgoAAAAIAAAACAP/BHwbWF4cAAACEgAAAAfAAAAIAEfAH1uYW1lAAAIaAAAAUIAAAJbMgE9YHBvc3QAAAmsAAAAhgAAAMzvQ6KQeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGFhZ5zAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHnjG86mJu+N/AwMB8hwFIMjCiKGICAHTmDPV4nOWS0Q2CQAyG/5MTFJHIqw/IAC7BCIQJGIE1eHYYH31ylB/CEthSNDGGCWzzXdJe2rv0L4AtgEC4Ch5wTzioPSTr5nyAeM573CQ+46QZgp4xMxas2bDt66Eay7GbJuBzl//erZiTvm/Pv1x/GGODAxIckWInr3vsEUpNJIXhas//sWQ+70uUqgKGqktvqIpckHmCmSGTBXNDO/FiyLTBwph71oYoADaGbg5bQ7enrw3RB0NliFIYS0M3auwMRC+wXUU4eJyNFVtoHFX0nns3m5AOMzubzGN3M5Od2eyksrCbZF+ptYmxKc2DlGBTLU0pWgRFam1L2q9iafFD+iFNlVKC0AdtqRbFfhj6IVj90FhbtAWxKEYpRcVAaQRRavbWc2c2L23FZTj3PO897yVhQu7fZxfpdaKQZpIn68ko2UVIg9qo552OUlEteCnHDdeojWE8PaRLyNfLWmPY9dZAwcuA6xVKq6FDV5G3QJVQVurQoRjIfEnYAmHVEKgFCsjShcL7SZ0W9GRSr1zVk3RXiFau0lCI0gINHZEb5RDdUy/L9XuERoDRELLnTi4jL/sa8+r0Ub5V6MMZAflWcR+cQbhtiUmy8ucSExn2LaUq9+rlJQ8Q/NVgvr5mF1gGsRVEJQZJYLa0VDGvOQKkVAGKjgD5Bkd1Tg/NUHvi56GhmcotPLZRwgmdXmQMzcBlToiow09sgsVJHd4aJynSSjKElDW8SOTK8ZNbzBdVkbNUEZ/QUvgGlqNGddQafOnjycl0iRVKaXGOTvI7k6OlNE3xTniJ34HoH4IMRDQlsNFRQU2ifGqU36nGFvjAiEQ0YqMPJI03w//wgt4WF1W+f5ATb8EUf+PBz1dzSgi7RH/BHkyRTjJEnsWcYpdpS7quIRX0m99FomVKBY8FbRYQ1QbTq30myEBPWLFUlfIbLuBdoTs0y9IqbyJcfygUliKSpR2qk6TzdVI4JJC6Q5olseFlpBdggTo9bmm8IG6Bq5pVOb9ELyLBjwt64lp+eRlJ6xBb1J/vra/YR6wNO8vEacySLmQCDlSHAThCLsPoGw0bao0u8FoLngJGEfKGjuFAqhq9r6IbelgotXpsx9zdFUZSYhGEnyppW7FUpS9W737ZrO05zV878LnWzL97OtHSQqcUz5JXmYaWWbvGtZtbWERKGivm7iKkmxQ7rdgbvL7sC9s/TMjRjaenec0xRTZvwCPpOI+nYUaxPXnVYP/x7rVPXnnmOREP9Wclg7MidgsBNRh8UU1RiTS6jBX2ayT2DFxI6i+KUUUAA/NYkv5e0QVOf0UoFsQCJd4AfOMGe55lCY4n2BCuhXAW8LouMJiVse0MdzN9GfzgdqK/P8GvJ1hnO321vZMl/LbzwWd0FqeuhazGO6o5Dtdiw3SUMdHp9toFTzHXwtWa+SzXVtXaS+VSq0cvyiub5KaGBgQr5azj8NlrB+OeFz94TbNtGBHSHkPXjR4h32hblk3bBJoYHGgSwuz+/T9MeHGOCZ2IKAl6MK50Cvnjm5/atLlHaGzcvXPnbnQ5hHHPsmmmkBhxSY48hp7jHPrL2oKqv/MbvEYsZbGEwc0CZqbDBpkyV4ZGGzq6oJAF9vqJnMM/cXInnFzOYU0I52ZVw3AMA4Z79/b2jh0eWwe9Y+uccjJZfqLsOGX68rCTzTrDaOcKBKbRWhg4Bt/eu/fwmDDa2wv7kp09ZQdBZ7Jary/YB6xIGvwZtwEdlQHdrlbtEj1i5S38Krv8kxUXccuX+X31bUhjHvZVDq90lkebXtgcWl4ELTaI6LhidZOwY5VRNRZT6dmoaVb66dniwECR3zwgePy9aCwWfYXfLAwO0huxKN8iuHAuGhtBnS2FgZFYKobfyEABzhUH/P65P8XeZgbGkyFrfW9kEZMN6E+XiCkLgH4Y1X/MWoSFbqwQ+pROLf4NlkWBFPA9pve4nBvO4Qe/+Wfl1qmICaZjjkuuKY13qaYB905GYvOco91YK6ajLlfahEEbzAqizYyeVA0z0jUuma40brixraZ6SnC6j/oc0zWDGL5h72A+/yuGh/j6sNjoX/+IgW84tegwhoCdRf8VFfPQd65UDWcxlkqtgTGYproQg0nfNdUFliMdRdbfcc6+8AB4nGNgZGBgAOJ/IVM2xPPbfGXgZmEAgXvt+z4h6P8nWESZTYFcDgYmkCgAbRoMkwB4nGNgZGBgbvjfwBDDkskABCyiDIwMqIAfAFLlAvYAAHicY2FgYGAhBWci2AAMPwCmAAAAAAAAAACYAMQBBgFCAcYCLgJgAoAC3AM4A1oDoAQCBGR4nGNgZGBg4GcoZGBjAAEmIOYCQgaG/2A+AwAVcgGdAHicXZE/bsIwGMVf+FcVpA6t1KGTu6BKlRJgZKuQYGegcwhOCEriyDFITD1NT9AT9AQ9QXuJXqCvyccAsfz5957fZzkJgFv8wEPz3HE27OGKquEW+UG4TX4U7pCfhLsYIBDu0Z8K9/GMF+EBT8x4gte5phriTdjDDd6FW+QP4Tb5U7hD/hLu4h7fwj36v8J9rDxPeICh9zqzOnR6o9ZHlUamiE3hDlX1vyx1ss9CK0qWlbZVago19kfiLHSh7emI6pBMnItVbE2u5tzVWWZUac1OR87fOldOgyAW349MjhksNEI41g0U1jiypohgUCCuq8MBFcdJLZlNsOeHCtl9vneuVkxa6rTWCmP4GF1kFswUde7yFhWTCSZ0HdOK07InJ82lV/MOGVmhrPd2dCL6PrZ1V8mfHHDEF3m/fr/8D+MqbIkAAHicbc1BDoMgFIRhxmJrQWt7EBYeieAzJUEeETDp7btwYRf9V18yixGNOFLifyMaXCDR4oobOtyhoNFjwAMjnmLY/UxsNls8m0kvNYTsNqI46Z9FHV58CP1JM8m1FmqTrZlkCvajOFE0O3tHXY425TcXmQsnufJML2ejo2DOE3VSiC/uhjJBAAA="},function(t,e,i){"use strict";i.r(e),e.default="data:font/ttf;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI8FU1hAAABjAAAAGBjbWFwHcPbmwAAAigAAAJ+Z2x5Zh6Tn90AAATIAAAIyGhlYWQgQ8HeAAAA4AAAADZoaGVhB/MD+QAAALwAAAAkaG10eDxpAAAAAAHsAAAAPGxvY2EP/BHwAAAEqAAAACBtYXhwAR8AfQAAARgAAAAgbmFtZTIBPWAAAA2QAAACW3Bvc3TvQ6KQAAAP7AAAAMwAAQAAA4D/gABcBGkAAAAABBUAAQAAAAAAAAAAAAAAAAAAAA8AAQAAAAEAAP5UlLBfDzz1AAsEAAAAAADeh77yAAAAAN6HvvIAAP/IBBUDNQAAAAgAAgAAAAAAAAABAAAADwBxAAYAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAQEBwGQAAUAAAKJAswAAACPAokCzAAAAesAMgEIAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAwOYA6ooDgP+AAAAD3ACAAAAAAQAAAAAAAAAAAAAAAAACBAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABGkAAAQAAAAEAAAAAAAABQAAAAMAAAAsAAAABAAAAcYAAQAAAAAAwAADAAEAAAAsAAMACgAAAcYABACUAAAAGgAQAAMACuYA5gTmCuYR5iDmU+Zh5nHnU+hR6kHqiv//AADmAOYE5grmEeYe5lPmYeZx51PoUepB6or//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABABoAGgAaABoAGgAeAB4AHgAeAB4AHgAeAAAABQAKAAIACwAMAA0ADgAIAAMABAAJAAYAAQAHAAABBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAC4AAAAAAAAAA4AAOYAAADmAAAAAAUAAOYEAADmBAAAAAoAAOYKAADmCgAAAAIAAOYRAADmEQAAAAsAAOYeAADmHgAAAAwAAOYfAADmHwAAAA0AAOYgAADmIAAAAA4AAOZTAADmUwAAAAgAAOZhAADmYQAAAAMAAOZxAADmcQAAAAQAAOdTAADnUwAAAAkAAOhRAADoUQAAAAYAAOpBAADqQQAAAAEAAOqKAADqigAAAAcAAAAAAAAAmADEAQYBQgHGAi4CYAKAAtwDOANaA6AEAgRkAAYAAP//A7EC0QAPAB8AMwBHAFsAcAAAExEUFjMhMjY1ETQmIyEiBgURFAYjISImNRE0NjMhMhY3FRQGIiY9ATQmKwEiJjQ2OwEyFhEVFAYrASImNDY7ATI2PQE0NjIWATU0NjsBMhYUBisBIgYdARQGIiYTFAYrASImPQE0NjIWHQEUFjsBMhawIBYCNBYgIBb9zBYgAnAEAv3MAgQEAgI0AgSQDhQOBAJyCg4OCnIWICAWcgoODgpyAgQOFA78oCAWcgoODgpyAgQOFA7ADgpyFiAOFA4EAnIKDgI6/lwWICAWAaQWICAW/lwCBAQCAaQCBARecgoODgpyAgQOFA4g/fhyFiAOFA4EAnIKDg4BdnIWIA4UDgQCcgoODv36Cg4gFnIKDg4KcgIEDgAAAAAFAAD/1QOrAysABQALABEAFwAbAAATFSM1MxUhIzUzFSMRNTMVIzUhMxUjNTMTIREhok3rAh6a501N6/3imudNXgIA/gAC3prnTU3r/eKa501N6wHA/gAABgAA/+YDmgMaAAgAEQAaACMAJwArAAA3FTMVIyImPQEhFRQGKwE1MzURMhYdASM1IzUhFSMVIzU0NjMFESERBSERIcG2tiU2AzQ2Jba2JTZbtv7utls2JQIj/jgBbf7uARL3tls2Jba2JTZbtgIjNiW2tltbtrYlNrb+OAHIW/7uAAAABQAA/+YDmgMaAAMADAAVAB4AJwAAJSERIQEVMxUjIiY9ASEVFAYrATUzNREyFh0BIzUjNSEVIxUjNTQ2MwLk/jgByP3dtrYlNgM0NiW2tiU2W7b+7rZbNiWcAcj+k7ZbNiW2tiU2W7YCIzYltrZbW7a2JTYAAAAABQAAAAADuALoAA8AIwA4AE0AYQAAEyEyFhURFAYjISImNRE0NhMjIiY9ATQmIgYdARQWOwEyNjQmAzI2PQE0NjsBMjY0JisBIgYdARQWASIGHQEUBisBIgYUFjsBMjY9ATQmAyMiBhQWOwEyFh0BFBYyNj0BNCbKAmwVHR0V/ZQVHR1HggQGDBAMHRWCCAwMqAgMBgSCCAwMCIIVHQwDUAgMBgSCCAwMCIIVHQwmgggMDAiCBAYMEAwdApgdFf40FR0dFQHMFR39qAYEgggMDAiCFR0MEAwB4AwIggQGDBAMHRWCCAz+wAwIggQGDBAMHRWCCAwCCAwQDAYEgggMDAiCFR0AAAAABQAA/9ADvwMwAAsAGAAfAC4APgAABQEmNDYyFwEWFAYiAyYiBhQXHgEHFz4BJic0Jg8BFzUBMxcWNj0BASMiBh0BFBYBJiIGFBcWFxYGBxc+AScmA2z88AsXIAwDEAsXIMYPJR4PHREPSBkKIs8fFXKi/oh/yRUf/ttXGyQkAsgPJh0OORgXFStDPSIeHyQDEAwgFwv88AwgFwJVDx4lDx5OJkguaGK8Gw4SU6Le/gWWDw4Y0gEpJRr+GiUB6w8eJg45S0mYP0NSymBkAAAAAAIAAP/VAysDKwAPAB8AAAERFAYrASImNRE0NjsBMhYlIyIGFREUFjsBMjY1ETQmAasgFmoWICAWahYgAUpqFiAgFmoWICAC9f0WFiAgFgLqFiAgICAW/RYWICAWAuoWIAAAAAABAAD/0gNnAy4ADgAAAR4BBgcBBi4BNRE0PgEXAx0rHh4r/iIrSCsrSCsB5BtJSRv+0RsDODEChDE4AxsAAAAAAwAAAAADxwLxABEAJAA7AAABJiIGFBceAQYHBhQWMjc+ASYlMQcjIgYVERQWOwEXFjY1ETQmBSYiBhQXFhcWBwYHBhQWMjcxNjc2JyYCsQ4oHA4cExMcDhwoDi4hIf7xzYEaJiYagc0VHh4BVA4oHA5BFxYWF0EOHCgOUx4dHR4CMA4cKA4bS0ocDigcDi58fN+aJhr+/holmhAPGwKBGg84DhwoDkBYVlVYQQ4oHA5TcW5ucQAAAAQAAP/xA94DDwAZACIALwA8AAABIzU0JiMhIgYdASMiBhURFBYzITI2NRE0JgUiJjQ2MhYUBgEiLgE0PgEyHgEOAgMiDgEUHgEyPgE0LgEDjp8vIf7CIS+fIS8vIQMcIS8v/PERFxchFxcBUER1RER0inRFAUR0RSE3ICA3QjchITcCb1AhLi4hUC8h/iIhLi4hAd4hL58XIRcXIRf+YkR1inRERHSKdUQBdiA4QTchIDhBOCAAAAABAAD/ywO1AzUAEwAAEyEyHgEVERQOASMhIi4BNRE0PgG4ApAdMx0dMx39cB0zHR0zAzUdMx39cB0zHR0zHQKQHTMdAAIAAP/aBBUDJgAPAC8AAAEhIgYVERQWMyEyNjURNCYlITIWFREUBiMhFTMyFhQGIyEiJjQ2OwE1ISImNRE0NgOW/VsRGRkRAqUSGBj9SQKlNUpKNf7YfxEZGRH+rhIZGRJ+/tg0S0sC0hkS/loRGRkRAaYSGVRKNf5aNEpUGSMZGSMZVEo0AaY1SgAAAwAA/8gDqQMXABMAKwBDAAABISIOARURFB4BMyEyPgE1ETQuAQEzMhYXFRQGIiY9AQcGIiY0PwEjIiY0NiUjIiY9ATQ2MhYdATc2MhYUDwEzMhYUBgL6/g4vUC8vUC8B8i9QLy9Q/eKhEBgBGCEYkQwiGAyRPhEYFwH6oBAZGCEYkQwiGAySPxEXFwMWL1Av/g8wUC8vUDAB8S9QL/4wGBKgERcYED6RDBgiDJEXIhlcGBGhERcYED+SDBgiDJEYIhgAAAMAAP/XA6oDJgATACsAQwAAASEiDgEVERQeATMhMj4BNRE0LgEBIyImPQE0NjIWHQE3NjIWFA8BMzIWFAYBMzIWFxUUBiImPQEHBiImND8BIyImNDYC+/4OL1AvL1AvAfIvUC8vUP5OoRAZGCEYkQwiGAyRPhEXFwECoRAYARghGJEMIhgMkT4RGBcDJi9QMP4PL1AvL1AvAfEwUC/9BxcSoBEYGBE+kQwYIgyRFyIYAq0YEaARGBgRPpEMGCEMkhciGAAAABIA3gABAAAAAAAAABMAAAABAAAAAAABAAcAEwABAAAAAAACAAcAGgABAAAAAAADAAcAIQABAAAAAAAEAAcAKAABAAAAAAAFAAsALwABAAAAAAAGAAcAOgABAAAAAAAKACsAQQABAAAAAAALABMAbAADAAEECQAAACYAfwADAAEECQABAA4ApQADAAEECQACAA4AswADAAEECQADAA4AwQADAAEECQAEAA4AzwADAAEECQAFABYA3QADAAEECQAGAA4A8wADAAEECQAKAFYBAQADAAEECQALACYBV0NyZWF0ZWQgYnkgaWNvbmZvbnR2c3Nmb250UmVndWxhcnZzc2ZvbnR2c3Nmb250VmVyc2lvbiAxLjB2c3Nmb250R2VuZXJhdGVkIGJ5IHN2ZzJ0dGYgZnJvbSBGb250ZWxsbyBwcm9qZWN0Lmh0dHA6Ly9mb250ZWxsby5jb20AQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdAB2AHMAcwBmAG8AbgB0AFIAZQBnAHUAbABhAHIAdgBzAHMAZgBvAG4AdAB2AHMAcwBmAG8AbgB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMAB2AHMAcwBmAG8AbgB0AEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAAcwB2AGcAMgB0AHQAZgAgAGYAcgBvAG0AIABGAG8AbgB0AGUAbABsAG8AIABwAHIAbwBqAGUAYwB0AC4AaAB0AHQAcAA6AC8ALwBmAG8AbgB0AGUAbABsAG8ALgBjAG8AbQAAAgAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAQIBAwEEAQUBBgEHAQgBCQEKAQsBDAENAQ4BDwEQAA12aWRlby1yYXRpby0xC2Z1bGxzY3JlZW4xC3ZpZGVvLXJhdGlvCnZpZGVvLWZpbGwMdmlkZW8tZmlsbC0xBG11dGUFcGF1c2UEcGxheQpvcGVuLXZvaWNlCHNuYXBzaG90BHN0b3AEbW9kZRFjYW5jZWwtZnVsbHNjcmVlbgpmdWxsc2NyZWVuAAA="},function(t,e,i){var r=i(47),n=i(253);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={insert:"head",singleton:!1};r(n,o);t.exports=n.locals||{}},function(t,e,i){(e=i(48)(!1)).push([t.i,".vss-loading{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;background-color:rgba(0,0,0,0.6);z-index:9}.vss-loading-center{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;flex-direction:column;justify-content:center}.vss-loading-icon{display:block;margin-bottom:5px;border:3px solid #f3f3f3;border-radius:50%;border-top:3px solid #ad2605;width:25px;height:25px;animation:load .5s linear infinite}.vss-loading-img{margin-bottom:5px;width:40px;height:40px}.vss-loading-text{color:#ffffff;font-size:14px}.vss-canvas{width:100%;height:100%;position:absolute;top:0;left:0;background:#000000}.vss-big-play-button{position:absolute;z-index:100;top:0;bottom:0;left:0;right:0;width:50px;height:50px;display:flex;align-items:center;justify-content:center;margin:auto;color:#ffffff;border-radius:50%;background-color:rgba(255,255,255,0.4)}.vss-big-play-icon{font-size:24px;margin-left:3px}.vss-pointer{cursor:pointer}.vss-control-show .vss-control-bar{opacity:1;visibility:visible}.vss-control-bar{height:34px;position:absolute;bottom:0;width:100%;display:flex;align-items:center;justify-content:space-between;color:#ffffff;background-color:rgba(43,51,63,0.7);z-index:20;opacity:0;visibility:hidden;transition:all .2s ease-in-out}.vss-control-bar-right,.vss-control-bar-left{display:flex;align-items:center;flex-shrink:0}.vss-full-screen-btn{width:34px;height:34px;display:flex;align-items:center;justify-content:center}.vss-control-btn{width:34px;height:34px;display:flex;align-items:center;justify-content:center}.vss-item-box{height:34px;display:flex;align-items:center;justify-content:center;padding:0 5px}.vss-control-bar-conter{width:100%}.vss-time-box{display:flex;align-items:center;justify-content:space-between;color:#ffffff}.vss-time-left-text,.vss-time-right-text{flex-shrink:0;font-size:13px;margin:0 5px}.vss-time-schedule{width:100%;padding:0 5px}.vss-time-track-out{position:relative;width:100%;height:3px;vertical-align:middle}.vss-time-track{position:relative;width:100%;height:3px;background-color:#ffffff;vertical-align:middle;cursor:pointer;border-radius:3px}.vss-time-progress{position:absolute;left:0;top:0;height:100%;width:0;background-color:#00ABBE;border-top-left-radius:3px;border-bottom-left-radius:3px;user-select:none}.vss-time-button-wrapper{height:12px;width:12px;position:absolute;z-index:1001;top:-5px;transform:translateX(-50%);background-color:transparent;text-align:center;user-select:none;line-height:normal;cursor:pointer}.vss-time-button-wrapper:hover .vss-time-button-wrapper_tip:not(.vss-hide){display:block}.vss-time-button-wrapper_tip{display:none;position:absolute;top:-30px;background-color:rgba(0,0,0,0.5);border:1px solid rgba(0,0,0,0.6);padding:2px 5px;color:#ffffff;height:16px;z-index:10;border-radius:3px;transform:translateX(calc(-50% + 6px));white-space:nowrap}.vss-time-button-wrapper_tip:after{position:absolute;content:'';left:0;right:0;margin:0 auto;width:0;bottom:-6px;border-top:5px solid rgba(0,0,0,0.5);border-left:5px solid transparent;border-right:5px solid transparent}.vss-time-button-wrapper_button{width:12px;height:12px;border:1px solid #333;background-color:#fff;border-radius:50%;transition:.2s;user-select:none}.vss-time-button-wrapper_button:hover{transform:scale(1.2)}.vss-full-screen-btn span{font-size:18px}.vss-poster-box{width:100%;height:100%;position:absolute;top:0;left:0;overflow:hidden}.vss-poster-image{width:100%;height:100%}@keyframes load{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}\n",""]),t.exports=e},function(t,e,i){var r=i(47),n=i(255);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={insert:"head",singleton:!1};r(n,o);t.exports=n.locals||{}},function(t,e,i){(e=i(48)(!1)).push([t.i,"input[type=range]{-webkit-appearance:none}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}input[type=range]::-webkit-slider-runnable-track{height:15px;border-radius:10px}input[type=range]:focus{outline:none}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:15px;width:15px;margin-top:-2px;background:#ffffff;border-radius:50%}.conter{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.Loding{margin:0 auto;margin-bottom:5px;border:3px solid #f3f3f3;border-radius:50%;border-top:3px solid #2e8e9a;width:25px;height:25px;animation:load .5s linear infinite}.LodingTitle{margin-top:20px;color:#fff;font-size:14px}@keyframes load{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.bigPlayBox{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background-color:rgba(0,0,0,0.5);cursor:pointer;width:80px;height:80px;border-radius:40px;text-align:center;line-height:80px;font-size:36px;color:#fff;z-index:9}\n",""]),t.exports=e},function(t,e,i){var r=i(47),n=i(257);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.i,n,""]]);var o={insert:"head",singleton:!1};r(n,o);t.exports=n.locals||{}},function(t,e,i){(e=i(48)(!1)).push([t.i,".vss-player{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;-o-user-select:none;user-select:none;z-index:5}.vss-player:after{position:absolute;content:'';top:0;bottom:0;left:0;right:0;margin:auto;z-index:10}.vss-shade{box-shadow:0 0 5px rgba(0,0,0,0.5)}.vss-mask{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;background-color:rgba(0,0,0,0.6);z-index:9}.vss-mask-center{position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);display:flex;align-items:center;flex-direction:column;justify-content:center}.vss-loading-logo-img{display:block;width:240px;margin-bottom:5px}.vss-loading-logo-text{letter-spacing:2px;text-align:center;font-size:18px;font-weight:600;background:linear-gradient(90deg, #833ab4 0%, #fd1d1d 33.3%, #fcb045 66.6%, #833ab4 100%);-webkit-background-clip:text;color:transparent;background-size:300% 100%;animation:logoText-animation 4s infinite linear}@keyframes logoText-animation{0%{background-position:0 0}100%{background-position:-150% 0}}.vss-show{display:block !important}.vss-hide{display:none !important}.no-copy{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;-o-user-select:none;user-select:none}.vss-contextm-menu{position:absolute;top:0;left:0;color:#333;background-color:#ffffff;padding:5px 0;opacity:0;visibility:hidden;margin:0;border-radius:2px;z-index:10005;list-style:none;box-shadow:0 1.5px 4px rgba(0,0,0,0.24),0 1.5px 6px rgba(0,0,0,0.12);font-family:Roboto-Medium, 'Noto Sans CJK DemiLight', 'Microsoft YaHei', Arial, Helvetica, sans-serif;box-sizing:initial}.vss-contextm-menu.vss-contextm-menu-show{opacity:1;visibility:visible}.vss-contextm-menu li{position:relative;max-width:360px;padding:5px 15px;text-align:left;white-space:nowrap;text-overflow:ellipsis;font-size:14px;color:#383838;transition:all .2s;user-select:none;cursor:pointer}.vss-contextm-menu li:hover{background-color:#c8c8c8}.vss-message-box{position:absolute;bottom:34px;left:0;z-index:10;max-height:200px;padding:0 15px;opacity:1;visibility:visible;transition:all .2s ease-in-out}.vss-message-box .vss-message-item{color:#c1c1c1;font-size:12px;text-shadow:1px 1px 2px #000000}.vss-message-box.vss-message-hide{opacity:0;visibility:hidden}.vss-export-message-box{position:absolute;bottom:34px;right:0;z-index:10;max-height:200px;max-width:200px;padding:0 15px;opacity:1;visibility:visible;transition:all .2s ease-in-out}.vss-export-message-box .vss-export-message-item{color:#c1c1c1;font-size:12px;text-shadow:1px 1px 2px #000000}.vss-export-message-box.vss-export-message-hide{opacity:0;visibility:hidden}.vss-osd-message-box{position:absolute;background-color:rgba(0,0,0,0.5);z-index:10;max-height:15em;max-width:30em;overflow:hidden;padding:1em;opacity:1;visibility:visible;height:fit-content;color:#c1c1c1}.vss-osd-message-box.pos_righttop{right:1em;top:1em}.vss-osd-message-box.pos_lefttop{left:1em;top:1em}.vss-osd-message-box.pos_rightbottom{right:1em;bottom:40px}.vss-osd-message-box.pos_leftbottom{left:1em;bottom:40px}.vss-osd-message-box.pos_center{left:50%;top:50%;transform:translate(-50%, -50%)}.vss-osd-message-box .vss-osd-message-item{font-size:12px}.vss-osd-message-box .vss-osd-message-item.vss-move-top{margin-top:-1em}.vss-osd-message-box.vss-osd-message-hide{opacity:0;visibility:hidden}\n",""]),t.exports=e},function(t,e){},function(t,e,i){var r;t.exports=(r=i(5),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,e=t.init,i=t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var i=t.byteLength,r=[],n=0;n<i;n++)r[n>>>2]|=t[n]<<24-n%4*8;e.call(this,r,i)}else e.apply(this,arguments)};i.prototype=t}}(),r.lib.WordArray)},function(t,e,i){var r;t.exports=(r=i(5),function(){var t=r,e=t.lib.WordArray,i=t.enc;function n(t){return t<<8&4278255360|t>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(t){for(var e=t.words,i=t.sigBytes,r=[],n=0;n<i;n+=2){var o=e[n>>>2]>>>16-n%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var i=t.length,r=[],n=0;n<i;n++)r[n>>>1]|=t.charCodeAt(n)<<16-n%2*16;return e.create(r,2*i)}},i.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,r=[],o=0;o<i;o+=2){var a=n(e[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(a))}return r.join("")},parse:function(t){for(var i=t.length,r=[],o=0;o<i;o++)r[o>>>1]|=n(t.charCodeAt(o)<<16-o%2*16);return e.create(r,2*i)}}}(),r.enc.Utf16)},function(t,e,i){var r;t.exports=(r=i(5),function(){var t=r,e=t.lib.WordArray;function i(t,i,r){for(var n=[],o=0,a=0;a<i;a++)if(a%4){var s=r[t.charCodeAt(a-1)]<<a%4*2|r[t.charCodeAt(a)]>>>6-a%4*2;n[o>>>2]|=s<<24-o%4*8,o++}return e.create(n,o)}t.enc.Base64url={stringify:function(t,e){void 0===e&&(e=!0);var i=t.words,r=t.sigBytes,n=e?this._safe_map:this._map;t.clamp();for(var o=[],a=0;a<r;a+=3)for(var s=(i[a>>>2]>>>24-a%4*8&255)<<16|(i[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|i[a+2>>>2]>>>24-(a+2)%4*8&255,h=0;h<4&&a+.75*h<r;h++)o.push(n.charAt(s>>>6*(3-h)&63));var u=n.charAt(64);if(u)for(;o.length%4;)o.push(u);return o.join("")},parse:function(t,e){void 0===e&&(e=!0);var r=t.length,n=e?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<n.length;a++)o[n.charCodeAt(a)]=a}var s=n.charAt(64);if(s){var h=t.indexOf(s);-1!==h&&(r=h)}return i(t,r,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),r.enc.Base64url)},function(t,e,i){var r,n,o,a,s,h;t.exports=(h=i(5),i(131),n=(r=h).lib.WordArray,o=r.algo,a=o.SHA256,s=o.SHA224=a.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=4,t}}),r.SHA224=a._createHelper(s),r.HmacSHA224=a._createHmacHelper(s),h.SHA224)},function(t,e,i){var r,n,o,a,s,h,u,l;t.exports=(l=i(5),i(49),i(132),n=(r=l).x64,o=n.Word,a=n.WordArray,s=r.algo,h=s.SHA512,u=s.SHA384=h.extend({_doReset:function(){this._hash=new a.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=h._doFinalize.call(this);return t.sigBytes-=16,t}}),r.SHA384=h._createHelper(u),r.HmacSHA384=h._createHmacHelper(u),l.SHA384)},function(t,e,i){var r;t.exports=(r=i(5),i(49),function(t){var e=r,i=e.lib,n=i.WordArray,o=i.Hasher,a=e.x64.Word,s=e.algo,h=[],u=[],l=[];!function(){for(var t=1,e=0,i=0;i<24;i++){h[t+5*e]=(i+1)*(i+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)u[t+5*e]=e+(2*t+3*e)%5*5;for(var n=1,o=0;o<24;o++){for(var s=0,d=0,f=0;f<7;f++){if(1&n){var c=(1<<f)-1;c<32?d^=1<<c:s^=1<<c-32}128&n?n=n<<1^113:n<<=1}l[o]=a.create(s,d)}}();var d=[];!function(){for(var t=0;t<25;t++)d[t]=a.create()}();var f=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var i=this._state,r=this.blockSize/2,n=0;n<r;n++){var o=t[e+2*n],a=t[e+2*n+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(R=i[n]).high^=a,R.low^=o}for(var s=0;s<24;s++){for(var f=0;f<5;f++){for(var c=0,p=0,m=0;m<5;m++)c^=(R=i[f+5*m]).high,p^=R.low;var g=d[f];g.high=c,g.low=p}for(f=0;f<5;f++){var v=d[(f+4)%5],y=d[(f+1)%5],b=y.high,_=y.low;for(c=v.high^(b<<1|_>>>31),p=v.low^(_<<1|b>>>31),m=0;m<5;m++)(R=i[f+5*m]).high^=c,R.low^=p}for(var w=1;w<25;w++){var A=(R=i[w]).high,M=R.low,E=h[w];E<32?(c=A<<E|M>>>32-E,p=M<<E|A>>>32-E):(c=M<<E-32|A>>>64-E,p=A<<E-32|M>>>64-E);var S=d[u[w]];S.high=c,S.low=p}var k=d[0],T=i[0];for(k.high=T.high,k.low=T.low,f=0;f<5;f++)for(m=0;m<5;m++){var R=i[w=f+5*m],I=d[w],C=d[(f+1)%5+5*m],P=d[(f+2)%5+5*m];R.high=I.high^~C.high&P.high,R.low=I.low^~C.low&P.low}R=i[0];var x=l[s];R.high^=x.high,R.low^=x.low}},_doFinalize:function(){var e=this._data,i=e.words,r=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;i[r>>>5]|=1<<24-r%32,i[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*i.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,h=s/8,u=[],l=0;l<h;l++){var d=a[l],f=d.high,c=d.low;f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),u.push(c),u.push(f)}return new n.init(u,s)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),i=0;i<25;i++)e[i]=e[i].clone();return t}});e.SHA3=o._createHelper(f),e.HmacSHA3=o._createHmacHelper(f)}(Math),r.SHA3)},function(t,e,i){var r;t.exports=(r=i(5),function(t){var e=r,i=e.lib,n=i.WordArray,o=i.Hasher,a=e.algo,s=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),h=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=n.create([0,1518500249,1859775393,2400959708,2840853838]),f=n.create([1352829926,1548603684,1836072691,2053994217,0]),c=a.RIPEMD160=o.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var i=0;i<16;i++){var r=e+i,n=t[r];t[r]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,a,c,_,w,A,M,E,S,k,T,R=this._hash.words,I=d.words,C=f.words,P=s.words,x=h.words,D=u.words,O=l.words;for(A=o=R[0],M=a=R[1],E=c=R[2],S=_=R[3],k=w=R[4],i=0;i<80;i+=1)T=o+t[e+P[i]]|0,T+=i<16?p(a,c,_)+I[0]:i<32?m(a,c,_)+I[1]:i<48?g(a,c,_)+I[2]:i<64?v(a,c,_)+I[3]:y(a,c,_)+I[4],T=(T=b(T|=0,D[i]))+w|0,o=w,w=_,_=b(c,10),c=a,a=T,T=A+t[e+x[i]]|0,T+=i<16?y(M,E,S)+C[0]:i<32?v(M,E,S)+C[1]:i<48?g(M,E,S)+C[2]:i<64?m(M,E,S)+C[3]:p(M,E,S)+C[4],T=(T=b(T|=0,O[i]))+k|0,A=k,k=S,S=b(E,10),E=M,M=T;T=R[1]+c+S|0,R[1]=R[2]+_+k|0,R[2]=R[3]+w+A|0,R[3]=R[4]+o+M|0,R[4]=R[0]+a+E|0,R[0]=T},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,a=0;a<5;a++){var s=o[a];o[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return n},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,i){return t^e^i}function m(t,e,i){return t&e|~t&i}function g(t,e,i){return(t|~e)^i}function v(t,e,i){return t&i|e&~i}function y(t,e,i){return t^(e|~i)}function b(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(c),e.HmacRIPEMD160=o._createHmacHelper(c)}(Math),r.RIPEMD160)},function(t,e,i){var r,n,o,a,s,h,u,l,d;t.exports=(d=i(5),i(75),i(76),n=(r=d).lib,o=n.Base,a=n.WordArray,s=r.algo,h=s.SHA1,u=s.HMAC,l=s.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:h,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var i=this.cfg,r=u.create(i.hasher,t),n=a.create(),o=a.create([1]),s=n.words,h=o.words,l=i.keySize,d=i.iterations;s.length<l;){var f=r.update(e).finalize(o);r.reset();for(var c=f.words,p=c.length,m=f,g=1;g<d;g++){m=r.finalize(m),r.reset();for(var v=m.words,y=0;y<p;y++)c[y]^=v[y]}n.concat(f),h[0]++}return n.sigBytes=4*l,n}}),r.PBKDF2=function(t,e,i){return l.create(i).compute(t,e)},d.PBKDF2)},function(t,e,i){var r;t.exports=(r=i(5),i(11),r.mode.CFB=function(){var t=r.lib.BlockCipherMode.extend();function e(t,e,i,r){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,r.encryptBlock(n,0);for(var a=0;a<i;a++)t[e+a]^=n[a]}return t.Encryptor=t.extend({processBlock:function(t,i){var r=this._cipher,n=r.blockSize;e.call(this,t,i,n,r),this._prevBlock=t.slice(i,i+n)}}),t.Decryptor=t.extend({processBlock:function(t,i){var r=this._cipher,n=r.blockSize,o=t.slice(i,i+n);e.call(this,t,i,n,r),this._prevBlock=o}}),t}(),r.mode.CFB)},function(t,e,i){var r,n,o;t.exports=(o=i(5),i(11),o.mode.CTR=(r=o.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(t,e){var i=this._cipher,r=i.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var a=o.slice(0);i.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)t[e+s]^=a[s]}}),r.Decryptor=n,r),o.mode.CTR)},function(t,e,i){var r;t.exports=(r=i(5),i(11),r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,i=t>>8&255,r=255&t;255===e?(e=0,255===i?(i=0,255===r?r=0:++r):++i):++e,t=0,t+=e<<16,t+=i<<8,t+=r}else t+=1<<24;return t}function i(t){return 0===(t[0]=e(t[0]))&&(t[1]=e(t[1])),t}var n=t.Encryptor=t.extend({processBlock:function(t,e){var r=this._cipher,n=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),i(a);var s=a.slice(0);r.encryptBlock(s,0);for(var h=0;h<n;h++)t[e+h]^=s[h]}});return t.Decryptor=n,t}(),r.mode.CTRGladman)},function(t,e,i){var r,n,o;t.exports=(o=i(5),i(11),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(t,e){var i=this._cipher,r=i.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),i.encryptBlock(o,0);for(var a=0;a<r;a++)t[e+a]^=o[a]}}),r.Decryptor=n,r),o.mode.OFB)},function(t,e,i){var r,n;t.exports=(n=i(5),i(11),n.mode.ECB=((r=n.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),r.Decryptor=r.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),r),n.mode.ECB)},function(t,e,i){var r;t.exports=(r=i(5),i(11),r.pad.AnsiX923={pad:function(t,e){var i=t.sigBytes,r=4*e,n=r-i%r,o=i+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},function(t,e,i){var r;t.exports=(r=i(5),i(11),r.pad.Iso10126={pad:function(t,e){var i=4*e,n=i-t.sigBytes%i;t.concat(r.lib.WordArray.random(n-1)).concat(r.lib.WordArray.create([n<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},function(t,e,i){var r;t.exports=(r=i(5),i(11),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},function(t,e,i){var r;t.exports=(r=i(5),i(11),r.pad.ZeroPadding={pad:function(t,e){var i=4*e;t.clamp(),t.sigBytes+=i-(t.sigBytes%i||i)},unpad:function(t){var e=t.words,i=t.sigBytes-1;for(i=t.sigBytes-1;i>=0;i--)if(e[i>>>2]>>>24-i%4*8&255){t.sigBytes=i+1;break}}},r.pad.ZeroPadding)},function(t,e,i){var r;t.exports=(r=i(5),i(11),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},function(t,e,i){var r,n,o,a;t.exports=(a=i(5),i(11),n=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return n.create({ciphertext:e})}},a.format.Hex)},function(t,e,i){var r;t.exports=(r=i(5),i(31),i(32),i(21),i(11),function(){var t=r,e=t.lib.BlockCipher,i=t.algo,n=[],o=[],a=[],s=[],h=[],u=[],l=[],d=[],f=[],c=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var i=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,n[i]=p,o[p]=i;var m=t[i],g=t[m],v=t[g],y=257*t[p]^16843008*p;a[i]=y<<24|y>>>8,s[i]=y<<16|y>>>16,h[i]=y<<8|y>>>24,u[i]=y,y=16843009*v^65537*g^257*m^16843008*i,l[p]=y<<24|y>>>8,d[p]=y<<16|y>>>16,f[p]=y<<8|y>>>24,c[p]=y,i?(i=m^t[t[t[v^m]]],r^=t[t[r]]):i=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=i.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,i=t.sigBytes/4,r=4*((this._nRounds=i+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<i?o[a]=e[a]:(u=o[a-1],a%i?i>6&&a%i==4&&(u=n[u>>>24]<<24|n[u>>>16&255]<<16|n[u>>>8&255]<<8|n[255&u]):(u=n[(u=u<<8|u>>>24)>>>24]<<24|n[u>>>16&255]<<16|n[u>>>8&255]<<8|n[255&u],u^=p[a/i|0]<<24),o[a]=o[a-i]^u);for(var s=this._invKeySchedule=[],h=0;h<r;h++){if(a=r-h,h%4)var u=o[a];else u=o[a-4];s[h]=h<4||a<=4?u:l[n[u>>>24]]^d[n[u>>>16&255]]^f[n[u>>>8&255]]^c[n[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,h,u,n)},decryptBlock:function(t,e){var i=t[e+1];t[e+1]=t[e+3],t[e+3]=i,this._doCryptBlock(t,e,this._invKeySchedule,l,d,f,c,o),i=t[e+1],t[e+1]=t[e+3],t[e+3]=i},_doCryptBlock:function(t,e,i,r,n,o,a,s){for(var h=this._nRounds,u=t[e]^i[0],l=t[e+1]^i[1],d=t[e+2]^i[2],f=t[e+3]^i[3],c=4,p=1;p<h;p++){var m=r[u>>>24]^n[l>>>16&255]^o[d>>>8&255]^a[255&f]^i[c++],g=r[l>>>24]^n[d>>>16&255]^o[f>>>8&255]^a[255&u]^i[c++],v=r[d>>>24]^n[f>>>16&255]^o[u>>>8&255]^a[255&l]^i[c++],y=r[f>>>24]^n[u>>>16&255]^o[l>>>8&255]^a[255&d]^i[c++];u=m,l=g,d=v,f=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^i[c++],g=(s[l>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&u])^i[c++],v=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^i[c++],y=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&d])^i[c++],t[e]=m,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},function(t,e,i){var r;t.exports=(r=i(5),i(31),i(32),i(21),i(11),function(){var t=r,e=t.lib,i=e.WordArray,n=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=n.extend({_doReset:function(){for(var t=this._key.words,e=[],i=0;i<56;i++){var r=a[i]-1;e[i]=t[r>>>5]>>>31-r%32&1}for(var n=this._subKeys=[],o=0;o<16;o++){var u=n[o]=[],l=h[o];for(i=0;i<24;i++)u[i/6|0]|=e[(s[i]-1+l)%28]<<31-i%6,u[4+(i/6|0)]|=e[28+(s[i+24]-1+l)%28]<<31-i%6;for(u[0]=u[0]<<1|u[0]>>>31,i=1;i<7;i++)u[i]=u[i]>>>4*(i-1)+3;u[7]=u[7]<<5|u[7]>>>27}var d=this._invSubKeys=[];for(i=0;i<16;i++)d[i]=n[15-i]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,i){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var n=i[r],o=this._lBlock,a=this._rBlock,s=0,h=0;h<8;h++)s|=u[h][((a^n[h])&l[h])>>>0];this._lBlock=a,this._rBlock=o^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,f.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var i=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=i,this._lBlock^=i<<t}function c(t,e){var i=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=i,this._rBlock^=i<<t}t.DES=n._createHelper(d);var p=o.TripleDES=n.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),n=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=d.createEncryptor(i.create(e)),this._des2=d.createEncryptor(i.create(r)),this._des3=d.createEncryptor(i.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=n._createHelper(p)}(),r.TripleDES)},function(t,e,i){var r;t.exports=(r=i(5),i(31),i(32),i(21),i(11),function(){var t=r,e=t.lib.StreamCipher,i=t.algo,n=i.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,i=t.sigBytes,r=this._S=[],n=0;n<256;n++)r[n]=n;n=0;for(var o=0;n<256;n++){var a=n%i,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[n]+s)%256;var h=r[n];r[n]=r[o],r[o]=h}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,i=this._j,r=0,n=0;n<4;n++){i=(i+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[i],t[i]=o,r|=t[(t[e]+t[i])%256]<<24-8*n}return this._i=e,this._j=i,r}t.RC4=e._createHelper(n);var a=i.RC4Drop=n.extend({cfg:n.cfg.extend({drop:192}),_doReset:function(){n._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)},function(t,e,i){var r;t.exports=(r=i(5),i(31),i(32),i(21),i(11),function(){var t=r,e=t.lib.StreamCipher,i=t.algo,n=[],o=[],a=[],s=i.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,i=0;i<4;i++)h.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,f=l<<16|65535&u;for(n[0]^=u,n[1]^=d,n[2]^=l,n[3]^=f,n[4]^=u,n[5]^=d,n[6]^=l,n[7]^=f,i=0;i<4;i++)h.call(this)}},_doProcessBlock:function(t,e){var i=this._X;h.call(this),n[0]=i[0]^i[5]>>>16^i[3]<<16,n[1]=i[2]^i[7]>>>16^i[5]<<16,n[2]=i[4]^i[1]>>>16^i[7]<<16,n[3]=i[6]^i[3]>>>16^i[1]<<16;for(var r=0;r<4;r++)n[r]=16711935&(n[r]<<8|n[r]>>>24)|4278255360&(n[r]<<24|n[r]>>>8),t[e+r]^=n[r]},blockSize:4,ivSize:2});function h(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,i=0;i<8;i++){var r=t[i]+e[i],n=65535&r,s=r>>>16,h=((n*n>>>17)+n*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[i]=h^u}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)},function(t,e,i){var r;t.exports=(r=i(5),i(31),i(32),i(21),i(11),function(){var t=r,e=t.lib.StreamCipher,i=t.algo,n=[],o=[],a=[],s=i.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var n=0;n<4;n++)h.call(this);for(n=0;n<8;n++)r[n]^=i[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,f=l<<16|65535&u;for(r[0]^=u,r[1]^=d,r[2]^=l,r[3]^=f,r[4]^=u,r[5]^=d,r[6]^=l,r[7]^=f,n=0;n<4;n++)h.call(this)}},_doProcessBlock:function(t,e){var i=this._X;h.call(this),n[0]=i[0]^i[5]>>>16^i[3]<<16,n[1]=i[2]^i[7]>>>16^i[5]<<16,n[2]=i[4]^i[1]>>>16^i[7]<<16,n[3]=i[6]^i[3]>>>16^i[1]<<16;for(var r=0;r<4;r++)n[r]=16711935&(n[r]<<8|n[r]>>>24)|4278255360&(n[r]<<24|n[r]>>>8),t[e+r]^=n[r]},blockSize:4,ivSize:2});function h(){for(var t=this._X,e=this._C,i=0;i<8;i++)o[i]=e[i];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,i=0;i<8;i++){var r=t[i]+e[i],n=65535&r,s=r>>>16,h=((n*n>>>17)+n*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[i]=h^u}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)},function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return Re}));var r=i(0),n=i(34),o=i.n(n),a=i(133),s=i.n(a),h=function(){function t(t){this.enableTextTexture=0,this.canvas=t,this.yuv=s.a.attach(t,{webGL:!1}),this.format=null}var e=t.prototype;return e.destroy=function(){},e.renderFrame=function(t,e,i,r,n){this.format||(this.format=o.a.format({width:e,height:i,chromaWidth:e/2,chromaHeight:i/2}));var a=o.a.lumaPlane(this.format,new Uint8Array(t.subarray(0,r))),s=o.a.chromaPlane(this.format,new Uint8Array(t.subarray(r,r+n))),h=o.a.chromaPlane(this.format,new Uint8Array(t.subarray(r+n,t.length))),u=o.a.frame(this.format,a,s,h);this.yuv.drawFrame(u)},e.renderVideoFrame=function(t,e,i){if(t){var r=e*i,n=e/2*(i/2);this.renderFrame(t,e,i,r,n)}},t}(),u=i(22),l=i(40),d=i(6),f=i.n(d),c=i(1),p={};!function(){var t=self.navigator.userAgent.toLowerCase(),e=/(edge)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(chrome)[ \/]([\w.]+)/.exec(t)||/(iemobile)[\/]([\w.]+)/.exec(t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(t)||[],i=/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(windows phone)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(android)/.exec(t)||/(windows)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||[],r={browser:e[5]||e[3]||e[1]||"",version:e[2]||e[4]||"0",majorVersion:e[4]||e[2]||"0",platform:i[0]||""},n={};if(r.browser){n[r.browser]=!0;var o=r.majorVersion.split(".");n.version={major:parseInt(r.majorVersion,10),string:r.version},o.length>1&&(n.version.minor=parseInt(o[1],10)),o.length>2&&(n.version.build=parseInt(o[2],10))}if(r.platform&&(n[r.platform]=!0),(n.chrome||n.opr||n.safari)&&(n.webkit=!0),n.rv||n.iemobile){n.rv&&delete n.rv;var a="msie";r.browser=a,n.msie=!0}if(n.edge){delete n.edge;var s="msedge";r.browser=s,n.msedge=!0}if(n.opr){var h="opera";r.browser=h,n.opera=!0}if(n.safari&&n.android){var u="android";r.browser=u,n.android=!0}for(var l in n.name=r.browser,n.platform=r.platform,p)p.hasOwnProperty(l)&&delete p[l];Object.assign(p,n)}();var m=p,g={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};function v(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var y=function(){function t(){}var e,i,r;return t.getConfig=function(){return{globalTag:c.a.GLOBAL_TAG,forceGlobalTag:c.a.FORCE_GLOBAL_TAG,enableVerbose:c.a.ENABLE_VERBOSE,enableDebug:c.a.ENABLE_DEBUG,enableInfo:c.a.ENABLE_INFO,enableWarn:c.a.ENABLE_WARN,enableError:c.a.ENABLE_ERROR,enableCallback:c.a.ENABLE_CALLBACK}},t.applyConfig=function(t){c.a.GLOBAL_TAG=t.globalTag,c.a.FORCE_GLOBAL_TAG=t.forceGlobalTag,c.a.ENABLE_VERBOSE=t.enableVerbose,c.a.ENABLE_DEBUG=t.enableDebug,c.a.ENABLE_INFO=t.enableInfo,c.a.ENABLE_WARN=t.enableWarn,c.a.ENABLE_ERROR=t.enableError,c.a.ENABLE_CALLBACK=t.enableCallback},t._notifyChange=function(){var e=t.emitter;if(e.listenerCount("change")>0){var i=t.getConfig();e.emit("change",i)}},t.registerListener=function(e){t.emitter.addListener("change",e)},t.removeListener=function(e){t.emitter.removeListener("change",e)},t.addLogListener=function(e){c.a.emitter.addListener("log",e),c.a.emitter.listenerCount("log")>0&&(c.a.ENABLE_CALLBACK=!0,t._notifyChange())},t.removeLogListener=function(e){c.a.emitter.removeListener("log",e),0===c.a.emitter.listenerCount("log")&&(c.a.ENABLE_CALLBACK=!1,t._notifyChange())},e=t,r=[{key:"forceGlobalTag",get:function(){return c.a.FORCE_GLOBAL_TAG},set:function(e){c.a.FORCE_GLOBAL_TAG=e,t._notifyChange()}},{key:"globalTag",get:function(){return c.a.GLOBAL_TAG},set:function(e){c.a.GLOBAL_TAG=e,t._notifyChange()}},{key:"enableAll",get:function(){return c.a.ENABLE_VERBOSE&&c.a.ENABLE_DEBUG&&c.a.ENABLE_INFO&&c.a.ENABLE_WARN&&c.a.ENABLE_ERROR},set:function(e){c.a.ENABLE_VERBOSE=e,c.a.ENABLE_DEBUG=e,c.a.ENABLE_INFO=e,c.a.ENABLE_WARN=e,c.a.ENABLE_ERROR=e,t._notifyChange()}},{key:"enableDebug",get:function(){return c.a.ENABLE_DEBUG},set:function(e){c.a.ENABLE_DEBUG=e,t._notifyChange()}},{key:"enableVerbose",get:function(){return c.a.ENABLE_VERBOSE},set:function(e){c.a.ENABLE_VERBOSE=e,t._notifyChange()}},{key:"enableInfo",get:function(){return c.a.ENABLE_INFO},set:function(e){c.a.ENABLE_INFO=e,t._notifyChange()}},{key:"enableWarn",get:function(){return c.a.ENABLE_WARN},set:function(e){c.a.ENABLE_WARN=e,t._notifyChange()}},{key:"enableError",get:function(){return c.a.ENABLE_ERROR},set:function(e){c.a.ENABLE_ERROR=e,t._notifyChange()}}],(i=null)&&v(e.prototype,i),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();y.emitter=new f.a;var b=y,_=i(12),w=i(50),A=function(){function t(){}return t.init=function(){for(var e in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var i=t.constants={};i.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),i.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),i.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),i.STSC=i.STCO=i.STTS,i.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),i.HDLR_VIDEO=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]),i.HDLR_AUDIO=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]),i.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),i.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},t.box=function(t){for(var e=8,i=null,r=Array.prototype.slice.call(arguments,1),n=r.length,o=0;o<n;o++)e+=r[o].byteLength;(i=new Uint8Array(e))[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(t,4);for(var a=8,s=0;s<n;s++)i.set(r[s],a),a+=r[s].byteLength;return i},t.generateInitSegment=function(e){var i=t.box(t.types.ftyp,t.constants.FTYP),r=t.moov(e),n=new Uint8Array(i.byteLength+r.byteLength);return n.set(i,0),n.set(r,i.byteLength),n},t.moov=function(e){var i=t.mvhd(e.timescale,e.duration),r=t.trak(e),n=t.mvex(e);return t.box(t.types.moov,i,r,n)},t.mvhd=function(e,i){return t.box(t.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,i>>>24&255,i>>>16&255,i>>>8&255,255&i,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]))},t.trak=function(e){return t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.tkhd=function(e){var i=e.id,r=e.duration,n=e.presentWidth,o=e.presentHeight;return t.box(t.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>>8&255,255&n,0,0,o>>>8&255,255&o,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e),t.hdlr(e),t.minf(e))},t.mdhd=function(e){var i=e.timescale,r=e.duration;return t.box(t.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))},t.hdlr=function(e){var i=null;return i="audio"===e.type?t.constants.HDLR_AUDIO:t.constants.HDLR_VIDEO,t.box(t.types.hdlr,i)},t.minf=function(e){var i=null;return i="audio"===e.type?t.box(t.types.smhd,t.constants.SMHD):t.box(t.types.vmhd,t.constants.VMHD),t.box(t.types.minf,i,t.dinf(),t.stbl(e))},t.dinf=function(){return t.box(t.types.dinf,t.box(t.types.dref,t.constants.DREF))},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.constants.STTS),t.box(t.types.stsc,t.constants.STSC),t.box(t.types.stsz,t.constants.STSZ),t.box(t.types.stco,t.constants.STCO))},t.stsd=function(e){return"audio"===e.type?"mp3"===e.codec?t.box(t.types.stsd,t.constants.STSD_PREFIX,t.mp3(e)):t.box(t.types.stsd,t.constants.STSD_PREFIX,t.mp4a(e)):t.box(t.types.stsd,t.constants.STSD_PREFIX,t.avc1(e))},t.mp3=function(e){var i=e.channelCount,r=e.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return t.box(t.types[".mp3"],n)},t.mp4a=function(e){var i=e.channelCount,r=e.audioSampleRate,n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return t.box(t.types.mp4a,n,t.esds(e))},t.esds=function(e){var i=e.config||[],r=i.length,n=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(i).concat([6,1,2]));return t.box(t.types.esds,n)},t.avc1=function(e){var i=e.avcc,r=e.codecWidth,n=e.codecHeight,o=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,r>>>8&255,255&r,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return t.box(t.types.avc1,o,t.box(t.types.avcC,i))},t.mvex=function(e){return t.box(t.types.mvex,t.trex(e))},t.trex=function(e){var i=e.id,r=new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return t.box(t.types.trex,r)},t.moof=function(e,i){return t.box(t.types.moof,t.mfhd(e.sequenceNumber),t.traf(e,i))},t.mfhd=function(e){var i=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return t.box(t.types.mfhd,i)},t.traf=function(e,i){var r=e.id,n=t.box(t.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),o=t.box(t.types.tfdt,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),a=t.sdtp(e),s=t.trun(e,a.byteLength+16+16+8+16+8+8);return t.box(t.types.traf,n,o,s,a)},t.sdtp=function(e){for(var i=e.samples||[],r=i.length,n=new Uint8Array(4+r),o=0;o<r;o++){var a=i[o].flags;n[o+4]=a.isLeading<<6|a.dependsOn<<4|a.isDependedOn<<2|a.hasRedundancy}return t.box(t.types.sdtp,n)},t.trun=function(e,i){var r=e.samples||[],n=r.length,o=12+16*n,a=new Uint8Array(o);i+=8+o,a.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,255&n,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0);for(var s=0;s<n;s++){var h=r[s].duration,u=r[s].size,l=r[s].flags,d=r[s].cts;a.set([h>>>24&255,h>>>16&255,h>>>8&255,255&h,u>>>24&255,u>>>16&255,u>>>8&255,255&u,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return t.box(t.types.trun,a)},t.mdat=function(e){return t.box(t.types.mdat,e)},t}();A.init();var M=A,E=function(){function t(){}return t.getSilentFrame=function(t,e){if("mp4a.40.2"===t){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}();function S(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var k=function(t,e,i,r,n){this.dts=t,this.pts=e,this.duration=i,this.originalDts=r,this.isSyncPoint=n,this.fileposition=null},T=function(){function t(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return t.prototype.appendSyncPoint=function(t){t.isSyncPoint=!0,this.syncPoints.push(t)},t}(),R=function(){function t(){this._list=[]}var e=t.prototype;return e.clear=function(){this._list=[]},e.appendArray=function(t){var e=this._list;0!==t.length&&(e.length>0&&t[0].originalDts<e[e.length-1].originalDts&&this.clear(),Array.prototype.push.apply(e,t))},e.getLastSyncPointBeforeDts=function(t){if(0==this._list.length)return null;var e=this._list,i=0,r=e.length-1,n=0,o=0,a=r;for(t<e[0].dts&&(i=0,o=a+1);o<=a;){if((n=o+Math.floor((a-o)/2))===r||t>=e[n].dts&&t<e[n+1].dts){i=n;break}e[n].dts<t?o=n+1:a=n-1}return this._list[i]},t}(),I=function(){function t(t){this._type=t,this._list=[],this._lastAppendLocation=-1}var e,i,r,n=t.prototype;return n.isEmpty=function(){return 0===this._list.length},n.clear=function(){this._list=[],this._lastAppendLocation=-1},n._searchNearestSegmentBefore=function(t){var e=this._list;if(0===e.length)return-2;var i=e.length-1,r=0,n=0,o=i,a=0;if(t<e[0].originalBeginDts)return a=-1;for(;n<=o;){if((r=n+Math.floor((o-n)/2))===i||t>e[r].lastSample.originalDts&&t<e[r+1].originalBeginDts){a=r;break}e[r].originalBeginDts<t?n=r+1:o=r-1}return a},n._searchNearestSegmentAfter=function(t){return this._searchNearestSegmentBefore(t)+1},n.append=function(t){var e=this._list,i=t,r=this._lastAppendLocation,n=0;-1!==r&&r<e.length&&i.originalBeginDts>=e[r].lastSample.originalDts&&(r===e.length-1||r<e.length-1&&i.originalBeginDts<e[r+1].originalBeginDts)?n=r+1:e.length>0&&(n=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=n,this._list.splice(n,0,i)},n.getLastSegmentBefore=function(t){var e=this._searchNearestSegmentBefore(t);return e>=0?this._list[e]:null},n.getLastSampleBefore=function(t){var e=this.getLastSegmentBefore(t);return null!=e?e.lastSample:null},n.getLastSyncPointBefore=function(t){for(var e=this._searchNearestSegmentBefore(t),i=this._list[e].syncPoints;0===i.length&&e>0;)e--,i=this._list[e].syncPoints;return i.length>0?i[i.length-1]:null},e=t,(i=[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}}])&&S(e.prototype,i),r&&S(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),C=i(2);function P(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var x=function(){function t(t){this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._adjustPts=0,this._lastAdjustVideoPts=0,this._lastVideoPts=0,this._audioSegmentInfoList=new I("audio"),this._videoSegmentInfoList=new I("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!m.chrome||!(m.version.major<50||50===m.version.major&&m.version.build<2661)),this._fillSilentAfterSeek=m.msedge||m.msie,this._mp3UseMpegAudio=!m.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}var e,i,r,n=t.prototype;return n.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},n.bindDataSource=function(t){return t.onDataAvailable=this.remux.bind(this),t.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},n.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},n.changeSpeed=function(t){this._adjustPts=t},n.seek=function(t){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear(),this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._adjustPts=0,this._lastAdjustVideoPts=0,this._lastVideoPts=0},n.remux=function(t,e){if(!this._onMediaSegment)throw new C.a("MP4Remuxer: onMediaSegment callback must be specificed!");if(!this._dtsBaseInited&&!this._calculateDtsBase(t,e))return e.samples=[],void(t.samples=[]);this._remuxVideo(e),this._remuxAudio(t)},n._onTrackMetadataReceived=function(t,e){var i=null,r="mp4",n=e.codec;if("audio"===t)this._audioMeta=e,"mp3"===e.codec&&this._mp3UseMpegAudio?(r="mpeg",n="",i=new Uint8Array):i=M.generateInitSegment(e);else{if("video"!==t)return;this._videoMeta=e,i=M.generateInitSegment(e)}if(!this._onInitSegment)throw new C.a("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(t,{type:t,data:i.buffer,codec:n,container:t+"/"+r,mediaDuration:e.duration})},n._calculateDtsBase=function(t,e){if(!this._dtsBaseInited)return t.samples&&t.samples.length&&(this._audioDtsBase=t.samples[0].dts),e.samples&&e.samples.length&&(this._videoDtsBase=e.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0,!(this._dtsBase<0)},n.flushStashedSamples=function(){var t=this._videoStashedLastSample,e=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=t&&(i.samples.push(t),i.length=t.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=e&&(r.samples.push(e),r.length=e.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(r,!0)},n._remuxAudio=function(t,e){if(null!=this._audioMeta){var i,r=t,n=r.samples,o=void 0,a=-1,s=this._audioMeta.refSampleDuration,h="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,u=this._dtsBaseInited&&void 0===this._audioNextDts,l=!1;if(n&&0!==n.length&&(1!==n.length||e)){var d=0,f=null,p=0;h?(d=0,p=r.length):(d=8,p=8+r.length);var g=null;if(n.length>1&&(p-=(g=n.pop()).length),null!=this._audioStashedLastSample){var v=this._audioStashedLastSample;this._audioStashedLastSample=null,n.unshift(v),p+=v.length}null!=g&&(this._audioStashedLastSample=g);var y=n[0].dts-this._dtsBase;if(this._audioNextDts)o=y-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())o=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(l=!0);else{var b=this._audioSegmentInfoList.getLastSampleBefore(y);if(null!=b){var _=y-(b.originalDts+b.duration);_<=3&&(_=0),o=y-(b.dts+b.duration+_)}else o=0}if(l){var w=y-o,A=this._videoSegmentInfoList.getLastSegmentBefore(y);if(null!=A&&A.beginDts<w){var S=E.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(S){var R=A.beginDts,I=w-A.beginDts;c.a.v(this.TAG,"InsertPrefixSilentAudio: dts: "+R+", duration: "+I),n.unshift({unit:S,dts:R,pts:R}),p+=S.byteLength}}else l=!1}for(var C=[],P=0;P<n.length;P++){var x=n[P],D=x.unit,O=x.dts-this._dtsBase,B=O-o;-1===a&&(a=B);var L=0;if(P!==n.length-1)L=n[P+1].dts-this._dtsBase-o-B;else if(null!=g)L=g.dts-this._dtsBase-o-B;else L=C.length>=1?C[C.length-1].duration:Math.floor(s);var W=!1,N=null;if(L>1.5*s&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!m.safari){W=!0;var F=Math.abs(L-s),U=Math.ceil(F/s),j=B+s;c.a.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\ndts: "+(B+L)+" ms, expected: "+(B+Math.round(s))+" ms, delta: "+Math.round(F)+" ms, generate: "+U+" framessampleDuration: "+L+" ms, refSampleDuration: "+s);var V=E.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==V&&(c.a.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),V=D),N=[];for(var H=0;H<U;H++){var z=Math.round(j);if(N.length>0){var G=N[N.length-1];G.duration=z-G.dts}var q={dts:z,pts:z,cts:0,unit:V,size:V.byteLength,duration:0,originalDts:O,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};N.push(q),p+=q.size,j+=s}var X=N[N.length-1];X.duration=B+L-X.dts,L=Math.round(s)}C.push({dts:B,pts:B,cts:0,unit:x.unit,size:x.unit.byteLength,duration:L,originalDts:O,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),W&&C.push.apply(C,N)}h?f=new Uint8Array(p):((f=new Uint8Array(p))[0]=p>>>24&255,f[1]=p>>>16&255,f[2]=p>>>8&255,f[3]=255&p,f.set(M.types.mdat,4));for(var Z=0;Z<C.length;Z++){var K=C[Z].unit;f.set(K,d),d+=K.byteLength}var Q=C[C.length-1];i=Q.dts+Q.duration,this._audioNextDts=i;var Y=new T;Y.beginDts=a,Y.endDts=i,Y.beginPts=a,Y.endPts=i,Y.originalBeginDts=C[0].originalDts,Y.originalEndDts=Q.originalDts+Q.duration,Y.firstSample=new k(C[0].dts,C[0].pts,C[0].duration,C[0].originalDts,!1),Y.lastSample=new k(Q.dts,Q.pts,Q.duration,Q.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Y),r.samples=C,r.sequenceNumber++;var J=null;J=h?new Uint8Array:M.moof(r,a),r.samples=[],r.length=0;var $={type:"audio",data:this._mergeBoxes(J,f).buffer,sampleCount:C.length,info:Y};h&&u&&($.timestampOffset=a),this._onMediaSegment("audio",$)}}},n._remuxVideo=function(t,e){if(null!=this._videoMeta){var i,r,n=t,o=n.samples,a=void 0,s=-1,h=-1;if(o&&0!==o.length){o.length;var u=8,l=null,d=8+t.length,f=null;if(o.length>0&&(d-=(f=o.pop()).length),null!=this._videoStashedLastSample){var c=this._videoStashedLastSample;this._videoStashedLastSample=null,o.unshift(c),d+=c.length}if(null!=f&&(this._videoStashedLastSample=f),!(o.length<1)){var p=o[0].dts-this._dtsBase;if(this._videoNextDts)a=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())a=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=m){var g=p-(m.originalDts+m.duration);g<=3&&(g=0),a=p-(m.dts+m.duration+g)}else a=0}var v=!1;this._adjustPts>0&&(a=10,v=!0);for(var y=new T,b=[],_=0;_<o.length;_++){var w=o[_],A=w.dts-this._dtsBase,E=w.isKeyframe,S=A-a,R=w.cts,I=S+R;-1===s&&(s=S,h=I);var C=0;if(_!==o.length-1)C=o[_+1].dts-this._dtsBase-a-S;else if(null!=f)C=f.dts-this._dtsBase-a-S;else C=b.length>=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(E){var P=new k(S,I,C,w.dts,!0);P.fileposition=w.fileposition,y.appendSyncPoint(P)}v&&(C=Math.floor(.8*C)),b.push({dts:S,pts:I,cts:R,units:w.units,size:w.length,isKeyframe:E,duration:C,originalDts:A,flags:{isLeading:0,dependsOn:E?2:1,isDependedOn:E?1:0,hasRedundancy:0,isNonSync:E?0:1}})}(l=new Uint8Array(d))[0]=d>>>24&255,l[1]=d>>>16&255,l[2]=d>>>8&255,l[3]=255&d,l.set(M.types.mdat,4);for(var x=0;x<b.length;x++)for(var D=b[x].units;D.length;){var O=D.shift().data;l.set(O,u),u+=O.byteLength}var B=b[b.length-1];if(i=B.dts+B.duration,r=B.pts+B.duration,this._videoNextDts=i,y.beginDts=s,y.endDts=i,y.beginPts=h,y.endPts=r,y.originalBeginDts=b[0].originalDts,y.originalEndDts=B.originalDts+B.duration,y.firstSample=new k(b[0].dts,b[0].pts,b[0].duration,b[0].originalDts,b[0].isKeyframe),y.lastSample=new k(B.dts,B.pts,B.duration,B.originalDts,B.isKeyframe),this._isLive||this._videoSegmentInfoList.append(y),n.samples=b,n.sequenceNumber++,this._forceFirstIDR){var L=b[0].flags;L.dependsOn=2,L.isNonSync=0}var W=M.moof(n,s);n.samples=[],n.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(W,l).buffer,sampleCount:b.length,info:y})}}}},n._mergeBoxes=function(t,e){var i=new Uint8Array(t.byteLength+e.byteLength);return i.set(t,0),i.set(e,t.byteLength),i},e=t,(i=[{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(t){this._onInitSegment=t}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(t){this._onMediaSegment=t}}])&&P(e.prototype,i),r&&P(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),D=i(7);function O(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var B=function(){function t(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}var e,i,r,n=t.prototype;return n.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},n.addBytes=function(t){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=t,this._totalBytes+=t):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=t,this._totalBytes+=t):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=t,this._totalBytes+=t,this._lastCheckpoint=this._now())},e=t,(i=[{key:"currentKBps",get:function(){this.addBytes(0);var t=(this._now()-this._lastCheckpoint)/1e3;return 0==t&&(t=1),this._intervalBytes/t/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var t=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/t/1024}}])&&O(e.prototype,i),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function L(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var W=0,N=1,F=2,U=3,j=4,V="Exception",H="HttpStatusCodeInvalid",z="EarlyEof",G="UnrecoverableEarlyEof",q=function(){function t(t){this._type=t||"undefined",this._status=W,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}var e,i,r,n=t.prototype;return n.destroy=function(){this._status=W,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},n.isWorking=function(){return this._status===N||this._status===F},n.open=function(t,e){throw new C.c("Unimplemented abstract function!")},n.abort=function(){throw new C.c("Unimplemented abstract function!")},e=t,(i=[{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(t){this._onContentLengthKnown=t}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(t){this._onURLRedirect=t}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(t){this._onDataArrival=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onComplete",get:function(){return this._onComplete},set:function(t){this._onComplete=t}}])&&L(e.prototype,i),r&&L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function X(t,e){return X=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},X(t,e)}var Z=function(t){var e,i;function n(e,i){var r;return(r=t.call(this,"fetch-stream-loader")||this).TAG="FetchStreamLoader",r._seekHandler=e,r._config=i,r._needStash=!0,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r._retryConnectTimes=0,r._fetchUrl=null,r._fetchParam=null,r._triggerReconnectingNotify=!0,r._triggerReconnectSuccessNotify=!0,r}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,X(e,i),n.isSupported=function(){try{var t=m.msedge&&m.version.minor>=15048,e=!m.msedge||t;return self.fetch&&self.ReadableStream&&e}catch(t){return!1}};var o=n.prototype;return o.destroy=function(){this.isWorking()&&this.abort(),t.prototype.destroy.call(this)},o.fetchStream=function(){var t=this,e=this._fetchParam;this._retryConnectTimes++,this._triggerReconnectingNotify&&(this._triggerReconnectingNotify=!1,this._onDataArrival&&this._onDataArrival(null,-this._retryConnectTimes,0)),this._triggerReconnectSuccessNotify=!0,self.fetch(this._fetchUrl,e).then((function(e){if(t._requestAbort)return t._requestAbort=!1,void(t._status=W);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==t._fetchUrl&&t._onURLRedirect){var i=t._seekHandler.removeURLParameters(e.url);t._onURLRedirect(i)}var n=e.headers.get("Content-Length");return null!=n&&(t._contentLength=parseInt(n),0!==t._contentLength&&t._onContentLengthKnown&&t._onContentLengthKnown(t._contentLength)),t._triggerReconnectingNotify=!0,t._pump.call(t,e.body.getReader())}t._status=U,t._onError,r.MediaWorkerLog("fetch-stream: code:"+e.status+" msg:"+e.statusText);var o=t;r.sleep(3e3).then((function(){o.fetchStream()}))})).catch((function(e){if(t._status=U,!t._onError)throw e;t._onError(V,{code:-1,msg:e.message});var i=t;r.sleep(3e3).then((function(){i.fetchStream()}))}))},o.open=function(t,e){this._dataSource=t,this._range=e;var i=t.url;this._config.reuseRedirectedURL&&null!=t.redirectedURL&&(i=t.redirectedURL);var r=this._seekHandler.getConfig(i,e),n=new self.Headers;if("object"==typeof r.headers){var o=r.headers;for(var a in o)o.hasOwnProperty(a)&&n.append(a,o[a])}var s={method:"GET",headers:n,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var h in this._config.headers)n.append(h,this._config.headers[h]);!1===t.cors&&(s.mode="same-origin"),t.withCredentials&&(s.credentials="include"),t.referrerPolicy&&(s.referrerPolicy=t.referrerPolicy),this._status=N,this._fetchUrl=r.url,this._fetchParam=s,this.fetchStream()},o.abort=function(){this._requestAbort=!0},o._pump=function(t){var e=this;return t.read().then((function(i){if(i.done)if(null!==e._contentLength&&e._receivedLength<e._contentLength){e._status=U;var n=z,o={code:-1,msg:"Fetch stream meet Early-EOF"};if(!e._onError)throw new C.d(o.msg);e._onError(n,o),null!==e._contentLength&&e._receivedLength===e._contentLength&&e._receivedLength>0?(r.setLiveStreamType(!1),e._onComplete(e._range.from,e._range.from+e._receivedLength-1)):e._onComplete(-1,-1)}else e._status=j,e._onComplete&&(null!==e._contentLength&&e._receivedLength===e._contentLength&&e._receivedLength>0?(r.setLiveStreamType(!1),e._onComplete(e._range.from,e._range.from+e._receivedLength-1)):e._onComplete(-1,-1));else{if(!0===e._requestAbort)return e._requestAbort=!1,e._status=j,t.cancel();e._status=F;var a=i.value.buffer,s=e._range.from+e._receivedLength;e._receivedLength+=a.byteLength,e._onDataArrival&&e._onDataArrival(a,s,e._receivedLength),e._triggerReconnectSuccessNotify&&(e._triggerReconnectSuccessNotify=!1,e._onDataArrival&&(e._onDataArrival(null,e._retryConnectTimes,0),e._retryConnectTimes++)),e._pump(t)}})).catch((function(t){e._onComplete(-1,-1)}))},n}(q);function K(t,e){return K=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},K(t,e)}var Q=function(t){var e,i;function r(e,i){var r;return(r=t.call(this,"xhr-moz-chunked-loader")||this).TAG="MozChunkedLoader",r._seekHandler=e,r._config=i,r._needStash=!0,r._xhr=null,r._requestAbort=!1,r._contentLength=null,r._receivedLength=0,r}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,K(e,i),r.isSupported=function(){try{var t=new XMLHttpRequest;return t.open("GET","https://example.com",!0),t.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===t.responseType}catch(t){return c.a.w("MozChunkedLoader",t.message),!1}};var n=r.prototype;return n.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),t.prototype.destroy.call(this)},n.open=function(t,e){this._dataSource=t,this._range=e;var i=t.url;this._config.reuseRedirectedURL&&null!=t.redirectedURL&&(i=t.redirectedURL);var r=this._seekHandler.getConfig(i,e);this._requestURL=r.url;var n=this._xhr=new XMLHttpRequest;if(n.open("GET",r.url,!0),n.responseType="moz-chunked-arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onloadend=this._onLoadEnd.bind(this),n.onerror=this._onXhrError.bind(this),t.withCredentials&&(n.withCredentials=!0),"object"==typeof r.headers){var o=r.headers;for(var a in o)o.hasOwnProperty(a)&&n.setRequestHeader(a,o[a])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var h in s)s.hasOwnProperty(h)&&n.setRequestHeader(h,s[h])}this._status=N,n.send()},n.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=j},n._onReadyStateChange=function(t){var e=t.target;if(2===e.readyState){if(null!=e.responseURL&&e.responseURL!==this._requestURL&&this._onURLRedirect){var i=this._seekHandler.removeURLParameters(e.responseURL);this._onURLRedirect(i)}if(0!==e.status&&(e.status<200||e.status>299)){if(this._status=U,!this._onError)throw new C.d("MozChunkedLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(H,{code:e.status,msg:e.statusText})}else this._status=F}},n._onProgress=function(t){if(this._status!==U){null===this._contentLength&&null!==t.total&&0!==t.total&&(this._contentLength=t.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var e=t.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,i,this._receivedLength)}},n._onLoadEnd=function(t){!0!==this._requestAbort?this._status!==U&&(this._status=j,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},n._onXhrError=function(t){this._status=U;var e=0,i=null;if(this._contentLength&&t.loaded<this._contentLength?(e=z,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(e=V,i={code:-1,msg:t.constructor.name+" "+t.type}),!this._onError)throw new C.d(i.msg);this._onError(e,i)},r}(q);function Y(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function J(t,e){return J=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},J(t,e)}var $=function(t){var e,i;function r(e,i){var r;return(r=t.call(this,"xhr-range-loader")||this).TAG="RangeLoader",r._seekHandler=e,r._config=i,r._needStash=!1,r._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],r._currentChunkSizeKB=384,r._currentSpeedNormalized=0,r._zeroSpeedChunkCount=0,r._xhr=null,r._speedSampler=new B,r._requestAbort=!1,r._waitForTotalLength=!1,r._totalLengthReceived=!1,r._currentRequestURL=null,r._currentRedirectedURL=null,r._currentRequestRange=null,r._totalLength=null,r._contentLength=null,r._receivedLength=0,r._lastTimeLoaded=0,r}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,J(e,i),r.isSupported=function(){try{var t=new XMLHttpRequest;return t.open("GET","https://example.com",!0),t.responseType="arraybuffer","arraybuffer"===t.responseType}catch(t){return c.a.w("RangeLoader",t.message),!1}};var n,o,a,s=r.prototype;return s.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),t.prototype.destroy.call(this)},s.open=function(t,e){this._dataSource=t,this._range=e,this._status=N;var i=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(i=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||i?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},s._openSubRange=function(){var t=1024*this._currentChunkSizeKB,e=this._range.from+this._receivedLength,i=e+t;null!=this._contentLength&&i-this._range.from>=this._contentLength&&(i=this._range.from+this._contentLength-1),this._currentRequestRange={from:e,to:i},this._internalOpen(this._dataSource,this._currentRequestRange)},s._internalOpen=function(t,e){this._lastTimeLoaded=0;var i=t.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=t.redirectedURL&&(i=t.redirectedURL));var r=this._seekHandler.getConfig(i,e);this._currentRequestURL=r.url;var n=this._xhr=new XMLHttpRequest;if(n.open("GET",r.url,!0),n.responseType="arraybuffer",n.onreadystatechange=this._onReadyStateChange.bind(this),n.onprogress=this._onProgress.bind(this),n.onload=this._onLoad.bind(this),n.onerror=this._onXhrError.bind(this),t.withCredentials&&(n.withCredentials=!0),"object"==typeof r.headers){var o=r.headers;for(var a in o)o.hasOwnProperty(a)&&n.setRequestHeader(a,o[a])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var h in s)s.hasOwnProperty(h)&&n.setRequestHeader(h,s[h])}n.send()},s.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=j},s._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},s._onReadyStateChange=function(t){var e=t.target;if(2===e.readyState){if(null!=e.responseURL){var i=this._seekHandler.removeURLParameters(e.responseURL);e.responseURL!==this._currentRequestURL&&i!==this._currentRedirectedURL&&(this._currentRedirectedURL=i,this._onURLRedirect&&this._onURLRedirect(i))}if(e.status>=200&&e.status<=299){if(this._waitForTotalLength)return;this._status=F}else{if(this._status=U,!this._onError)throw new C.d("RangeLoader: Http code invalid, "+e.status+" "+e.statusText);this._onError(H,{code:e.status,msg:e.statusText})}}},s._onProgress=function(t){if(this._status!==U){if(null===this._contentLength){var e=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,e=!0;var i=t.total;this._internalAbort(),null!=i&0!==i&&(this._totalLength=i)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,e)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=t.loaded-this._lastTimeLoaded;this._lastTimeLoaded=t.loaded,this._speedSampler.addBytes(r)}},s._normalizeSpeed=function(t){var e=this._chunkSizeKBList,i=e.length-1,r=0,n=0,o=i;if(t<e[0])return e[0];for(;n<=o;){if((r=n+Math.floor((o-n)/2))===i||t>=e[r]&&t<e[r+1])return e[r];e[r]<t?n=r+1:o=r-1}},s._onLoad=function(t){if(this._status!==U)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var e=this._speedSampler.lastSecondKBps;if(0===e&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(e=this._speedSampler.currentKBps)),0!==e){var i=this._normalizeSpeed(e);this._currentSpeedNormalized!==i&&(this._currentSpeedNormalized=i,this._currentChunkSizeKB=i)}var r=t.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():o=!0,this._onDataArrival&&this._onDataArrival(r,n,this._receivedLength),o&&(this._status=j,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},s._onXhrError=function(t){this._status=U;var e=0,i=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(e=z,i={code:-1,msg:"RangeLoader meet Early-Eof"}):(e=V,i={code:-1,msg:t.constructor.name+" "+t.type}),!this._onError)throw new C.d(i.msg);this._onError(e,i)},n=r,(o=[{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}}])&&Y(n.prototype,o),a&&Y(n,a),Object.defineProperty(n,"prototype",{writable:!1}),r}(q);function tt(t,e){return tt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},tt(t,e)}var et=function(t){var e,i;function r(){var e;return(e=t.call(this,"websocket-loader")||this).TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e._retryConnectTimes=0,e._triggerReconnectingNotify=!0,e._triggerReconnectSuccessNotify=!0,e}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,tt(e,i),r.isSupported=function(){try{return void 0!==self.WebSocket}catch(t){return!1}};var n=r.prototype;return n.destroy=function(){this._ws&&this.abort(),t.prototype.destroy.call(this)},n.open=function(t){try{this._retryConnectTimes++,this._triggerReconnectingNotify&&(this._triggerReconnectingNotify=!1,this._onDataArrival&&this._onDataArrival(null,-this._retryConnectTimes,0)),this._triggerReconnectSuccessNotify=!0;var e=this._ws=new self.WebSocket(t.url);e.binaryType="arraybuffer",e.onopen=this._onWebSocketOpen.bind(this),e.onclose=this._onWebSocketClose.bind(this),e.onmessage=this._onWebSocketMessage.bind(this),e.onerror=this._onWebSocketError.bind(this),this._status=N}catch(t){this._status=U;var i={code:t.code,msg:t.message};if(!this._onError)throw new C.d(i.msg);this._onError(V,i)}},n.abort=function(){var t=this._ws;!t||0!==t.readyState&&1!==t.readyState||(this._requestAbort=!0,t.close()),this._ws=null,this._status=j},n._onWebSocketOpen=function(t){this._status=F},n._onWebSocketClose=function(t){!0!==this._requestAbort?(this._status=j,this._onComplete&&this._onComplete(-1,-1)):this._requestAbort=!1},n._onWebSocketMessage=function(t){var e=this;if(t.data instanceof ArrayBuffer)this._dispatchArrayBuffer(t.data);else if(t.data instanceof Blob){var i=new FileReader;i.onload=function(){e._dispatchArrayBuffer(i.result)},i.readAsArrayBuffer(t.data)}else{this._status=U;var r={code:-1,msg:"Unsupported WebSocket message type: "+t.data.constructor.name};if(!this._onError)throw new C.d(r.msg);this._onError(V,r)}},n._dispatchArrayBuffer=function(t){var e=t,i=this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,i,this._receivedLength),this._triggerReconnectSuccessNotify&&(this._triggerReconnectSuccessNotify=!1,this._onDataArrival&&(this._onDataArrival(null,this._retryConnectTimes,0),this._retryConnectTimes++))},n._onWebSocketError=function(t){this._status=U;var e={code:t.code,msg:t.message};if(!this._onError)throw new C.d(e.msg);this._onError(V,e)},r}(q),it=function(){function t(t){this._zeroStart=t||!1}var e=t.prototype;return e.getConfig=function(t,e){var i,r={};0!==e.from||-1!==e.to?(i=-1!==e.to?"bytes="+e.from.toString()+"-"+e.to.toString():"bytes="+e.from.toString()+"-",r.Range=i):this._zeroStart&&(r.Range="bytes=0-");return{url:t,headers:r}},e.removeURLParameters=function(t){return t},t}(),rt=function(){function t(t,e){this._startName=t,this._endName=e}var e=t.prototype;return e.getConfig=function(t,e){var i=t;if(0!==e.from||-1!==e.to){var r=!0;-1===i.indexOf("?")&&(i+="?",r=!1),r&&(i+="&"),i+=this._startName+"="+e.from.toString(),-1!==e.to&&(i+="&"+this._endName+"="+e.to.toString())}return{url:i,headers:{}}},e.removeURLParameters=function(t){var e=t.split("?")[0],i=void 0,r=t.indexOf("?");-1!==r&&(i=t.substring(r+1));var n="";if(null!=i&&i.length>0)for(var o=i.split("&"),a=0;a<o.length;a++){var s=o[a].split("="),h=a>0;s[0]!==this._startName&&s[0]!==this._endName&&(h&&(n+="&"),n+=o[a])}return 0===n.length?e:e+"?"+n},t}();function nt(t,e){return nt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nt(t,e)}var ot=function(t){var e,i;function n(){var e;return(e=t.call(this,"m3u8-loader")||this).TAG="M3U8Loader",e._needStash=!0,e.url="",e.startPlayTime=0,e._requestAbort=!1,e._receivedLength=0,e.getNextFileFlag=!0,e.pauseDisplay=!1,e.totalDuration=0,e.seeking=!1,e}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,nt(e,i),n.isSupported=function(){return!0};var o=n.prototype;return o.destroy=function(){this.abort(),t.prototype.destroy.call(this)},o.GetM3u8TotalDuration=function(){return this.totalDuration},o.createDownloadWorker=function(){var t;if(!this.downloadWorker&&"undefined"!=typeof Worker)try{t=this.downloadWorker=u(284),this.onwmsg=this.onWorkerMessage.bind(this);var e={cmd:r.tOpenStream,url:this.url,time:this.startPlayTime};t.postMessage(e),t.addEventListener("message",this.onwmsg),t.onerror=function(t){}}catch(t){this.downloadWorker=void 0}},o.setStartPlaySecs=function(t){this.startPlayTime=t},o.open=function(t){try{this.url=t.url,this.createDownloadWorker(),this._status=N}catch(t){this._status=U;var e={code:t.code,msg:t.message};if(!this._onError)throw new C.d(e.msg);this._onError(V,e)}},o.abort=function(){var t={cmd:r.tCloseStream};this.downloadWorker&&void 0!==this.downloadWorker&&this.downloadWorker.postMessage(t),this._status=j},o._onWebSocketOpen=function(t){this._status=F},o._onWebSocketClose=function(t){!0!==this._requestAbort?(this._status=j,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},o.seek=function(t,e){this.pauseDisplay=!1;var i={cmd:r.tSeekStream,type:e,time:t};this.downloadWorker&&void 0!==this.downloadWorker&&(this.downloadWorker.postMessage(i),this.seeking=!0)},o.pause=function(){this.pauseDisplay=!0;var t={cmd:r.tPauseStream};this.downloadWorker&&void 0!==this.downloadWorker&&this.downloadWorker.postMessage(t)},o.resume=function(){this.pauseDisplay=!1;var t={cmd:r.tResumeStream};this.downloadWorker&&void 0!==this.downloadWorker&&this.downloadWorker.postMessage(t)},o.onWorkerMessage=function(t){var e=t.data;switch(e.cmd){case r.tOpenStream:var i={cmd:r.tGetTsStream,t:0};this.downloadWorker.postMessage(i);break;case r.tGetTsStreamRsp:this.getNextFileFlag=!0;break;case r.tGetTsComplete:this.playComplete=!0;break;case r.tDisconnect:i={cmd:r.tReOpenStream};this.downloadWorker.postMessage(i);break;case r.tCloseStream:e.workerId==r.DOWNLOAD_WORKER_ID?(this.downloadWorker.terminate(),this.downloadWorker=null):e.workerId==r.DECODE_WORKER_ID?(this.decodeWorker.terminate(),this.decodeWorker=null,this.soundPlayer&&(this.soundPlayer.destroy(),delete this.soundPlayer,this.soundPlayer=null),this.webGLPlayer&&this.webGLPlayer.renderVideoFrame(null,0,0)):e.workerId==r.RENDER_WORKER_ID&&(this.renderWorker.terminate(),this.renderWorker=null);break;case r.tFrameData:if(e.workerId==r.DOWNLOAD_WORKER_ID){var n=e.dat,o=this._receivedLength;this._receivedLength+=n.byteLength,this._onDataArrival&&this._onDataArrival(n,o,this._receivedLength);break}if(e.workerId==r.DECODE_WORKER_ID){if(this.pauseDisplay)break;1==e.mediaType?(this.canvas.width=e.width,this.canvas.height=e.height,this.webGLPlayer.renderVideoFrame(e.dat,e.width,e.height),this.OnUpdatePlayInfo(e.playTimeSec,e.frameNum)):2==e.mediaType&&(null==this.soundPlayer&&this.OpenAudioPlayer(e.fmt,e.ch,e.samplerate),null!=this.soundPlayer&&this.soundPlayer.play(e.dat))}break;case r.tMediaInfo:this.totalDuration=e.duration,r.setLiveStreamType(e.live);break;case r.tGetTsStream:this.pauseDisplay||this.getNextFileFlag&&(this.downloadWorker.postMessage(e),this.getNextFileFlag=!1);break;case r.tSeekStream:this.seeking=!1;break;case r.tResetMSE:this._onDataArrival&&(this._receivedLength=0,this._onDataArrival(null,e.fileSequence,0))}},o._dispatchArrayBuffer=function(t){var e=t,i=this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,i,this._receivedLength)},o._onWebSocketError=function(t){this._status=U;var e={code:t.code,msg:t.message};if(!this._onError)throw new C.d(e.msg);this._onError(V,e)},n}(q),at="SYNC RTSP CLIENT v2020.07.10",st=function(){function t(t,e,i,r,n){this.TAG="RtspHandler",this._ws=e,this.rtspUrl=t,this.rtspSeq=1,this.state=0,this.authType=1,this.username="",this.realm="",this.nonce="",this.authBasicStr="",this.authDigestStr="",this.videoTrack="",this.audioTrack="",this.metadataTrack="",this.contentBaseStr="",this.setupStreamNum=0,this.videoSessionId="",this.audioSessionId="",this.metadataSessionId="",this.mediaInfo={videoCodecId:0,audioCodecId:0},this.RTSP_VER_STR="RTSP/1.0",this.callbackPtr=i,this.userPtr=r,this.dataSource=n}var e=t.prototype;return e.destroy=function(){},e.getMediaInfo=function(){return this.mediaInfo},e.sendPacket=function(t){this._ws.send(t)},e.makeHeader=function(t,e){var i="";if(i=""==this.contentBaseStr?t+" "+this.rtspUrl:t+" "+this.contentBaseStr,e&&null!=e){var r=this.contentBaseStr.length;"/"!=this.contentBaseStr[r-1]?i+="/"+e:i+=e}return i+=" "+this.RTSP_VER_STR+"\r\n",i+="CSeq: "+this.rtspSeq+"\r\n",this.rtspSeq++,i},e.getLineString=function(t,e){var i=0,r="";for(i=0;i<t.length;i++){if("\r"==t[i]||"\n"==t[i]||e&&null!=e&&e==t[i]||i+1==t.length)return r;r+=t[i]}return r},e.FindStringByStr=function(t,e){var i=t.indexOf(e);return i>=0?t.substr(i):null},e.rtspParseDESCRIBE=function(t){var e="",i="",n="",o="",a="",s="",h=t.indexOf("RTSP/1.0 401 Unauthorized");if(h>=0){var u=t.indexOf("WWW-Authenticate: Digest");return u>0||(u=t.indexOf("WWW-Authenticate: Basic")),401}if((h=t.indexOf("RTSP/1.0 302"))>=0){var l="";if((h=t.indexOf("Location: "))>=0){var d=t.substring(h,t.length),f=d.indexOf("\r",0);l=d.substring(10,f)}return this.callbackPtr&&this.userPtr&&this.callbackPtr(this.userPtr,302,l,this.dataSource),302}if((h=t.indexOf("200 OK"))<0)return c.a.e(this.TAG,"DESCRIBE ERROR"),-1;var p=this.FindStringByStr(t,"m=video");if(p){if(g=this.FindStringByStr(p,"a=rtpmap")){if((b=this.getLineString(g).split(" ")).length>0){var m=b[0].substr(9);parseInt(m)}if(b.length>1)(_=b[1].split("/")).length>0&&(e=_[0])}if(v=this.FindStringByStr(p,"trackID="))c.a.w(this.TAG,"not process");else if(v=this.FindStringByStr(p,"a=control:"))(y=this.getLineString(v).split(":")).length>1&&(n=y[1])}if(p=this.FindStringByStr(t,"m=audio")){if(g=this.FindStringByStr(p,"a=rtpmap")){if((b=this.getLineString(g).split(" ")).length>0){m=b[0].substr(9);parseInt(m)}if(b.length>1)(_=b[1].split("/")).length>0&&(i=_[0])}if(v=this.FindStringByStr(p,"trackID="))c.a.w(this.TAG,"not process");else if(v=this.FindStringByStr(p,"a=control:"))(y=this.getLineString(v).split(":")).length>1&&(o=y[1])}if(p=this.FindStringByStr(t,"m=metadata")){var g,v,y;if(g=this.FindStringByStr(p,"a=rtpmap")){var b,_;if((b=this.getLineString(g).split(" ")).length>0){m=b[0].substr(9);parseInt(m)}if(b.length>1)(_=b[1].split("/")).length>0&&_[0]}if(v=this.FindStringByStr(p,"trackID="))c.a.w(this.TAG,"not process");else if(v=this.FindStringByStr(p,"a=control:"))(y=this.getLineString(v).split(":")).length>1&&(a=y[1])}(p=this.FindStringByStr(t,"Content-Base: "))&&(s=this.getLineString(p).substr(14));return"H264"==e?(this.mediaInfo.videoCodecId=7,r.setCodecTypeStr("H264")):"H265"==e&&(this.mediaInfo.videoCodecId=12,r.setCodecTypeStr("H265")),"MPEG4-GENERIC"==i?this.mediaInfo.audioCodecId=10:"PCMU"==i?this.mediaInfo.audioCodecId=1:"PCMA"==i&&(this.mediaInfo.audioCodecId=2),this.videoTrack=n,this.audioTrack=o,this.metadataTrack=a,this.contentBaseStr=s,0},e.rtspParseSETUP=function(t){var e="0",i=this.FindStringByStr(t,"Session:");if(i){var r=this.getLineString(i).split(";");if(r.length>0)e=r[0].substr(9);1==this.setupStreamNum?this.videoSessionId=e:2==this.setupStreamNum?this.audioSessionId=e:3==this.setupStreamNum&&(this.metadataSessionId=e)}},e.rtspParsePLAY=function(t){var e="0";if(t.indexOf("200 OK")<0)return c.a.e(this.TAG,"PLAY ERROR: "+t),-1;var i=this.FindStringByStr(t,"Session:");if(i){var r=this.getLineString(i).split(";");if(r.length>0)e=r[0].substr(9);this.videoSessionId=e}this.state=7},e.sendOptions=function(){var t=this.makeHeader("OPTIONS",null);1==this.authType?t+="WWW-Authorization: Basic "+this.authBasicStr+"\r\n":2==this.authType&&(t+="WWW-Authorization: Digest ",t+='username = "'+this.username+'",',t+='realm = "'+this.realm+'",',t+='nonce = "'+this.nonce+'",',t+='uri = "'+this.rtspUrl+'",',t+='response = "'+this.authDigestStr+'"\r\n'),t+="\r\n",this.sendPacket(t)},e.sendDescribe=function(){var t=this.makeHeader("DESCRIBE",null);1==this.authType?t+="WWW-Authorization: Basic "+this.authBasicStr+"\r\n":2==this.authType&&(t+="WWW-Authorization: Digest ",t+='username = "'+this.username+'",',t+='realm = "'+this.realm+'",',t+='nonce = "'+this.nonce+'",',t+='uri = "'+this.rtspUrl+'",',t+='response = "'+this.authDigestStr+'"\r\n'),t+="Accept: application/sdp\r\n",t+="User-Agent: "+at+"\r\n",t+="\r\n",this.sendPacket(t),this.state=2},e.sendSetup=function(t){var e=this.makeHeader("SETUP",t);""!=this.videoSessionId&&(e+="Session: "+this.videoSessionId+"\r\n"),e+="User-Agent: "+at+"\r\n",t==this.videoTrack?(e+="Transport: RTP/AVP/TCP;unicast;interleaved=0-1\r\n\r\n",this.audioTrack,this.setupStreamNum++):t==this.audioTrack?(e+="Transport: RTP/AVP/TCP;unicast;interleaved=2-3\r\n\r\n",this.setupStreamNum++):t==this.metadataTrack&&(e+="Transport: RTP/AVP/TCP;unicast;interleaved=4-5\r\n\r\n",this.setupStreamNum++),this.state=3,this.sendPacket(e)},e.sendPlay=function(){var t=this.makeHeader("PLAY",null);t+="Session: "+this.videoSessionId+"\r\n",1==this.authType?t+="WWW-Authorization: Basic "+this.authBasicStr+"\r\n":2==this.authType&&(t+="WWW-Authorization: Digest ",t+='username = "'+this.username+'",',t+='realm = "'+this.realm+'",',t+='nonce = "'+this.nonce+'",',t+='uri = "'+this.rtspUrl+'",',t+='response = "'+this.authDigestStr+'"\r\n'),t+="Range: npt=0.000-\r\n\r\n",this.state=4,this.sendPacket(t)},e.sendPause=function(){var t=this.makeHeader("PAUSE",null);t+="Session: "+this.videoSessionId+"\r\n",1==this.authType?t+="WWW-Authorization: Basic "+this.authBasicStr+"\r\n":2==this.authType&&(t+="WWW-Authorization: Digest ",t+='username = "'+this.username+'",',t+='realm = "'+this.realm+'",',t+='nonce = "'+this.nonce+'",',t+='uri = "'+this.rtspUrl+'",',t+='response = "'+this.authDigestStr+'"\r\n'),this.state=5,this.sendPacket(t)},e.sendScale=function(t){var e=this.makeHeader("PLAY",null);e+="Session: "+this.videoSessionId+"\r\n",1==this.authType?e+="WWW-Authorization: Basic "+this.authBasicStr+"\r\n":2==this.authType&&(e+="WWW-Authorization: Digest ",e+='username = "'+this.username+'",',e+='realm = "'+this.realm+'",',e+='nonce = "'+this.nonce+'",',e+='uri = "'+this.rtspUrl+'",',e+='response = "'+this.authDigestStr+'"\r\n'),e+="Scale: "+t+"\r\n",e+="Range: npt=0.000-\r\n\r\n",this.state=4,this.sendPacket(e)},e.abort=function(){var t=this._ws;!t||0!==t.readyState&&1!==t.readyState||(this._requestAbort=!0,t.close()),this._ws=null,this._status=LoaderStatus.kComplete},e._onWebSocketOpen=function(t){this._status=LoaderStatus.kBuffering,c.a.e(this.TAG,"_onWebSocketOpen: "+t.target.url)},e._onWebSocketClose=function(t){c.a.e(this.TAG,"onWebSocketClose"),!0!==this._requestAbort?(this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(-1,-1)):this._requestAbort=!1},e._onWebSocketMessage=function(t){var e=this;if(t.data instanceof ArrayBuffer)this._dispatchArrayBuffer(t.data);else if(t.data instanceof Blob){var i=new FileReader;i.onload=function(){e._dispatchArrayBuffer(i.result)},i.readAsArrayBuffer(t.data)}else{this._status=LoaderStatus.kError;var r={code:-1,msg:"Unsupported WebSocket message type: "+t.data.constructor.name};if(!this._onError)throw new C.d(r.msg);this._onError(LoaderErrors.EXCEPTION,r)}},e._dispatchArrayBuffer=function(t){var e=t,i=this._receivedLength;this._receivedLength+=e.byteLength,this._onDataArrival&&this._onDataArrival(e,i,this._receivedLength),this._triggerReconnectSuccessNotify&&(this._triggerReconnectSuccessNotify=!1,this._onDataArrival&&(this._onDataArrival(null,this._retryConnectTimes,0),this._retryConnectTimes++))},e._onWebSocketError=function(t){c.a.e(this.TAG,"_onWebSocketError: "+t),this._status=LoaderStatus.kError;var e={code:t.code,msg:t.message};if(!this._onError)throw new C.d(e.msg);this._onError(LoaderErrors.EXCEPTION,e)},e.parseResponseStr=function(t){2==this.state?0==this.rtspParseDESCRIBE(t)&&this.sendSetup(this.videoTrack):3==this.state?(this.rtspParseSETUP(t),this.setupStreamNum<2&&""!=this.audioTrack?this.sendSetup(this.audioTrack):this.setupStreamNum<3&&""!=this.metadataTrack?this.sendSetup(this.metadataTrack):this.sendPlay()):4==this.state?this.rtspParsePLAY(t):7==this.state||this.state},t}();function ht(t,e){return ht=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ht(t,e)}var ut=function(t){var e,i;function r(){var e;return(e=t.call(this,"RtspStream-loader")||this).TAG="RtspStreamLoader",e._needStash=!0,e._ws=null,e._RtspHandler=null,e._requestAbort=!1,e._receivedLength=0,e._retryConnectTimes=0,e._triggerReconnectingNotify=!0,e._triggerReconnectSuccessNotify=!0,e._procMediaInfo=!0,e._heartbeatTime=0,e}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,ht(e,i),r.isSupported=function(){try{return void 0!==self.WebSocket}catch(t){return!1}};var n=r.prototype;return n.destroy=function(){this._ws&&this.abort(),t.prototype.destroy.call(this)},n.rtspCallbackEvent=function(t,e,i,r){t.abort(),r.url=i,t.open(r)},n.open=function(t){try{this._retryConnectTimes++,this._triggerReconnectingNotify&&(this._triggerReconnectingNotify=!1,this._onDataArrival&&this._onDataArrival(null,-this._retryConnectTimes,0)),this._triggerReconnectSuccessNotify=!0;var e=t.url.replace("rtsp","ws"),i=this._ws=new self.WebSocket(e);this._RtspHandler=new st(t.url,i,this.rtspCallbackEvent,this,t),i.onopen=this._onWebSocketOpen.bind(this),i.onclose=this._onWebSocketClose.bind(this),i.onmessage=this._onWebSocketMessage.bind(this),i.onerror=this._onWebSocketError.bind(this),this._status=N}catch(t){this._status=U;var r={code:t.code,msg:t.message};if(!this._onError)throw new C.d(r.msg);this._onError(V,r)}},n.abort=function(){var t=this._ws;!t||0!==t.readyState&&1!==t.readyState||(this._requestAbort=!0,t.close()),this._ws=null,this._status=j},n.pause=function(){this._RtspHandler&&this._RtspHandler.sendPause()},n.resume=function(){this._RtspHandler&&this._RtspHandler.sendPlay()},n.scale=function(t){this._RtspHandler&&this._RtspHandler.sendScale(t)},n._onWebSocketOpen=function(t){this._status=F,this._RtspHandler.sendDescribe()},n._onWebSocketClose=function(t){c.a.e(this.TAG,"onWebSocketClose"),!0!==this._requestAbort?(this._status=j,this._onComplete&&this._onComplete(-1,-1)):this._requestAbort=!1},n._onWebSocketMessage=function(t){var e=this;if(t.data instanceof ArrayBuffer)this._dispatchArrayBuffer(t.data);else if(t.data instanceof Blob){var i=new FileReader;i.onload=function(){e._dispatchArrayBuffer(i.result)},i.readAsArrayBuffer(t.data)}else if(t.data instanceof String)c.a.d(this.TAG,"response:"+t.data);else if("message"==t.type)c.a.d(this.TAG,"response message:"+t.data),this._RtspHandler.parseResponseStr(t.data);else{this._status=U;var r={code:-1,msg:"Unsupported WebSocket message type: "+t.data.constructor.name};if(!this._onError)throw new C.d(r.msg);this._onError(V,r)}},n._dispatchArrayBuffer=function(t){var e=t,i=this._receivedLength;if(this._receivedLength+=e.byteLength,this._procMediaInfo){this._procMediaInfo=!1;var r=this._RtspHandler.getMediaInfo();this._onDataArrival&&this._onDataArrival(r,i,1)}this._heartbeatTime<1&&(this._heartbeatTime=Date.parse(new Date));var n=Date.parse(new Date);(n-this._heartbeatTime)/1e3>10&&(this._heartbeatTime=n),this._onDataArrival&&this._onDataArrival(e,i,this._receivedLength),this._triggerReconnectSuccessNotify&&(this._triggerReconnectSuccessNotify=!1,this._onDataArrival&&(this._onDataArrival(null,this._retryConnectTimes,0),this._retryConnectTimes++))},n._onWebSocketError=function(t){c.a.e(this.TAG,"_onWebSocketError: "+t),this._status=U;var e={code:t.code,msg:t.message};if(!this._onError)throw new C.d(e.msg);this._onError(V,e)},r}(q);function lt(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var dt=function(){function t(t,e,i,r){this.TAG="IOController",this._config=e,this._extraData=i,this._stashInitialSize=393216,null!=e.stashInitialSize&&e.stashInitialSize>0&&(this._stashInitialSize=e.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===e.enableStashBuffer&&(this._enableStash=!1),"soft"===e.decodeType&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new B,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader(r)}var e,i,r,n=t.prototype;return n.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._stashBuffer&&(delete this._stashBuffer,this._stashBuffer=null),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},n.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},n.isPaused=function(){return this._paused},n._selectSeekHandler=function(){var t=this._config;if("range"===t.seekType)this._seekHandler=new it(this._config.rangeLoadZeroStart);else if("param"===t.seekType){var e=t.seekParamStart||"bstart",i=t.seekParamEnd||"bend";this._seekHandler=new rt(e,i)}else{if("custom"!==t.seekType)throw new C.b("Invalid seekType in config: "+t.seekType);if("function"!=typeof t.customSeekHandler)throw new C.b("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new t.customSeekHandler}},n._selectLoader=function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if("m3u8"===this._config.streamType)this._loaderClass=ot;else if("rtsp"===this._config.streamType)this._loaderClass=ut;else if(this._isWebSocketURL)this._loaderClass=et;else if(Z.isSupported())this._loaderClass=Z;else if(Q.isSupported())this._loaderClass=Q;else{if(!$.isSupported())throw new C.d("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=$}},n._IsM3u8Loader=function(){return this._loaderClass==ot},n._GetM3u8Loader=function(){return this._loaderClass==ot?this._loader:null},n._IsRtspLoader=function(){return this._loaderClass==ut},n._createLoader=function(t){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loaderClass==ot&&this._loader.setStartPlaySecs(t),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},n.open=function(t){this._currentRange={from:0,to:-1},t&&(this._currentRange.from=t),this._speedSampler.reset(),t||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},n.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},n.pause=function(){this._IsRtspLoader()?this._loader&&this._loader.pause():this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},n.resume=function(){if(this._IsRtspLoader())this._loader&&this._loader.resume();else if(this._paused){this._paused=!1;var t=this._resumeFrom;this._resumeFrom=0,this._internalSeek(t,!0)}},n.rtspScale=function(t){this._IsRtspLoader()&&this._loader&&this._loader.scale(t)},n.seek=function(t){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(t,!0)},n._internalSeek=function(t,e){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(e),this._loader.destroy(),this._loader=null;var i={from:t,to:-1};this._currentRange={from:i.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,i),this._onSeeked&&this._onSeeked()},n.updateUrl=function(t){if(!t||"string"!=typeof t||0===t.length)throw new C.b("Url must be a non-empty string!");this._dataSource.url=t},n._expandBuffer=function(t){for(var e=this._stashSize;e+1048576<t;)e*=2;if((e+=1048576)!==this._bufferSize){var i=new ArrayBuffer(e);if(this._stashUsed>0){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(i,0,e).set(r,0)}this._stashBuffer&&(delete this._stashBuffer,this._stashBuffer=null),this._stashBuffer=i,this._bufferSize=e}},n._normalizeSpeed=function(t){var e=this._speedNormalizeList,i=e.length-1,r=0,n=0,o=i;if(t<e[0])return e[0];for(;n<=o;){if((r=n+Math.floor((o-n)/2))===i||t>=e[r]&&t<e[r+1])return e[r];e[r]<t?n=r+1:o=r-1}},n._adjustStashSize=function(t){var e=0;(e=this._config.isLive||t<512?t:t>=512&&t<=1024?Math.floor(1.5*t):2*t)>8192&&(e=8192);var i=1024*e+1048576;this._bufferSize<i&&this._expandBuffer(i),this._stashSize=1024*e},n._dispatchChunks=function(t,e){return null===t?this._IsM3u8Loader()?void(e>1&&this._onComplete&&this._onComplete(-1)):this._onDataArrival(t,e):(this._currentRange.to=e+t.byteLength-1,this._onDataArrival(t,e))},n._onURLRedirect=function(t){this._redirectedURL=t,this._onRedirect&&this._onRedirect(t)},n._onContentLengthKnown=function(t){t&&this._fullRequestFlag&&(this._totalLength=t,this._fullRequestFlag=!1)},n._onLoaderChunkArrival=function(t,e,i){if(!this._onDataArrival)throw new C.a("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused)if(this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),null===t&&i<1)this._dispatchChunks(t,e);else{this._speedSampler.addBytes(t.byteLength);var r=this._speedSampler.lastSecondKBps;if(0!==r){var n=this._normalizeSpeed(r);this._speedNormalized!==n&&(this._speedNormalized=n,this._adjustStashSize(n))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=e),this._stashUsed+t.byteLength<=this._stashSize){new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength}else{var o=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var a=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(a,this._stashByteStart);if(s<a.byteLength){if(s>0){var h=new Uint8Array(a,s);o.set(h,0),this._stashUsed=h.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+t.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+t.byteLength),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength}else{var u=this._dispatchChunks(t,e);if(u<t.byteLength){var l=t.byteLength-u;l>this._bufferSize&&(this._expandBuffer(l),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(t,u),0),this._stashUsed+=l,this._stashByteStart=e+u}}}else if(0===this._stashUsed){var d=this._dispatchChunks(t,e);if(d<t.byteLength){var f=t.byteLength-d;f>this._bufferSize&&this._expandBuffer(f),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(t,d),0),this._stashUsed+=f,this._stashByteStart=e+d}}else{this._stashUsed+t.byteLength>this._bufferSize&&(c.a.w(this.TAG,"_expandBuffer... "+(this._stashUsed+t.byteLength)),this._expandBuffer(this._stashUsed+t.byteLength));var p=new Uint8Array(this._stashBuffer,0,this._bufferSize);p.set(new Uint8Array(t),this._stashUsed),this._stashUsed+=t.byteLength;var m=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(m<this._stashUsed&&m>0){var g=new Uint8Array(this._stashBuffer,m);p.set(g,0)}this._stashUsed-=m,this._stashByteStart+=m}}},n._flushStashBuffer=function(t){if(this._stashUsed>0){var e=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(e,this._stashByteStart),r=e.byteLength-i;if(i<e.byteLength){if(!t){if(i>0){var n=new Uint8Array(this._stashBuffer,0,this._bufferSize),o=new Uint8Array(e,i);n.set(o,0),this._stashUsed=o.byteLength,this._stashByteStart+=i}return 0}c.a.w(this.TAG,r+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,r}return 0},n._onLoaderComplete=function(t,e){this._flushStashBuffer(!0),t!=e||-1!=e?this._onComplete&&this._onComplete(this._extraData):this._onComplete&&this._onComplete(-1)},n._onLoaderError=function(t,e){if(c.a.e(this.TAG,"Loader error, code = "+e.code+", msg = "+e.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,t=G),t===z){if(!this._config.isLive&&this._totalLength){var i=this._currentRange.to+1;return void(i<this._totalLength&&(c.a.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(i,!1)))}t=G}if(!this._onError)throw new C.d("IOException: "+e.msg);this._onError(t,e)},e=t,(i=[{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(t){this._extraData=t}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(t){this._onDataArrival=t}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(t){this._onSeeked=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onComplete",get:function(){return this._onComplete},set:function(t){this._onComplete=t}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(t){this._onRedirect=t}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(t){this._onRecoveredEarlyEof=t}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===$?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}}])&<(e.prototype,i),r&<(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),ft={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint",RECONNECT_ING:"reconnect_ing",RECONNECT_SUCCESS:"reconnect_success"},ct=i(77),pt=i(23);function mt(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gt(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}var vt=function(){function t(t,e,i,r,n,o,a){var s;this.TAG="RTSPDemuxer",this._config=e,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._initVideoMetadata=!1,this._initAudioMetadata=!1,this._mediaInfo=new _.a,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=(s=new ArrayBuffer(2),new DataView(s).setInt16(0,256,!0),256===new Int16Array(s)[0]),this.videoCodecId=t.videoCodecId,this.audioCodecId=t.audioCodecId,this._AVC_SPS=null,this._AVC_PPS=null,this._HEVC_VPS=null,this._HEVC_SPS=null,this._HEVC_PPS=null,this._StartCode=[0,0,0,1],this._SampleRate=8e3,this._ChannelNum=1,this._AVC_Config=null,this._pause=!1,this._callbackInitFlag=!1,this._callbackMediaDataFunc=i,this._callbackMediaDataUserPtr=r,this._callbackPlaybackTimePtr=n,this._callbackPlaybackTimeUserPtr=o,this.getVideoInfoCallbackFunc=a,this._debugProcCount=0,this.ptsInterval=40,this.packetData=null,this.packetPos=0,this.frameData=new Uint8Array(2097152),this.fullFrameData=null,this.fullFramePos=0,this.snapshotCount=0,this.framePos=0,this.lastTimestamp=0,this.currentIsKeyFrame=!1,this.reset=0,this.findKeyframe=!0,this.syncVideoPts=0,this.syncAudioPts=0,this.startVideoPts=0,this.startAudioPts=0,this.lastNALType=0,this._fileposition=0,this._DebugBuf=null,this._DebugBufPos=0}var e,i,r,n=t.prototype;return n.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this.packetData&&(delete this.packetData,this.packetData=null),this.frameData&&(delete this.frameData,this.frameData=null),this.fullFrameData&&(delete this.fullFrameData,this.fullFrameData=null)},t.probe=function(t){if(t.videoCodecId>0)return{match:!0,consumed:0,dataOffset:0,hasAudioTrack:t.audioCodecId>0,hasVideoTrack:t.videoCodecId>0,videoCodecId:t.videoCodecId,audioCodecId:t.audioCodecId};var e=new Uint8Array(t),i={match:!1};if("$"!==e[0])return i;var r=(4&e[4])>>>2!=0,n=0!=(1&e[4]),o=gt(e,5);return o<9?i:{match:!0,consumed:o,dataOffset:o,hasAudioTrack:r,hasVideoTrack:n}},n.bindDataSource=function(t){return t.onDataArrival=this.parseChunks.bind(this),this},n.resetMediaInfo=function(){this._mediaInfo=new _.a},n.pause=function(){this._pause=!0},n.resume=function(){this._pause=!1},n._onDataAvailableToSoftwareDecodeVideo=function(t,e){var i=e.samples,r=-1;for(i.length>1&&(r=0);i.length;){for(var n=i.shift(),o=0,a=0;a<n.units.length;a++)o+=n.units[a].data.length;for(var s=0,h=new Uint8Array(o);n.units.length;){var u=n.units.shift();27==t&&(u.data[0]=0,u.data[1]=0,u.data[2]=0,u.data[3]=1),h.set(u.data,s),s+=u.data.length}this._callbackMediaDataFunc&&(r>=0&&r++,this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,1,t,n.isKeyframe,h,o,n.pts,0,0))}},n._onDataAvailableToSoftwareDecodeAudio=function(t,e){var i=e.samples,r=-1;for(i.length>1&&(r=0);i.length;){var n=i.shift();this._callbackMediaDataFunc&&(r>=0&&r++,this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,2,t,0,n.unit,n.length,this._SampleRate,this._ChannelNum,this._SampleRate>=44100?32:16))}},n._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},n.procH264Packet=function(t,e){var i=[0,0,0,1],r=0,n=!1,o=31&t[0];o>=1&&o<=23&&(5==o&&(n=!0),o=1);var a={length:0,keyframe:n,endBit:0};switch(o){case 0:default:break;case 1:this.frameData.set(i,this.framePos),this.framePos+=4,this.frameData.set(t,this.framePos),this.framePos+=t.length,a.length=4+t.length,this._AVC_SPS&&this._AVC_PPS&&a.length>this._AVC_SPS.length+this._AVC_PPS.length+8&&(a.endBit=1);break;case 24:r++;for(var s=0;s<2;s++){var h=this.framePos-r;do{t[r],t[r+1];r+=2,h-=2}while(h>2)}break;case 25:case 26:case 27:case 29:c.a.e(this.TAG,"Unhandled type("+o+") (See RFC for implementation details");break;case 28:var u=o,l=t[++r],d=l>>7,f=(64&l)>>6,p=31&l;o;var m=224&u|31&l;if(r++,5!=p&&6!=p||(a.keyframe=!0),1==f){var g=t.subarray(r);this.frameData.set(g,this.framePos),this.framePos+=g.length,a.endBit=1}else if(1==d){var v=224&t[0]|31&t[1];this._AVC_SPS&&this._AVC_PPS&&this._AVC_SPS[4]!=v&&5==m&&(this.frameData[4]!=this._AVC_SPS[4]||this.frameData[4]==this._AVC_SPS[4]&&this.framePos<1)&&(this.frameData.set(this._AVC_SPS,this._AVC_SPS.length),this.framePos+=this._AVC_SPS.length,this.frameData.set(this._AVC_PPS,this._AVC_PPS.length),this.framePos+=this._AVC_PPS.length),this.frameData.set(i,this.framePos),this.framePos+=4,this.frameData[this.framePos]=224&t[0]|31&t[1],this.framePos+=1;var y=t.subarray(2,t.length);this.frameData.set(y,this.framePos),this.framePos+=y.length}else{var b=t.subarray(2);this.frameData.set(b,this.framePos),this.framePos+=b.length}break;case 30:case 31:c.a.e(this.TAG,"Undefined type: "+o)}return a},n.procH264NALHeader=function(t){var e=31&t[0];if(this.lastNALType=e,(7==e||8==e||6==e||5==e)&&t.length<256){var i=[0,0,0,1];if(this.currentIsKeyFrame=!0,7==e){if(!this._initVideoMetadata){this._AVC_Config=pt.a.parseSPS(t);var r=this._AVC_Config,n="avc1.";if(r)for(var o=t.subarray(1,4),a=0;a<3;a++){var s=o[a].toString(16);s.length<2&&(s="0"+s),n+=s}null==this._AVC_SPS&&(this._AVC_SPS=new Uint8Array(t.length+4),this._AVC_SPS.set(i,0),this._AVC_SPS.set(t,4));var h=this._videoMetadata,u=this._videoTrack;if(h?void 0!==h.avcc&&c.a.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(h=this._videoMetadata={}).type="video",h.id=u.id,h.timescale=this._timescale,h.duration=this._duration),h.codecWidth=r.codec_size.width,h.codecHeight=r.codec_size.height,h.presentWidth=r.present_size.width,h.presentHeight=r.present_size.height,this.getVideoInfoCallbackFunc&&null!=this.getVideoInfoCallbackFunc&&this.getVideoInfoCallbackFunc(this._callbackPlaybackTimeUserPtr,"H264",h.codecWidth,h.codecHeight),h.profile=r.profile_string,h.level=r.level_string,h.bitDepth=r.bit_depth,h.chromaFormat=r.chroma_format,h.sarRatio=r.sar_ratio,h.frameRate=r.frame_rate,!1!==r.frame_rate.fixed&&0!==r.frame_rate.fps_num&&0!==r.frame_rate.fps_den||(h.frameRate=this._referenceFrameRate),void 0!==h.frameRate){var l=h.frameRate.fps_den,d=h.frameRate.fps_num;h.refSampleDuration=h.timescale*(l/d)}h.codec=n;var f=this._mediaInfo;f.width=h.codecWidth,f.height=h.codecHeight,void 0!==h.frameRate&&(f.fps=h.frameRate.fps),f.profile=h.profile,f.level=h.level,f.refFrames=r.ref_frames,f.chromaFormat=r.chroma_format_string,f.sarNum=h.sarRatio.width,f.sarDen=h.sarRatio.height,f.videoCodec=n,f.hasAudio?null!=f.audioCodec&&(f.mimeType='video/x-flv; codecs="'+f.videoCodec+","+f.audioCodec+'"'):f.mimeType='video/x-flv; codecs="'+f.videoCodec+'"',f.isComplete()&&this._onMediaInfo(f)}}else if(8==e&&(null==this._AVC_PPS&&(this._AVC_PPS=new Uint8Array(t.length+4),this._AVC_PPS.set(i,0),this._AVC_PPS.set(t,4)),!this._initVideoMetadata)){var p=this._videoMetadata;if(null==p.avcc){var m=0,g=this._AVC_SPS.length-4+8+1+2+(this._AVC_PPS.length-4);p.avcc=new Uint8Array(g+1),p.avcc[0]=1,p.avcc[1]=this._AVC_SPS[5],p.avcc[2]=this._AVC_SPS[6],p.avcc[3]=this._AVC_SPS[7],p.avcc[4]=255,p.avcc[5]=225,m=6,p.avcc[m++]=this._AVC_SPS.length-4>>8,p.avcc[m++]=this._AVC_SPS.length-4&255;var v=this._AVC_SPS.subarray(4,this._AVC_SPS.length);p.avcc.set(v,m),m+=v.length,p.avcc[m++]=1,p.avcc[m++]=this._AVC_PPS.length-4>>8,p.avcc[m++]=this._AVC_PPS.length-4&255;var y=this._AVC_PPS.subarray(4,this._AVC_PPS.length);p.avcc.set(y,m),m+=y.length,p.avcc[g]=1}this._onTrackMetadata("video",p),this._initVideoMetadata=!0}}},n.procH265Packet=function(t,e,i){var r=[0,0,0,1],n=t[0]>>1&63,o={length:0,keyframe:!1,endBit:0};if(49==n){var a=t[2],s=128&a,h=64&a,u=(n=63&a)<<1;16!=n&&17!=n&&18!=n&&19!=n&&20!=n&&21!=n&&39!=n||(o.keyframe=!0);var l=3;0!=s&&(this.framePos=0,this.frameData.set(r,this.framePos),this.framePos+=4,t[1]=u,t[2]=1,l=1),0!=h&&(o.endBit=1);var d=t.subarray(l);this.frameData.set(d,this.framePos),this.framePos+=d.length,o.length=this.framePos,38==this.frameData[4]&&(o.keyframe=!0)}else if(48==n);else if(1==n||19==n||32==n||33==n||34==n||39==n){var f=!1;if(32==n)null==this._AVC_VPS&&(this._AVC_VPS=new Uint8Array(t.length+4)),this._AVC_VPS.set(r,0),this._AVC_VPS.set(t,4),f=!0;else if(33==n)null==this._AVC_SPS&&(this._AVC_SPS=new Uint8Array(t.length+4)),this._AVC_SPS.set(r,0),this._AVC_SPS.set(t,4),f=!0;else if(34==n)null==this._AVC_PPS&&(this._AVC_PPS=new Uint8Array(t.length+4)),this._AVC_PPS.set(r,0),this._AVC_PPS.set(t,4),f=!0;else if(39==n);else if(1==n){this.framePos=0,this.frameData.set(r,this.framePos),this.framePos+=4;var c=t.subarray(0);this.frameData.set(c,this.framePos),this.framePos+=c.length,o.length=this.framePos,o.endBit=1}f&&(o.length=4+t.length,o.keyframe=!0)}return o},n.uint8arrayToBase64=function(t){for(var e,i=0,r=t.length,n="";i<r;)e=t.subarray(i,Math.min(i+32768,r)),n+=String.fromCharCode.apply(null,e),i+=32768;return btoa(n)},n.parseVideoRTPPacket=function(t){var e=t.length,i=0,r=gt(t,i)>>>0,n=(8388608&r)>>23;gt(t,i+=4),gt(t,i+=4);i+=4;var o=r>>24&15;if(!(t.length<o)){if(268435456&r){if(t.length<4)return;var a=gt(t,i)>>>0;i+=4;var s=4*(65535&a);if(t.length<s)return;i+=s}if(536870912&r){if(t.length<1)return;var h=t[t.length-1];if(t.length<h)return;e-=h}var u=t.subarray(i,e),l=null;if(7==this.videoCodecId?(this.procH264NALHeader(u),l=this.procH264Packet(u,u.length)):12==this.videoCodecId&&(l=this.procH265Packet(u,u.length,n)),null!=l&&(1==n||1==l.endBit)){var d=[],f=0,c=0,p=1,m=!1;m=l.keyframe;var g=!0;if(7==this.videoCodecId?"auto"!==this._config.decodeType&&"hard"!==this._config.decodeType||(g=!1):12==this.videoCodecId&&(m=l.keyframe),m){if(this.findKeyframe=!1,this.fullFramePos=0,12==this.videoCodecId&&this._AVC_VPS){var v=new Uint8Array(this._AVC_VPS.length);g&&v.set(this._AVC_VPS,0);var y={type:7,data:v};d.push(y),c=f+=v.length,this.snapshotCount>0&&this.fullFrameData&&null!=this.fullFrameData&&(this.fullFrameData.set(this._AVC_VPS,0),this.fullFramePos=this._AVC_VPS.length),this._DebugBuf&&(this._DebugBuf.set(v,this._DebugBufPos),this._DebugBufPos+=v.length)}if(this._AVC_SPS){var b=new Uint8Array(this._AVC_SPS.length);if(g)b.set(this._AVC_SPS,0);else{var _=this._AVC_SPS.length-4;b.set(this._AVC_SPS,0),b[0]=_>>24&255,b[1]=_>>16&255,b[2]=_>>8&255,b[3]=255&_}this.snapshotCount>0&&this.fullFrameData&&null!=this.fullFrameData&&(this.fullFrameData.set(this._AVC_SPS,this.fullFramePos),this.fullFramePos+=this._AVC_SPS.length);var w={type:7,data:b};if(d.push(w),f+=b.length,c+=b.length,this._DebugBuf&&(this._DebugBuf.set(b,this._DebugBufPos),this._DebugBufPos+=b.length),this._AVC_PPS){var A=new Uint8Array(this._AVC_PPS.length);if(g)A.set(this._AVC_PPS,0);else{var M=this._AVC_PPS.length-4;A.set(this._AVC_PPS,0),A[0]=M>>24&255,A[1]=M>>16&255,A[2]=M>>8&255,A[3]=255&M}this.snapshotCount>0&&this.fullFrameData&&null!=this.fullFrameData&&(this.fullFrameData.set(this._AVC_PPS,this.fullFramePos),this.fullFramePos+=this._AVC_PPS.length);var E={type:8,data:A};d.push(E),f+=A.length,c+=A.length,this._DebugBuf&&(this._DebugBuf.set(A,this._DebugBufPos),this._DebugBufPos+=A.length)}}if(6==this.frameData[f+4])for(var S=0;S<f+32;S++){if(0==this.frameData[S+f+4]&&0==this.frameData[S+f+4+1]&&0==this.frameData[S+f+4+2]&&1==this.frameData[S+f+4+3]){f=f+S+4;break}if(0==this.frameData[S+f+4]&&0==this.frameData[S+f+4+1]&&1==this.frameData[S+f+4+2]){f=f+S+3;break}}p=5,this._videoInitialMetadataDispatched=!0}if(12==this.videoCodecId&&(f=0),0==l.endBit)return;var k=this.frameData.subarray(f,this.framePos),T=new Uint8Array(k);if(m&&this.snapshotCount>0&&this.fullFrameData&&null!=this.fullFrameData&&this.fullFramePos>0&&window.vssModuleInitialized){this.snapshotCount--,this.fullFrameData.set(T,this.fullFramePos),this.fullFramePos+=T.length;var R=window.vssPlayerModule,I=window.VssPlayerWasmKits;if(R&&null!=R&&I&&null!=I){var C=new Uint8Array(this.fullFrameData);if(C.length>0){var P=R._malloc(C.length);R.HEAP8.set(C,P);var x=I.convertFrame2Image(0,P,this.fullFramePos,I.yuvData,0);if(x<1);else{var D=R.HEAPU8.subarray(I.yuvData,I.yuvData+x),O=this.uint8arrayToBase64(D),B=document.createElement("a");document.body.append(B),B.href="data:image/jpeg;base64,"+O,B.download="snapshot.jpg",B.rel="noopener noreferrer",B.click(),document.body.removeChild(B)}R._free(P)}}this.fullFramePos=0}if(c+=T.length,g);else{var L=T.length-4;T[0]=L>>24&255,T[1]=L>>16&255,T[2]=L>>8&255,T[3]=255&L}if(this._DebugBuf){if(this._DebugBufPos+T.length<1048576&&(this._DebugBufPos>0||5==p||1==l.keyframe)&&(this._DebugBuf.set(T,this._DebugBufPos),this._DebugBufPos+=T.length),this._DebugBufPos>0)this._DebugBuf.subarray(0,this._DebugBufPos);this._DebugBufPos=0}var W={type:p,data:T};d.push(W),f+=T.length,this.findKeyframe;var N=this.startVideoPts;this.startVideoPts+=this.ptsInterval,this.startVideoPts>=2147483647&&(this.startVideoPts=0);var F=this._videoTrack,U={units:d,length:c,isKeyframe:m,dts:N,cts:0,pts:N,fileposition:this._fileposition};m&&(this._fileposition=0,U.fileposition=0),this._fileposition+=c,!this._callbackInitFlag&&this._callbackMediaDataFunc&&(this._callbackInitFlag=!0,12==this.videoCodecId?this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,1,0,0,null,0,0,0,0):"auto"===this._config.decodeType||"hard"===this._config.decodeType?this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!1,1,0,0,null,0,0,0,0):this._callbackMediaDataFunc(this._callbackMediaDataUserPtr,!0,1,0,0,null,0,0,0,0)),7==this.videoCodecId||0==this.videoCodecId?"auto"===this._config.decodeType||"hard"===this._config.decodeType?this._videoTrack.length>0&&(this._videoTrack.samples.length>=1&&!this.findKeyframe||m)&&this._onDataAvailable(this._audioTrack,this._videoTrack):(this._videoTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeVideo(27,this._videoTrack),this._audioTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeAudio(86018,this._audioTrack)):12==this.videoCodecId&&(this._videoTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeVideo(173,this._videoTrack),this._audioTrack.samples.length>0&&this._onDataAvailableToSoftwareDecodeAudio(10==this.audioCodecId?86018:0,this._audioTrack)),0!==this.reset||this.findKeyframe||(F.samples.push(U),F.length+=f),this.framePos=0,d.length>1&&(this.currentIsKeyFrame=!1)}}},n._parseAACAudioSpecificConfig=function(t){var e=t,i=null,r=0,n=null;if(r=2,5,!(5>=this._mpegSamplingRates.length)){0,5===r&&(n=(7&e[1])<<1|e[2]>>>7,(124&e[2])>>>2);var o=self.navigator.userAgent.toLowerCase();return-1!==o.indexOf("firefox")||-1!==o.indexOf("android")?(r=2,i=new Array(2),n=5):(r=5,n=5,i=new Array(4)),i[0]=r<<3,i[0]|=2,i[1]=640,i[1]|=16,5===r&&(i[1]|=(15&n)>>>1,i[2]=(1&n)<<7,i[2]|=8,i[3]=0),{config:i,samplingRate:32e3,channelCount:2,codec:"mp4a.40."+r,originalCodec:"mp4a.40.2"}}this._onError(D.a.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!")},n.procAACHeader=function(t,e,i){var r={};if(!this._initAudioMetadata){var n=this._audioMetadata,o=this._audioTrack;if(n||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(n=this._audioMetadata={}).type="audio",n.id=o.id,n.timescale=this._timescale>0?this._timescale:1e3,n.duration=this._duration>0?this._duration:32,n.audioSampleRate=32e3,n.channelCount=2),r.data=this._parseAACAudioSpecificConfig(t,e+1,i-1),!this._initAudioMetadata&&this._initVideoMetadata){if(null==r.data)return 0;var a=r.data;n.audioSampleRate=a.samplingRate,n.channelCount=a.channelCount,n.codec=a.codec,n.originalCodec=a.originalCodec,n.config=a.config,n.refSampleDuration=1024/n.audioSampleRate*n.timescale,c.a.v(this.TAG,"Parsed AudioSpecificConfig"),this._SampleRate=a.samplingRate,this._ChannelNum=a.channelCount,this._duration=0,this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",n);var s=this._mediaInfo;s.audioCodec=n.originalCodec,s.audioSampleRate=n.audioSampleRate,s.audioChannelCount=n.channelCount,s.hasVideo?null!=s.videoCodec&&(s.mimeType='video/x-flv; codecs="'+s.videoCodec+","+s.audioCodec+'"'):s.mimeType='video/x-flv; codecs="'+s.audioCodec+'"',s.isComplete()&&(this._onMediaInfo(s),this._initAudioMetadata=!0),this._initAudioMetadata=!0}}},n.parseAudioRTPPacket=function(t){t.length;var e=0,i=gt(t,e)>>>0;gt(t,e+=4),gt(t,e+=4);e+=4;var r=i>>24&15;if(!(t.length<r)){if(268435456&i){if(t.length<4)return;var n=gt(t,e)>>>0;e+=4;var o=4*(65535&n);if(t.length<o)return;e+=o}if(536870912&i){if(t.length<1)return;var a=t[t.length-1];if(t.length<a)return;a}}},n.parseChunks=function(t,e){if(null===t)return 0;if(t.byteLength<1)return 0;var i=new Uint8Array(t),r=0;if(36!=i[r]){for(var n=0;n<i.length;n++){var o=i[n+2]<<8|i[n+3];if(36==i[n]&&0==i[n+1]&&o<=1460){r=n;break}}if(r<1)return 0}var a=i[r+1],s=i[r+2]<<8|i[r+3];if(i.length-r<s+4)return 0;if(0==a){var h=i.subarray(4,s+4);this.parseVideoRTPPacket(h)}else if(1==a);else if(2==a){var u=i.subarray(4,s+4);this.parseAudioRTPPacket(u)}else if(3==a);else if(4==a){var l=i.subarray(48,s+4+12+32);this._callbackPlaybackTimePtr&&this._callbackPlaybackTimePtr(this._callbackPlaybackTimeUserPtr,"rtspPlaybackTime",l)}return i.length,s+4},n._makeH265Header=function(t){var e=2;switch(t){case 78:case 80:case 64:case 66:case 32:case 34:case 36:case 38:case 40:case 42:e=1}return e},n.snapshot=function(){null==this.fullFrameData&&(this.fullFrameData=new Uint8Array(2097152)),this.snapshotCount++},n.changeSpeed=function(t){this.ptsInterval=t},e=t,(i=[{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(t){this._onTrackMetadata=t}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(t){this._onMediaInfo=t}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(t){this._onMetaDataArrived=t}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(t){this._onScriptDataArrived=t}},{key:"onError",get:function(){return this._onError},set:function(t){this._onError=t}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(t){this._onDataAvailable=t}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(t){this._timestampBase=t}},{key:"overridedDuration",get:function(){return this._duration},set:function(t){this._durationOverrided=!0,this._duration=t,this._mediaInfo.duration=t}},{key:"overridedHasAudio",set:function(t){this._hasAudioFlagOverrided=!0,this._hasAudio=t,this._mediaInfo.hasAudio=t}},{key:"overridedHasVideo",set:function(t){this._hasVideoFlagOverrided=!0,this._hasVideo=t,this._mediaInfo.hasVideo=t}}])&&mt(e.prototype,i),r&&mt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),yt=function(){function t(t,e){this.TAG="TransmuxingController",this._emitter=new f.a,this._config=e,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(r){r.timestampBase=i,i+=r.duration,r.cors=t.cors,r.withCredentials=t.withCredentials,e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null,this._callbackMediaData=null,this._callbackUserPtr=null,this._callbackPlaybackTimePtr=null,this._callbackPlaybackTimeUserPtr=null,this.getVideoInfoCallbackFunc=null,this._isM3u8=!1,this._isRtsp=!1,this._reconnectTimes=0}var e=t.prototype;return e.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},e.on=function(t,e){this._emitter.addListener(t,e)},e.off=function(t,e){this._emitter.removeListener(t,e)},e.setMediaSourceCallback=function(t,e,i,r,n){this._callbackMediaData=t,this._callbackUserPtr=e,this._callbackPlaybackTimePtr=i,this._callbackPlaybackTimeUserPtr=r,this.getVideoInfoCallbackFunc=n},e.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},e._loadSegment=function(t,e){if(this._currentSegmentIndex=t,null!=this._mediaDataSource.segments){var i=this._mediaDataSource.segments[t],r=this._ioctl=new dt(i,this._config,t,this._mediaDataSource.startPlaySecs);r.onError=this._onIOException.bind(this),r.onSeeked=this._onIOSeeked.bind(this),r.onComplete=this._onIOComplete.bind(this),r.onRedirect=this._onIORedirect.bind(this),r.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),e?this._demuxer.bindDataSource(this._ioctl):r.onDataArrival=this._onInitChunkArrival.bind(this),r.open(e),this._isM3u8=r._IsM3u8Loader(),this._isRtsp=r._IsRtspLoader()}},e.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},e._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},e.pauseOrResume=function(t){null!=this._demuxer&&(this._isM3u8||(this._isRtsp&&(t?this._ioctl.pause():this._ioctl.resume()),t?this._demuxer.pause():(this._remuxer.seek(0),this._demuxer.resume())))},e.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},e.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},e.rtspScale=function(t,e){this._isRtsp&&(this._ioctl.rtspScale(t),this._demuxer&&null!=this._demuxer&&this._demuxer.changeSpeed(e))},e.changeSpeed=function(t){this._remuxer&&this._remuxer.changeSpeed(t)},e.seekToSecs=function(t,e){var i=this._ioctl._GetM3u8Loader();i&&(i.seek(t,e),this._demuxer&&this._demuxer.resetMediaPts(1)),this._remuxer&&this._remuxer.seek(0),i&&this._demuxer&&this._demuxer.resetMediaPts(0)},e.seek=function(t){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var e=this._searchSegmentIndexContains(t);if(e===this._currentSegmentIndex){var i=this._mediaInfo.segments[e];if(null==i)this._pendingSeekTime=t;else{var r=i.getNearestKeyframe(t);this._remuxer.seek(r.milliseconds),this._ioctl.seek(r.fileposition),this._pendingResolveSeekPoint=r.milliseconds}}else{var n=this._mediaInfo.segments[e];if(null==n)this._pendingSeekTime=t,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(e);else{var o=n.getNearestKeyframe(t);this._internalAbort(),this._remuxer.seek(t),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[e].timestampBase,this._loadSegment(e,o.fileposition),this._pendingResolveSeekPoint=o.milliseconds,this._reportSegmentMediaInfo(e)}}this._enableStatisticsReporter()}},e._searchSegmentIndexContains=function(t){for(var e=this._mediaDataSource.segments,i=e.length-1,r=0;r<e.length;r++)if(t<e[r].timestampBase){i=r-1;break}return i},e._onInitChunkArrival=function(t,e){var i=this;if(this._isM3u8||this._isRtsp){if(this._isRtsp){var r=null,n=0;if(null==t&&e<0)return void this._emitter.emit(ft.RECONNECT_ING,e);if(null==t&&e>0)return;if(e>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,n=this._demuxer.parseChunks(t,e);else if((r=vt.probe(t)).match){this._demuxer=new vt(r,this._config,this._callbackMediaData,this._callbackUserPtr,this._callbackPlaybackTimePtr,this._callbackPlaybackTimeUserPtr,this.getVideoInfoCallbackFunc),this._remuxer||(this._remuxer=new x(this._config));var o=this._mediaDataSource;null==o.duration||isNaN(o.duration)||(this._demuxer.overridedDuration=o.duration),"boolean"==typeof o.hasAudio&&(this._demuxer.overridedHasAudio=o.hasAudio),"boolean"==typeof o.hasVideo&&(this._demuxer.overridedHasVideo=o.hasVideo),this._demuxer.timestampBase=o.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),this._reconnectTimes>0&&this._emitter.emit(ft.RECONNECT_SUCCESS,this._reconnectTimes),this._reconnectTimes++}else r=null,c.a.e(this.TAG,"Non-RTSP, Unsupported media type!"),Promise.resolve().then((function(){i._internalAbort()})),this._emitter.emit(ft.DEMUX_ERROR,D.a.FORMAT_UNSUPPORTED,"Non-RTSP, Unsupported media type"),n=0;return n}if(null==t&&e<0)return void this._emitter.emit(ft.RECONNECT_ING,e);if(null==t&&e>0)return;var a=0;if(e>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,this._demuxer.append(t,e,0),a=t.length;else{this._demuxer=new ct.a(this._config,this._callbackMediaData,this._callbackUserPtr),this._remuxer||(this._remuxer=new x(this._config));var s=this._mediaDataSource;null==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),this._demuxer.append(t,e,0),a=t.length}return a}var h=null,u=0;if(null==t&&e<0)this._emitter.emit(ft.RECONNECT_ING,e);else if(!(null==t&&e>0)){if(e>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,u=this._demuxer.parseChunks(t,e);else if((h=w.a.probe(t)).match){this._demuxer=new w.a(h,this._config,this._callbackMediaData,this._callbackUserPtr,this._callbackPlaybackTimeUserPtr,this.getVideoInfoCallbackFunc),this._remuxer||(this._remuxer=new x(this._config));var l=this._mediaDataSource;null==l.duration||isNaN(l.duration)||(this._demuxer.overridedDuration=l.duration),"boolean"==typeof l.hasAudio&&(this._demuxer.overridedHasAudio=l.hasAudio),"boolean"==typeof l.hasVideo&&(this._demuxer.overridedHasVideo=l.hasVideo),this._demuxer.timestampBase=l.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),u=this._demuxer.parseChunks(t,e),this._reconnectTimes>0&&this._emitter.emit(ft.RECONNECT_SUCCESS,this._reconnectTimes),this._reconnectTimes++}else h=null,c.a.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){i._internalAbort()})),this._emitter.emit(ft.DEMUX_ERROR,D.a.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),u=0;return u}},e._GetM3u8Loader=function(){if(null==this._ioctl)return null;var t=this._ioctl._GetM3u8Loader();return t||null},e._GetM3u8TotalDuration=function(){if(null==this._ioctl)return 0;var t=this._ioctl._GetM3u8Loader();return t?t.GetM3u8TotalDuration():0},e._onMediaInfo=function(t){var e=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},t),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,_.a.prototype));var i=Object.assign({},t);Object.setPrototypeOf(i,_.a.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=i,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var t=e._pendingSeekTime;e._pendingSeekTime=null,e.seek(t)}))},e._onMetaDataArrived=function(t){this._emitter.emit(ft.METADATA_ARRIVED,t)},e._onScriptDataArrived=function(t){this._emitter.emit(ft.SCRIPTDATA_ARRIVED,t)},e._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},e._onIOComplete=function(t){var e=t+1;if(this._ioctl&&this._ioctl._IsM3u8Loader()){this._ioctl._GetM3u8Loader();r.GetLiveStreamType()&&(this._emitter.emit(ft.RECONNECT_SUCCESS,2),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this.start())}else if(e<this._mediaDataSource.segments.length){if(this._internalAbort(),this._remuxer&&this._remuxer.flushStashedSamples(),-1===t){this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null);var i=this;r.sleep(3e3).then((function(){i.start()}))}}else if(this._remuxer&&(this._remuxer.flushStashedSamples(),this._emitter.emit(ft.LOADING_COMPLETE),this._disableStatisticsReporter()),-1===t){this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null);var n=this;r.sleep(3e3).then((function(){n.start()}))}},e._onIORedirect=function(t){var e=this._ioctl.extraData;this._mediaDataSource.segments[e].redirectedURL=t},e._onIORecoveredEarlyEof=function(){this._emitter.emit(ft.RECOVERED_EARLY_EOF)},e._onIOException=function(t,e){c.a.e(this.TAG,"IOException: type = "+t+", code = "+e.code+", msg = "+e.msg),this._emitter.emit(ft.IO_ERROR,t,e),this._disableStatisticsReporter()},e._onDemuxException=function(t,e){c.a.e(this.TAG,"DemuxException: type = "+t+", info = "+e),this._emitter.emit(ft.DEMUX_ERROR,t,e)},e._onRemuxerInitSegmentArrival=function(t,e){this._emitter.emit(ft.INIT_SEGMENT,t,e)},e._onRemuxerMediaSegmentArrival=function(t,e){if(null==this._pendingSeekTime&&(this._emitter.emit(ft.MEDIA_SEGMENT,t,e),null!=this._pendingResolveSeekPoint&&"video"===t)){var i=e.info.syncPoints,r=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,m.safari&&i.length>0&&i[0].originalDts===r&&(r=i[0].pts),this._emitter.emit(ft.RECOMMEND_SEEKPOINT,r)}},e._enableStatisticsReporter=function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},e._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e._reportSegmentMediaInfo=function(t){var e=this._mediaInfo.segments[t],i=Object.assign({},e);i.duration=this._mediaInfo.duration,i.segmentCount=this._mediaInfo.segmentCount,delete i.segments,delete i.keyframesIndex,this._emitter.emit(ft.MEDIA_INFO,i)},e._reportStatisticsInfo=function(){var t={};null!=this._ioctl&&(t.url=this._ioctl.currentURL,t.hasRedirect=this._ioctl.hasRedirect,t.hasRedirect&&(t.redirectedURL=this._ioctl.currentRedirectedURL),t.speed=this._ioctl.currentSpeed,t.loaderType=this._ioctl.loaderType,t.currentSegmentIndex=this._currentSegmentIndex,t.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(ft.STATISTICS_INFO,t))},e.snapshot=function(){this._demuxer&&null!=this._demuxer&&this._demuxer.snapshot()},t}(),bt=function(){function t(){}return t.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Object.assign=Object.assign||function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var r=arguments[i];if(null!=r)for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e},"function"!=typeof self.Promise&&i(143).polyfill()},t}();bt.install();var _t=bt,wt=function(t){var e=null,i=function(e,i){t.postMessage({msg:"logcat_callback",data:{type:e,logcat:i}})}.bind(this);function r(e,i){var r={msg:ft.INIT_SEGMENT,data:{type:e,data:i}};t.postMessage(r,[i.data])}function n(e,i){var r={msg:ft.MEDIA_SEGMENT,data:{type:e,data:i}};t.postMessage(r,[i.data])}function o(){var e={msg:ft.LOADING_COMPLETE};t.postMessage(e)}function a(){var e={msg:ft.RECOVERED_EARLY_EOF};t.postMessage(e)}function s(e){var i={msg:ft.MEDIA_INFO,data:e};t.postMessage(i)}function h(e){var i={msg:ft.METADATA_ARRIVED,data:e};t.postMessage(i)}function u(e){var i={msg:ft.SCRIPTDATA_ARRIVED,data:e};t.postMessage(i)}function l(e){var i={msg:ft.STATISTICS_INFO,data:e};t.postMessage(i)}function d(e,i){t.postMessage({msg:ft.IO_ERROR,data:{type:e,info:i}})}function f(e,i){t.postMessage({msg:ft.DEMUX_ERROR,data:{type:e,info:i}})}function c(e){t.postMessage({msg:ft.RECOMMEND_SEEKPOINT,data:e})}_t.install(),t.addEventListener("message",(function(p){switch(p.data.cmd){case"init":(e=new yt(p.data.param[0],p.data.param[1])).on(ft.IO_ERROR,d.bind(this)),e.on(ft.DEMUX_ERROR,f.bind(this)),e.on(ft.INIT_SEGMENT,r.bind(this)),e.on(ft.MEDIA_SEGMENT,n.bind(this)),e.on(ft.LOADING_COMPLETE,o.bind(this)),e.on(ft.RECOVERED_EARLY_EOF,a.bind(this)),e.on(ft.MEDIA_INFO,s.bind(this)),e.on(ft.METADATA_ARRIVED,h.bind(this)),e.on(ft.SCRIPTDATA_ARRIVED,u.bind(this)),e.on(ft.STATISTICS_INFO,l.bind(this)),e.on(ft.RECOMMEND_SEEKPOINT,c.bind(this));break;case"destroy":e&&(e.destroy(),e=null),t.postMessage({msg:"destroyed"});break;case"start":e.start();break;case"stop":e.stop();break;case"seek":e.seek(p.data.param);break;case"pause":e.pause();break;case"resume":e.resume();break;case"logging_config":var m=p.data.param;b.applyConfig(m),!0===m.enableCallback?b.addLogListener(i):b.removeLogListener(i)}}))},At={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full",CB_PLAY_INFO:"play_info",CHANGE_SPEED:"change_speed"},Mt=function(){function t(t,e,r,n,o,a,s,h){this.TAG="Transmuxer",this._emitter=new f.a,this._config=e,this.soundPlayer=null,this._webGLPlayer=null,this._mediaCanvas=r,this.pauseDisplay=!1,this.enableAudio=!1,this.audioFmt=0,this.audioSamplerate=0,this.audioChannelNum=2,this.initAudioPlayer=!1,this.totalDuration=0,this.initDuration=0,this.currentPlayTime=0,"m3u8"===t.type&&(this.currentPlayTime=t.startPlaySecs),this._callbackPlaybackTimePtr=a,this._callbackPlaybackTimeUserPtr=s,this.getVideoInfoCallbackFunc=h,this.getVideoInfoCB=!0;var u=navigator.userAgent;this.isAndroid=u.indexOf("Android")>-1||u.indexOf("Adr")>-1,this.isiOS=!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),this.isiPad=!1;var l=navigator.userAgent;if(("iPad"==l.match(/iPad/i)||l.indexOf("Macintosh;")>-1&&l.indexOf("AppleWebKit/"))&&(this.isiPad=!0),this._callbackUserPtr=n,this._callbackWasmTypePtr=o,e.enableWorker&&"undefined"!=typeof Worker)try{var d=i(144);this._worker=d(wt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,e]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},b.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:b.getConfig()})}catch(i){c.a.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new yt(t,e)}else this._controller=new yt(t,e);if(this._controller){var p=this._controller;p.on(ft.IO_ERROR,this._onIOError.bind(this)),p.on(ft.DEMUX_ERROR,this._onDemuxError.bind(this)),p.on(ft.INIT_SEGMENT,this._onInitSegment.bind(this)),p.on(ft.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),p.on(ft.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),p.on(ft.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),p.on(ft.MEDIA_INFO,this._onMediaInfo.bind(this)),p.on(ft.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),p.on(ft.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),p.on(ft.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),p.on(ft.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this)),p.on(ft.RECONNECT_ING,this._onReconnecting.bind(this)),p.on(ft.RECONNECT_SUCCESS,this._onReconnectSuccess.bind(this))}}var e=t.prototype;return e.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),b.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null,this.soundPlayer&&(this.soundPlayer.destroy(),delete this.soundPlayer,this.soundPlayer=null)},e.on=function(t,e){this._emitter.addListener(t,e)},e.off=function(t,e){this._emitter.removeListener(t,e)},e.hasWorker=function(){return null!=this._worker},e.OpenAudioPlayer=function(t,e,i){if(null==this.soundPlayer){1;var r="16bitInt";r="16bitInt",this.soundPlayer=new l.a,this.soundPlayer.init({encoding:r,channels:e,sampleRate:i,flushingTime:1e3}),this.initAudioPlayer=!0}},e.createDecodeWorker=function(){var t;if(this.decodeWorker=null,"undefined"!=typeof Worker)try{t=this.decodeWorker=u(41),this.onwmsg=this.onWorkerMessage.bind(this);var e={cmd:r.tOpenStream,url:r.getFullURL(),isFlv:!this._controller._isM3u8};t.postMessage(e),t.addEventListener("message",this.onwmsg),t.onerror=function(t){}}catch(t){this.w=void 0}else this.decodeWorker=null;this.decodeWorker&&null==this._webGLPlayer&&(this._webGLPlayer=new h(this._mediaCanvas))},e.getCurrentPlayTime=function(){return this.currentPlayTime},e.getTotalDuration=function(){return this._controller?this._controller._GetM3u8TotalDuration():this.totalDuration},e._onMediaDataCallback=function(t,e,i,n,o,a,s,h,u,l){if(!(n<1)||e||1!==s)if(e){null==t.decodeWorker&&(t.createDecodeWorker(),t._callbackWasmTypePtr&&t._callbackWasmTypePtr(t._callbackUserPtr,!0));var d=new Uint8Array(a);if(t.decodeWorker){var f={cmd:r.tFrameData,mediaType:i,codecId:n,frameType:o,samplerate:h,channelNum:u,bitPerSample:l,playTimeSec:h,dat:d};t.decodeWorker.postMessage(f,[f.dat.buffer])}}else t._callbackWasmTypePtr&&t._callbackWasmTypePtr(t._callbackUserPtr,!1)},e.onWorkerMessage=function(t){var e=t.data;switch(e.cmd){case r.tDisconnect:var i={cmd:r.tReOpenStream};this.downloadWorker.postMessage(i);break;case r.tCloseStream:e.workerId==r.DOWNLOAD_WORKER_ID?(this.downloadWorker.terminate(),this.downloadWorker=null):e.workerId==r.DECODE_WORKER_ID?(this.decodeWorker.terminate(),this.decodeWorker=null,this.soundPlayer&&(this.soundPlayer.destroy(),delete this.soundPlayer,this.soundPlayer=null),this._webGLPlayer&&this._webGLPlayer.renderVideoFrame(null,0,0)):e.workerId==r.RENDER_WORKER_ID&&(this.renderWorker.terminate(),this.renderWorker=null);break;case r.tDecoderWorkerStartup:this.enableAudio&&this.openAudio();break;case r.tFrameData:if(e.workerId==r.DOWNLOAD_WORKER_ID)this.decodeWorker;else if(e.workerId==r.DECODE_WORKER_ID){if(this.pauseDisplay)break;if(1==e.mediaType){if(this._mediaCanvas.width=e.width,this._mediaCanvas.height=e.height,this.getVideoInfoCB&&this.getVideoInfoCallbackFunc&&null!=this.getVideoInfoCallbackFunc&&(this.getVideoInfoCallbackFunc(this._callbackPlaybackTimeUserPtr,"H265",e.width,e.height),this.getVideoInfoCB=!1),e.playTimeSec>0){var n=Math.floor((e.playTimeSec+1e3)/1e3);this.currentPlayTime!==n&&(this.initDuration>0&&(this.currentPlayTime+=n-this.initDuration),this.initDuration!==n&&(this.initDuration=n,this._emitter&&this._emitter.emit(At.CB_PLAY_INFO)))}this._webGLPlayer&&this._webGLPlayer.renderVideoFrame(e.dat,e.width,e.height)}else 2==e.mediaType&&(null==this.soundPlayer&&(null!=this.soundPlayer||this.isiOS||this.isiPad?(this.audioFmt=e.fmt,this.audioSamplerate=e.samplerate,this.audioChannelNum=e.ch,44100==this.audioSamplerate&&(this.audioFmt=1)):this.OpenAudioPlayer(e.fmt,e.samplerate>=16e3?2:e.ch,e.samplerate)),this.enableAudio&&this.soundPlayer&&this.initAudioPlayer&&this.soundPlayer.play(e.dat))}break;case r.tDecode:this.avQueue.length>0&&this.pauseDisplay}},e.openAudio=function(){var t={cmd:r.tOpenAudio};if(this.decodeWorker&&void 0!==this.decodeWorker&&this.decodeWorker.postMessage(t),this.enableAudio=!0,null==this.soundPlayer&&(this.isiOS||this.isiPad)){if(!(this.audioSamplerate>0))return!1;this.OpenAudioPlayer(this.audioFmt,this.audioSamplerate>=16e3?2:this.audioChannelNum,this.audioSamplerate)}return!0},e.closeAudio=function(){var t={cmd:r.tCloseAudio};return this.decodeWorker&&void 0!==this.decodeWorker&&this.decodeWorker.postMessage(t),this.soundPlayer&&this.initAudioPlayer&&this.soundPlayer.clearAudioBuffer(),this.enableAudio=!1,!0},e.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):(this._controller.setMediaSourceCallback(this._onMediaDataCallback,this,this._callbackPlaybackTimePtr,this._callbackPlaybackTimeUserPtr,this.getVideoInfoCallbackFunc),this._controller.start())},e.close=function(){var t={cmd:r.tCloseStream};this.decodeWorker&&void 0!==this.decodeWorker&&this.decodeWorker.postMessage(t),this._webGLPlayer&&(this._webGLPlayer.renderVideoFrame(null,0,0),this._webGLPlayer.destroy(),delete this._webGLPlayer,this._webGLPlayer=null),this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},e.changeSpeed=function(t){this._controller&&this._controller.changeSpeed(t)},e.seekToSecs=function(t,e){var i={cmd:r.tSeekStream,type:e,time:t};this.decodeWorker&&void 0!==this.decodeWorker&&this.decodeWorker.postMessage(i),this._controller.seekToSecs(t,e)},e.seek=function(t){this._worker?this._worker.postMessage({cmd:"seek",param:t}):this._controller.seek(t)},e.isPaused=function(){return this.pauseDisplay},e.pause=function(){this.pauseDisplay=!0;var t={cmd:r.tPauseStream};if(this.decodeWorker&&void 0!==this.decodeWorker&&this.decodeWorker.postMessage(t),this._controller){var e=this._controller._GetM3u8Loader();e?e.pause():this._controller.pauseOrResume(!0)}this._worker&&this._worker.postMessage({cmd:"pause"})},e.resume=function(){this.pauseDisplay=!1;var t={cmd:r.tResumeStream};if(this.decodeWorker&&void 0!==this.decodeWorker&&this.decodeWorker.postMessage(t),this._controller){var e=this._controller._GetM3u8Loader();e?e.resume():this._controller.pauseOrResume(!1)}this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},e.rtspScale=function(t,e){this._controller&&this._controller.rtspScale(t,e)},e._onReconnecting=function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(ft.RECONNECT_ING,t)}))},e._onReconnectSuccess=function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(ft.RECONNECT_SUCCESS,t)}))},e._onInitSegment=function(t,e){var i=this;Promise.resolve().then((function(){i._emitter.emit(ft.INIT_SEGMENT,t,e)}))},e._onMediaSegment=function(t,e){var i=this;Promise.resolve().then((function(){i._emitter.emit(ft.MEDIA_SEGMENT,t,e)}))},e._onLoadingComplete=function(){var t=this;Promise.resolve().then((function(){t._emitter.emit(ft.LOADING_COMPLETE)}))},e._onRecoveredEarlyEof=function(){var t=this;Promise.resolve().then((function(){t._emitter.emit(ft.RECOVERED_EARLY_EOF)}))},e._onMediaInfo=function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(ft.MEDIA_INFO,t)}))},e._onMetaDataArrived=function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(ft.METADATA_ARRIVED,t)}))},e._onScriptDataArrived=function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(ft.SCRIPTDATA_ARRIVED,t)}))},e._onStatisticsInfo=function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(ft.STATISTICS_INFO,t)}))},e._onIOError=function(t,e){var i=this;Promise.resolve().then((function(){i._emitter.emit(ft.IO_ERROR,t,e)}))},e._onDemuxError=function(t,e){var i=this;Promise.resolve().then((function(){i._emitter.emit(ft.DEMUX_ERROR,t,e)}))},e._onRecommendSeekpoint=function(t){var e=this;Promise.resolve().then((function(){e._emitter.emit(ft.RECOMMEND_SEEKPOINT,t)}))},e._onLoggingConfigChanged=function(t){this._worker&&this._worker.postMessage({cmd:"logging_config",param:t})},e._onWorkerMessage=function(t){var e=t.data,i=e.data;if("destroyed"===e.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(e.msg){case ft.INIT_SEGMENT:case ft.MEDIA_SEGMENT:this._emitter.emit(e.msg,i.type,i.data);break;case ft.LOADING_COMPLETE:case ft.RECOVERED_EARLY_EOF:this._emitter.emit(e.msg);break;case ft.MEDIA_INFO:Object.setPrototypeOf(i,_.a.prototype),this._emitter.emit(e.msg,i);break;case ft.METADATA_ARRIVED:case ft.SCRIPTDATA_ARRIVED:case ft.STATISTICS_INFO:this._emitter.emit(e.msg,i);break;case ft.IO_ERROR:case ft.DEMUX_ERROR:this._emitter.emit(e.msg,i.type,i.info);break;case ft.RECOMMEND_SEEKPOINT:this._emitter.emit(e.msg,i);break;case"logcat_callback":c.a.emitter.emit("log",i.type,i.logcat)}},e.snapshot=function(){this._controller&&null!=this._controller&&this._controller.snapshot()},t}(),Et=function(){function t(t){this.TAG="MSEController",this._config=t,this._emitter=new f.a,this._currentPlayTime=0,this._hlsSeekTime=0,this._lastPlayTime=0,this._waitingData=!1,this._pause=!1,this._lastSpeed=0,this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._seek=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new R}var e=t.prototype;return e.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},e.on=function(t,e){this._emitter.addListener(t,e)},e.off=function(t,e){this._emitter.removeListener(t,e)},e.setSeekPlayTime=function(t){this._mediaElement&&(this._lastPlayTime=Math.floor(this._mediaElement.currentTime)),this._hlsSeekTime=t},e.pause=function(){this._pause=!0},e.resume=function(){this._pause=!1},e.attachMediaElement=function(t){if(this._mediaSource)throw new C.a("MediaSource has been attached to an HTMLMediaElement!");var e=this._mediaSource=new window.MediaSource;e.addEventListener("sourceopen",this.e.onSourceOpen),e.addEventListener("sourceended",this.e.onSourceEnded),e.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=t,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),t.src=this._mediaSourceObjectURL;var i=this;t.addEventListener("timeupdate",(function(){var e=Math.floor(t.currentTime);i._hlsSeekTime>0&&(e=e-i._lastPlayTime+i._hlsSeekTime),i._currentPlayTime!=e&&(i._currentPlayTime=e,i._emitter&&i._emitter.emit(At.CB_PLAY_INFO))}),!1)},e.getCurrentPlayTime=function(){return this._currentPlayTime},e.getTotalDuration=function(){return this._mediaElement.duration},e.detachMediaElement=function(){if(this._mediaSource){var t=this._mediaSource;for(var e in this._sourceBuffers){var i=this._pendingSegments[e];i.splice(0,i.length),this._pendingSegments[e]=null,this._pendingRemoveRanges[e]=null,this._lastInitSegments[e]=null;var r=this._sourceBuffers[e];if(r){if("closed"!==t.readyState){try{t.removeSourceBuffer(r)}catch(t){c.a.e(this.TAG,t.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[e]=null,this._sourceBuffers[e]=null}}if("open"===t.readyState)try{t.endOfStream()}catch(t){c.a.e(this.TAG,t.message)}t.removeEventListener("sourceopen",this.e.onSourceOpen),t.removeEventListener("sourceended",this.e.onSourceEnded),t.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},e.appendInitSegment=function(t,e){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(t),void this._pendingSegments[t.type].push(t);var i=t,r=""+i.container;i.codec&&i.codec.length>0&&(r+=";codecs="+i.codec);var n=!1;if(this._lastInitSegments[i.type]=i,r!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])c.a.v(this.TAG,"Notice: "+i.type+" mimeType changed, origin: "+this._mimeTypes[i.type]+", target: "+r);else{n=!0;try{var o=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(r);o.addEventListener("error",this.e.onSourceBufferError),o.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(t){return c.a.e(this.TAG,t.message),void this._emitter.emit(At.ERROR,{code:t.code,msg:t.message})}}this._mimeTypes[i.type]=r}e||this._pendingSegments[i.type].push(i),n||this._sourceBuffers[i.type]&&!this._sourceBuffers[i.type].updating&&this._doAppendSegments(),m.safari&&"audio/mpeg"===i.container&&i.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())},e.appendMediaSegment=function(t){var e=t;this._pendingSegments[e.type].push(e),(this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()||this._seek)&&(this._doCleanupSourceBuffer(),this._seek=!1);var i=this._sourceBuffers[e.type];!i||i.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},e.reset=function(t){for(var e in this._sourceBuffers){var i=this._sourceBuffers[e];if(i){for(var r=i.buffered,n=!1,o=0;o<r.length;o++){var a=r.start(o),s=r.end(o);n=!0,this._pendingRemoveRanges[e].push({start:a,end:s})}n&&!i.updating&&this._doRemoveRanges()}}this._mediaElement.currentTime=1,t&&this._mediaElement.play()},e.seek=function(t){for(var e in this._sourceBuffers)if(this._sourceBuffers[e]){var i=this._sourceBuffers[e];if("open"===this._mediaSource.readyState)try{i.abort()}catch(t){c.a.e(this.TAG,t.message)}this._idrList.clear();var r=this._pendingSegments[e];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var n=0;n<i.buffered.length;n++){var o=i.buffered.start(n),a=i.buffered.end(n);this._pendingRemoveRanges[e].push({start:o,end:a})}if(i.updating||this._doRemoveRanges(),m.safari){var s=this._lastInitSegments[e];s&&(this._pendingSegments[e].push(s),i.updating||this._doAppendSegments())}}}},e.endOfStream=function(){var t=this._mediaSource,e=this._sourceBuffers;t&&"open"===t.readyState?e.video&&e.video.updating||e.audio&&e.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,t.endOfStream()):t&&"closed"===t.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},e.getNearestKeyframe=function(t){return this._idrList.getLastSyncPointBeforeDts(t)},e._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var t=this._mediaElement.currentTime;for(var e in this._sourceBuffers){var i=this._sourceBuffers[e];if(i){var r=i.buffered;if(r.length>=1&&t-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},e.GetSourceBufferStartTime=function(){for(var t in this._sourceBuffers){var e=this._sourceBuffers[t];if(e)for(var i=e.buffered,r=0;r<i.length;r++){var n=i.start(r);return n+(i.end(r)-n)/2}}},e._doCleanupSourceBuffer=function(){var t=this._mediaElement.currentTime;for(var e in this._sourceBuffers){var i=this._sourceBuffers[e];if(i){for(var r=i.buffered,n=!1,o=0;o<r.length;o++){var a=r.start(o),s=r.end(o);if(a<=t&&t<s+3){if(t-a>=this._config.autoCleanupMaxBackwardDuration){n=!0;var h=t-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[e].push({start:a,end:h})}}else s<t&&(n=!0,this._pendingRemoveRanges[e].push({start:a,end:s}))}n&&!i.updating&&this._doRemoveRanges()}}},e.__ClearAllSourceBuffer=function(){for(var t in this._sourceBuffers){var e=this._sourceBuffers[t];if(e){for(var i=e.buffered,r=!1,n=0;n<i.length;n++){var o=i.start(n),a=i.end(n);r=!0,this._pendingRemoveRanges[t].push({start:o,end:a})}r&&!e.updating&&this._doRemoveRanges()}}},e._updateMediaSourceDuration=function(){var t=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(t.video&&t.video.updating||t.audio&&t.audio.updating)){var e=this._mediaSource.duration,i=this._pendingMediaDuration;i>0&&(isNaN(e)||i>e)&&(c.a.v(this.TAG,"Update MediaSource duration from "+e+" to "+i),this._mediaSource.duration=i),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},e._doRemoveRanges=function(){for(var t in this._pendingRemoveRanges)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating)for(var e=this._sourceBuffers[t],i=this._pendingRemoveRanges[t];i.length&&!e.updating;){var r=i.shift();e.remove(r.start,r.end)}},e._doAppendSegments=function(){var t=this._pendingSegments;for(var e in t)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating&&t[e].length>0){var i=t[e].shift();if(i.timestampOffset){var n=this._sourceBuffers[e].timestampOffset,o=i.timestampOffset/1e3;Math.abs(n-o)>.1&&(c.a.v(this.TAG,"Update MPEG audio timestampOffset from "+n+" to "+o),this._sourceBuffers[e].timestampOffset=o),delete i.timestampOffset}if(!i.data||0===i.data.byteLength)continue;try{this._sourceBuffers[e].appendBuffer(i.data),this._isBufferFull=!1,"video"===e&&i.hasOwnProperty("info")&&this._idrList.appendArray(i.info.syncPoints),r.ClearAppendBufferError()}catch(t){this._pendingSegments[e].unshift(i),r.SetAppendBufferError(e),this.__ClearAllSourceBuffer(),22===t.code?(this._isBufferFull||this._emitter.emit(At.BUFFER_FULL),this._isBufferFull=!0):(c.a.e(this.TAG,t.message),this._emitter.emit(At.ERROR,{code:t.code,msg:t.message}))}}},e._onSourceOpen=function(){if(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var t=this._pendingSourceBufferInit;t.length;){var e=t.shift();this.appendInitSegment(e,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(At.SOURCE_OPEN)},e._onSourceEnded=function(){c.a.v(this.TAG,"MediaSource onSourceEnded")},e._onSourceClose=function(){c.a.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},e._hasPendingSegments=function(){var t=this._pendingSegments;return t.video.length>0||t.audio.length>0},e._hasPendingRemoveRanges=function(){var t=this._pendingRemoveRanges;return t.video.length>0||t.audio.length>0},e._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(At.UPDATE_END)},e._onSourceBufferError=function(t){c.a.e(this.TAG,"SourceBuffer Error: "+t)},t}(),St="NetworkError",kt="MediaError",Tt=(D.a.FORMAT_ERROR,D.a.FORMAT_UNSUPPORTED,D.a.CODEC_UNSUPPORTED,{enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0});function Rt(){return Object.assign({},Tt)}function It(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ct=function(){function t(t,e){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new f.a,this._IsWasm=!1,this.callbackFunc=null,this.callbackPlayTimeFunc=null,this.callbackConnectStatusFunc=null,this.callbackUserPtr=null,this.getVideoInfoCallbackFunc=null,this.needCallPlay=!1,this.waitingForData=!1,this.playTally=0,this._config=Rt(),"object"==typeof e&&Object.assign(this._config,e),"soft"===e.decodeType&&(this._IsWasm=!0),"flv"!==t.type.toLowerCase()&&"m3u8"!==t.type.toLowerCase()&&"rtsp"!==t.type.toLowerCase())throw new C.b("FlvPlayer requires an flv MediaDataSource input!");this.isFlv=!0,"m3u8"===t.type.toLowerCase()&&(this.isFlv=!1),!0===t.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this),onvWaiting:this._onvWaiting.bind(this),onvPlaying:this._onvPlaying.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=t,this._mediaCanvas=null,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._initFlag=!1,this._msectlInitSegmentVideoParams=null,this._msectlInitSegmentAudioParams=null,this._msectlResetComplete=!0,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=m.chrome&&(m.version.major<50||50===m.version.major&&m.version.build<2661);this._alwaysSeekKeyframe=!!(i||m.msedge||m.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}var e,i,n,o=t.prototype;return o.destroy=function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},o.on=function(t,e){var i=this;t===g.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){i._emitter.emit(g.MEDIA_INFO,i.mediaInfo)})):t===g.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){i._emitter.emit(g.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(t,e)},o.off=function(t,e){this._emitter.removeListener(t,e)},o.attachMediaElement=function(t,e){var i=this;if(this._mediaCanvas=e,!this._IsWasm&&(this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),t.addEventListener("seeking",this.e.onvSeeking),t.addEventListener("canplay",this.e.onvCanPlay),t.addEventListener("stalled",this.e.onvStalled),t.addEventListener("progress",this.e.onvProgress),t.addEventListener("waiting",this.e.onvWaiting),t.addEventListener("playing",this.e.onvPlaying),this._msectl=new Et(this._config),this._msectl.setSeekPlayTime(this._mediaDataSource.startPlaySecs),this._msectl.on(At.CB_PLAY_INFO,this._onmseCbPlayInfo.bind(this)),this._msectl.on(At.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(At.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(At.SOURCE_OPEN,(function(){i._mseSourceOpened=!0,i._hasPendingLoad&&(i._hasPendingLoad=!1,i.load())})),this._msectl.on(At.ERROR,(function(t){i.ReCreateMSECtl()})),this._msectl.on(At.CHANGE_SPEED,(function(t){i._transmuxer&&i._transmuxer.changeSpeed(t.speed)})),this._msectl.attachMediaElement(t),null!=this._pendingSeekTime))try{t.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}},o.detachMediaElement=function(){this._IsWasm||(this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null))},o.ReCreateMSECtl=function(){var t=this;this._msectlResetComplete=!1,this._msectl&&(this._mediaElement&&this._msectl.detachMediaElement(),this._msectl.destroy(),this._msectl=null),this._msectl=new Et(this._config),this._msectl.setSeekPlayTime(this._mediaDataSource.startPlaySecs),this._msectl.on(At.CB_PLAY_INFO,this._onmseCbPlayInfo.bind(this)),this._msectl.on(At.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(At.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(At.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._msectlInitSegmentVideoParams&&t._msectl.appendInitSegment(t._msectlInitSegmentVideoParams),t._msectlInitSegmentAudioParams&&!r.GetAppendBufferError().audio?t._msectl.appendInitSegment(t._msectlInitSegmentAudioParams):t._msectlInitSegmentAudioParams&&r.GetAppendBufferError().audio&&r.SetEnableAudio(!1),r.ClearAppendBufferError(),t._msectlResetComplete=!0})),this._msectl.on(At.ERROR,(function(e){t.ReCreateMSECtl()})),this._msectl.on(At.CHANGE_SPEED,(function(e){t._transmuxer&&t._transmuxer.changeSpeed(e.speed)})),this._msectl.attachMediaElement(this._mediaElement),this._transmuxer&&this._transmuxer.seekToSecs(0,0)},o.callbackWasmType=function(t,e){t._IsWasm=e,t.callbackToParent(),t.needCallPlay&&(t.needCallPlay=!1,e||t.play())},o.callbackToParent=function(){this.callbackFunc&&this.callbackFunc(this.callbackUserPtr,this.isFlv?"flv":"m3u8",this._IsWasm)},o.setCallback=function(t,e,i,r,n){this.callbackFunc=t,this.callbackPlayTimeFunc=e,this.callbackConnectStatusFunc=i,this.callbackUserPtr=r,this.getVideoInfoCallbackFunc=n},o.load=function(){var t=this;if(!this._IsWasm){if(!this._mediaElement)throw new C.a("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new C.a("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened)return void(this._hasPendingLoad=!0);this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0)}this._transmuxer=new Mt(this._mediaDataSource,this._config,this._mediaCanvas,this,this.callbackWasmType,this.callbackPlayTimeFunc,this.callbackUserPtr,this.getVideoInfoCallbackFunc),this._transmuxer.on(ft.INIT_SEGMENT,(function(e,i){t._IsWasm||(t._initFlag=!0,t._msectl.appendInitSegment(i),"video"===e?t._msectlInitSegmentVideoParams=i:"audio"===e&&(t._msectlInitSegmentAudioParams=i))})),this._transmuxer.on(ft.MEDIA_SEGMENT,(function(e,i){if(t._IsWasm||t._msectlResetComplete&&t._msectl.appendMediaSegment(i),t._config.lazyLoad&&!t._config.isLive){var r=t._mediaElement.currentTime;i.info.endDts>=1e3*(r+t._config.lazyLoadMaxDuration)&&null==t._progressChecker&&(c.a.v(t.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),t._suspendTransmuxer())}})),this._transmuxer.on(ft.LOADING_COMPLETE,(function(){t._IsWasm||t._msectl.endOfStream(),t._emitter.emit(g.LOADING_COMPLETE)})),this._transmuxer.on(ft.RECOVERED_EARLY_EOF,(function(){t._emitter.emit(g.RECOVERED_EARLY_EOF)})),this._transmuxer.on(ft.IO_ERROR,(function(e,i){t._emitter.emit(g.ERROR,St,e,i)})),this._transmuxer.on(ft.DEMUX_ERROR,(function(e,i){t._emitter.emit(g.ERROR,kt,e,{code:-1,msg:i})})),this._transmuxer.on(ft.MEDIA_INFO,(function(e){t._mediaInfo=e,t._emitter.emit(g.MEDIA_INFO,Object.assign({},e))})),this._transmuxer.on(ft.METADATA_ARRIVED,(function(e){t._emitter.emit(g.METADATA_ARRIVED,e)})),this._transmuxer.on(ft.SCRIPTDATA_ARRIVED,(function(e){t._emitter.emit(g.SCRIPTDATA_ARRIVED,e)})),this._transmuxer.on(ft.STATISTICS_INFO,(function(e){t._statisticsInfo=t._fillStatisticsInfo(e),t._emitter.emit(g.STATISTICS_INFO,Object.assign({},t._statisticsInfo))})),this._transmuxer.on(ft.RECOMMEND_SEEKPOINT,(function(e){t._mediaElement&&!t._config.accurateSeek&&(t._requestSetTime=!0,t._mediaElement.currentTime=e/1e3)})),this._transmuxer.on(ft.RECONNECT_ING,(function(e){t.callbackConnectStatusFunc&&t.callbackConnectStatusFunc(t.callbackUserPtr,0)})),this._transmuxer.on(ft.RECONNECT_SUCCESS,(function(e){t._IsWasm||(e>1&&t._msectl&&(t._transmuxer.seekToSecs(0,0),t._msectl.reset(!0)),t._mediaElement),t.callbackConnectStatusFunc&&t.callbackConnectStatusFunc(t.callbackUserPtr,1)})),this._transmuxer.on(At.CB_PLAY_INFO,this._onmseCbPlayInfo.bind(this)),this._transmuxer.open()},o.unload=function(){this._IsWasm||(this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0)),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null),this._initFlag=!1},o.play=function(){return null==this._transmuxer?(this.needCallPlay=!0,this._mediaElement&&(this._mediaElement.volume=0),!1):this._mediaElement?(this.needCallPlay=!1,this._mediaElement.play()):void 0},o.pause=function(){this._transmuxer&&this._transmuxer.pause(),this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.pause()},o.resume=function(){this._transmuxer&&this._transmuxer.resume(),this._msectl&&(r.GetLiveStreamType()&&this._msectl.reset(!1),this._msectl.resume()),this._mediaElement&&this._mediaElement.play()},o.rtspScale=function(t,e){this._transmuxer&&this._transmuxer.rtspScale(t,e)},o.openAudio=function(){if(this._IsWasm){if(this._transmuxer)return this._transmuxer.openAudio()}else if(this._mediaElement)return this._mediaElement.volume=1,!0;return!1},o.closeAudio=function(){if(this._IsWasm){if(this._transmuxer)return this._transmuxer.closeAudio()}else if(this._mediaElement)return this._mediaElement.volume=0,!0;return!1},o.seek=function(t,e){if(!this._IsWasm&&this.isFlv&&this._mediaElement&&this._mediaElement.duration>0){var i=Math.floor(t/100*this._mediaElement.duration);return this._mediaElement?this._internalSeek(i):this._pendingSeekTime=i,!0}if(this._transmuxer){var r=Math.floor(t/100*this._transmuxer.getTotalDuration());return this._msectl&&this._msectl.getCurrentPlayTime()==r||(this._transmuxer.seekToSecs(t,e),this._msectl&&(this._msectl.setSeekPlayTime(r),this._msectl.reset(!0)),this._mediaElement?(Math.floor(this._mediaElement.currentTime),Math.floor(r),this._progressChecker):this._pendingSeekTime=r),!0}},o._fillStatisticsInfo=function(t){if(t.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return t;var e=!0,i=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var n=this._mediaElement.getVideoPlaybackQuality();i=n.totalVideoFrames,r=n.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):e=!1;return e&&(t.decodedFrames=i,t.droppedFrames=r),t},o._onmseCbPlayInfo=function(){if(this._transmuxer){var t=0,e=0;!this._IsWasm&&this._msectl?(t=this._msectl.getCurrentPlayTime(),(e=this._msectl.getTotalDuration())!=1/0||r.GetLiveStreamType()||(e=this._transmuxer.getTotalDuration())):((t=this._transmuxer.getCurrentPlayTime())<0&&(t=0),e=this._transmuxer.getTotalDuration()),this.callbackPlayTimeFunc&&this.callbackPlayTimeFunc(this.callbackUserPtr,this.isFlv?"flv":"m3u8",t,e)}},o._onmseUpdateEnd=function(){if(this._config.lazyLoad&&!this._config.isLive){for(var t=this._mediaElement.buffered,e=this._mediaElement.currentTime,i=0,r=0;r<t.length;r++){var n=t.start(r),o=t.end(r);if(n<=e&&e<o){n,i=o;break}}i>=e+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(c.a.v(this.TAG,"onmseUpdateEnd::Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},o._onmseBufferFull=function(){c.a.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()},o._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},o._checkProgressAndResume=function(){if(null!=this._mediaElement){for(var t=this._mediaElement.currentTime,e=this._mediaElement.buffered,i=!1,r=0;r<e.length;r++){var n=e.start(r),o=e.end(r);if(t>=n&&t<o){t>=o-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i&&(c.a.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},o._isTimepointBuffered=function(t){for(var e=this._mediaElement.buffered,i=0;i<e.length;i++){var r=e.start(i),n=e.end(i);if(t>=r&&t<n)return!0}return!1},o._internalSeek=function(t){var e=this._isTimepointBuffered(t),i=!1,r=0;if(t<1&&this._mediaElement.buffered.length>0){var n=this._mediaElement.buffered.start(0);(n<1&&t<n||m.safari)&&(i=!0,r=m.safari?.1:n)}if(i)this._requestSetTime=!0,this._mediaElement.currentTime=r;else if(e){if(this._alwaysSeekKeyframe){var o=this._msectl.getNearestKeyframe(Math.floor(1e3*t));this._requestSetTime=!0,this._mediaElement.currentTime=null!=o?o.dts/1e3:t}else this._requestSetTime=!0,this._mediaElement.currentTime=t;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(t),this._transmuxer.seek(Math.floor(1e3*t)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=t)},o._checkAndApplyUnbufferedSeekpoint=function(){},o._checkAndResumeStuckPlayback=function(t){},o._onvLoadedMetadata=function(t){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},o._onvSeeking=function(t){var e=this._mediaElement.currentTime,i=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(e<1&&i.length>0){var r=i.start(0);if(r<1&&e<r||m.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=m.safari?.1:r)}if(this._isTimepointBuffered(e)){if(this._alwaysSeekKeyframe){var n=this._msectl.getNearestKeyframe(Math.floor(1e3*e));null!=n&&(this._requestSetTime=!0,this._mediaElement.currentTime=n.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:e,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},o._onvCanPlay=function(t){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},o._onvStalled=function(t){this._checkAndResumeStuckPlayback(!0)},o._onvProgress=function(t){this._checkAndResumeStuckPlayback()},o._onvWaiting=function(t){},o._onvPlaying=function(t){this.waitingForData=!1,this.playTally++},o.snapshot=function(){this._transmuxer&&null!=this._transmuxer&&this._transmuxer.snapshot()},e=t,(i=[{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._internalSeek(t):this._pendingSeekTime=t}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}}])&&It(e.prototype,i),n&&It(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Pt(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var xt=function(){function t(t,e,i,r,n,o,a,s,h){var u=this;this.url="",this.downloadWorker=null,this.decodeWorker=null,this.renderWorker=null,this.audioWorker=null,this.printStatInfo=!1,this.pauseDisplay=!1,this.enableLog=!1,this.streamType=t,this.h5Video=e,this.canvas=i,this.flvPlayer=null,this.decodeType=r,this.callbackFunc=n,this.callbackPlayTimeFunc=o,this.callbackConnectStatusFunc=a,this.callbackUserPtr=s,this.getVideoInfoCallbackFunc=h,this.avQueue=[],this.webGLPlayer=null,this.soundPlayer=null,this.fullScreenFlag=!1,this._statisticsInfo=null,this._mediaInfo=null,this._emitter=new f.a,this.skipTimer=null,this.h5Video.addEventListener("play",(function(t){u.manualFrameSkipping()})),this.h5Video.addEventListener("pause",(function(t){u.skipTimer&&(clearInterval(u.skipTimer),u.skipTimer=null)}))}var e,i,n,o=t.prototype;return o.manualFrameSkipping=function(){var t=this;if("m3u8"===this.streamType)return!1;this.skipTimer&&(clearInterval(this.skipTimer),this.skipTimer=null),this.skipTimer=setInterval((function(){t.flvPlayer&&t.flvPlayer.buffered.length&&(t.flvPlayer.buffered.end(0)-t.flvPlayer.currentTime>=.7?t.flvPlayer.currentTime=t.flvPlayer.buffered.end(0)-.3:t.flvPlayer.playbackRate=1)}),2e3)},o.destroy=function(){if(this.webGLPlayer&&this.webGLPlayer.renderVideoFrame(null,0,0),this.renderWorker){var t={cmd:r.tCloseStream};this.renderWorker.postMessage(t)}this.soundPlayer&&(this.soundPlayer.destroy(),delete this.soundPlayer,this.soundPlayer=null),this.webGLPlayer&&this.webGLPlayer.destroy(),this.flvPlayer&&(this.flvPlayer.destroy(),this.flvPlayer=null),this._emitter&&(this._emitter.removeAllListeners(),this._emitter=null),this.skipTimer&&(clearInterval(this.skipTimer),this.skipTimer=null)},o.on=function(t,e){var i=this;t===g.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){i._emitter.emit(g.MEDIA_INFO,i.mediaInfo)})):t===g.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){i._emitter.emit(g.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(t,e)},o.off=function(t,e){this._emitter.removeListener(t,e)},o.logD=function(t){this.enableLog},o.createDecodeWorker=function(){var t;if(this.logD("create decode worker..."),this.decodeWorker=void 0,"undefined"!=typeof Worker)try{t=this.decodeWorker=u(41),this.onwmsg=this.onWorkerMessage.bind(this);var e={cmd:r.tOpenStream,url:r.getFullURL(),isFlv:!0};t.postMessage(e),t.addEventListener("message",this.onwmsg),t.onerror=function(t){}}catch(t){this.w=void 0}},o.createAudioWorker=function(){var t;if(this.logD("create audio play worker..."),this.audioWorker=void 0,"undefined"!=typeof Worker)try{t=this.audioWorker=u(246),this.onwmsg=this.onWorkerMessage.bind(this);var e={cmd:r.tOpenStream};t.postMessage(e),t.addEventListener("message",this.onwmsg),t.onerror=function(t){}}catch(t){this.audioWorker=void 0}this.audioWorker},o.decodeAndDisplayLoop=function(){if(!(this.avQueue.length<1))for(;this.avQueue.length>0;){this.avQueue[0];this.avQueue.shift()}},o.play=function(t,e){var i=this;return this.pauseDisplay?this.resume():(this.url=t,null==this.flvPlayer&&(this.flvPlayer=new Ct({type:this.streamType,isLive:!0,url:t,startPlaySecs:e,hasAudio:!0,withCredentials:!1},{streamType:this.streamType,enableWorker:!1,lazyLoadMaxDuration:"flv"===this.streamType||"rtsp"===this.streamType?2:180,lazyLoadRecoverDuration:"flv"===this.streamType||"rtsp"===this.streamType?1:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:"flv"===this.streamType||"rtsp"===this.streamType?5:180,autoCleanupMinBackwardDuration:"flv"===this.streamType||"rtsp"===this.streamType?3:120,seekType:"range",enableStashBuffer:!1,decodeType:this.decodeType}),"flv"!==this.streamType&&"rtsp"!==this.streamType||r.setLiveStreamType(!0)),this.flvPlayer.setCallback(this.callbackFunc,this.callbackPlayTimeFunc,this.callbackConnectStatusFunc,this.callbackUserPtr,this.getVideoInfoCallbackFunc),this.flvPlayer.attachMediaElement(this.h5Video,this.canvas),this.flvPlayer.load(),this.flvPlayer.play(),this.flvPlayer.on("statistics_info",(function(t){i._statisticsInfo=t,i._emitter.emit(g.STATISTICS_INFO,t)}))),!0},o.stop=function(){return this.pauseDisplay=!1,this.destroy(),!0},o.isPause=function(){return this.pauseDisplay},o.pause=function(){this.pauseDisplay=!0,this.flvPlayer&&this.flvPlayer.pause()},o.resume=function(){this.pauseDisplay=!1,this.flvPlayer&&this.flvPlayer.resume()},o.rtspScale=function(t,e){this.flvPlayer&&this.flvPlayer.rtspScale(t,e)},o.seek=function(t,e){this.pauseDisplay=!1,this.flvPlayer&&this.flvPlayer.seek(t,e)},o.setTrack=function(t,e){},o.openAudio=function(){return!!this.flvPlayer&&this.flvPlayer.openAudio()},o.closeAudio=function(){return!!this.flvPlayer&&this.flvPlayer.closeAudio()},o.openStatinfo=function(){return this.printStatInfo=!0,!0},o.closeStatinfo=function(){return this.printStatInfo=!1,!0},o.snapshot=function(){this.flvPlayer&&null!=this.flvPlayer&&this.flvPlayer.snapshot()},o.isFullScreen=function(){return this.fullScreenFlag},o.canvasFullscreen=function(){var t=this.canvas;t.RequestFullScreen?t.RequestFullScreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen?t.msRequestFullscreen():r.MediaWorkerLog("This browser doesn't supporter fullscreen")},o.canvasExitFullscreen=function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():r.MediaWorkerLog("Exit fullscreen doesn't work")},o.fullscreen=function(t){if(1==t){if(!this.fullScreenFlag)return this.canvasFullscreen(),this.fullScreenFlag=!0,!0}else if(this.fullScreenFlag)return this.canvasExitFullscreen(),this.fullScreenFlag=!1,!0;return!1},e=t,(i=[{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return Object.assign({},this._statisticsInfo)}}])&&Pt(e.prototype,i),n&&Pt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Dt(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ot=function(){function t(t,e,i,r,n){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new f.a,this._config=Rt(),"object"==typeof n&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new C.b("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new C.b("NativePlayer("+t.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null,this.pauseDisplay=!1,this.h5Video=e,this.callbackPlayTimeFunc=i,this.callbackUserPtr=r}var e,i,r,n=t.prototype;return n.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},n.on=function(t,e){var i=this;t===g.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(g.MEDIA_INFO,i.mediaInfo)})):t===g.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(g.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(t,e)},n.off=function(t,e){this._emitter.removeListener(t,e)},n.attachMediaElement=function(t){if(this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{t.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(t){}},n.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},n.load=function(){if(!this._mediaElement)throw new C.a("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},n.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},n.play=function(){return this.pauseDisplay||(this.attachMediaElement(this.h5Video),this.load()),this.pauseDisplay=!1,this._mediaElement.play()},n.stop=function(){this.unload(),this.detachMediaElement()},n.pause=function(){this._mediaElement.pause(),this.pauseDisplay=!0},n.isPause=function(){return this.pauseDisplay},n.openAudio=function(){return this._mediaElement.volume=1,!0},n.closeAudio=function(){return this._mediaElement.volume=0,!0},n.seek=function(t,e){var i=t;1==e&&(i=t/100*this._mediaElement.duration),this._mediaElement?this._mediaElement.currentTime=i:this._pendingSeekTime=i},n._onvLoadedMetadata=function(t){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(g.MEDIA_INFO,this.mediaInfo)},n._reportStatisticsInfo=function(){this._emitter.emit(g.STATISTICS_INFO,this.statisticsInfo)},e=t,(i=[{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(t){this._mediaElement.volume=t}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(t){this._mediaElement.muted=t}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(t){this._mediaElement?this._mediaElement.currentTime=t:this._pendingSeekTime=t}},{key:"mediaInfo",get:function(){var t={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};if(this._mediaElement){t.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(t.width=this._mediaElement.videoWidth,t.height=this._mediaElement.videoHeight),this.callbackPlayTimeFunc&&this.callbackPlayTimeFunc(this.callbackUserPtr,"mp4",this._mediaElement.currentTime,t.duration/1e3);var e=this,i=0,r=t.duration/1e3;this._mediaElement.addEventListener("timeupdate",(function(){if(e._mediaElement){var t=e._mediaElement.currentTime;if(null!=t){var n=Math.floor(t);i!=n&&(i=n,e.callbackPlayTimeFunc(e.callbackUserPtr,"mp4",i,r))}}}),!1)}return t}},{key:"statisticsInfo",get:function(){var t={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return t;var e=!0,i=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var n=this._mediaElement.getVideoPlaybackQuality();i=n.totalVideoFrames,r=n.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):e=!1;return e&&(t.decodedFrames=i,t.droppedFrames=r),t}}])&&Dt(e.prototype,i),r&&Dt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Bt=i(41);function Lt(t){return typeof t===Ft(214,"Fiv!")&&!isNaN(t)}function Wt(){var t=["WRBcPCkmtJHRW4mMWPpcI8o8ofi","sNNdOeVdSCkC","w1vfnmoInW","ithcJN09","WRCsWQifbq","WR4nWQeD","WP/dLCo3a0VdQgb0WRr0WR10","WPPAjmk2mMyIn8kyo8kn","W7ddR8kuASkZAa","w0ldSdCJWR/cI8kd","WQNdNCk7WOSqWRG+hvmmjXC","xqL2WQ0","khtdL8oCW6pdIstdLW","W6XZW67cMgbaWOlcJq","WP3dNCoZa0xcN258WOHYWOK","meFdLcldMCoxW71Dcuu3nW","mYxcLh/cKmkVW44","FbVcRNi","W6ldPSorfN44W7ubWRFcLCoRaq","W7BcJCoWW5O","WPldLSk5zd3cOKbl","BqKLWRBcPa","x8kJWOddTG","A8kwW6pcOmoLfgJdICkKWRZcUG9D","uSo2W5CWW6NdHq","c8k2WO9JWRJcN3G4xCkwW4al","WQhcPCkirIbNW6GT","eemwrW","WRi7WOnAW7ajW70","ySonE0LCb0C","mSoFW61+WQRdHtS","exrsj8oSed8","tCkQea","u2xcJem","AXWHWO7cTfZdVq","thJcL1dcMmo/","WROhWRmnfsXQ","kZ49W5ldMq3cQbW","W7BcTSkY","W6BdKSo1hehdTgRdUs8","gqasC8k5z0pdNCkWWR1VpWe","w1hdQYSIWR3cICkk","t1vqeSoOmH4","fc7cUXNcS8kDcCo4msNcRW","tSoRdwJdMJtdHSoOEexdIG","ef4avq","jYtcIKuTWRvZ","pbmjs8k8W6m","b2PgW50"];return(Wt=function(){return t})()}function Nt(t){if(!Lt(t))return 0;var e=parseInt(t/36e5),i=parseInt(t%36e5/6e4),r=parseInt(t%6e4/1e3);return(e<10?"0"+e:e)+":"+(i<10?"0"+i:i)+":"+(r<10?"0"+r:r)}function Ft(t,e){var i=Wt();return Ft=function(e,r){var n=i[e-=175];if(void 0===Ft.RuwVZq){var o=function(t){for(var e,i,r="",n="",o=0,a=0;i=t.charAt(a++);~i&&(e=o%4?64*e+i:i,o++%4)?r+=String.fromCharCode(255&e>>(-2*o&6)):0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(var s=0,h=r.length;s<h;s++)n+="%"+("00"+r.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(n)},a=function(t,e){var i,r,n=[],a=0,s="";for(t=o(t),r=0;r<256;r++)n[r]=r;for(r=0;r<256;r++)a=(a+n[r]+e.charCodeAt(r%e.length))%256,i=n[r],n[r]=n[a],n[a]=i;r=0,a=0;for(var h=0;h<t.length;h++)a=(a+n[r=(r+1)%256])%256,i=n[r],n[r]=n[a],n[a]=i,s+=String.fromCharCode(t.charCodeAt(h)^n[(n[r]+n[a])%256]);return s};Ft.wksTNG=a,t=arguments,Ft.RuwVZq=!0}var s=i[0],h=e+s,u=t[h];return u?n=u:(void 0===Ft.DqbBAI&&(Ft.DqbBAI=!0),n=Ft.wksTNG(n,r),t[h]=n),n},Ft(t,e)}function Ut(t){var e=Ft;return new Date(t||new Date)[e(191,"TOkq")]()}!function(t,e){for(var i=Ft,r=t();;)try{if(212490===parseInt(i(212,"r%hu"))/1+-parseInt(i(200,"dzzP"))/2*(parseInt(i(194,"SLqP"))/3)+parseInt(i(182,"Z1qM"))/4+parseInt(i(185,"^iAT"))/5*(-parseInt(i(175,"&vJN"))/6)+parseInt(i(180,"[OC1"))/7+parseInt(i(197,"R)EY"))/8*(parseInt(i(188,"R)EY"))/9)+parseInt(i(196,"cfLC"))/10*(-parseInt(i(201,"INWl"))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Wt);var jt=function(){function t(){}return t.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},t.supportNetworkStreamIO=function(){var t=new dt({},Rt()),e=t.loaderType;return t.destroy(),"fetch-stream-loader"==e||"xhr-moz-chunked-loader"==e},t.getNetworkLoaderTypeName=function(){var t=new dt({},Rt()),e=t.loaderType;return t.destroy(),e},t.supportNativeMediaPlayback=function(e){null==t.videoElement&&(t.videoElement=window.document.createElement("video"));var i=t.videoElement.canPlayType(e);return"probably"===i||"maybe"==i},t.getFeatureList=function(){var e={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return e.mseFlvPlayback=t.supportMSEH264Playback(),e.networkStreamIO=t.supportNetworkStreamIO(),e.networkLoaderName=t.getNetworkLoaderTypeName(),e.mseLiveFlvPlayback=e.mseFlvPlayback&&e.networkStreamIO,e.nativeMP4H264Playback=t.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),e.nativeWebmVP8Playback=t.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),e.nativeWebmVP9Playback=t.supportNativeMediaPlayback('video/webm; codecs="vp9"'),e},t}(),Vt=jt,Ht=(Object.prototype.toString,function(t){return qt(t)?Object.keys(t):[]});function zt(t,e){Ht(t).forEach((function(i){return e(t[i],i)}))}function Gt(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[t].concat(i)):(i.forEach((function(e){e&&zt(e,(function(e,i){t[i]=e}))})),t)}function qt(t){return!!t&&"object"==typeof t}function Xt(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),function(t){return qt(t)&&1===t.nodeType}(t)||function(t){return qt(t)&&3===t.nodeType}(t)?t:"string"==typeof t&&/\S/.test(t)?document.createTextNode(t):void 0})).filter((function(t){return t}))}function Zt(t,e,i,r){void 0===t&&(t="div"),void 0===e&&(e={}),void 0===i&&(i={});var n=document.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var i=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?n.setAttribute(t,i):"textContent"===t||n[t]===i&&"tabIndex"!==t||(n[t]=i)})),Object.getOwnPropertyNames(i).forEach((function(t){n.setAttribute(t,i[t])})),r&&function(t,e){Xt(e).forEach((function(e){return t.appendChild(e)}))}(n,r),n}var Kt=function(t,e){var i=this;this.boxDom=t.boxDom,this.isFill=t.showMode,this.fillModeBtnEl=Zt("div",{className:"vss-control-btn vss-control-fill-btn vss-pointer"},{}),this.fillModeIconEl=Zt("span",{className:"vssfont "+(t.showMode?"vss-video-ratio":"vss-video-fill")},{title:t.showMode?"按比例显示":"铺满窗口"}),this.fillModeBtnEl.appendChild(this.fillModeIconEl),e.appendChild(this.fillModeBtnEl),this.fillModeBtnEl.onclick=function(e){i.isFill?(i.isFill=!1,t.callbackFunc("ratio"),i.fillModeIconEl.title="铺满窗口",i.fillModeIconEl.classList.remove("vss-video-ratio"),i.fillModeIconEl.classList.add("vss-video-fill"),t.videoEl.style.objectFit=""):(i.isFill=!0,t.callbackFunc("fill"),i.fillModeIconEl.title="按比例显示",i.fillModeIconEl.classList.remove("vss-video-fill"),i.fillModeIconEl.classList.add("vss-video-ratio"),t.videoEl.style.objectFit="fill")}},Qt=function(){function t(t,e){var i=this;this.boxDom=t.boxDom,this.isFill=!1,this.fillModeBtnEl=Zt("div",{className:"vss-control-btn vss-control-snap-btn vss-pointer"},{}),this.fillModeIconEl=Zt("span",{className:"vssfont vss-snapshot"},{title:"快照"}),this.fillModeBtnEl.appendChild(this.fillModeIconEl),e.appendChild(this.fillModeBtnEl),this.fillModeBtnEl.onclick=function(e){i.snapshotDown(t)}}return t.prototype.snapshotDown=function(t){window.VssPlayerWasmKits?t.playerInstance&&t.playerInstance.snapshot():(t.InitWasmModule(),this.snapshotDown(t))},t}();function Yt(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(!t)return;if("string"==typeof t)return Jt(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Jt(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}var $t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],te=function(){for(var t,e=$t[0],i={},r=Yt($t);!(t=r()).done;){var n=t.value;if((null==n?void 0:n[1])in document){for(var o,a=Yt(n.entries());!(o=a()).done;){var s=o.value,h=s[0],u=s[1];i[e[h]]=u}return i}}return!1}(),ee={change:te.fullscreenchange,error:te.fullscreenerror},ie={request:function(t,e){return void 0===t&&(t=document.documentElement),new Promise((function(i,r){var n=function t(){ie.off("change",t),i()};ie.on("change",n);var o=t[te.requestFullscreen](e);o instanceof Promise&&o.then(n).catch(r)}))},exit:function(){return new Promise((function(t,e){if(ie.isFullscreen){var i=function e(){ie.off("change",e),t()};ie.on("change",i);var r=document[te.exitFullscreen]();r instanceof Promise&&r.then(i).catch(e)}else t()}))},toggle:function(t,e){return ie.isFullscreen?ie.exit():ie.request(t,e)},onchange:function(t){ie.on("change",t)},onerror:function(t){ie.on("error",t)},on:function(t,e){var i=ee[t];i&&document.addEventListener(i,e,!1)},off:function(t,e){var i=ee[t];i&&document.removeEventListener(i,e,!1)},raw:te};Object.defineProperties(ie,{isFullscreen:{get:function(){return Boolean(document[te.fullscreenElement])}},element:{enumerable:!0,get:function(){var t;return null!=(t=document[te.fullscreenElement])?t:void 0}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[te.fullscreenEnabled])}}}),te||(ie={isEnabled:!1});var re=ie,ne=function(){function t(t,e){var i=this;this.boxDom=t.boxDom,this.isFullScreen=!1,this.fullScreenBtnEl=Zt("div",{className:"vss-control-btn vss-control-full-btn vss-pointer"},{}),this.fullScreenIconEl=Zt("span",{className:"vssfont vss-fullscreen"},{title:"全屏"}),this.fullScreenBtnEl.appendChild(this.fullScreenIconEl),e.appendChild(this.fullScreenBtnEl),this.fullScreenBtnEl.onclick=function(t){i.isFullScreen?i.exitFullScreen():i.requestFullscreen()},re.isEnabled&&re.on("change",this.screenfullChange.bind(this))}var e=t.prototype;return e.requestFullscreen=function(){if(!re.isEnabled)return!1;re.request(this.boxDom)},e.exitFullScreen=function(){re.toggle()},e.screenfullChange=function(){this.isFullScreen=re.isFullscreen,this.isFullScreen?(this.fullScreenIconEl.title="取消全屏",this.fullScreenIconEl.classList.remove("vss-fullscreen"),this.fullScreenIconEl.classList.add("vss-cancel-fullscreen")):(this.fullScreenIconEl.title="全屏",this.fullScreenIconEl.classList.remove("vss-cancel-fullscreen"),this.fullScreenIconEl.classList.add("vss-fullscreen"))},t}(),oe=function(){function t(t,e){var i=this;this.boxDom=t.boxDom,this.isFill=!1,this.isPlaying=!1,this.fillModeBtnEl=Zt("div",{className:"vss-control-btn vss-control-play-btn vss-pointer"},{}),this.fillModeIconEl=Zt("span",{className:"vssfont vss-play"},{title:"播放"}),this.fillModeBtnEl.appendChild(this.fillModeIconEl),e.appendChild(this.fillModeBtnEl),this.fillModeBtnEl.onclick=function(e){t.url&&(i.isPlaying?(i.isPlaying=!1,i.fillModeIconEl.title="播放",i.fillModeIconEl.classList.remove("vss-pause"),i.fillModeIconEl.classList.add("vss-play"),i.pause(t)):(i.isPlaying=!0,i.fillModeIconEl.title="暂停",i.fillModeIconEl.classList.remove("vss-play"),i.fillModeIconEl.classList.add("vss-pause"),i.play(t)))},t.on("status",(function(t){100===t&&(i.isPlaying=!0,i.fillModeIconEl.title="暂停",i.fillModeIconEl.classList.remove("vss-play"),i.fillModeIconEl.classList.add("vss-pause"))}))}var e=t.prototype;return e.play=function(t){t.play(t.url,1,t.seekTimeSecs)},e.pause=function(t){t.pause()},t}(),ae=function(t,e){var i=this;this.boxDom=t.boxDom,this.isFill=!1,this.isPlaying=!1,this.fillModeBtnEl=Zt("div",{className:"vss-control-btn vss-control-stop-btn vss-pointer"},{}),this.fillModeIconEl=Zt("span",{className:"vssfont vss-stop"},{title:"停止"}),this.fillModeBtnEl.appendChild(this.fillModeIconEl),e.appendChild(this.fillModeBtnEl),this.fillModeBtnEl.onclick=function(e){i.isPlaying&&(i.isPlaying=!1,t.callbackFunc("stop"),t.stop())},t.on("status",(function(t){i.isPlaying=100===t}))},se=function(){function t(t,e){var i=this;this.boxDom=t.boxDom,this.isFill=!1,this.isPlaying=!1,this.fillModeBtnEl=Zt("div",{className:"vss-control-btn vss-control-audio-btn vss-pointer"},{}),this.fillModeIconEl=Zt("span",{className:"vssfont "+(t.enableAudio?"vss-open-voice":"vss-mute")},{title:t.enableAudio?"静音":"声音"}),this.fillModeBtnEl.appendChild(this.fillModeIconEl),e.appendChild(this.fillModeBtnEl),this.fillModeBtnEl.onclick=function(e){t.enableAudio?(i.fillModeIconEl.title="声音",i.fillModeIconEl.classList.remove("vss-open-voice"),i.fillModeIconEl.classList.add("vss-mute"),i.closeAudio(t)):(i.fillModeIconEl.title="静音",i.fillModeIconEl.classList.remove("vss-mute"),i.fillModeIconEl.classList.add("vss-open-voice"),i.openAudio(t))},t.on("audio",(function(t){t?(i.fillModeIconEl.title="静音",i.fillModeIconEl.classList.remove("vss-mute"),i.fillModeIconEl.classList.add("vss-open-voice")):(i.fillModeIconEl.title="声音",i.fillModeIconEl.classList.remove("vss-open-voice"),i.fillModeIconEl.classList.add("vss-mute"))}))}var e=t.prototype;return e.openAudio=function(t){t.openAudio()},e.closeAudio=function(t){t.closeAudio()},t}(),he=function(t,e){var i=this;this.boxDom=t.boxDom,this.isFill=!1,this.isPlaying=!1,this.fillModeBtnEl=Zt("div",{className:"vss-item-box"},{}),this.fillModeIconEl=Zt("span",{className:""},{},""),this.fillModeBtnEl.appendChild(this.fillModeIconEl),e.appendChild(this.fillModeBtnEl),t.on("resolutionRatio",(function(t){i.fillModeIconEl.innerText="LIVE ["+t.code+":"+t.width+"×"+t.height+"]"}))},ue=function(){function t(t,e){var i=this;this.boxDom=t.boxDom,this.isFill=!1,this.isPlaying=!1,this.duration=0,this.isMousedown=!1,this.isMousemove=!1,this.mousedownCursor=0,this.show=!1,this.timeBoxEl=Zt("div",{className:"vss-item-box vss-time-box vss-hide"},{}),this.timeScheduleEl=Zt("div",{className:"vss-time-schedule"},{}),this.leftTimeEl=Zt("div",{className:"vss-time-left-text"},{},"00:00:00"),this.rightTimeEl=Zt("div",{className:"vss-time-right-text"},{},"00:00:00"),this.timeBoxEl.appendChild(this.leftTimeEl),this.timeBoxEl.appendChild(this.timeScheduleEl),this.timeBoxEl.appendChild(this.rightTimeEl),this.timeTrackOutEl=Zt("div",{className:"vss-time-track-out"},{}),this.timeTrackEl=Zt("div",{className:"vss-time-track"},{}),this.timeProgressEl=Zt("div",{className:"vss-time-progress"},{}),this.timeProgressButtonBoxEl=Zt("div",{className:"vss-time-button-wrapper"},{}),this.timeProgressButtonEl=Zt("div",{className:"vss-time-button-wrapper_button"},{}),this.timeProgressTipEl=Zt("span",{className:"vss-time-button-wrapper_tip vss-hide"},{}),this.timeProgressButtonBoxEl.appendChild(this.timeProgressButtonEl),this.timeProgressButtonBoxEl.appendChild(this.timeProgressTipEl),this.timeTrackEl.appendChild(this.timeProgressEl),this.timeTrackOutEl.appendChild(this.timeTrackEl),this.timeTrackOutEl.appendChild(this.timeProgressButtonBoxEl),this.timeScheduleEl.appendChild(this.timeTrackOutEl),e.appendChild(this.timeBoxEl),this.timeTrackEl.onmousedown=function(e){if((e=e||window.event).stopPropagation(),0!==e.button)return!1;if(i.isPlaying){var r=e.layerX,n=i.timeTrackEl.offsetWidth,o=r/n*100;o<=0?o=0:o>=100&&(o=100);var a=parseInt(i.duration*(r/n)*1e3)/1e3;return i.leftTimeEl.innerText=Nt(1e3*a),i.timeProgressTipEl.innerText=Nt(1e3*a),i.isMousemove||(i.timeProgressEl.style.width=o+"%",i.timeProgressButtonBoxEl.style.left=o+"%"),document.onmouseup=function(e){return i.seekToPre(t,o),e.stopPropagation(),document.onmouseup=null,!1},!1}return!1},this.timeProgressButtonEl.onmousedown=function(e){if((e=e||window.event).stopPropagation(),0!==e.button)return!1;i.isMousedown=!0,i.mousedownCursor=i.getCursorPositionX(e);var r=i.timeTrackEl.offsetWidth,n=0,o=parseFloat(i.timeProgressButtonBoxEl.style.left||0);document.onmousemove=function(t,e,i){var r,n,o,a=0;i||(i={});var s=function(){var e=Ft;a=!1===i.leading?0:(new Date)[e(199,"R)EY")](),r=null,t[e(209,"UCj3")](n,o),r||(n=o=null)};return function(){var h=Ft,u=(new Date)[h(203,"UCj3")]();a||!1!==i[h(193,"yeBN")]||(a=u);var l=e-(u-a);n=this,o=arguments,l<=0||l>e?(r&&(clearTimeout(r),r=null),a=u,t[h(178,"TOkq")](n,o),r||(n=o=null)):!r&&!1!==i[h(183,"&vJN")]&&(r=setTimeout(s,l))}}((function(e){e.stopPropagation(),i.isMousemove=!0;var a=i.getCursorPositionX(e)-i.mousedownCursor,s=o/100*r;(s+=a)>=r?s=r:s<=0&&(s=0);var h=s/r;n=100*h;var u=parseInt(i.duration*h*1e3)/1e3;i.timeProgressEl.style.width=n+"%",i.leftTimeEl.innerText=Nt(1e3*u),i.timeProgressButtonBoxEl.style.left=n+"%",i.timeProgressTipEl.innerText=Nt(1e3*u),i.seekToPre(t,n)}),25),document.onmouseup=function(e){e.stopPropagation(),i.isMousedown=!1,i.isMousemove=!1;var r=parseFloat(i.timeProgressButtonBoxEl.style.left||0);return i.seekToPre(t,r),document.onmousemove=null,document.onmouseup=null,!1}},t.on("timeSchedule",(function(e){i.show||i.timeBoxEl.classList.remove("vss-hide"),t.emit("status",100),i.isPlaying=!0,i.duration=e.duration,i.timeProgressTipEl.classList.remove("vss-hide"),i.leftTimeEl.innerText=Nt(1e3*e.currentTime),i.rightTimeEl.innerText=Nt(1e3*e.duration),i.timeProgressTipEl.innerText=Nt(1e3*e.currentTime),i.isMousemove||(i.timeProgressEl.style.width=1e3*e.currentTime/(1e3*e.duration)*100+"%",i.timeProgressButtonBoxEl.style.left=1e3*e.currentTime/(1e3*e.duration)*100+"%")})),t.on("timeended",(function(t){i.isPlaying=!1,i.timeProgressTipEl.classList.add("vss-hide"),i.leftTimeEl.innerText=Nt(1e3*t.currentTime),i.rightTimeEl.innerText=Nt(1e3*t.duration),i.timeProgressTipEl.innerText=Nt(1e3*t.currentTime),i.isMousemove||(i.timeProgressEl.style.width=1e3*t.currentTime/(1e3*t.duration)*100+"%",i.timeProgressButtonBoxEl.style.left=1e3*t.currentTime/(1e3*t.duration)*100+"%")}))}var e=t.prototype;return e.getCursorPositionX=function(t){var e=0;return t||(t=window.event),t.pageX||t.pageY?e=t.pageX:(t.clientX||t.clientY)&&(e=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft),e},e.seekToPre=function(t,e){t.seekToPercent(e)},t}(),le=ue,de=function(){function t(t,e,i){var r=this,n=this.createEl("div",{className:"vss-control-bar"}),o=this.createEl("div",{className:"vss-control-bar-left"}),a=this.createEl("div",{className:"vss-control-bar-conter"}),s=this.createEl("div",{className:"vss-control-bar-right"});n.appendChild(o),n.appendChild(a),n.appendChild(s),e.appendChild(n),new oe(t,o),new ae(t,o),new se(t,o),new he(t,o),new le(t,a),new Kt(t,s),new Qt(t,s),new ne(t,s),this.Timer=null,e.onmousemove=function(){clearTimeout(r.Timer),e.classList.add("vss-control-show")},e.onmouseout=function(){clearTimeout(r.Timer),r.Timer=setTimeout((function(){e.classList.remove("vss-control-show"),clearTimeout(r.Timer)}),2e3)}}return t.prototype.createEl=function(t,e,i){return void 0===e&&(e={}),void 0===i&&(i={}),"div",Zt("div",e=Gt({},e),i)},t}(),fe=function(){function t(t,e){var i=this;this.loadingEl=this.createEl(),e.appendChild(this.loadingEl),t.on("status",(function(t){i.open(t)}))}var e=t.prototype;return e.createEl=function(t,e,i){void 0===e&&(e={}),void 0===i&&(i={});var r=Zt("div",e=Gt({className:this.buildCSSClass()},e),i=Gt({type:"loading"},i));return this.center=Zt("div",{className:"vss-loading-center"},{"aria-type":"center"}),this.loading=Zt("img",{className:"vss-loading-img"},{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIKICAgICBjbGFzcz0idWlsLWRlZmF1bHQiPgogICAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9Im5vbmUiIGNsYXNzPSJiayIvPgogICAgPHJlY3QgeD0iNDciIHk9IjQwIiB3aWR0aD0iNiIgaGVpZ2h0PSIyMCIgcng9IjUiIHJ5PSI1IiBmaWxsPSIjZmZmZmZmIiB0cmFuc2Zvcm09InJvdGF0ZSgwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApIj4KICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBmcm9tPSIxIiB0bz0iMCIgZHVyPSIxcyIgYmVnaW49Ii0xcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4KICAgIDwvcmVjdD4KICAgIDxyZWN0IHg9IjQ3IiB5PSI0MCIgd2lkdGg9IjYiIGhlaWdodD0iMjAiIHJ4PSI1IiByeT0iNSIgZmlsbD0iI2ZmZmZmZiIKICAgICAgICAgIHRyYW5zZm9ybT0icm90YXRlKDMwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApIj4KICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBmcm9tPSIxIiB0bz0iMCIgZHVyPSIxcyIgYmVnaW49Ii0wLjkxNjY2NjY2NjY2NjY2NjZzIgogICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+CiAgICA8L3JlY3Q+CiAgICA8cmVjdCB4PSI0NyIgeT0iNDAiIHdpZHRoPSI2IiBoZWlnaHQ9IjIwIiByeD0iNSIgcnk9IjUiIGZpbGw9IiNmZmZmZmYiCiAgICAgICAgICB0cmFuc2Zvcm09InJvdGF0ZSg2MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSI+CiAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgZnJvbT0iMSIgdG89IjAiIGR1cj0iMXMiIGJlZ2luPSItMC44MzMzMzMzMzMzMzMzMzM0cyIKICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0iNDciIHk9IjQwIiB3aWR0aD0iNiIgaGVpZ2h0PSIyMCIgcng9IjUiIHJ5PSI1IiBmaWxsPSIjZmZmZmZmIgogICAgICAgICAgdHJhbnNmb3JtPSJyb3RhdGUoOTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCkiPgogICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIGZyb209IjEiIHRvPSIwIiBkdXI9IjFzIiBiZWdpbj0iLTAuNzVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0iNDciIHk9IjQwIiB3aWR0aD0iNiIgaGVpZ2h0PSIyMCIgcng9IjUiIHJ5PSI1IiBmaWxsPSIjZmZmZmZmIgogICAgICAgICAgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApIj4KICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBmcm9tPSIxIiB0bz0iMCIgZHVyPSIxcyIgYmVnaW49Ii0wLjY2NjY2NjY2NjY2NjY2NjZzIgogICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+CiAgICA8L3JlY3Q+CiAgICA8cmVjdCB4PSI0NyIgeT0iNDAiIHdpZHRoPSI2IiBoZWlnaHQ9IjIwIiByeD0iNSIgcnk9IjUiIGZpbGw9IiNmZmZmZmYiCiAgICAgICAgICB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCkiPgogICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIGZyb209IjEiIHRvPSIwIiBkdXI9IjFzIiBiZWdpbj0iLTAuNTgzMzMzMzMzMzMzMzMzNHMiCiAgICAgICAgICAgICAgICAgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4KICAgIDwvcmVjdD4KICAgIDxyZWN0IHg9IjQ3IiB5PSI0MCIgd2lkdGg9IjYiIGhlaWdodD0iMjAiIHJ4PSI1IiByeT0iNSIgZmlsbD0iI2ZmZmZmZiIKICAgICAgICAgIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSI+CiAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgZnJvbT0iMSIgdG89IjAiIGR1cj0iMXMiIGJlZ2luPSItMC41cyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiLz4KICAgIDwvcmVjdD4KICAgIDxyZWN0IHg9IjQ3IiB5PSI0MCIgd2lkdGg9IjYiIGhlaWdodD0iMjAiIHJ4PSI1IiByeT0iNSIgZmlsbD0iI2ZmZmZmZiIKICAgICAgICAgIHRyYW5zZm9ybT0icm90YXRlKDIxMCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSI+CiAgICAgICAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0ib3BhY2l0eSIgZnJvbT0iMSIgdG89IjAiIGR1cj0iMXMiIGJlZ2luPSItMC40MTY2NjY2NjY2NjY2NjY3cyIKICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0iNDciIHk9IjQwIiB3aWR0aD0iNiIgaGVpZ2h0PSIyMCIgcng9IjUiIHJ5PSI1IiBmaWxsPSIjZmZmZmZmIgogICAgICAgICAgdHJhbnNmb3JtPSJyb3RhdGUoMjQwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApIj4KICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBmcm9tPSIxIiB0bz0iMCIgZHVyPSIxcyIgYmVnaW49Ii0wLjMzMzMzMzMzMzMzMzMzMzNzIgogICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+CiAgICA8L3JlY3Q+CiAgICA8cmVjdCB4PSI0NyIgeT0iNDAiIHdpZHRoPSI2IiBoZWlnaHQ9IjIwIiByeD0iNSIgcnk9IjUiIGZpbGw9IiNmZmZmZmYiCiAgICAgICAgICB0cmFuc2Zvcm09InJvdGF0ZSgyNzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCkiPgogICAgICAgIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIGZyb209IjEiIHRvPSIwIiBkdXI9IjFzIiBiZWdpbj0iLTAuMjVzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0iNDciIHk9IjQwIiB3aWR0aD0iNiIgaGVpZ2h0PSIyMCIgcng9IjUiIHJ5PSI1IiBmaWxsPSIjZmZmZmZmIgogICAgICAgICAgdHJhbnNmb3JtPSJyb3RhdGUoMzAwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApIj4KICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBmcm9tPSIxIiB0bz0iMCIgZHVyPSIxcyIgYmVnaW49Ii0wLjE2NjY2NjY2NjY2NjY2NjY2cyIKICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0iNDciIHk9IjQwIiB3aWR0aD0iNiIgaGVpZ2h0PSIyMCIgcng9IjUiIHJ5PSI1IiBmaWxsPSIjZmZmZmZmIgogICAgICAgICAgdHJhbnNmb3JtPSJyb3RhdGUoMzMwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApIj4KICAgICAgICA8YW5pbWF0ZSBhdHRyaWJ1dGVOYW1lPSJvcGFjaXR5IiBmcm9tPSIxIiB0bz0iMCIgZHVyPSIxcyIgYmVnaW49Ii0wLjA4MzMzMzMzMzMzMzMzMzMzcyIKICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIvPgogICAgPC9yZWN0Pgo8L3N2Zz4K"}),this.loadingText=Zt("span",{className:"vss-loading-text"},{},"视频加载中..."),this.center.appendChild(this.loading),r.appendChild(this.center),r},e.buildCSSClass=function(){return"vss-loading vss-hide"},e.open=function(t){this.loadingEl&&(100===t?(this.loadingText.innerHTML="播放中...",this.hide()):99===t?(this.hide(),this.loadingText.innerHTML="已停止"):0===t?(this.loadingText.innerHTML="连接中...",this.show()):1===t?(this.loadingText.innerHTML="视频加载中...",this.hide()):2===t?(this.loadingText.innerHTML="状态为2",this.show()):(this.loadingText.innerHTML="未知状态:"+t,this.show()))},e.show=function(){this.loadingEl.classList.remove("vss-hide"),this.loadingEl.classList.add("vss-show")},e.hide=function(){this.loadingEl.classList.remove("vss-show"),this.loadingEl.classList.add("vss-hide")},t}(),ce=function(){function t(t,e){this.canvas=this.createEl(),e.appendChild(this.canvas)}return t.prototype.createEl=function(t,e,i){return void 0===e&&(e={}),void 0===i&&(i={}),"canvas",Zt("canvas",e=Gt({className:"vss-canvas"},e),i)},t}(),pe=function(t,e){var i=this;this.Timer=null,this.messageBoxDom=Zt("div",{className:"vss-message-box"}),e.appendChild(this.messageBoxDom),t.on("message",(function(t){r.setMessage(t),i.messageBoxDom.appendChild(Zt("div",{className:"vss-message-item"},{},"[播放器]:"+t.name))})),t.on("play",(function(t){i.Timer=setTimeout((function(){i.messageBoxDom.classList.add("vss-message-hide"),clearTimeout(i.Timer)}),5e3)}))},me=function(){function t(t,e){var i=this;this.Timer=null,this.exportMessageDom=Zt("div",{className:"vss-export-message-box"}),e.appendChild(this.exportMessageDom),this.messageLists=[],this.index=0,t.on("exportMessage",(function(t){i.messageLists[i.index]=Zt("div",{className:"vss-export-message-item"},{},""+t.message),i.exportMessageDom.appendChild(i.messageLists[i.index]),t.duration>0&&i.removeChildDom(i.index,t.duration),t.callback(i.index),i.index++})),t.on("clearMessage",(function(t){t>=0?i.messageLists[t]&&(i.exportMessageDom.removeChild(i.messageLists[t]),i.messageLists.splice(t,1)):(i.exportMessageDom.innerHTML="",i.messageLists=[])}))}return t.prototype.removeChildDom=function(t,e){var i=this;setTimeout((function(){i.messageLists[t]&&(i.exportMessageDom.removeChild(i.messageLists[t]),i.messageLists.splice(t,1))}),e)},t}(),ge=function(){function t(t,e){var i=this;this.Timer=null,this.osdMessageDom=Zt("div",{className:"vss-osd-message-box vss-osd-message-hide"}),e.appendChild(this.osdMessageDom),this.messageLists=[],this.index=0,t.on("osdMessage",(function(t,e,r){return t instanceof Array&&(!!t.length&&(e=e||"lefttop",i.osdMessageDom.innerHTML="",i.osdMessageDom.classList.remove("pos_lefttop"),i.osdMessageDom.classList.remove("pos_leftbottom"),i.osdMessageDom.classList.remove("pos_righttop"),i.osdMessageDom.classList.remove("pos_rightbottom"),i.osdMessageDom.classList.remove("pos_center"),t.forEach((function(t,e){i.osdMessageDom.appendChild(Zt("div",{className:"vss-osd-message-item"},{"data-index":e},t.name+":"+t.value))})),i.osdMessageDom.classList.add("pos_"+e),void i.osdMessageDom.classList.remove("vss-osd-message-hide")))}))}return t.prototype.removeChildDom=function(t){var e=this;setTimeout((function(){e.osdMessageDom.classList.add("vss-osd-message-hide"),setTimeout((function(){e.osdMessageDom.innerHTML=""}),200)}),t)},t}(),ve=function(){function t(t,e,i){var r=this,n=i.height,o=i.isFill;if(!e)return"";n?(e.style.position="relative",e.style.backgroundColor="#000000",e.style.overflow="hidden",e.style.paddingTop="56.25%"):(e.style.position="relative",e.style.backgroundColor="#000000",e.style.width="100%",e.style.height="100%",e.style.overflow="hidden"),e.classList.add("vss-shade"),e.classList.add("vss-player"),this.elDom=e,this.isFill=o,this.videoEl=null,this.videoEl=document.createElement("video"),this.videoEl.style.width="100%",this.videoEl.style.height="100%",this.videoEl.style.position="absolute",this.videoEl.style.top="0",this.videoEl.style.left="0",this.videoEl.style.background="#000000",this.elDom.appendChild(this.videoEl),this.fill(),this.InitMessage=new pe(t,e),this.ExportMessage=new me(t,e),this.OsdMessage=new ge(t,e),t.on("play",(function(){})),t.on("setfill",(function(){r.isFill=!0,r.fill()}))}return t.prototype.fill=function(){this.videoEl&&this.isFill?this.videoEl.style.objectFit="fill":this.videoEl.style.objectFit=""},t}(),ye=function(){function t(t,e,i){var r=this;return this.isBigButton=i,i?(this.bigPlayBox=this.createEl("div"),e.appendChild(this.bigPlayBox),this.bigPlayBox.onclick=function(){t.play("",!0),r.hide()},this.bigPlayBox):null}var e=t.prototype;return e.createEl=function(t,e,i){void 0===e&&(e={}),void 0===i&&(i={});var r=Zt("div",e=Gt({className:"vss-big-play-button vss-pointer"},e),i=Gt({type:"button"},i));return this.iconEl=Zt("span",{className:"vss-big-play-icon vssfont vss-play"}),r.appendChild(this.iconEl),r},e.show=function(){this.isBigButton&&(this.bigPlayBox.classList.remove("vss-hide"),this.bigPlayBox.classList.add("vss-show"))},e.hide=function(){this.isBigButton&&(this.bigPlayBox.classList.remove("vss-show"),this.bigPlayBox.classList.add("vss-hide"))},t}(),be=function(){function t(t,e){var i=this;this.loadingLogoDom=this.createEl(),e.appendChild(this.loadingLogoDom),this.boxDom=e,t.on("status",(function(t){i.open(t)}))}var e=t.prototype;return e.createEl=function(){var t=Zt("div",{className:"vss-mask vss-show"});return this.center=Zt("div",{className:"vss-mask-center"}),this.loadingLogoImg=Zt("img",{className:"vss-loading-logo-img"},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANkAAAAnCAMAAAC1+B0tAAAC7lBMVEUAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////jtXoAAAA+XRSTlMAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkZOUlpeYmZqbnJ2foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f5tOzRcAAAIn0lEQVRo3u2YeVwTVx7AXyYhQDgEFBAEuW/kWKlFQEpFyoqKrVJFVKxXPdp61IUt7iJoW6toPQpS03q0dgVawS6ggiIqSy1bEKhHrUEiR4LVcBOTzPy3781MMpMQwqeWP9Z++P01M++9ee/7fud7AIzLuIzLuIyRWC7c/+9r1y/lr3HG/lRcISdkOEHJs4pEwe8aO/GlxIQQ6//P/Zh0pI9giao0lKfdgffyP0vr798t3RNuqjPUZs0Vcmz/tY1TOFotgqjd565fPbXRc1RmY9cZPia6HzHH+W/EzWBJyET9o7kBSa9HsTtOY9oC6lSEtnQksQmwhMpBtUIvxLFbjJPrFOoxeN0ilq75c8sHqO/ST721kS3ClqSuoiQ1dgL84HYUL/dl3CJ2S+ocOyBIfqy9JnEyALb77hd7qDtaHxA1bQDAPFdn8c2aXwXfJQ2xaf/iqIiEnTVD6OXJMgbAYo8UZ8b1pNsyLVkd7F+2bbBUt5hvFTEmUJ1gxFLyugalpulRmrEumcOublycbqafjDfjTm8erV7TFf3PymwMkbneIjX2WLhsMrIbLLIMsUnijen2Ccd6tAb27lCbhSC7U/ufDfNpKzZ5T8T+XjOPq1n43l7m++BJF6BNxvEVylXNy+FvTBa2yQpSWZLkhnZsdV9bCuUg0++r7oejVXyEP9nJ7phIT2VyWrOFQ8XRaHNN07ugjv7jR/kH9kEXpavqgssSsqs0mba6lLvkvh+ePdk+Yvdd2KbYN4Vqmf8DaZ8dtfUy9KA8E6iebX0rfm9PfAwl4VR3how3sxxX3IhD1stPeNiZMdyrHISKm95oCxyLiKebSd3txMVB+hxwYT+0l0PWztGbSvpwRaEP3F3s/SfwW7YV2T6dVGnPfjcIOiG9FdnltTAS2v28HMKcDaX0EXwOqvq7UPLZ/ij8KfEwfTLg+B3rRnb6Lm1CXkK84U3dkKIhM01sIAZKgilH1U/GDb3Vlw89xSJNMfi1uSEy8wq48Cv2cJd4PMcPpbhoDh8AIxQrf5mOlszZ9xSuTLaO8iDOgibYfWibDXrZ1ALVctqPDg9GWVKCqJhJPr96FY7pfJeceOpnMJIoj7tRvWZVDBx1ACOQWW9sJ2T5TsAQGRCk9HSsAPzXpMpGf2CIbBbc0r4YyOBd9ZMH5vHtUOtsaJHe/1USqs1oZY4VUDF4jr06TG5qhYu+gIzL6nPofw1zaM8yW/szVOc3VMRd/yvsdJJ2nXm18OViFPUSc6XnwKQRyKbs6SE6sicAw2TALldR5+9ZTUhXAoNku2HULoEIdtXKSicOMDvSfysAcn4Mgc+hzQ1DgbMlRhPcHIuh0Yn+ChXrUwnV96kzsJ+Xmrr1SCMKO907SAvG3m+H27WLJvD6GrbULaArgkLVd0F6yTgBJ+T4Lxs1eW1EMm5gXf8Xtr5/CeIbJONfgctbCfc9Y7AGeRKwKZPvtgAgvAUnfp4GEV8Xw3Wdd2Vy28cwGHe/BbtE/gitdL0FiPlBk9GKQqi5MmHQ+W0HnQIcDsNk+NNCOubv6pEddtFDFjjrEq68mcgFLDJZWa6QkYPhdIvpYplkNTMaknUdY/UTfkRN24QTsnAMTKzppZNObGe9Owe41CoICXK5t1DG+sSO+dFmaI7yd6BuYuthblguYMjw0kjuaGQg6hKhartxmZSyo4mWNFl1RiMhL3+ZvecJDyWnilmp49EyTUrc33HZi03W8R47990mP3s8wIkWXwz4iW7TVZDDDUmsEbD8fojoXgBNYy0i+7sNM+NaGDeUW62G66xzrwcd9AyRGc2tYhI1MVQWzSHJng0RfV95A22yzux5rfrITJcqJQvYZOKXsnBdMq8WimyauNGVCnI2lY/j+Tpk26yYGdOgDw28bUn7WY4TIlNIGs+sd9UEc0NkAExeXXxbRIq4h1BeDEdkcI6uA3ZAlyxDf6U4nEyPn7ncw4lHgRhwapDOpEzJ/969IC6wLpfrJzPJhxGxa6lANzZqzWyQjFWP+uf1dx+yIslE2+1j/5G5zm3MyGx+xAn5bC7AhPIvrElrOdBXAAtDn0Yl8QhVJLpkobVQU3ei0S68/QD61glfznOTwfReiF8IRtbYvNIICylQDX7rM1Zk4F9woVkwUoSKlMenYsA6p1cSB18TJXA1XhyarEpT4Fvmo5LiDOm/7iWoBjkTwn1+sokf9N+cq85nWHCBaqDQc6zINsB81uAAEZI68Z7a67/hfe9ASzP9Bq4mDxX1JBkxcDqMzB6TDj9BNTFdkSxByRnWja/a8p6TzDZzqDZeU4NgwWcZtD9M5ifGCdVWtOxFbXCdisrZ6DnuIU70LzLRkMFAfz1r8eLs5mfouSyQskCTv7XqHCDkOc6/h4wTXaUs9mXqRiykSIP2h8mwXBiE28lEFF6vVJREoqzmfBUSXHXnsMhYIl2iPmGapYu1my5GcEYj49u5qsVnRbWqI8OYVeuTaEWkrcPzGa5UsKRlqX4yeD7D2f0UDXRDEFJVM3lkmXTwKa5qOpQcUQzX0ptCrn84mWw7c2znJVTJ2cl0lelo1mi8WuvkNnjaXet8hgVDtAJ3imz4yXMEshFOnttQxdeWRFYgnjnt6ouDY1R6Icnqpcx1gniVJVvnVimlmrsh+T6nUf1sZhkrp+Jtn0xFO7osd4um5A4uVPUjNH6EsOBkHkv2zlDPaRT2WU4wc2OxpujscXbHXZoMlYeuMhTnY8li1GxLOzl1BV1QUFHfc1MNeROi+vWg/7AEZhUyfzl5q/GGM2c0MuPItEyNpL/pMjxlYO6bM9PieWNyc2X+OXVL0/H9l8LCB1TtU+VPx3J1PuPYh70SE+lp8mJdNgo+7NW2VMWpqepSiSTbbvXCXqRGsstU4s4KM6YAfsHJAO81IX31NlC61ILV8MKToUQTkJS6KiVMoO3UfwYy/TJONk42TjYu+uR/jc0F3eSHi7IAAAAASUVORK5CYII="}),this.loadingLogoText=Zt("span",{className:"vss-loading-logo-text"},{},"成都视开信息科技"),this.center.appendChild(this.loadingLogoImg),this.center.appendChild(this.loadingLogoText),t.appendChild(this.center),t},e.open=function(t){this.loadingLogoDom&&99===t&&this.hide()},e.show=function(){this.loadingLogoDom.classList.remove("vss-hide"),this.loadingLogoDom.classList.add("vss-show")},e.hide=function(){this.loadingLogoDom.classList.remove("vss-show"),this.loadingLogoDom.classList.add("vss-hide")},t}(),_e=function(){function t(){}var e=t.prototype;return e.on=function(t,e,i){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:i}),this},e.once=function(t,e,i){var r=this;function n(){r.off(t,n);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];e.apply(i,a)}return n._=e,this.on(t,n,i)},e.emit=function(t){for(var e=((this.e||(this.e={}))[t]||[]).slice(),i=arguments.length,r=new Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];for(var o=0;o<e.length;o+=1)e[o].fn.apply(e[o].ctx,r);return this},e.off=function(t,e){var i=this.e||(this.e={}),r=i[t],n=[];if(r&&e)for(var o=0,a=r.length;o<a;o+=1)r[o].fn!==e&&r[o].fn._!==e&&n.push(r[o]);return n.length?i[t]=n:delete i[t],this},t}();i(247),i(252),i(254),i(256);function we(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Ae=function(){function t(t,e){if(this.TAG="WebRtcPlayer",this._type="WebRtcPlayer",this._emitter=new f.a,this.pc=null,this._mediaElement=null,this.url=t,this.autoplay=!!e.autoplay||!1,this.typeCallback=e.typeCallback,this.statusCallback=e.statusCallback,!t.match(/^webrtc?:\/\/||^webrtcs?:\/\//))throw"JSWebrtc just work with webrtc";this.timer=null,this.sendChannel=null,this._mediaInfo=null,this._statisticsInfo=null,this.isPlaying=!1,this._isLoad=!1,this._isDestroy=!1,this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvPlay:this._onvPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this),onvWaiting:this._onvWaiting.bind(this),onvPlaying:this._onvPlaying.bind(this)},this.attachMediaElement(e.mediaElement,t)}var e,i,n,o=t.prototype;return o.on=function(t,e){var i=this;t===g.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){i._emitter.emit(g.MEDIA_INFO,i.mediaInfo)})):t===g.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){i._emitter.emit(g.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(t,e)},o.off=function(t,e){this._emitter.removeListener(t,e)},o.attachMediaElement=function(t,e){this._mediaElement=t,this._mediaElement=t,t.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),t.addEventListener("seeking",this.e.onvSeeking),t.addEventListener("canplay",this.e.onvCanPlay),t.addEventListener("play",this.e.onvPlay),t.addEventListener("stalled",this.e.onvStalled),t.addEventListener("progress",this.e.onvProgress),t.addEventListener("waiting",this.e.onvWaiting),t.addEventListener("playing",this.e.onvPlaying),this.typeCallback(!0),this.load(e)},o.load=function(t){var e=this;this.statusCallback(0),this.pc&&this.pc.close(),this.pc=new RTCPeerConnection(null),this.pc.ontrack=function(t){e._mediaElement.srcObject=t.streams[0]},this.pc.addTransceiver("audio",{direction:"recvonly"}),this.pc.addTransceiver("video",{direction:"recvonly"}),this.sendChannel=this.pc.createDataChannel("keepalive"),this.sendChannel.onclose=this.onChannelClose.bind(this),this.sendChannel.onopen=this.onChannelOpen.bind(this),this.sendChannel.onmessage=this.onChannelMessage.bind(this),this.pc.createOffer({offerToReceiveVideo:!0,offerToReceiveAudio:!0}).then((function(t){return e.pc.setLocalDescription(t).then((function(){return t}))})).then((function(i){return new Promise((function(r,n){e.HttpPost(t,window.btoa(i.sdp)).then((function(t){r(t)}),(function(t){n(t)}))}))})).then((function(t){return e.pc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:window.atob(t)}))})).then((function(){e._isLoad=!0})).catch((function(t){throw t}))},o.onChannelClose=function(){var t=this;clearInterval(this.timer),this._isDestroy||r.sleep(3e3).then((function(){t.load(t.url)}))},o.onChannelOpen=function(){var t=this;this.timer=setInterval((function(){t.sendChannel&&t.sendChannel.send("ping")}),3e3)},o.onChannelMessage=function(){},o.HttpPost=function(t,e){return new Promise((function(i,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState&&n.status>=200&&n.status<300){var t=n.responseText;n.onreadystatechange=new Function,n=null,i(t)}},n.open("POST",t.replace("webrtc","http"),!0),n.send(e)}))},o._onvLoadedMetadata=function(){},o._onvSeeking=function(){},o._onvCanPlay=function(){this.autoplay&&this._mediaElement.play()},o._onvPlay=function(){this.isPlaying=!0,this.statusCallback(100)},o._onvStalled=function(){},o._onvProgress=function(){},o._onvWaiting=function(){},o._onvPlaying=function(){},o.unload=function(){},o.play=function(){this.isPlaying||(this._mediaElement.play(),this.isPlaying=!0)},o.pause=function(){this.isPlaying&&(this._mediaElement.pause(),this.isPlaying=!1)},o.resume=function(){},o.openAudio=function(){},o.closeAudio=function(){},o.seek=function(){},o.stop=function(){this.destroy()},o.destroy=function(){this._isDestroy=!0,this.pc&&(this.pc.close(),this.pc=null),this._mediaElement&&(this._mediaElement=null),this.sendChannel&&(this.sendChannel=null),this.autoplay=null,this.typeCallback=null,this.statusCallback=null,this.isPlaying=!1,this._isLoad=!1,clearInterval(this.timer)},e=t,(i=[{key:"isLoad",get:function(){return this._isLoad}}])&&we(e.prototype,i),n&&we(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Me=i(24),Ee=i.n(Me);function Se(t){if(void 0===t)throw new ReferenceError(Te(765,"n[BW"));return t}function ke(t,e){return(ke=Object[Te(550,"e54v")]||function(t,e){return t.__proto__=e,t})(t,e)}function Te(t,e){var i=Ie();return Te=function(e,r){var n=i[e-=469];if(void 0===Te.ILWeBe){var o=function(t){for(var e,i,r="",n="",o=0,a=0;i=t.charAt(a++);~i&&(e=o%4?64*e+i:i,o++%4)?r+=String.fromCharCode(255&e>>(-2*o&6)):0)i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);for(var s=0,h=r.length;s<h;s++)n+="%"+("00"+r.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(n)},a=function(t,e){var i,r,n=[],a=0,s="";for(t=o(t),r=0;r<256;r++)n[r]=r;for(r=0;r<256;r++)a=(a+n[r]+e.charCodeAt(r%e.length))%256,i=n[r],n[r]=n[a],n[a]=i;r=0,a=0;for(var h=0;h<t.length;h++)a=(a+n[r=(r+1)%256])%256,i=n[r],n[r]=n[a],n[a]=i,s+=String.fromCharCode(t.charCodeAt(h)^n[(n[r]+n[a])%256]);return s};Te.yLFdNq=a,t=arguments,Te.ILWeBe=!0}var s=i[0],h=e+s,u=t[h];return u?n=u:(void 0===Te.CeQIkv&&(Te.CeQIkv=!0),n=Te.yLFdNq(n,r),t[h]=n),n},Te(t,e)}!function(t,e){for(var i=Te,r=t();;)try{if(264984===-parseInt(i(485,"GV(q"))/1+parseInt(i(634,"m23]"))/2*(-parseInt(i(666,"4V[I"))/3)+parseInt(i(817,"n[BW"))/4*(parseInt(i(783,"gN$k"))/5)+parseInt(i(891,"GV(q"))/6*(-parseInt(i(846,"WqFg"))/7)+-parseInt(i(874,"n[BW"))/8*(-parseInt(i(596,"e^)J"))/9)+-parseInt(i(728,"C)3J"))/10*(-parseInt(i(885,"e54v"))/11)+parseInt(i(628,"4V[I"))/12)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(Ie);var Re=function(t){var e,i,n,o=Te;function a(e,i,r,n){var o,a=Te;void 0===n&&(n={}),o=t[a(518,"JAzB")](this)||this;var s=n,h=s.cbUserPtr,u=s[a(780,"0R(A")],l=s[a(679,"5n5*")],d=s[a(770,"JAzB")],f=void 0!==d&&d,c=s[a(695,"c#1J")],p=void 0!==c&&c,m=s[a(827,"1i%J")],g=void 0!==m&&m,v=s[a(700,"4V[I")],y=void 0!==v&&v,b=s.playbackRecord,_=void 0!==b&&b;if(o[a(743,"e54v")]=null,o[a(590,"FHP5")]=e,o[a(580,"gN$k")]=r,o[a(696,"63En")]=h,o[a(534,"e^)J")]=p,o[a(630,"9D1T")]=f,o[a(514,"cdCG")]=y,o[a(655,"Wnj0")]=a(642,"nsHP"),o[a(512,"7So$")]="2.0.1",(u===a(832,"HW@j")||u===a(825,"uC!F"))&&(o[a(494,"cdCG")]=u),!Vt.supportMSEH264Playback()&&(o[a(654,"[uf*")]=a(482,"#8CZ")),o.internalTriggerPlay=!0,o[a(620,"FHP5")]=g,o[a(681,"4V[I")]=_,o[a(470,"5PPf")]="",o[a(551,"GV(q")]=0,o[a(740,"ML(c")]=0,o[a(549,"#oec")]=!1,o[a(513,"HW@j")]=!1,o[a(801,"4V[I")]=!1,o[a(646,"c#1J")]=!1,o[a(849,"4fK)")]=!1,o[a(592,"e%y]")]=0,o[a(829,"HW@j")]=!1,!i)return Se(o);if(o[a(480,"8@RW")]=!!l,o.enableAudio=!!l,o[a(838,"eoN(")]=document[a(548,"UstW")](i),!o[a(723,"c#1J")])return Se(o);var w={};w[a(671,"wo*4")]=p,w.isFill=g,o[a(823,"m23]")]=new ve(Se(o),o[a(673,"4V[I")],w);var A={};A[a(747,"c#1J")]=a(577,"l7ku")+"2.0.1",o[a(562,"reFT")](a(627,"7So$"),A);var M={};M[a(532,"lmfv")]=a(875,"o6Lm"),o[a(861,"o6Lm")]("message",M),o.h5Video=o[a(867,"HW@j")]=o[a(877,"4fK)")][a(776,"RgFV")],o.bigPlayButton=new ye(Se(o),o[a(673,"4V[I")],f),o.Loading=new fe(Se(o),o[a(766,"gN$k")]),o[a(501,"#oec")]=new ce(Se(o),o[a(503,"n%B4")]),o[a(744,"63En")]=new de(Se(o),o.boxDom),o[a(662,"7So$")]=new be(Se(o),o[a(503,"n%B4")]);var E={};return E[a(835,"RgFV")]=a(537,"m23]"),o[a(697,"8@RW")](a(578,"&XMC"),E),o}i=t,(e=a)[(n=Te)(736,"0R(A")]=Object.create(i[n(892,"5PPf")]),e[n(644,"e54v")][n(576,"n%B4")]=e,ke(e,i);var s=a.prototype;return s[o(657,"n%B4")]=function(){},s[o(839,"9D1T")]=function(){},s[o(535,"HkRl")]=function(t){},s[o(860,"ML(c")]=function(t){for(var e=o,i=t[e(896,"5n5*")].length-1;i>=0;i--)this[e(616,"UstW")](t[e(515,"Wnj0")][i]),t.removeChild(t[e(541,"y(@t")][i])},s.destroy=function(){var t=o;this[t(553,"0R(A")](),this[t(638,"C)3J")]&&this[t(886,"L!7]")](this[t(601,"5n5*")]),this.playerInstance&&(this[t(597,"5n5*")].stop(),this[t(565,"uC!F")].destroy(),delete this.playerInstance,this[t(483,"#8CZ")]=null)},s[o(588,"0R(A")]=function(t){var e=o;if(this.initH5Flag){if(t===this.currentH5Status)return}else this[e(852,"#oec")]=!0;this[e(847,"GV(q")]=t,t?this[e(649,"HW@j")][e(581,"5n5*")]&&this[e(572,"#8CZ")][e(496,"y(@t")](this[e(582,"l7ku")].canvas):this[e(865,"c#1J")]&&this.boxDom[e(676,"lmfv")](this[e(502,"e54v")])},s[o(641,"RgFV")]=function(t,e){t[o(697,"8@RW")]("status",e)},s[o(499,"4fK)")]=function(t){this.emit("status",t)},s[o(612,"HkRl")]=function(t,e,i){var r=o;t[r(772,"gN$k")](!i),r(831,"8@RW")},s[o(883,"nsHP")]=function(t,e,i,r){var n=o;t.VideoCodec=e,t[n(670,"63En")]=i,t[n(525,"4fK)")]=r;var a={};a.code=e,a[n(843,"RgFV")]=i,a[n(678,"nsHP")]=r,t[n(660,"Gd!C")](n(530,"lmfv"),a),t[n(701,"5n5*")](t,100)},s._onUpdatePlayTime=function(t,e,i,r){var n=o;if(e!=n(556,"63En")){if(!t[n(558,"m23]")])if(t.showTimeLabel=!0,r!==1/0&&r>0){t[n(490,"GV(q")]();var a={};a[n(888,"8@RW")]=e,a[n(587,"8@RW")]=i,a[n(481,"UstW")]=r,t[n(787,"n[BW")]("timeSchedule",a)}else t.live();if(r!==1/0&&!(r<1)&&t[n(703,"e^)J")]&&r>0){var s={};if(s[n(691,"9D1T")]=e,s.currentTime=i,s.duration=r,t[n(564,"&XMC")]("timeSchedule",s),t[n(675,"e54v")]&&!this[n(474,"[uf*")]){t[n(779,"y(@t")]("playbackTime",parseInt(i));var h=i+1;if(!this.callbackEnd&&h>=r){t.callbackFunc(n(791,"&XMC"),0);var u={};u[n(594,"#8CZ")]=e,u[n(782,"1i%J")]=r,u.duration=r,t[n(637,"e%y]")](n(707,"4V[I"),u),this[n(704,"#8CZ")]=!0}}}}else{var l="20"+i[0]+"-";i[1]<10&&(l+="0"),l+=i[1],l+="-",i[2]<10&&(l+="0"),l+=i[2],l+=" ",i[3]<10&&(l+="0"),l+=i[3],l+=":",i[4]<10&&(l+="0"),l+=i[4],l+=":",i[5]<10&&(l+="0"),l+=i[5],l=(l=(l+=".0")[n(667,"FHP5")](0,19))[n(636,"4fK)")](/-/g,"/");var d=new Date(l)[n(653,"0R(A")]();t[n(752,"lmfv")]("playbackTime",parseInt(d))}},s[o(871,"HW@j")]=function(){var t=o;this[t(520,"RgFV")](t(484,"o6Lm")),this[t(529,"o6Lm")][t(725,"doAq")]()},s.endLoding=function(){var t=o;this[t(533,"m23]")](t(555,"RgFV")),this[t(472,"#8CZ")].hide()},s.getTermOfVa_lid_ity=function(){var t,e,i,r=o;return Ut()-Ut(this.d_a_ecr_cyp_t({data:"1af59aebd420060814a44411b4590e87"}[r(552,"5n5*")]))>=(t=2,e=10,i=Ft,3*30*Math[i(189,"Fpx6")](t,3)*30*2*60*Math[i(195,"thn2")](e,3))},s[o(610,"n%B4")]=function(t,e,i){var n=o,a=this;if(void 0===e&&(e=!0),void 0===i&&(i=0),!t&&(t=this[n(686,"9D1T")]),!this[n(510,"8@RW")])return!1;if(t){if(!e)return!1;if(Lt(i)){var s=function(t){var e=Ft;if(!t)return null;var i=document[e(206,"&vJN")]("a");i[e(202,"wid[")]=t;var r={};return r.href=i[e(205,"!rup")],r[e(181,"Z1qM")]=i[e(192,"Hbpw")]||i[e(215,"MfES")]+"//"+i[e(184,"wid[")],r.protocol=i[e(219,"u*hT")],r[e(211,"yeBN")]=i[e(179,"fRV(")],r.hostname=i.hostname,r[e(223,"!Kb8")]=i[e(190,"Hbpw")],r[e(198,"MfES")]=i[e(218,"Dw]6")],r[e(204,"kyP(")]=i[e(208,"R)EY")],r[e(176,"EwYr")]=i[e(217,"&3*4")],r}(t);if([n(680,"e%y]"),n(519,"gN$k"),n(709,"4V[I"),n(757,"^yX["),"wss:",n(881,"uC!F"),n(647,"UstW")][n(748,"HW@j")]((function(t){return t===s[n(476,"JAzB")]}))){this[n(469,"n%B4")]=t,this.emit(n(712,"5PPf")),this.callbackFunc(n(729,"o6Lm")),this[n(717,"gN$k")]=i;var h={};h[n(820,"e54v")]=n(668,"y(@t"),this[n(506,"^yX[")](n(600,"c#1J"),h),this._onConnectStatus(this,99),r[n(781,"8@RW")](!0);var u=!1,l=!1,d=!1,f=!1,c=!1,p=this.url[n(880,"m23]")](this.url[n(760,"^p@k")](".")+1);if(p){var m=p.toLowerCase();m[n(650,"1i%J")]("m3u8")>-1?u=!0:m[n(621,"JAzB")](n(768,"#8CZ"))>-1?l=!0:m[n(857,"doAq")]("mp4")>-1&&(d=!0),u||l||d||f||(this[n(686,"9D1T")][n(848,"Gd!C")](".flv")>-1?l=!0:this[n(570,"1181")][n(542,"&XMC")](n(856,"^yX["))>-1?u=!0:this[n(797,"n[BW")][n(674,"C)3J")](".mp4")>-1?d=!0:l=!0)}else l=!0;"rtsp:"===s.protocol&&(u=!1,l=!1,d=!1,f=!0),this[n(487,"Wnj0")]=!1;var v=!1;if(c="webrtc:"===s.protocol||"webrtcs:"===s.protocol)null==this[n(643,"nsHP")]&&(this[n(727,"cdCG")]=new Ae(this[n(818,"o6Lm")],{autoplay:!0,mediaElement:this[n(504,"o6Lm")],typeCallback:this.changeToH5Video[n(771,"e^)J")](this),statusCallback:this[n(478,"HW@j")][n(665,"reFT")](this)}));else if(u)this[n(703,"e^)J")]=!1,(null==this[n(799,"8@RW")]||!this[n(473,"4V[I")][n(739,"4V[I")]())&&this[n(563,"cdCG")](),this.isHLS=!1,null==this[n(527,"doAq")]&&(this.playerInstance=new xt("m3u8",this[n(544,"Gd!C")],this[n(603,"RgFV")][n(796,"e^)J")],this[n(693,"1i%J")],this[n(731,"5n5*")],this[n(571,"HkRl")],this._onConnectStatus,this,null)),v=this.playerInstance.play(this[n(686,"9D1T")],this.seekTimeSecs),this[n(714,"n%B4")]=this.defaultAudioStatus,!this.internalTriggerPlay&&this[n(863,"cdCG")]&&this[n(716,"gN$k")](),this[n(517,"#oec")]=0;else if(d){if(this[n(853,"C)3J")](!0),this.showTimeLabel=!1,(null==this[n(805,"n%B4")]||!this[n(887,"NMpa")][n(591,"JAzB")]())&&this[n(493,"WqFg")](),this.isHLS=!1,null==this[n(774,"Gd!C")]){var y={};y[n(606,"L!7]")]=n(755,"&XMC"),y[n(811,"reFT")]=t,this[n(800,"GV(q")]=new Ot(y,this.h5Video,this[n(730,"nsHP")],this)}this[n(759,"Wnj0")][n(557,"[uf*")](),this.enableAudio=this[n(516,"5PPf")],!this[n(633,"^p@k")]&&this.enableAudio?this[n(819,"^p@k")]():this[n(764,"Wnj0")](),v=!0}else l?(this[n(669,"Wnj0")]=!1,this[n(814,"HW@j")](),this[n(573,"WqFg")]=!1,null==this.playerInstance&&(this[n(687,"C)3J")]=new xt(n(560,"reFT"),this.h5Video,this[n(893,"JAzB")][n(859,"[uf*")],this[n(497,"e^)J")],this[n(625,"c#1J")],this._onUpdatePlayTime,this[n(639,"o6Lm")],this,this._onGetVideoInfoCallback)),v=this[n(507,"gN$k")][n(526,"doAq")](this[n(713,"HkRl")],0),this[n(489,"lmfv")]=this.defaultAudioStatus,!this[n(622,"9D1T")]&&this.enableAudio&&this[n(758,"8@RW")]()):f&&(this[n(664,"n%B4")]=!1,this[n(890,"5n5*")](),this[n(652,"#oec")]=!1,null==this[n(816,"eoN(")]&&(this.playerInstance=new xt(n(619,"[uf*"),this[n(640,"RgFV")],this.screenCanvas[n(842,"m23]")],this[n(822,"Gd!C")],this[n(690,"e%y]")],this[n(724,"uC!F")],this[n(813,"1i%J")],this,this[n(656,"y(@t")])),v=this[n(477,"m23]")][n(720,"m23]")](this[n(705,"C)3J")],0),this[n(834,"e54v")]=this.defaultAudioStatus,!this[n(498,"4fK)")]&&this[n(714,"n%B4")]&&this[n(858,"n[BW")]());if(c)this[n(805,"n%B4")]&&this[n(618,"^yX[")][n(561,"y(@t")]&&(this[n(756,"e^)J")]("play"),this[n(879,"e%y]")].play());else{if(!this[n(559,"wo*4")])return this[n(558,"m23]")]=!1,this[n(492,"uC!F")](),this[n(631,"l7ku")]=!1,null==this[n(721,"WqFg")]&&(this.playerInstance=new xt(n(742,"RgFV"),this[n(895,"n[BW")],this[n(699,"n[BW")][n(733,"4V[I")],this.decodeType,this._onChangeTypeCallback,this[n(754,"FHP5")],this[n(706,"reFT")],this)),v=this[n(840,"reFT")].play(this.url,0),this[n(623,"RgFV")]=this[n(495,"o6Lm")],!this[n(613,"L!7]")]&&this[n(794,"GV(q")]&&this[n(868,"ML(c")](),!1;this.playerInstance.on(n(528,"Wnj0"),(function(t){var e=n;if(a[e(788,"uC!F")]){if(0==a[e(614,"5n5*")])return void(a[e(815,"n[BW")]=t[e(761,"o6Lm")]);a[e(862,"ML(c")]!=t.decodedFrames?a[e(862,"ML(c")]=t.decodedFrames:(a[e(566,"1i%J")]=0,a.playerInstance&&(a[e(483,"#8CZ")][e(629,"gN$k")](),a[e(850,"1i%J")]=null,a[e(648,"FHP5")](a[e(659,"uC!F")],1,0)))}a[e(746,"FHP5")](g[e(689,"wo*4")],t)}))}return v}}}},s[o(854,"eoN(")]=function(){var t=o;if(this[t(723,"c#1J")])return this.callbackFunc("stop"),this[t(704,"#8CZ")]=!1,this._onConnectStatus(this,99),!!this[t(683,"L!7]")]&&(this[t(777,"5PPf")](),this[t(737,"e^)J")][t(553,"0R(A")](),this.showTimeLabel=!1,!0)},s[o(841,"Gd!C")]=function(){var t=o;this[t(675,"e54v")](t(615,"#oec")),this[t(816,"eoN(")]&&this[t(602,"1181")][t(569,"m23]")]()},s[o(609,"y(@t")]=function(){var t=o;this[t(522,"reFT")](t(598,"#8CZ")),this[t(809,"n[BW")]&&this[t(547,"&XMC")].continuePlay()},s[o(624,"9D1T")]=function(){var t=o;this[t(479,"ML(c")](t(719,"HW@j")),this[t(539,"5PPf")]&&this[t(805,"n%B4")][t(872,"doAq")]()},s[o(792,"5n5*")]=function(t,e){var i=o;this[i(471,"[uf*")]&&this[i(597,"5n5*")][i(767,"l7ku")](t,e)},s.seekToSecs=function(t){var e=o;this[e(505,"9D1T")]&&this[e(605,"l7ku")][e(567,"n[BW")](t,0)},s[o(894,"uC!F")]=function(t){var e=o;this[e(505,"9D1T")]&&this[e(726,"63En")].seek(t,1)},s[o(583,"^yX[")]=function(t,e){var i=o;this.playerInstance&&this[i(687,"C)3J")].setTrack(t,e)},s.openAudio=function(){var t=o;return this[t(675,"e54v")](t(568,"1181")),this[t(737,"e^)J")]&&(this[t(897,"HkRl")][t(716,"gN$k")]()?(r[t(708,"0R(A")](!0),this[t(807,"8@RW")]=!0):this[t(714,"n%B4")]=!1),this[t(746,"FHP5")]("audio",this[t(798,"nsHP")]),this[t(715,"UstW")]},s[o(864,"8@RW")]=function(){var t=o;if(this[t(734,"9D1T")](t(845,"c#1J")),this[t(726,"63En")]){if(!this[t(837,"L!7]")])return!0;this[t(645,"o6Lm")][t(826,"4V[I")]()?this[t(531,"ML(c")]=!1:this[t(688,"l7ku")]=!0}return this.emit(t(870,"doAq"),this[t(828,"JAzB")]),!this[t(778,"eoN(")]},s[o(810,"eoN(")]=function(t){var e=o;return null!=this[e(816,"eoN(")]&&(t?this[e(507,"gN$k")][e(672,"e^)J")]():this[e(651,"4fK)")][e(824,"^yX[")]())},s[o(769,"y(@t")]=function(){return this[o(836,"lmfv")]},s.canvasFullscreen=function(){var t=o,e=this[t(869,"4fK)")][t(692,"8@RW")];e[t(710,"wo*4")]?e[t(488,"JAzB")]():e.webkitRequestFullScreen?e[t(607,"n[BW")]():e[t(889,"#8CZ")]?e[t(889,"#8CZ")]():e[t(751,"^p@k")]&&e[t(750,"Wnj0")]()},s[o(685,"&XMC")]=function(){var t=o;document[t(635,"e54v")]?document[t(806,"reFT")]():document[t(611,"&XMC")]?document.webkitExitFullscreen():document[t(491,"cdCG")]?document.mozCancelFullScreen():document[t(873,"&XMC")]&&document[t(523,"c#1J")]()},s.fullscreen=function(t){var e=o;if(t){if(!this[e(508,"JAzB")])return this[e(585,"8@RW")](),this[e(775,"7So$")]=!0,!0}else if(this.fullScreenFlag)return this[e(599,"63En")](),this.fullScreenFlag=!1,!0},s[o(833,"^p@k")]=function(){var t=o;window[t(538,"4fK)")]=Bt.VSSModule;var e=new(function(){var e=t;function i(){var t=Te;this[t(575,"L!7]")]=null,this[t(663,"n[BW")]=null,this[t(632,"gN$k")]=null,this[t(500,"gN$k")]=null}var r=i[e(855,"e^)J")];return r[e(595,"l7ku")]=function(){var t=e,i=this;Object(Bt.VSSLoadWasmModule)(),window.vssPlayerModule[t(753,"Gd!C")]=function(){var e=t;window[e(786,"&XMC")]=!0,i[e(711,"63En")]=window[e(844,"[uf*")][e(536,"C)3J")](e(593,"o6Lm"),e(763,"m23]")),i.deinitModule=window[e(793,"8@RW")][e(540,"gN$k")](e(749,"1i%J"),"number"),i[e(722,"doAq")]=window[e(795,"1181")][e(745,"l7ku")](e(884,"8@RW"),e(808,"c#1J"),["number",e(785,"[uf*"),e(738,"HkRl"),e(574,"e54v"),e(521,"cdCG")]),i.initModule(),i.yuvData=window.vssPlayerModule._malloc(8294400)}},r.destroy=function(){var t=e;window[t(579,"HkRl")][t(617,"RgFV")](this[t(773,"UstW")])},i}());e.loadWebAssembly(),window[t(543,"m23]")]=e},s.d_a_ecr_cyp_t=function(t){var e=o,i=Ee.a[e(803,"y(@t")][e(812,"[uf*")][e(830,"1i%J")](t),r=Ee.a[e(586,"e^)J")][e(804,"GV(q")][e(661,"5PPf")](i);return Ee.a[e(524,"e54v")][e(682,"5PPf")](r,Object({words:Object({0:842019377,1:842019378,2:842019379,3:842019380}),sigBytes:16}),{iv:Object({words:Object({0:842019377,1:842019378,2:842019379,3:842019380}),sigBytes:16}),mode:Ee.a.mode[e(545,"cdCG")],padding:Ee.a[e(475,"doAq")].Pkcs7})[e(735,"5PPf")](Ee.a[e(584,"5PPf")][e(511,"WqFg")])[e(741,"wo*4")]()},s[o(802,"^p@k")]=function(t){this.emit("exportMessage",t)},s.$clearMessage=function(t){var e=o;this[e(899,"WqFg")](e(878,"JAzB"),t)},s[o(784,"63En")]=function(t,e,i){void 0===e&&(e="lefttop"),void 0===i&&(i=0),this[o(554,"#8CZ")]("osdMessage",t,e,i)},a}(_e);function Ie(){var t=["W4DSW6tcQeNcRColWPmhmG","eSoiw8oMW587kW","W5tcOmkkzGhdOCkxx8oqW4hdKfhdRCk6W7BdRddcNZP4WODNWRpcJSojWOxdSSkv","ACkFrmkMn8kfCq","W60atmkuEZnFxmoy","CLaeWQ/dLmkkhmkwW5LkW5Pi","W44bb1tcVG","BmkcqCkXlmkmCSk0emkomq","W50reeJcVmkY","W6rseetcRhXTm8otW5JdUCoYFe4DWOi","W58DtW3dN8kssM/cKYVcKaDa","5Q6d5z6p5yMQ5AA05y+NW57dKCk9","dCkhqmksvtRcGq","D1OsWQ/dNSkHm8ksW5PzW5vp","nmodW7H0W4zVW4pcJCk+m3FdTa","txKVWPtdT8koW7NdItVdJSo4WOJdMSkt","qSo6ySo2ESka","W5ldTmozshHLWRS","5Pky5PwN5zU+5P6b5PAE5PYmWQ4/5Aw7WO7NJitLT5xKUytLNQJMNzBMLyNMN7lLHiZJG5e","vf9UWPTheCk0jCojW4/cPe1EC0RcPcZcVCk+WOHdiCkT","W7nHW7JcTMJcICoDWPGkomkKWOjYWOL5tvVcUKqwqZRdVum0WQZdLg7cSei","WR1hhff3jNqp","W4Ljg8kZprJdRwBcUcCoprFcLCoj","rtxdT8oXWRnHW5rHiCowW5vjkSoL","W5b5W7VcVG","W550srPhhhhcR8o/xmoUBSkTAcJcQSk7jSkywq","D8oqW47cHa","WPNcLSkYWQSelYxcJG","WRFdT8okymovrSo7WR7cIa","jmomW69WW5fmW6xcN8kJjhhdOG","W5BdTmoEuvHPW5hcUmoMW5zPWP5t","WOmykfhcJ8odhq","EmorW5hcJCkXWQZdJ0JdTCoS","W5hcSSksWRxdU0dcTcxdOSkAuSkpWOXm","kh8BhrtdMKpdT2TDWR7dQSoo","k3FcPSk9","W4tcRtq","WPhdRmobCCovCCoTWQRcImo8","ESoWuLGOvZT7W5b2vmk7wh0","W790uIXla2m","WQ/dOSovEgzdW7qKW7yxWObbW73cGW","ACo9x00Vrbf+W6zSuq","W58vbW","j8oDW7jHW5TbW4NcKG","qCoJyCo8A8kauCoYpSo9W5JdU13cRG","Cmkyy8kSnSkUEmkZdCkZiSkay8oQ","W6errCkwwcDyxSoXWOtdNGm","W4bLW63cULNcGmokWRyBoCk/WRjIWPj2t0VcUW","cmoJm8kiW4ytmmk0","W4b0vtW","W4n3uJfhh03cPmo/xmojDCkIyq","WPpdKXynWOxcVmkqW7FcVSoKWOy","WP3cN8oIW5PdCadcQKCxemkx","WP1gkeNcP8kIW6ldSa","WPHodCkUrCo/rmkuW4tcVCkm","bCokW6XGW5frW5lcUmk4pNZdGM5EW6VdPv8","xSkGWP3dVCoiCIXfu8kzW5q","W5JdGSk6WPewjGNcTq","fSkYB8opWPONymo5W7BdNCoiuCo7umksvhZcK8kK","W4NdUmonxW","iNpcUCkS","h8k4DSoJWP8Sv8oLW6RdVG","WOtdGHeEWOtcNmklW5lcOSoUWOJdRJRcVKJcKSkQWQi","WPJcMSoNWRpdR8oDWRGNWRdcL8kF","bmkhumkoudJcSmo2W5jd","Af0cWQ/dG8kkpSkBW6noW5jCWOxdImkSWOJdImkIfG","BL01WQxdN8kkoSkuW4nVW49AWPBdMa","aLhdPN3cMSkEbJFcRrjIye48faPWfW","W54FqelcO3ahtSoiW6yGzG","W6DaauXLnLW","W5pcScb7W7xcMq","WOJcKIewWPxcLCkq","AmkwW4xcUmolWOVcQc3cRmkeW6aUW4dcNa","ACkydY4","evldQxlcMSkEoX/cRaDUAX8q","mCoAW7f5W6DbW5tcM8kOpfBdVwXl","E0BcQNibuw8bWRC","W4zVW7pcN0pcGq","g27cQCoX","W7udlCkai0e8","BmktrCkOmCkUEG","gSkOyCoJWRGMBCoYW7/dUmoj","WPHhcmkUq8oqsmkBW6tcOa","WQpdOmodDCopxSo2WO/cMmo7WPhdPvOaW7ZcRKDI","W54zv0ZcKNCPsSo1W7uIzG","nmooW7f5","cuRdVhVdHq","W4HfimkoWRjeW5JcOdnrACk+","fCkOEmoUWP47","W4zSW5eZW7hdR8oFf8kqWQKjtq","f8kosmo3W5iQaSkMW43cMSkwW6blW6eeuq","W44Wba","v1OsWQ/dNSkSoSkEW5buW48","W58yaKq","W58yaKtcTmkLW6ZdNwrPWRONtgS","WOHBamk2tSoTu8kwW6lcOmk3WQf2a8k/","WQZdIbyBWPJcNSky","sCkRWO/dSmoiyHLzwmkEW6L4c8ozDq","W6CEsmkyvIn6qmotWPJdNW","vCkVWPhdUG","uSoUBmoPBmktE8o3c8o8W5FdTG","cmkhwSkgxcK","W47cSmkMWRZdULpcIs7dHCkCuSkcWOr5hu4","oZKrWQKR","5yIS5Awe5yYw5Bw35A6c5OUI","D0afWPRdNCkfjSksW4vXW5rFWPFdGCk7","WRFdQCoeBCoFqmolWQdcNSoRWPNdPgOr","aKNdUMRcJW","WONcL8oJWRddVCo2WPqRWRZcIa","W6bpmvNcVuDn","z8o8C8ovySktyCo5p8oEW5JdPLpcGmouaSkl","CNT+r0pcJrW","omkFvG","W7hdVCoitSoTDmoA","W7LnnexcOhPIkmomW4ddQ8o/Bu4","c8oZnCkSW54FmSk/bMNcMSkdCvC","W54uxvdcKNCPsSoQW7eJCmoe","W7Wqi3vZpeCJW4NdSSkKDrG5","W77dH8k/WO0BeapcUMu3","F8oyW4ZcGa","W4HkW6xdPq","W5z2wJW","W45kkmkUWR9bW5lcPri","tmoyW7GeW6DTWRJdP8kvWQVdSf7dLmoJes8","ESoWuLG","qSoNB8oYwSkBDCo5aCoOW5VdSfi","W6TkAxtdU8kgt8kByCoCWQXNW53cKG","W4nHW4S","WOpcJmogWRpdUmoC","W4bGW5qR","f8k0y8oP","W6XmpeG","W5xdVCoAq2L0W4JcS8oNW4fTWP5eAq","WQJcVSoFW7aAW5KxW6y5dWmykIStlW","WPHig1m","jqhdVxSjA0CzWQK","qCoUDCo2AW","pWpdTa","W77cSCkDWPNdRLBcNd/dTmk+x8kaWPz9g1ddJa","W5f0sWXnaa","j2NcH8kfWQq","W6eaoKDKiq","W5jch8kObHldIh/cUae","W5lcSdzmW67cHNdcOd16Eq","54Q95P2myq","W6rejK/cPg9o","W5FcRCkaWPZdSLpcHc7dO8kJxmkfWPPffW","aL/dPgFcNCknerRcMqzHzG","EmoyW5BcL8k0WPe","WOydpSoSW7tcK8ovW4xcOmkmgmoA","F8kqeG7cICkZlmkz","WQldQ8og","W4DHW6xcRu3cN8o4WOicmCkLWR5dWOnYvq","bCkmua","W4D1W7NcQuNcGSokWQmhmmkZ","W5HwW6VdU8oGjKPbmCoFBSkNWOW1qq","sSoLFmopWOSHtmom","W6tcQSkp","pSoCW410W4frW4m","tNaRWOBdHSkvW53dGHVdN8o6WPu","WRFdHGqsWRxcLCkCW7ZcS8oVWPpdNIdcPedcKG","W4DIqY0","WPKplCoTW4BcMmo0W6xcVCkjhmoetSktW44","wCkKqSkQwXFcOq","A8ovW5NcMmkWWPddQuldO8oRfrWeWQC","W4n3uJe","xConW6ucW5zYWPZdPSkEWR7dLuddRmoMdYNcUmo6xJy","f8kyFSo8W5O5iq","ECowW4dcPCk6WO8","oH3dUwWTBgOEWRuzWRnRW7xdTa","W5HhpSkhWRvlW7JcQHTszSkU","jH7dVW","WOumlCoWW7tcJ8oFW4RcVCkogmoht8kA","W49vbSk5","WPXihfpcGSosigtcSrVcTcnWWRRdKahdLSokg8owkgFcKq","W53dQwW","WONcKmoKWQJdSmowWO4QWONcL8kAsa","W4hcSZLg","W75en1FcRhXUpSowW4ddJmoKyKClWO/dU8kOf3u","W77cSCkDWO/dTLpcKYZdTmk6sSkrWOPQe1hdHCkQWQiVhq","W5jcaSk5orpdJwBcGbypmXZcLmoiWPxdRIOE","D8oyW4VcLCkrWOFdG0pdTmo6edqvWQntWPO","W50Dr1tcOW","hSoZlmkgW4qFhSk2bf7cSmktvfDT","W7rcpSkhWRu","FmkzbYpcNSkGbSkCW7b4mCo5WRHp","EmoOqfe","W6lcSmkmzwZdQmkgvG","pSobW7LWW4XTW4a","CCkuW5dcPmoCWPFcGc/cI8kcW6GNW4tcNmoSk1enW48","W45klCkaWRXaW7RcVHfnAa","ASkFW5FcTmodWPW","jCksy8omW5m/kSk0W4tcOSkCW7nCW4CauX3cTrddHNm","5PcU5Pwy5z2V5z6Z5lMh6iot5lMO56MG","W64dlmkak0K3","W6VcUCkgotqfWOKyW4yRWODDW5W","bvVdU3/cJCkdcW","ESktW4pcKCocWPJcMa","WPWtbmofW4i","geVdVK/cNSkyeW","W5JdQh9ezf/cRSo+WRL5WQpcMmoPW5rzvmoTe2e","b8o3BCoFwCk0qa","W6OnpLfhjL8GW47dQmkMDtiX","C1ygWQBdKmkhoG","whGNWPK","oIeBWOW0WQ4","WR/dIbK8WP7cNSkrW7BcTmo+WRldTqJcVLZcLq","W4mrgSklWRraW5q","W7rliSkHWR9lW5xcRHzqvmkPrX4KhW","AKv0WRm","E1XHWQvhf8kRiSoEW57cQMPtCa","W78hoffUj0O8W5G","WPddIXygWPtcGSk2W73cPmo+WOddRWRcRW","e8ktzmo7W7nRaSk/W4dcKq","g8oZi8kBW4yzlmoG","W6hcTmkcAW","BmkvuSkMpCkUxSkXf8kwn8ks","WQ3cSCoiW6eMW7ms","Cv8xWRpdLmkwfSkzW4riW5PvWOhdIa","W4qpEMVcLq","W5XBW77dGCoUlNS","BSo5ue4PqczSW5nN","WP9kaSkTq8o7C8kgW7hcTG","WRxcKmoKWPVdVmomWQ0MWR3cNSkuEdhcTCo8W69dWOX9j8oOW7/dKW","W53cTI5A","lSkvzmo8WPS8nSk8W5BcHCkaW7ezW6aowGlcUvBdKtGPEc/dMhlcTslcSSkpWQzPd8kDWPddSbmguKXV","W5ddO8ox","FYnbwG","WRtdSCoxFCouvCoRWQJcLa","W68jpSkxi0a1vG40W7y","WO9if1BcGSosp27cPbVcVtu","W4lcTZDiW47cNwJcPGv0Asqu","W4DKW5m7","W6VcU8kgndOdW4GdW60tWQz/","W6lcRCkbyvxdTCklxCoB","5Q6j5z+x5yIQ6l6H6kwF6AcP5lYA5OcGW7FdLCov","WOHhdSk1C8o3sSkAW43cSSkkWQ10","AmofW68rW5HwWRddUSkdWQi","W7ndywRdTSka","d8ksvSkpzYNcHCo7W4Tih8o1","WR3dOComrwXC","msahWQ0JWOW3","W6Wuo0LJmLaNW7VdVSk6CW","sCkRWPhdSmosCI5yxSkCW58","WRJdQ8oavwzdW5afW6m1WObWW7lcJZu2WP3cM8ou","y1vPWRTkeq","DmojW53cJ8kuWPFdHexdVW","t2e9WP3cQa","WQ/dOSovEgfqW54HW5CgWOjaW6ZcGG","WQpdOmogzSodqSo2","W4Taf8kLlG/dPwtcPXahoHJcLa","W4mBba","W6Pao0RcPhTUpSowW4ddJmoKyKClWO/dU8kOf3u","BCkiW4G","kcicWRe+WReymYJdLmknA8otgW","WPaolCoRW73cMmoxW5hcQSktfG","W4HYsvNdL8kNuSk8uCo7WPjaW7dcStm","yNOGWQ7dUSkDW57dGc3dRSoGWPBdNmk1WQFcKSolnmo7WQug","BmkdW5tcPa","W4DHW6xcRu3cNW","WQdcUSopW6S6W5KGW7aTdW","DmkvW4m","eSkyzmoOW5mQ","xConW6CyW5vGWRRdTCkIWRNdTKFdKmo+dG","W4fTW6lcRW","u3a5W43dQ8kjW4BdGYNdJSo4W4JcL8oy","WPHodf3cJSoimwdcRHJcScm","WR7dU8oaBKbEW5mKW6aaWPu","rmowW5BcOSk6WOZdJKNdS8oRjWygWRzlWOW","iNxcQa","e8kkxmkwydtcICoQW65hg8o/FW","W5b6xYradgFcOCojrSom","ltWp","W7PIW5mCW7ZdOmosgCk1WQG0wSkPcu/dGa","WQVdP8ozzgzFW5KVW6e","W6HBW77dKmoPiNXchmkRtCkQWOe/","WRFdUSoaCxal","W4LdExJdU8khCSkZz8oeWQfAW53cHrKXtq","v8ocW6iaW7PUWR3dQ8kBWQ8","WRFdQCoeBq","W5tcRmkF","W5tcStLDW7BcKutcTI18za","cCo4imklW54FhSkVdhtcTW","dK7dRwxcVSkzfHJcSa","eLVdRwdcQ8kfhXtcJbzSDG","WPanjCo9","BCktu8k2nCkL","qCoJyCo8","pNBcRSkWWPldQJX/W5LFFH7cM1e","W4WBduVcTmkLW5hdTwv8WRyShuDqWQecW6i","gmksDColW5qZ","W7RdVSovB3XIW6dcQCoXW6vGWPfEwhJdNI8","W5WCdeO","tSoaW6OnW5jZWPddSmkeWR7dSLVdO8oV","c8kXDmo1WP47sSoYW6NdR8oCu8o0zG","AN9qW7TOW7fHgb/dG8kcqmof","WPddIXyg","vf9UWOLsaCkdomoiW7RcP2vjquZcIIG","rmowW5BcOSk9WOpdJKVdTColdqicWOfFWPmICqJdQvK","ncee","WRZdR8oAD2jc","E8kBW4JcRComWPJcGIJcMCkfW68J","WRpdQSo2ymoiw8oSWQK","W4TmW6xdOCoOn2DEha","emkouSkyus/cRCoHW5fsgmo0Cbq","W4/cQ8kEWQ7dU0a","WRBdVCoKyhzcW5G","W5qztCkFvq5ExmoqWPNdHa","W69jw3NdRmkDAmks","W41ioG","W78znLXKixOIW47dV8k1FJq6","xCodW6uaW4vUWRxdNmkwWRG","WPyxpSoOW6e","W7tcTCkkzG","fmkCymoQ","BmkztCkM","WPpcVSoFW6KAW5KxW6y5dXubhc8xjmk0W7u","WPzCm8kNvSoRqSkmW7xcLCkDWQr0fSkZgKPGW78","W5ZdTvLez0tcQSoHWPLnWR/cK8oIW4jiDSoKf3y","wmkVWPddS8ogDG5BCCkfW5v6","Dsb6w0NcNbRdN0P3WR7dHSopAXNcSmoKBLG2","W47cT8knr1hdO8kdr8ozW6ldN0ldSCklW7hcOte","W6rryq","a8kdx8knvJZcH8oKW6rtf8o5","E8kgxa","W4TWW67cTw3cMCoAWP4b","WOTdamk7qSoSBSkrW7lcP8kjWQz7aa","W53dP3Hvx1/cQ8o3WPveWQW","WOtdGHqqWPxcLCkBW5xcPCoRWOZdPbO","WQitoZ/cR8ofC8kGFSoSWPP5","x8o6BCoNA8ka","WPHddSkXqSoFuSkBW6JcVa","WP9ff0VdI8ooe3lcRKNcPxbMWPNdGapcMSoWfSonowVcNNBcTL0zWQRcHgz9wSkFW6K+WP1IW44ihajoW6elWRZdHSogWRX8n8k6ggRcJ8kKF3W","a1hdSe/cKmkb","WOCup8o5W4lcNSo3W4JcQW","W5v3rq","WOpcJmomWQNdTCouWQGSWQVcNSkExW","nCogW7PfW5HdW58","aSklxCkf","aLBdQwxcMmkjjH7cL0zzBbGqfG","fCoJn8kTW5mopG","AIjjv0lcMJRdNfXkWRhdGCoyzW","W6utm8kFgu0GFWq9W58cC8oR","W51nkmkhWR9GW5C","WQtdQCokz8oFC8o3WQRcHmoW","pCoZBCorAG82WPxcTKqp","WONcNSoMWRddU8ozWPGKWP/cJSkvuG","W59BW6NdUSoJjKPxcCkp","W7DLW7/cNKlcJCoCWPSlhmkJWRLyWOK","WQFcQSoEW7y7W5iaW500bWi","uGNcVtNdISkzfqhcPGjQ","gSodW7GqW7PKWQRdRCkwWQ3dTG","zmoPxKmOvW","W79sjNhcQMXEkSoAW73dPmo4EKizWOddOmk3f38","WO5af0W","W4tdPmopvu9PW6/cS8oXW5z4","W6vomG","oNpcOSkSW5FLVz3POi7KVlhML5RLRBZNSAtLN7S","W6XpmvNcOq","AConW4VcKCkgWOhdGuddTq","W5jZW7JcI0dcJCohWPiCemk5WRLeWOPY","W43dGmk6WOOyiIVcQ3u2cG","paldQ0uKF1OvWRqGWR1HW6pdVrG","a8kdxCkxvs4","WP5FeG","BL5HWR5oamkJoCojW4pcPa","W5rSW6RcOKNcNSo3WPKDkCk3WRnsWOm","W5JdGSk6WPernspcSgiRbmk0W4T1","WRZdR8oyBwfqW54HW4anWOu","WPxdQ25szvdcQmo3","WO/cKCoP","W6RdJ8kOWO1cCW","W4hcSZLgW7/cHKZcRtPHAI8BBq","W4b1W5qRW5xdU8oqemkLWR8vs8kTeW","W4fUW6RcUudcICo/WOiknmk5","fmkiymoTW54S","WPTbh0hcJSouo2/cSXRcSd5NWPK","k8o1y8oevr4wWPtcU04tbK9UWRK","W5b/W5e","qSo5sW","WPVcSmocW4CXW5iAW6W+hJqQot4loq","C8kFvSkM","WODmduZcR8odew7cPaVcTrz2WP3dIaG","kmoXBCokyXG+WO7cOvKbiujT","W5OAtf/cOSoPpNdcSq","WPxdLrS","W57dTM5pv0tcQ8o7WOi","W6euoKa","WPZcMCoPW5bdC17cJfixa8kOW6O","FITlqupcJsFdI19B","r8oMzmoGyCk3Dmo5imoSW5FdOq","B8kzcsNcNSkbo8ktW7DLpSoXWRq","W5BdVSoDtG","WRZdOSoBCMzWW4GUW6Wm","WRFcT8odW7mtW5mqW6W","mSobW7X3W5HhW6FcI8kPo38","ECkdtmkVc8kJB8k1hmkoemknDSo4","WRtcVSoEW7C7","W4KZW77dOW","FSkdvmkS","W7JdQgjvqvdcVmo/WQbKWQ7cISoIW5q","W6OBnKDTnNi5W5NdOSk7","W4vfiCkh","xCk7WPddS8o3Db9vuSkEW711hSox","W55cf8k+jXJdRx/cSa0j","oSoYDmo3AqC","AmkwW4xcUmomWPJcGIG","W5vHW5WMW7BdVmo1eSkLWQGgqmkRga","AI9Dxui","uSoUBSoZB8kb","W5XnkmkwWRG","FmoVqheHraTWW5fpwSkXtNtcPa","gCkrySo8W54FmCk3W4JcMq","DY/dVmo7W4BcQqbeW4zVsaa","W4VdM8kPWPOrkr7cLIqmeCk7W5XLjG","CYbms1/cPXu","yKyeWRJdLmkkk8k/WOjVW49AWPBdMmkT","WRtcS8onW707W449W6CUhGyWoY8","WRbrASobF1S1AHGIW7W","W4qsw1pcJIScq8ohW7C","oYycWQy8WQyfmHpcLCk6Bmoug1G","k8oPy8od","emkqxmkvwYNcNCo/W4C","iSkyvs/dGW","W4yAb1JcQCkyW4m","WOrDg1BcQSotfMJcRW","ACo9xvCSvG","W7avrmkvtcn6wCoBWRldMaLAACku","WOxdIH4l","W64rwSkoFInywSotWPtdLczeBmkkWO4","hSkZDmoUWPCSqSoPW77dSSos"];return(Ie=function(){return t})()}},function(t,e,i){"use strict";i.r(e);var r=i(0),n=(i(77),i(33)),o=i.n(n);function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}var s=function(t){for(var e,i=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},n=i.length;n--;)""!==i[n]&&((e=/([^=]*)=(.*)/.exec(i[n]).slice(1))[0]=e[0].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^['"](.*)['"]$/g,"$1"),r[e[0]]=e[1]);return r},h=function(t){var e,i;function r(){var e;return(e=t.call(this)||this).customParsers=[],e.tagMappers=[],e}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,a(e,i);var n=r.prototype;return n.push=function(t){var e,i,r=this;0!==(t=t.trim()).length&&("#"===t[0]?this.tagMappers.reduce((function(e,i){var r=i(t);return r===t?e:e.concat([r])}),[t]).forEach((function(t){for(var n=0;n<r.customParsers.length;n++)if(r.customParsers[n].call(r,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))r.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return i={type:"tag",tagType:"inf"},e[1]&&(i.duration=parseFloat(e[1])),e[2]&&(i.title=e[2]),void r.trigger("data",i);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"targetduration"},e[1]&&(i.duration=parseInt(e[1],10)),void r.trigger("data",i);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"totalduration"},e[1]&&(i.duration=parseInt(e[1],10)),void r.trigger("data",i);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"version"},e[1]&&(i.version=parseInt(e[1],10)),void r.trigger("data",i);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"media-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void r.trigger("data",i);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void r.trigger("data",i);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return i={type:"tag",tagType:"playlist-type"},e[1]&&(i.playlistType=e[1]),void r.trigger("data",i);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"byterange"},e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),void r.trigger("data",i);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return i={type:"tag",tagType:"allow-cache"},e[1]&&(i.allowed=!/NO/.test(e[1])),void r.trigger("data",i);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"map"},e[1]){var o=s(e[1]);if(o.URI&&(i.uri=o.URI),o.BYTERANGE){var a=o.BYTERANGE.split("@"),h=a[0],u=a[1];i.byterange={},h&&(i.byterange.length=parseInt(h,10)),u&&(i.byterange.offset=parseInt(u,10))}}r.trigger("data",i)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"stream-inf"},e[1]){if(i.attributes=s(e[1]),i.attributes.RESOLUTION){var l=i.attributes.RESOLUTION.split("x"),d={};l[0]&&(d.width=parseInt(l[0],10)),l[1]&&(d.height=parseInt(l[1],10)),i.attributes.RESOLUTION=d}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}r.trigger("data",i)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return i={type:"tag",tagType:"media"},e[1]&&(i.attributes=s(e[1])),void r.trigger("data",i);if(e=/^#EXT-X-ENDLIST/.exec(t))r.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t))r.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return i={type:"tag",tagType:"program-date-time"},e[1]&&(i.dateTimeString=e[1],i.dateTimeObject=new Date(e[1])),void r.trigger("data",i);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return i={type:"tag",tagType:"key"},e[1]&&(i.attributes=s(e[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(e=/^#EXT-X-START:?(.*)$/.exec(t))return i={type:"tag",tagType:"start"},e[1]&&(i.attributes=s(e[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void r.trigger("data",i);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out-cont"},e[1]?i.data=e[1]:i.data="",void r.trigger("data",i);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out"},e[1]?i.data=e[1]:i.data="",void r.trigger("data",i);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-in"},e[1]?i.data=e[1]:i.data="",void r.trigger("data",i);r.trigger("data",{type:"tag",data:t.slice(4)})}}}else r.trigger("data",{type:"comment",text:t.slice(1)})})):this.trigger("data",{type:"uri",uri:t}))},n.addParser=function(t){var e=this,i=t.expression,r=t.customType,n=t.dataParser,o=t.segment;"function"!=typeof n&&(n=function(t){return t}),this.customParsers.push((function(t){if(i.exec(t))return e.trigger("data",{type:"custom",data:n(t),customType:r,segment:o}),!0}))},n.addTagMapper=function(t){var e=t.expression,i=t.map;this.tagMappers.push((function(t){return e.test(t)?i(t):t}))},r}(o.a);function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}var l=function(t){var e,i;function r(){var e;return(e=t.call(this)||this).buffer="",e}return i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,u(e,i),r.prototype.push=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},r}(o.a),d=i(134),f=i.n(d);function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}var p=function(t){var e,i;function r(){var e;(e=t.call(this)||this).lineStream=new l,e.parseStream=new h,e.lineStream.pipe(e.parseStream);var i,r,n=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e),o=[],a={},s=function(){},u={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},d=0;return e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},e.parseStream.on("data",(function(t){var e,h;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&(a.byterange=e,e.length=t.length,"offset"in t||(this.trigger("info",{message:"defaulting offset to zero"}),t.offset=0)),"offset"in t&&(a.byterange=e,e.offset=t.offset)},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"})),t.duration>0&&(a.duration=t.duration),0===t.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=o},key:function(){if(t.attributes)if("NONE"!==t.attributes.METHOD)if(t.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:f()(t.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),r={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(r.iv=t.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,d=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){i={},t.uri&&(i.uri=t.uri),t.byterange&&(i.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=o,this.manifest.mediaGroups=this.manifest.mediaGroups||u,t.attributes?(a.attributes||(a.attributes={}),Object.assign(a.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||u,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME){var i=this.manifest.mediaGroups[t.attributes.TYPE];i[t.attributes["GROUP-ID"]]=i[t.attributes["GROUP-ID"]]||{},e=i[t.attributes["GROUP-ID"]],(h={default:/yes/i.test(t.attributes.DEFAULT)}).default?h.autoselect=!0:h.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(h.language=t.attributes.LANGUAGE),t.attributes.URI&&(h.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(h.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(h.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(h.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=h}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){d+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(o.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),a.dateTimeString=t.dateTimeString,a.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=t.data},"cue-out-cont":function(){a.cueOutCont=t.data},"cue-in":function(){a.cueIn=t.data}}[t.tagType]||s).call(n)},uri:function(){a.uri=t.uri,o.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),r&&(a.key=r),a.timeline=d,i&&(a.map=i),a={}},comment:function(){},custom:function(){t.segment?(a.custom=a.custom||{},a.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(n)})),e}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,c(e,i);var n=r.prototype;return n.push=function(t){this.lineStream.push(t)},n.end=function(){this.lineStream.push("\n")},n.addParser=function(t){this.parseStream.addParser(t)},n.addTagMapper=function(t){this.parseStream.addTagMapper(t)},r}(o.a),m=new WebAssembly.Memory({initial:256,maximum:256});new WebAssembly.Table({initial:0,maximum:0,element:"anyfunc"}),m.buffer.byteLength,e.default=function(t){t.url="",t.canvas=null,t.webGLPlayer=null,t.videoSampleQueue=[],t.audioSampleQueue=[],t.videoInterval=40,t.lastRenderTime=0,t.intervalVal=0,t.renderFrameCount=0,t.requestAbort=!1,t.pause=!1,t.cbStreamData=!0,t.reConnect=!0,t.isLiveStream=!0,t.seekTime=0,t.totalDuration=0,t.playDuration=0,t.startVideoPts=0,t.startAudioPts=0,t.tsFileList=[],t.getFileIndex=0,t.lastTsFile="",t.isFirstFile=!0,t.lastTsFileSequence=0,t.sequenceExceptNum=0,t.hlsTsPlaybackFileNo=-1,t.tsDemuxer=null,t.getFileCount=100,t.intervalHandle=-1,t.intervalValue=40,t.startDownloadTimeSecs=0;var e=function(t,e){if(t.indexOf("http")>=0)return t;for(var i=e,r=0,n=0;n>=0;)(n=i.indexOf("/"))>=0?(i=i.substring(n+1),r+=n+1):i=e.substring(0,r);return""!==t?i+t:i},i=function(){var e={cmd:r.tCloseStream,workerId:r.DOWNLOAD_WORKER_ID};t.postMessage(e),t.getFileIndex=0,t.hlsTsPlaybackFileNo=-1},n=function n(o,a){if(t.url=o,1!=t._requestAbort){if(!t.pause&&(!(t.totalDuration>0)||t.isLiveStream)){var s=new XMLHttpRequest;s.open("get",o,!0),s.responseType="text",s.onreadystatechange=function(){if(4==s.readyState&&(200==s.status||304==s.status)){var i=new p;i.push(s.responseText),i.end();var o=i.manifest;if("undefined"!==i.manifest.endList&&1==i.manifest.endList?t.isLiveStream=!1:t.isLiveStream=!0,o.segments.length<1){var h=t;return void r.sleep(3e3).then((function(){n(h.url,1)}))}var u=0,l=0;if(t.isLiveStream)if(""==t.lastTsFile){for(u=0;u<o.segments.length;u++){g={filename:c=e(o.segments[u].uri,t.url),duration:o.segments[u].duration};t.tsFileList.push(g)}var d=0;o.segments.length>2&&(d=o.segments.length-1-1),t.getFileIndex=d,t.lastTsFile=o.segments[d].uri}else{d=-1;var f=!1;for(u=0;u<o.segments.length;u++){c=e(o.segments[u].uri,t.url);if(o.segments[u].uri!==t.lastTsFile)if(d>=0){g={filename:c,duration:o.segments[u].duration};t.totalDuration+=o.segments[u].duration,t.tsFileList.push(g),f||(t.lastTsFile=o.segments[u].uri,f=!0)}else;else d=u,t.tsFileList.length=0,t.tsFileList=[],t.getFileIndex=0}if(d<0)for(t.tsFileList.length=0,t.tsFileList=[],t.getFileIndex=0,u=0;u<o.segments.length;u++){g={filename:c=e(o.segments[u].uri,t.url),duration:o.segments[u].duration};t.totalDuration+=o.segments[u].duration,t.tsFileList.push(g),t.lastTsFile=o.segments[u].uri}if(1===a)return}else{for(t.seekTime>0&&(t.getFileIndex=-1),u=0;u<o.segments.length;u++){var c=e(o.segments[u].uri,t.url),m=0;for(l=0;l<t.tsFileList.length;l++)if(t.tsFileList[l].filename===c){m=1;break}if(0==m){t.seekTime>0&&t.totalDuration>=t.seekTime&&t.getFileIndex<0&&(t.getFileIndex=u);var g={filename:c,duration:o.segments[u].duration};t.totalDuration+=o.segments[u].duration,t.tsFileList.push(g)}}t.getFileIndex<0&&(t.getFileIndex=0);var v={cmd:r.tMediaInfo,duration:t.totalDuration,live:t.isLiveStream,workerId:r.DOWNLOAD_WORKER_ID};t.postMessage(v)}if(t.tsFileList.length>0&&1==a){v={cmd:r.tOpenStream,workerId:r.DOWNLOAD_WORKER_ID};t.postMessage(v)}}},s.send()}}else i()},o=function e(){if(!(t.getFileCount++<1)){var o=!1;if(!t.pause)if(1!=t._requestAbort){if(t.isLiveStream){if(t.getFileCount=0,t.getFileIndex>=t.tsFileList.length||3==t.getFileCount)return void n(t.url,1);o=!0}else if(t.getFileIndex>=t.tsFileList.length){t.getFileIndex++;var a={cmd:r.tGetTsComplete,workerId:r.DOWNLOAD_WORKER_ID};return void t.postMessage(a)}var s=t.tsFileList[t.getFileIndex].filename;if(t.isLiveStream){var h=function(t){var e=t.split("-"),i=e.length;if(i>0){var r=e[i-1].split(".");if(r.length>0)return r[0]}return""}(s),u=parseInt(h);if(u>0&&u>t.lastTsFileSequence+1){t.sequenceExceptNum++;a={cmd:r.tResetMSE,workerId:r.DOWNLOAD_WORKER_ID,fileSequence:t.sequenceExceptNum};t.postMessage(a)}t.lastTsFileSequence=u}else if(t.hlsTsPlaybackFileNo==t.getFileIndex)return;var l=new XMLHttpRequest;l.open("get",s,!0),l.responseType="arraybuffer",l.onreadystatechange=function(){if(404==l.status)return r.MediaWorkerLog("current file not found. refresh list..."),void n(t.url,1);if(4==l.readyState&&(200==l.status||304==l.status)){var i=new Uint8Array(l.response),a=0;for(a=0;a<t.getFileIndex;a++)t.tsFileList[a].duration;var s={cmd:r.tFrameData,workerId:r.DOWNLOAD_WORKER_ID,mediaType:1,codecId:27,flag:0,pts:0,playTimeSec:0,dat:i};if(t.postMessage(s,[s.dat.buffer]),t.intervalHandle>=0&&(clearInterval(t.intervalHandle),t.intervalHandle=-1),!t.pause){var h=t.getFileIndex;h>=0&&h<t.tsFileList.length?t.intervalValue=1e3*t.tsFileList[h].duration-600:t.intervalValue=2e3,t.isFirstFile&&(t.isFirstFile=!1,t.intervalValue>900&&(t.intervalValue-=900)),t.intervalHandle=setInterval(e,t.intervalValue)}t.getFileCount=100,t.getFileIndex++,t.getFileIndex>=0&&(t.getFileIndex,t.tsFileList.length);s={cmd:r.tGetTsStreamRsp,workerId:r.DOWNLOAD_WORKER_ID};if(t.postMessage(s),o)return void n(t.url,0)}},l.send(),t.hlsTsPlaybackFileNo=t.getFileIndex}else i()}};t.addEventListener("message",(function(e){var a=e.data;e.data;switch(a.cmd){case r.tOpenStream:t.url=a.url,t.seekTime=a.time,n(a.url,1);break;case r.tGetTsStream:0==a.t&&o();break;case r.tReOpenStream:n(t.url,1);break;case r.tSeekStream:var s=a.time;1==a.type&&(s=a.time/100*t.totalDuration);var h=!1,u=0,l=0;for(l=0;l<t.tsFileList.length;l++)if((u+=t.tsFileList[l].duration)>s){t.getFileIndex=l,o();var d={cmd:r.tSeekStream,type:a.type,time:s};t.postMessage(d),h=!0;break}if(!h){d={cmd:r.tSeekStream,type:a.type,time:s};t.postMessage(d)}break;case r.tPauseStream:t.pause=!0;break;case r.tResumeStream:t.pause=!1,n(t.url,1);break;case r.tCloseStream:t._requestAbort=!0,t.seekTime=0,i()}}))}}]).default}));