videomail-client
Version:
A wicked npm package to record videos directly in the browser, wohooo!
21 lines • 485 kB
JavaScript
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).VideomailClient=e()}}((function(){return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},{}],2:[function(e,t,n){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],3:[function(e,t,n){var r,i;r=this,i=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){var o,s,a,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"passive";if(void 0!==e.addEventListener){var l=r.SupportMap[u]?Object.assign({},i,(a=!0,(s=u)in(o={})?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a,o)):i;e.addEventListener(t,n,l)}};var r=n(1)},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SupportMap=void 0;var i=n(2);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=(o(r={},i.PASSIVE,!1),o(r,i.CAPTURE,!1),o(r,i.ONCE,!1),r);t.SupportMap=(Object.keys(s).forEach((function(e,t){s[e]=function(e){if(s[e])return s[e];try{var t=Object.defineProperty({},e,{get:function(){s[e]=!0}});window.addEventListener("test",null,t),window.removeListener("test",null)}catch(e){}return s[e]}(e)})),s)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PASSIVE="passive",t.CAPTURE="capture",t.ONCE="once"}])},"object"==typeof n&&"object"==typeof t?t.exports=i():"object"==typeof n?n["add-eventlistener-with-options"]=i():r["add-eventlistener-with-options"]=i()},{}],4:[function(e,t,n){var r,i=e("events").EventEmitter,o=e("inherits"),s=e("raf"),a={requestAnimationFrame:s,cancelAnimationFrame:s.cancel};function u(){return!0}function l(e){e=e||{},this.__delay=e.delay||0,this.fixedDelta=!!e.fixedDelta,this.frameCount=0,this.deltaTime=0,this.elapsedTime=0,this.__running=!1,this.__completed=!1,this.setFPS(e.fps||1/0),this.setRequestAnimationFrameObject(e.requestAnimationFrameObject||a)}function c(e){var t,r=Date.now();if(e.__running)return e;n.running+=1,e.__running=!0,e.__lastTime=r,e.deltaTime=0,e.emit("start",e.deltaTime,0,e.frameCount);var i=e.requestAnimationFrameObject,o=function(){if(i!==e.requestAnimationFrameObject)return i=e.requestAnimationFrameObject,void e.requestAnimationFrameObject.requestAnimationFrame(o);e.__isReadyForUpdate()&&e.update(),e.__running?t=e.requestAnimationFrameObject.requestAnimationFrame(o):e.requestAnimationFrameObject.cancelAnimationFrame(t)};return e.requestAnimationFrameObject.requestAnimationFrame(o),e}for(var f in o(l,i),r={off:i.prototype.removeListener,trigger:i.prototype.emit,complete:function(){return this.stop(),this.__completed=!0,this.emit("complete",this.frameCount,this.deltaTime),this},dispose:function(){return this.stop(),this.removeAllListeners(),this},getDeltaTime:function(){return this.deltaTime},getElapsedTime:function(){return this.elapsedTime},getFPS:function(){return this.deltaTime>0?1e3/this.deltaTime:0},getFPSLimit:function(){return this.__fps},getFrameCount:function(){return this.frameCount},getRequestAnimationFrameObject:function(){return this.requestAnimationFrameObject},isRunning:function(){return this.__running},isCompleted:function(){return this.__completed},reset:function(){return this.stop(),this.__completed=!1,this.__lastTime=0,this.deltaTime=0,this.elapsedTime=0,this.frameCount=0,this.emit("reset",0,0,this.frameCount),this},setFPS:function(e){return this.__fps=e,this.__isReadyForUpdate=function(e){var t=1e3/e,n=Date.now();if(e<=0||e===1/0)return u;var r=Math.ceil(1e3/60)/2;return function(){var e=Date.now();return!(e-n<t-r||(n=e,0))}}(e),this},setRequestAnimationFrameObject:function(e){if("function"!=typeof e.requestAnimationFrame||"function"!=typeof e.cancelAnimationFrame)throw new Error("Invalid object provide to `setRequestAnimationFrameObject`");return this.requestAnimationFrameObject=e,this},start:function(){var e=this;return this.__delay?setTimeout((function(){c(e)}),this.__delay):c(this),this},stop:function(){return this.__running&&(this.__running=!1,n.running-=1,this.emit("stop",this.deltaTime,this.elapsedTime,this.frameCount)),this},update:function(){this.frameCount++;var e=Date.now();return this.__lastTime=this.__lastTime||e,this.deltaTime=this.fixedDelta||n.globalFixedDelta?1e3/Math.min(60,this.__fps):e-this.__lastTime,this.elapsedTime+=this.deltaTime,this.__lastTime=e,this.emit("update",this.deltaTime,this.elapsedTime,this.frameCount),this}})l.prototype[f]=r[f];function d(e,t){1===arguments.length&&"function"==typeof e&&(t=e,e={});var n=new l(e);return t&&n.on("update",t),n}function p(e,t){return"function"==typeof e.bind?e.bind(t):function(){return e.apply(t,arguments)}}t.exports=n=d,n.bound=function(e,t){for(var n,r=d(e,t),i=function(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;r++)"function"==typeof e[t[r]]&&n.push(t[r]);return n}(l.prototype),o=!!Function.prototype.bind,s=0;s<i.length;s++)r[n=i[s]]=o?r[n].bind(r):p(r[n],r);return r},n.Animitter=l,n.globalFixedDelta=!1,n.EventEmitter=i,n.running=0,Date.now=Date.now||function(){return(new Date).getTime()}},{events:281,inherits:305,raf:328}],5:[function(e,t,n){(function(e){(function(){!function(n){"use strict";var r,i="function"==typeof(r=n.atob)?r:"function"==typeof e?function(t){
//!! Deliberately using an API that's deprecated in node.js because
//!! this file is for browsers and we expect them to cope with it.
//!! Discussion: github.com/node-browser-compat/atob/pull/9
return new e(t,"base64").toString("binary")}:"object"==typeof n.base64js?function(e){var t=n.base64js.b64ToByteArray(e);return Array.prototype.map.call(t,(function(e){return String.fromCharCode(e)})).join("")}:function(){throw new Error("You're probably in an old browser or an iOS webworker. It might help to include beatgammit's base64-js.")};n.atob=i,"object"==typeof t&&t&&t.exports&&(t.exports=i)}(window)}).call(this)}).call(this,e("buffer").Buffer)},{buffer:11}],6:[function(e,t,n){var r=e("typedarray-to-buffer"),i=e("validate.io-float32array");t.exports=function(e){if(!e)throw new Error("A Float32Array parameter is missing.");if(!i(e))throw new Error("The parameter is not a Float32Array.");this.toBuffer=function(){var t,n=e.length,i=new Int16Array(n);for(t=0;t<n;t++)i[t]=32767*Math.min(1,e[t]);return r(i)}}},{"typedarray-to-buffer":354,"validate.io-float32array":360}],7:[function(e,t,n){(function(e){(function(){"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],r="undefined"==typeof globalThis?e:globalThis;t.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof r[n[t]]&&(e[e.length]=n[t]);return e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],8:[function(e,t,n){"use strict";n.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){var t,n,r=u(e),s=r[0],a=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),c=0,f=a>0?s-4:s;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(l(e,a,a+s>u?u:a+s));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){},{}],10:[function(e,t,n){
/*!
* Cross-Browser Split 1.1.1
* Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
* Available under the MIT License
* ECMAScript compliant, uniform cross-browser split method
*/
t.exports=function(e){var t,n=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,i,o){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,o);var s,a,u,l,c=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),d=0;i=new RegExp(i.source,f+"g");for(t+="",r||(s=new RegExp("^"+i.source+"$(?!\\s)",f)),o=o===e?-1>>>0:o>>>0;(a=i.exec(t))&&!((u=a.index+a[0].length)>d&&(c.push(t.slice(d,a.index)),!r&&a.length>1&&a[0].replace(s,(function(){for(var t=1;t<arguments.length-2;t++)arguments[t]===e&&(a[t]=e)})),a.length>1&&a.index<t.length&&Array.prototype.push.apply(c,a.slice(1)),l=a[0].length,d=u,c.length>=o));)i.lastIndex===a.index&&i.lastIndex++;return d===t.length?!l&&i.test("")||c.push(""):c.push(t.slice(d)),c.length>o?c.slice(0,o):c},t}()},{}],11:[function(e,t,n){(function(t){(function(){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var t=e("base64-js"),r=e("ieee754");n.Buffer=s,n.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},n.INSPECT_MAX_BYTES=50;var i=2147483647;function o(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return a(e,t,n)}function a(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|d(e,t),r=o(n),i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=s.prototype,r}(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return s.from(r,t,n);var i=function(e){if(s.isBuffer(e)){var t=0|f(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||q(e.length)?o(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return u(e),o(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),n=o(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function d(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(i)return r?-1:D(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var f=!0,d=0;d<u;d++)if(l(e,o+d)!==l(t,d)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(q(a))return s;e[n+s]=a}return s}function g(e,t,n,r){return U(D(t,e.length-n),e,n,r)}function v(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return v(e,t,n,r)}function j(e,t,n,r){return U(B(t),e,n,r)}function E(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&l)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&l)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=S));return n}(r)}n.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,n){return a(e,t,n)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},s.allocUnsafe=function(e){return l(e)},s.allocUnsafeSlow=function(e){return l(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(F(o,Uint8Array)&&(o=s.from(o)),!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?_(this,0,e):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,n,r,i){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n),f=0;f<u;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return g(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return j(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function A(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function R(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function k(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=L(e[o]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function T(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(e,t,n,i,o){return t=+t,n>>>=0,o||M(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function C(e,t,n,i,o){return t=+t,n>>>=0,o||M(e,0,n,8),r.write(e,t,n,i,52,8),n+8}s.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=s.prototype,r},s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),r.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),r.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),r.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),r.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},s.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var o=i-1;o>=0;--o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return i},s.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=s.isBuffer(e)?e:s.from(e,r),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=a[o%u]}return this};var N=/[^+/0-9A-Za-z-_]/g;function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function B(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":8,buffer:11,ieee754:303}],12:[function(e,t,n){"use strict";var r=e("get-intrinsic"),i=e("./"),o=i(r("String.prototype.indexOf"));t.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},{"./":13,"get-intrinsic":288}],13:[function(e,t,n){"use strict";var r=e("function-bind"),i=e("get-intrinsic"),o=e("set-function-length"),s=i("%TypeError%"),a=i("%Function.prototype.apply%"),u=i("%Function.prototype.call%"),l=i("%Reflect.apply%",!0)||r.call(u,a),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}t.exports=function(e){if("function"!=typeof e)throw new s("a function is required");var t=l(r,u,arguments);return o(t,1+f(0,e.length-(arguments.length-1)),!0)};var d=function(){return l(r,a,arguments)};c?c(t.exports,"apply",{value:d}):t.exports.apply=d},{"function-bind":286,"get-intrinsic":288,"set-function-length":345}],14:[function(e,t,n){var r,i=e("typedarray-to-buffer"),o=e("atob"),s="undefined"!=typeof document&&"function"==typeof document.createElement;t.exports=function(e,t){void 0===t&&(t={});var n=this;if(t.image=t.image?t.image:{},t.image.types=t.image.types?t.image.types:[],t.image.types.length>2)throw new Error("Too many image types are specified!");t.image.types.length<1&&(t.image.types=s?["webp","jpeg"]:["png"]),t.image.quality||(t.image.quality=.5);var a=parseFloat(t.image.quality);function u(e){var n;return t.image.types[e]&&(n="image/"+t.image.types[e]),n}function l(e,n){var r=e&&e.match(n);return r&&t.debug&&t.debug("Image type %s verified",n),r}function c(){var t;return s?(t=document.createElement("canvas")).width=t.height=1:t=e,t}function f(e,t){try{c().toDataURL(e,(function(n,r){n?t(n):t(null,l(r,e))}))}catch(e){t(null,!1)}}function d(e){var n;try{var r=c();n=l(r.toDataURL&&r.toDataURL(e),e)}catch(n){t.debug&&t.logger.debug("Failed to call toDataURL() on canvas for image type %s",e)}return n}function p(e){var n=u(0);if(!e)return function(e){return d(e)||t.image.types[1]&&d(e=u(1))||(e=null),!e&&t.debug&&t.logger.debug("Unable to verify image type"),e}(n);!function(e,t){f(e,(function(n,r){n?t(n):r?t(null,e):f(e=u(1),(function(n,r){n?t(n):t(null,r?e:null)}))}))}(n,e)}function h(e){var t,r=e.split(",")[1];if("function"==typeof o)t=o(r);else{if("function"!=typeof n.constructor.atob)throw new Error("atob function is missing");t=n.constructor.atob(r)}for(var s=new Uint8Array(t.length),a=0,u=t.length;a<u;a++)s[a]=t.charCodeAt(a);return i(s)}this.toBuffer=function(t){if(!t)return(i=n.getImageType())&&(r=h(e.toDataURL(i,a))),r;var r,i;!function(t){n.getImageType((function(n,r){n?t(n):r?e.toDataURL(r,(function(e,n){e?t(e):t(null,h(n))})):t()}))}(t)},this.getImageType=function(e){if(!e)return r&&s||(r=p()),r;r&&s?e(null,r):p((function(t,n){t?e(t):e(null,r=n)}))}}},{atob:5,"typedarray-to-buffer":354}],15:[function(e,t,n){var r=e("indexof");function i(e){return!!e}t.exports=function(e){var t=e.classList;if(t)return t;var n={add:o,remove:s,contains:a,toggle:function(e){return a(e)?(s(e),!1):(o(e),!0)},toString:function(){return e.className},length:0,item:function(e){return u()[e]||null}};return n;function o(e){var t=u();r(t,e)>-1||(t.push(e),l(t))}function s(e){var t=u(),n=r(t,e);-1!==n&&(t.splice(n,1),l(t))}function a(e){return r(u(),e)>-1}function u(){return function(e,t){for(var n=[],r=0;r<e.length;r++)t(e[r])&&n.push(e[r]);return n}(e.className.split(" "),i)}function l(t){var r=t.length;e.className=t.join(" "),n.length=r;for(var i=0;i<t.length;i++)n[i]=t[i];delete t[r]}}},{indexof:304}],16:[function(e,t,n){
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
"document"in self&&(!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))?function(e){"use strict";if("Element"in e){var t="classList",n="prototype",r=e.Element[n],i=Object,o=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[n].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},a=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},u=function(e,t){if(""===t)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(e,t)},l=function(e){for(var t=o.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],r=0,i=n.length;r<i;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},c=l[n]=[],f=function(){return new l(this)};if(a[n]=Error[n],c.item=function(e){return this[e]||null},c.contains=function(e){return-1!==u(this,e+="")},c.add=function(){var e,t=arguments,n=0,r=t.length,i=!1;do{-1===u(this,e=t[n]+"")&&(this.push(e),i=!0)}while(++n<r);i&&this._updateClassName()},c.remove=function(){var e,t,n=arguments,r=0,i=n.length,o=!1;do{for(t=u(this,e=n[r]+"");-1!==t;)this.splice(t,1),o=!0,t=u(this,e)}while(++r<i);o&&this._updateClassName()},c.toggle=function(e,t){e+="";var n=this.contains(e),r=n?!0!==t&&"remove":!1!==t&&"add";return r&&this[r](e),!0===t||!1===t?t:!n},c.toString=function(){return this.join(" ")},i.defineProperty){var d={get:f,enumerable:!0,configurable:!0};try{i.defineProperty(r,t,d)}catch(e){-2146823252===e.number&&(d.enumerable=!1,i.defineProperty(r,t,d))}}else i[n].__defineGetter__&&r.__defineGetter__(t,f)}}(self):function(){"use strict";var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var n,r=arguments.length;for(n=0;n<r;n++)e=arguments[n],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}e=null}())},{}],17:[function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}void 0!==t&&(t.exports=r),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],18:[function(e,t,n){t.exports=function(e,t){if(e.contains)return e.contains(t);var n=e.compareDocumentPosition(t);return 0===n||16&n}},{}],19:[function(e,t,n){"use strict";var r=e("../internals/is-callable"),i=e("../internals/try-to-string"),o=TypeError;t.exports=function(e){if(r(e))return e;throw new o(i(e)+" is not a function")}},{"../internals/is-callable":110,"../internals/try-to-string":193}],20:[function(e,t,n){"use strict";var r=e("../internals/is-constructor"),i=e("../internals/try-to-string"),o=TypeError;t.exports=function(e){if(r(e))return e;throw new o(i(e)+" is not a constructor")}},{"../internals/is-constructor":111,"../internals/try-to-string":193}],21:[function(e,t,n){"use strict";var r=e("../internals/is-callable"),i=String,o=TypeError;t.exports=function(e){if("object"==typeof e||r(e))return e;throw new o("Can't set "+i(e)+" as a prototype")}},{"../internals/is-callable":110}],22:[function(e,t,n){"use strict";var r=e("../internals/well-known-symbol"),i=e("../internals/object-create"),o=e("../internals/object-define-property").f,s=r("unscopables"),a=Array.prototype;void 0===a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(e){a[s][e]=!0}},{"../internals/object-create":135,"../internals/object-define-property":137,"../internals/well-known-symbol":205}],23:[function(e,t,n){"use strict";var r=e("../internals/string-multibyte").charAt;t.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},{"../internals/string-multibyte":172}],24:[function(e,t,n){"use strict";var r=e("../internals/object-is-prototype-of"),i=TypeError;t.exports=function(e,t){if(r(t,e))return e;throw new i("Incorrect invocation")}},{"../internals/object-is-prototype-of":143}],25:[function(e,t,n){"use strict";var r=e("../internals/is-object"),i=String,o=TypeError;t.exports=function(e){if(r(e))return e;throw new o(i(e)+" is not an object")}},{"../internals/is-object":115}],26:[function(e,t,n){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],27:[function(e,t,n){"use strict";var r,i,o,s=e("../internals/array-buffer-basic-detection"),a=e("../internals/descriptors"),u=e("../internals/global"),l=e("../internals/is-callable"),c=e("../internals/is-object"),f=e("../internals/has-own-property"),d=e("../internals/classof"),p=e("../internals/try-to-string"),h=e("../internals/create-non-enumerable-property"),y=e("../internals/define-built-in"),m=e("../internals/define-built-in-accessor"),b=e("../internals/object-is-prototype-of"),g=e("../internals/object-get-prototype-of"),v=e("../internals/object-set-prototype-of"),w=e("../internals/well-known-symbol"),j=e("../internals/uid"),E=e("../internals/internal-state"),x=E.enforce,_=E.get,S=u.Int8Array,A=S&&S.prototype,R=u.Uint8ClampedArray,k=R&&R.prototype,O=S&&g(S),T=A&&g(A),I=Object.prototype,M=u.TypeError,P=w("toStringTag"),C=j("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",L=s&&!!v&&"Opera"!==d(u.opera),D=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},F=function(e){var t=g(e);if(c(t)){var n=_(t);return n&&f(n,N)?n[N]:F(t)}},q=function(e){if(!c(e))return!1;var t=d(e);return f(B,t)||f(U,t)};for(r in B)(o=(i=u[r])&&i.prototype)?x(o)[N]=i:L=!1;for(r in U)(o=(i=u[r])&&i.prototype)&&(x(o)[N]=i);if((!L||!l(O)||O===Function.prototype)&&(O=function(){throw new M("Incorrect invocation")},L))for(r in B)u[r]&&v(u[r],O);if((!L||!T||T===I)&&(T=O.prototype,L))for(r in B)u[r]&&v(u[r].prototype,T);if(L&&g(k)!==T&&v(k,T),a&&!f(T,P))for(r in D=!0,m(T,P,{configurable:!0,get:function(){return c(this)?this[C]:void 0}}),B)u[r]&&h(u[r],C,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:L,TYPED_ARRAY_TAG:D&&C,aTypedArray:function(e){if(q(e))return e;throw new M("Target is not a typed array")},aTypedArrayConstructor:function(e){if(l(e)&&(!v||b(O,e)))return e;throw new M(p(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(a){if(n)for(var i in B){var o=u[i];if(o&&f(o.prototype,e))try{delete o.prototype[e]}catch(n){try{o.prototype[e]=t}catch(e){}}}T[e]&&!n||y(T,e,n?t:L&&A[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(a){if(v){if(n)for(r in B)if((i=u[r])&&f(i,e))try{delete i[e]}catch(e){}if(O[e]&&!n)return;try{return y(O,e,n?t:L&&O[e]||t)}catch(e){}}for(r in B)!(i=u[r])||i[e]&&!n||y(i,e,t)}},getTypedArrayConstructor:F,isView:function(e){if(!c(e))return!1;var t=d(e);return"DataView"===t||f(B,t)||f(U,t)},isTypedArray:q,TypedArray:O,TypedArrayPrototype:T}},{"../internals/array-buffer-basic-detection":26,"../internals/classof":48,"../internals/create-non-enumerable-property":52,"../internals/define-built-in":56,"../internals/define-built-in-accessor":55,"../internals/descriptors":60,"../internals/global":96,"../internals/has-own-property":97,"../internals/internal-state":106,"../internals/is-callable":110,"../internals/is-object":115,"../internals/object-get-prototype-of":142,"../internals/object-is-prototype-of":143,"../internals/object-set-prototype-of":147,"../internals/try-to-string":193,"../internals/uid":199,"../internals/well-known-symbol":205}],28:[function(e,t,n){"use strict";var r=e("../internals/global"),i=e("../internals/function-uncurry-this"),o=e("../internals/descriptors"),s=e("../internals/array-buffer-basic-detection"),a=e("../internals/function-name"),u=e("../internals/create-non-enumerable-property"),l=e("../internals/define-built-in-accessor"),c=e("../internals/define-built-ins"),f=e("../internals/fails"),d=e("../internals/an-instance"),p=e("../internals/to-integer-or-infinity"),h=e("../internals/to-length"),y=e("../internals/to-index"),m=e("../internals/math-fround"),b=e("../internals/ieee754"),g=e("../internals/object-get-prototype-of"),v=e("../internals/object-set-prototype-of"),w=e("../internals/object-get-own-property-names").f,j=e("../internals/array-fill"),E=e("../internals/array-slice-simple"),x=e("../internals/set-to-string-tag"),_=e("../internals/internal-state"),S=a.PROPER,A=a.CONFIGURABLE,R="ArrayBuffer",k="DataView",O="prototype",T="Wrong index",I=_.getterFor(R),M=_.getterFor(k),P=_.set,C=r[R],N=C,L=N&&N[O],D=r[k],B=D&&D[O],U=Object.prototype,F=r.Array,q=r.RangeError,W=i(j),H=i([].reverse),z=b.pack,V=b.unpack,G=function(e){return[255&e]},$=function(e){return[255&e,e>>8&255]},Y=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},J=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},K=function(e){return z(m(e),23,4)},X=function(e){return z(e,52,8)},Q=function(e,t,n){l(e[O],t,{configurable:!0,get:function(){return n(this)[t]}})},Z=function(e,t,n,r){var i=M(e),o=y(n),s=!!r;if(o+t>i.byteLength)throw new q(T);var a=i.bytes,u=o+i.byteOffset,l=E(a,u,u+t);return s?l:H(l)},ee=function(e,t,n,r,i,o){var s=M(e),a=y(n),u=r(+i),l=!!o;if(a+t>s.byteLength)throw new q(T);for(var c=s.bytes,f=a+s.byteOffset,d=0;d<t;d++)c[f+d]=u[l?d:t-d-1]};if(s){var te=S&&C.name!==R;if(f((function(){C(1)}))&&f((function(){new C(-1)}))&&!f((function(){return new C,new C(1.5),new C(NaN),1!==C.length||te&&!A})))te&&A&&u(C,"name",R);else{(N=function(e){return d(this,L),new C(y(e))})[O]=L;for(var ne,re=w(C),ie=0;re.length>ie;)(ne=re[ie++])in N||u(N,ne,C[ne]);L.constructor=N}v&&g(B)!==U&&v(B,U);var oe=new D(new N(2)),se=i(B.setInt8);oe.setInt8(0,2147483648),oe.setInt8(1,2147483649),!oe.getInt8(0)&&oe.getInt8(1)||c(B,{setInt8:function(e,t){se(this,e,t<<24>>24)},setUint8:function(e,t){se(this,e,t<<24>>24)}},{unsafe:!0})}else L=(N=function(e){d(this,L);var t=y(e);P(this,{type:R,bytes:W(F(t),0),byteLength:t}),o||(this.byteLength=t,this.detached=!1)})[O],B=(D=function(e,t,n){d(this,B),d(e,L);var r=I(e),i=r.byteLength,s=p(t);if(s<0||s>i)throw new q("Wrong offset");if(s+(n=void 0===n?i-s:h(n))>i)throw new q("Wrong length");P(this,{type:k,buffer:e,byteLength:n,byteOffset:s,bytes:r.bytes}),o||(this.buffer=e,this.byteLength=n,this.byteOffset=s)})[O],o&&(Q(N,"byteLength",I),Q(D,"buffer",M),Q(D,"byteLength",M),Q(D,"byteOffset",M)),c(B,{getInt8:function(e){return Z(this,1,e)[0]<<24>>24},getUint8:function(e){return Z(this,1,e)[0]},getInt16:function(e){var t=Z(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Z(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return J(Z(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return J(Z(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return V(Z(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return V(Z(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){ee(this,1,e,G,t)},setUint8:function(e,t){ee(this,1,e,G,t)},setInt16:function(e,t){ee(this,2,e,$,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){ee(this,2,e,$,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){ee(this,4,e,Y,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){ee(this,4,e,Y,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){ee(this,4,e,K,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){ee(this,8,e,X,t,arguments.length>2&&arguments[2])}});x(N,R),x(D,k),t.exports={ArrayBuffer:N,DataView:D}},{"../internals/an-instance":24,"../internals/array-buffer-basic-detection":26,"../internals/array-fill":30,"../internals/array-slice-simple":40,"../internals/create-non-enumerable-property":52,"../internals/define-built-in-accessor":55,"../internals/define-built-ins":57,"../internals/descriptors":60,"../internals/fails":80,"../internals/function-name":87,"../internals/function-uncurry-this":90,"../internals/global":96,"../internals/ieee754":102,"../internals/internal-state":106,"../internals/math-fround":127,"../internals/object-get-own-property-names":140,"../internals/object-get-prototype-of":142,"../internals/object-set-prototype-of":147,"../internals/set-to-string-tag":167,"../internals/to-index":181,"../internals/to-integer-or-infinity":183,"../internals/to-length":184}],29:[function(e,t,n){"use strict";var r=e("../internals/to-object"),i=e("../internals/to-absolute-index"),o=e("../internals/length-of-array-like"),s=e("../internals/delete-property-or-throw"),a=Math.min;t.exports=[].copyWithin||function(e,t){var n=r(this),u=o(n),l=i(e,u),c=i(t,u),f=arguments.length>2?arguments[2]:void 0,d=a((void 0===f?u:i(f,u))-c,u-l),p=1;for(c<l&&l<c+d&&(p=-1,c+=d-1,l+=d-1);d-- >0;)c in n?n[l]=n[c]:s(n,l),l+=p,c+=p;return n}},{"../internals/delete-property-or-throw":59,"../internals/length-of-array-like":124,"../internals/to-absolute-index":179,"../internals/to-object":185}],30:[function(e,t,n){"use strict";var r=e("../internals/to-object"),i=e("../internals/to-absolute-index"),o=e("../internals/length-of-array-like");t.exports=function(e){for(var t=r(this),n=o(t),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>a;)t[a++]=e;return t}},{"../internals/length-of-array-like":124,"../internals/to-absolute-index":179,"../internals/to-object":185}],31:[function(e,t,n){"use strict";var r=e("../internals/array-iteration").forEach,i=e("../internals/array-method-is-strict")("forEach");t.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":35,"../internals/array-method-is-strict":38}],32:[function(e,t,n){"use strict";var r=e("../internals/length-of-array-like");t.exports=function(e,t){for(var n=0,i=r(t),o=new e(i);i>n;)o[n]=t[n++];return o}},{"../internals/length-of-array-like":124}],33:[function(e,t,n){"use strict";var r=e("../internals/function-bind-context"),i=e("../internals/function-call"),o=e("../internals/to-object"),s=e("../internals/call-with-safe-iteration-closing"),a=e("../internals/is-array-iterator-method"),u=e("../internals/is-constructor"),l=e("../internals/length-of-array-like"),c=e